• I have been working on a new project PictureBooks.io. Give it a try and let me know suggestions/comments herea>.

unit upgrading

jcfire236

Chieftain
Joined
Oct 16, 2007
Messages
10
So I am wondering what i can do to make units unable to upgrade... ie swordsman not able to upgrade to maceman... i want to be able to build any unit i want no matter how high up my techs are, and the way the game is vanilla i can only build macemen once i get that high up. how can i change it to be able to build any unit i want? ive added in many unique units for each civ. i also set it to be only in the medieval age. now i just need to figure this problem out, and ill be set! any help would be awesome!
 
i meant to say that i deleted the upgrades part in the unitinfos xml, and it works, but it throws errors when the game loads, so how can i do it with no errors?
 
I do not know exactly what you did, however I think the following would work.

Take for example the tank.
Look for the following lines (8478 to 8483):

<UnitClassUpgrades>
<UnitClassUpgrade>
<UnitClassUpgradeType>UNITCLASS_MODERN_ARMOR</UnitClassUpgradeType>
<bUnitClassUpgrade>1</bUnitClassUpgrade>
</UnitClassUpgrade>
</UnitClassUpgrades>

replace with <UnitClassUpgrades />

If you simply delete them, I guess you will have the error when the game tries to parse the xml on loading
 
yeah thats what i tried was deleting them. it worked, but it threw errors while it was loading. is there a way to accomplish this without having to delete those lines? what will it look like after it is typed in? i dont know alot about xml.
 
Well, I just tried what it told you, and it seemed to work quite well.

You really need to be careful, do not just delete the lines. Replace them with <UnitClassUpgrades />, else you will get your errors on loading.

For example, take the Warrior (with the line <Type>UNIT_WARRIOR</Type>) ; if you do what I said, it will look like:
<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>0</bMechanized>
<UnitClassUpgrades />
<UnitAIs>
....
 
well, i tried that and it throws even more errors than before....
the code looks like this:

<bNukeImmune>0</bNukeImmune>
<bPrereqBonuses>0</bPrereqBonuses>
<bPrereqReligion>0</bPrereqReligion>
<bMechanized>0</bMechanized>
<UnitClassUpgrades />
<UnitAIs>
<UnitAI>
<UnitAIType>UNITAI_ATTACK</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
<UnitAI>
<UnitAIType>UNITAI_ATTACK_CITY</UnitAIType>
<bUnitAI>1</bUnitAI>
</UnitAI>
</UnitAIs>
<NotUnitAIs/>
<Builds/>
 
never mind i figured it out... i was putting a space in front of the / and i took the space out and it works! thanks for the help! i also have one other question... i see in the screen shots the units are in like a formation... how do i set the units to do that?
 
Back
Top Bottom