Change units names for Mod

Need a guide step by step of how to change units and technologys names with files extracted with the resource manager. Is for a mod im working on.

Sounds like all you need is the stringmods section explained in this link:

3 Likes

Thks worked like a charm. One question: I want to change the Dragoon name and veteran/guard/imperial/ status and the name of the tech upgrade, BUT, only for one civ. How can i do so?

Then you also need to edit the techtree, this would make your mod incompatible with multiplayer.

Was trying with the “overridenimeid” method in the techtree but it seems that it does not work. Until now only the stringmods are working
 Maybe create a new unit and give that “MexicanGragoon” a new name and look for historical reference?

Ill keep trying with the techtreemod first. I think this is something related to the #uitechtree\techtreedata_demexicans.mods.xml” or the “” additive mods.

any ideas?

The file is just
‘’’
Game/data/techtree_mods.xml
‘’’

Really? Good! Will try with “techtree.mods” not “uitechtree\techtreedata_demexicans.mods.xml”

The UI has nothing to do with it ;D
Thats just the visual, not the code itself

But that is what I want to change, the visuals, the UI name of the units. If I go to string files it is easy for some units like the Soldado, Charro, Salteador, for they are unique units. I can change the name, but more importantly I want to create a “Federal Theme” mod for USA & Mexico. The idea is to change the upgrade status names. For example: Instead of “Imperial Soldado” to “NewName” Soldado” when the unit is upgraded. Also, if possible, change some units’ names for a “more accurate historical reference”.

That is easy for unique units, but for some “global” units (Dragoon, Falconets, Ships, Heavy Cannons, etc) it has become more tricky.

Looking up on” string” files has become really easy to update. But, “techtree” does not have the “strings IDs” for Dragoon for example. I found a dose string on “techtreedata_demexicans”. In theory I should just use “overridenameid” but it is not working.

Game/data/
“techtree_mods” not working.
“techtree.mods” not working
“techtreedata_demexicans.mods” not working.

It’s my first time code modding a game (I do more art modding), if you can be as specific as possible with the code i’ll be grateful.

P:D the icons, and visuals for the techs and units are already done, I i thought changing the UI names will be the easy part LOL

1 Like

Here is a list of the Orginal file, How the mod file has to be named, and how the Root node has to look

So you want to change a name, you have to make it like

<techtreemods>
    <tech mergeMode="add" name ='VeterandragoonsShadow'>
        <Effects>
          <effect type="SetName" proto="Dragoon" culture="none" newname="72443" reqtech="Age0Americans">
          </effect>
        </Effects>
    </Tech>

</techtreemods>

And thats how you can change a name of a unit when its upgraded.

Thks. Will try it out.

What does the “shadow” in “veteransdragoonshadow” stands for? what is its use?

Show is just that its researched automatically ^^
In the shadows, the player doesnt need to do anything besides fulfill the pre requirements

Ok got it. So i finally start changing the units names and at first it works, but when updated they return to the old name. For example:

“Dragón new name” all good and working. Guard upgrade research finishes And "Guard Dragoon " name returns replacing the “new Dragoon name”

I guess it is something regarding the strings?. But not sure. Any suggestions for the updated units? Or can I create a Unique strings documento only for one civ or civs

It seems is not working. Any ideas?

Well, the upgrade for the guard dragoon also updates their name. = You will need to do the same for each tech upgrade.

i guess like this.

techtreemods>
tech mergeMode=“add” name =‘VeterandragoonsShadow’>
Effects>
effect type=“SetName” proto=“Dragoon” culture=“none” newname=“72443” reqtech=“DEAge0Mexicans”>
/effect>
/Effects>
"/Tech>

tech mergeMode=“add” name =‘GuardDragoons’
Effects
effect type=“SetName” proto=“Dragoon” culture=“none” newname=“72444” reqtech=“DEAge0Mexicans”>
/effect>
/Effects>
/Tech>

/techtreemods>

and on, and on


1 Like

The thing is, it doesn’t work.

Someone recommended the following line of code and works for some units, but not for the upgrades.
Effect mergeMode=‘add’ type =‘SetName’ proto =‘Dragoon’ culture =‘none’ newName =‘230060’/>

If i go like this:
Effect mergeMode=‘add’ type =‘SetName’ proto =‘Dragoon’ culture =‘none’ newName =‘230060’/>
Effect mergeMode=‘add’ type =‘SetName’ proto =‘GuardDragoons’ culture =‘none’ newName =‘230061’/>

the dragoon name changes, but when upgraded to veteran/guard/imperial the name changes back to the original. This with all units.

any ideas?
I have not much experience with coding, maybe a tutorial or guide someone can recommend will be appreciated.

Well the easiest way would be to create own upgrades for the specific techs.

how? I understand the content of the code, but not how to write it.