Apolyton Archive  |  Preserved copy of the Apolyton Civilization Site and its forums as they stood in September 2005. Read-only; nothing here can be posted to or replied to.  |  Forum index |  About this archive |  The 1998–2001 UBB forums
Today on Apolyton WARDELL INTERVIEW PROMO A.C.S. HISTORY CHAPTER 4 GET CIV4 /w FREE PLUS! A.C.S. PHOTO GALLERY GET A.O.M. V1.1
Apolyton Civilization Forums
main| civ2| civ3| civ4| smac| ctp2| ron| moo3| galciv| galciv2| alt| about|
ApolytonPLUS | register | search | faq | new posts | pm (-/-) | upload | members
hall of fame new! | civgroups | civgroups news | interviews | the column | radio | chat | directory | news | store | PLUS
Apolyton Civilization Forums : Powered by vBulletin version 2.0.3 Apolyton Civilization Forums > Miscellaneous > Archive > CtP2-Creation/AI/Mods/Scenarios-Archive > Reply to Ralph (Unit Creation)
Show a Printable Version | Email This Page to Someone! | Receive updates to this thread | Report this to Apolyton news!

bottom of page
  
Author
Thread    < Last Thread     Next Thread > Post New Thread     Post A Reply
Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
Post  Old Post 02-04-2001 19:16 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#1 Report this post to a moderator
Reply to Ralph (Unit Creation) Avatar Enlargement: We've got the solution

Hmmm, I can't reply in the other thread, so sorry moderators, I'm starting a new thread.

Units.txt, bit by bit

quote:

from units.txt
## UNIT 0
UNIT_ABOLITIONIST { <----- unit internal name
Description DESCRIPTION_UNIT_ABOLITIONIST <----- not used
DefaultIcon UNIT_ICON_ABOLITIONIST <--- In uniticon.txt
IconDefaultSprite SPRITE_ABOLITIONIST <--- In newsprite.txt
Category UNIT_CATEGORY_SPECIAL <--- category
Attack 0 <---------- statistics
Defense 10 <----------
ZBRangeAttack 0 <---------- used
Firepower 1 <---------- in
Armor 1 <----------
MaxHP 10 <---------- combat
ShieldCost 540 <---- cost of unit
PowerPoints 250
ShieldHunger 5 <---- upkeep cost of unit (per turn)
FoodHunger 0 <---- upkeep cost of unit in food
MaxMovePoints 300 <---- how far it can move
VisionRange 1 <---- how far it can see
EnableAdvance ADVANCE_CLASSICAL_EDUCATION <--- enabling advance
ActiveDefenseRange 0 <---- how far it can actively defend
LossMoveToDmgNone
MaxFuel 0 <---- Amount of fuel (for aeroplanes)
* IgnoreZOC <---- This unit can ignore zones of control
* NoZoc <---- This unit has no zone of control
* CanBeExpelled <---- This unit can be expelled
* CantCaptureCity <---- This uniot cannot capture cities
* NoSlaves <---- Only build if you have no slaves
* IsSpecialForces <---- Full hitpoints regardless of military status
* Civilian <---- Isn't a military unit
s SoundSelect1 SOUND_SELECT1_ABOLITIONIST
s SoundSelect2 SOUND_SELECT2_ABOLITIONIST
s SoundMove SOUND_MOVE_ABOLITIONIST
s SoundAcknowledge SOUND_ACKNOWLEDGE_ABOLITIONIST
s SoundCantMove SOUND_CANTMOVE_ABOLITIONIST
s SoundAttack SOUND_ATTACK_ABOLITIONIST
s SoundWork SOUND_WORK_ABOLITIONIST
s SoundVictory SOUND_VICTORY_ABOLITIONIST
s SoundDeath SOUND_DEATH_ABOLITIONIST

CanSee: Standard <----- can see normal units
CanSee: Stealth <----- can see stealth units
MovementType: Land <----- walks on land
MovementType: Mountain <----- walks on mountains
Size: Small <----- is small
VisionClass: Stealth <----- is stealthy

se SlaveUprising {
Sound SOUND_ID_SLAVE_UPRISING
Effect SPECEFFECT_SLAVE_UPRISING
}

se UndergroundRailway {
Chance 0.75
DeathChance 0.5
Sound SOUND_ID_UNDERGROUND_RAILWAY
Effect SPECEFFECT_UNDERGROUND_RAILWAY
}
}

