How to make modifications to units?

DC0

Prince
Joined
Dec 20, 2008
Messages
320
Location
Russia, Moscow
Hi. I have installed DalesCombatMod and plan to use it. But I also want to make following changes to units:

Battleship
Increase building cost from 225 to 325

Missile Cruiser
Increase building cost from 260 to 360
Add ability to carry Guided Missile

Stealth Destroyer
Add ability to see Submarines

Submarine
Add ability to carry Guided Missile

Carrier
Increase building cost from 175 to 200

How can I make these changes?
 
All of that would be in the unitinfos xml file located under BeyondtheSword/Assets/XML/Units. The cost changes are easy, just add in the new number. Allowing units to carry guided missles might be a bit more difficult considering how the XML handles cargo types. If you have any questions, ask.
 
Doesnt the missle cruiser already carry guided missiles?

But i digress. For most units, allowing them to see an invisible unit is easy; simply replace
<iSeeInvisible>NONE</iSeeInvisible> with <iSeeInvisible>INVISIBLE_STEALH</iSeeInvisible> or <iSeeInvisible>INVISIBLE_SUBMARINE</iSeeInvisible>, but unfortunately, i think they can only see one kind of unit at a time.. so you could change the type of invisible is to the type SDs can see... Then change the Attack Sub too...
 
Actually the SeeInvisible allows multiple choices - i.e. <iSeeInvisible>INVISIBLE_STEALH, INVISIBLE_SUBMARINE</iSeeInvisible> - but for some odd reason Firaxis included the code in the SDK, but did not use the ability in XML... I guess they just forgot about it :smoke:
 
All of that would be in the unitinfos xml file located under BeyondtheSword/Assets/XML/Units. The cost changes are easy, just add in the new number. Allowing units to carry guided missles might be a bit more difficult considering how the XML handles cargo types. If you have any questions, ask.
Ajidica, I'd appreciate info or link to info regarding what exactly should be changed in XML files to add ability to carry guided missiles.
 
Its easy. Go to the xml file, open it using notepad or another text editor. (Note wordpad or microsoft word), Hit CRTL+F to open up the find window. Type in the name of the unit. (You will have to type it in with an underscore where there should be a space like Missile_cruiser, all letters will be capitalized. In some cases Firaxis used a different XML tag for the unit that what shows up in game, but it should be easy enough to find it. TO change the cost, use ctrl+f to find <icost> or something like that (I forget the exact tag.) you will find a number next to it, change the number to what you want. For invisibility, make the change Refar showed above, and for cargo space, I have never done anything with cargo classes, but it should be easy to figure it out. XML is just a data storage file, no coding skills needed.
 
Back
Top Bottom