Some units share the same description. Can it be changed by modding?

Recently I have been making an easy mod that changes some in-game floating texts. And I found that some units share the same description. This makes creating a text mod difficult.

Take Pirate as an example. There are actually three types of Pirate (despite they look identical). The first Pirate is created in Tavern/Saloon, the second one is created in Monastery (which has a “Repentant” prefix), and the third one is treasure guardian.

And every unit has two types of floating text. When I hover the mouse over the unit on the screen, it shows the simple version of the text; when I hover the mouse over its icon, it shows the detailed text.

There are four strings for these Pirate in the stringtabley.xml: string _locid=“46128”, string _locid=“46129”, string _locid=“69579” and string _locid=“69580”. The normal Pirate uses 46128 for its simple text and 46129 for its detailed text; the Repentant Pirate uses 69579 for its simple text and 69580 for its detailed text; then the treasure guardian Pirate use 69580 for both simple and detailed text.

Now here is my problem: If I edit the 69580 for the Repentant Pirate, the treasure guardian Pirate will also be affected.:unamused: Is it possible to add a new string and let the treasure guardian Pirate use it, and the mod can still be used in ranked games? How do I do this?

There are many other units that also share the same description text: Musketeer and Giant Grenadier; Hussar and Heli; Organ Gun and Leather Cannon… I want to add new strings for them if possible.

1 Like

You will need to modify their protoentries to point towards separate descriptions. This probably will affect multiplayer.

2 Likes

I have almost no programming knowledge. If I want to try, can I do this by just editing few words of the code in the specific .xml (or .xaml?) file? If so, could you please tell me which file to edit?

EDIT:
I roughly checked the existing .xml files and .xmal files in the data folder, but didn’t find any file related to the units’ descriptions.

And then I subscribe to the mods that change the game mechanism for reference…It seems that I have to add additional files and write some codes myself. Even though I know how to write a xaml file, the mod probably can’t use in multiplayer like you said…

I guess all I can do is to ignore the strings shared by multiple units or let the description fit all units used it… :expressionless: