Change Unit Upgrade

1Devestator

Chieftain
Joined
Apr 24, 2014
Messages
4
This will be my second mod. I have very little idea what I am doing, but we all gotta learn somewhere, right? I would like to make it so that Explorers can upgrade to Paratroopers. 'Cause Explorers become useless after a while, and Paratroopers would really benefit from scouting promotions.
Specifically, I need to know where to go for the coding for Explorers. I have the XML files for the standard game, but Explorers appear to be G&K? And I also need to know how to make the actual change. I successfully modified a building already, but this seems a bit more complicated. Thanks in advance for your help.
 
There isn't an Explorer in the base game; the Scout is normally the end of the line. Are you using BlouBlou's Units - Scout to Explorer? (which reuses the explorer archaeologist model from the BNW Scramble for Africa scenario)

If so, you probably just want to edit that mod by adding an entry to the Unit_ClassUpgrades table.

I'm not sure what BlouBlou's internal name for his explorer is; assuming it's UNIT_EXPLORER, you'd add the following to the file defining the unit, immediately after the beginning <GameData>:
Code:
    <Unit_ClassUpgrades>
        <Row>
            <UnitType>UNIT_EXPLORER</UnitType>
            <UnitClassType>UNITCLASS_PARATROOPER</UnitClassType>
        </Row>
    </Unit_ClassUpgrades>
 
Ok, so can I use this format <UnitClassType>UNITCLASS_PARATROOPER</UnitClassType>
to specify any unit upgrade? Just replace PARATROOPER.
 
Yes. Note that the unitclass and unit names aren't always what you would expect (e.g., UNIT_MECH for the Giant Death Robot), so you have to check. Also note that the first column references the unit that is to be upgraded and the second references the the unit class that it upgrades to (i.e., a UU for that class would override the default; but you should remember to include UUs of the same class to your unit since a UU can have a different upgrade path).
 
Hey, thanks! That worked! I was using the Prehistoric Era mod, which I didn't figure out how to modify, but I created a separate mod that works with it. Took a couple of tries. But I tested it out, and I got a paratrooper with the scouting promotions. And the ignore rough terrain stuff. First mod that I didn't have a YouTube video stepping me through it. I found the XML files for G&K and BNW too. Hahaha! My first, very own functional mod! Thanks, Nutty!
 
Top Bottom