##################################################
##########



Lines marked * indicate that these flags do not have to be present, and are used by the Abolitionist, and certain others, other units have other special flag, like the paratrooper that can paradrop etc.

Lines marked - s are sound lines, that are present in all units, and unless you want to make your own sound files, have to end with a unit that the game already uses.

Lines marked se are special effects that only the abolistionist has. again, other units have their own special effects, eg. the cleric, slaver...


The combat lines are what really make military units different from each other.

Attack 10
Defense 10
ZBRangeAttack 20
Firepower 1
Armor 1
MaxHP 10

The attack line is how powerful the unit is. These numbers are from the archer unit. it has a melee atatck of 10. This is fairly standard for the ancient age. As you go through the ages, the attack power gets bigger, as the weopons get more advanced.
Defence (english spelling, not american ) is how resistant to enemy attacks the unit is. (obviously).
ZBRangeAttack is how powerful the unit is as a ranged attacker. Archers, gunners, and war walkers are better as ranged attackers because they fire from a distance.
Firepower is a multiplier that works in the clever combat function so that good units beat worse units.
Armour is a defence multiplier, so tanks have lots of armour, hoplites have a little (a shield) and slavers (fat men) have none.

If this explaination was too much, then I apologise, but I hope it helped people understand how to edit stuff, especially if translating from American programming references into a foreign language, then back again is a little difficult.

If this explaination was too little, please ask more questions, and I'm sure everyone will be happy to help.

Ben
[This message has been edited by Immortal Wombat (edited April 02, 2001).]

hexagonian is offline hexagonian
King
Gnawing on your mind...
Jun 1999
time: 23:14
Thumbs up  Old Post 02-04-2001 23:11 Visit hexagonian's homepage!
Edit/Delete Message Reply w/Quote
#2 Report this post to a moderator
Support Apolyton or Terrorists Win

FoodHunger 0 <---- upkeep cost of unit in food

Were you able to get this line to work within the game? I tried it once to see if it would work, but was unsuccessful. This would be a good line to get to work though.

And I take it you couldn't figure out the PowerPoints do either.

This is a good reference for anyone who is adding new units!!!!

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
Post  Old Post 03-04-2001 16:48 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#3 Report this post to a moderator
Support Apolyton, pre-order Civilization IV

To be honest, I've never actually tried it, except when Nuo was trying the nomad, and tried it with a minus number to give the civ food.

Powerpoints I don't know, but I just had a look round, and I think it may be something to do with how much production points the unit disbands to when its disbanded in a city. Look in const.txt for POWER_POINTS_TO_MATERIALS 1

Evidently powerpoints should be roughly 1/2 the unit cost, and by the looks of things, you can edit how much each powerpoint donates.

Ben

RalphTheMouth is offline RalphTheMouth
Settler
CH-8820 Wädenswil
Mar 2001
time: 05:14
Post  Old Post 05-04-2001 15:07
Edit/Delete Message Reply w/Quote
#4 Report this post to a moderator
Avatar Enlargement: We've got the solution

Hi Ben

Thanks a lot for your reply with the explanations. Most of it, I assumed allready, as you explained. However I still have a couple of questions:

1) What dose "LossMoveToDmgNone" mean
2) What flag do I have to set, in order that a unit can attack in the same turn more than once, if this unit has move-points left

Thanks a lot and best regards
Ralph

Immortal Wombat is offline Immortal Wombat
Prince
in perpetuity
Dec 2000
time: 05:14
Post  Old Post 05-04-2001 16:53 Visit Immortal Wombat's homepage!
Edit/Delete Message Reply w/Quote
#5 Report this post to a moderator
Inflate your Upload Space

quote:

Originally posted by RalphTheMouth on 04-05-2001 06:07 AM
1) What dose "LossMoveToDmgNone" mean



I dont know. But... I think it may mean the unit doesn't lose movement points when its damaged. In civ2, units lost their movement points when they got damaged. 1/2 their hit points left = 1/2 their movement points.

quote:


2) What flag do I have to set, in order that a unit can attack in the same turn more than once, if this unit has move-points left



That needs SLIC code, its in the Samurai scenario, so it could be cut straight from there.

Hope that helps
Ben

EDIT: I just found the code you want:
code:
//---------------------------------------------------------------- // Clear Battle Flag so samurai can attack multiple times per turn //------------------------------------------------------------------ HandleEvent(BattleAfterMath) 'SSAfterBattle_F' post { afterBattle = 1; } HandleEvent(MoveUnits) 'SSClearBattleFlag_f' pre { int_t i; if (afterBattle == 1) { afterBattle = 0; for(i = 0; i < 7; i = i + 1) { if (sevenSamurai[i].valid) { ClearBattleFlag(sevenSamurai[i]); } } }


This is designed for the seven samurai, so it will need adapting for your needs. Try:

code:
HandleEvent(BattleAfterMath) 'SSAfterBattle_F' post { afterBattle = 1; } HandleEvent(MoveUnits) 'SSClearBattleFlag_f' pre { int_t i; if (afterBattle == 1) { afterBattle = 0; for(i = 0; i < army[0].size; i = i + 1) { GetUnitByIndex(army[0], i, tmpUnit) if(tmpUnit[i].valid) { ClearBattleFlag(tmpUnit[i]); } } }

That should clear the battle flag for your army, after each battle. If that doesnt work, replace the line "for(i = 0; i < army[0].size; i = i + 1) {" with "for(i = 0; i < player[0].units; i = i + 1) {", and in the line below that, replace "army[0]" with "player[0].units", which will then clear the battle flag for all your units. If that doesn't work (my SLIC is not amazing), I'm sure someone else will point out my errors.

Pheeuw, talked too much today, going to eat lunch
[This message has been edited by Immortal Wombat (edited April 05, 2001).]

RalphTheMouth is offline RalphTheMouth
Settler
CH-8820 Wädenswil
Mar 2001
time: 05:14
Wink  Old Post 05-04-2001 20:53
Edit/Delete Message Reply w/Quote
#6 Report this post to a moderator
Get a bigger avatar today!

Hi Ben

I hope you had a good lunch with something to "undry" your mouth from the "lots of talking".

Thanks a lot. I will try this out over the weekend.
I will let you know the outcome of my tryings.

Thanks and best regards

Ralph

  < Last Thread     Next Thread > Post New Thread     Post A Reply
All times are GMT. The time now is 05:14.
Apolyton Time is 00:14.
    top of page
Rate This Thread:
archivepost
Forum Jump:
Forum Rules:
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is ON
vB code is ON
Smilies are ON
[IMG] code is ON
 




Contact Us - Apolyton Civilization Site - Support Us!

Building a better Apolyton through better information. Click here and take our poll!
Non-US visitors, click here!

Powered by: vBulletin Version 2.0.3
Copyright ©2000, 2001, Jelsoft Enterprises Limited.

Page generated in 0.0302 seconds (89.46% PHP - 10.54% MySQL) with 31 queries
Page Loading Time:

Support Apolyton: Amazon USA | Amazon UK | Amazon DE | Amazon FR |
Support Apolyton and get FREE PLUS, Buy from Chips&Bits: Galactic Civilizations | Galactic Civilizations: Deluxe Edition | Call to Power 2 | Civilization: The Boardgame | GURPS/ Alpha Centauri | Alpha Centauri | Civilization IV | Civilization III: Complete |


Front Page | Civilization IV | Civilization III | Civilization II | Call to Power II | Alpha Centauri | Master of Orion III
Rise of Nations | Galactic Civilizations | Galactic Civilizations II | Misc
Alt.Civs | Civ I | C:CtP I | About | News | Directory | Apolyton Store | Forums | Chat | Columns | Interviews | Newsletter
Scenario League | CSC | Clash of Civs | Spanish Site | CtP Maps | Cradle of Civ | WesW's Ctp1/2 Site | Civ3 Haven

apolyton.net | apolyton.com | civilization2.net | civilization3.net | civilization4.net | civilizationiv.info | calltopower.net | galciv.net | galciv2.net | moo3.net