How should an additive strings mod look like?

I’ve been trying to make a mod that fixes the dialog portraits displayed in the campaign. However, while the mod folder is recognized by the game, none of the effects I put in stringmods.xml appear in the game. When trying to use a modded stringtabley.xml in its place, the change come into effect without issue.

I’ve concluded that there’s something I did wrong in the stringmods.xml file itself. So far I’ve only ran tests with 1 or 2 changes. Currently stringmods.xml looks like this:

<stringmods>
   <StringTable>
      <Language name="English">
	     <string _locid="27219" gamecharacter="Sailor" soundfilename="GENR5030" portraitfilename="resources\art\units\infantry_ranged\crossbow\crossbow_portrait.png">Thanks to that pirate, we'll need some new ships.</string>
         <string _locid="26854" gamecharacter="Second Sailor" soundfilename="GENR0005" portraitfilename="resources\art\units\mercenaries\highlander\highlander_portrait.png">A ship! Filled to the gunwales with explosives. It came out of nowhere.</string>
      </Language>
   </StringTable>
</stringmods>

I’ve tried browsing for mods that use stringmods.xml to compare, but so far no luck. They all use the entire stringtabley.xml file instead.

Any pointers as to what might have gone wrong and how can it be corrected? First attempt at modding so I suspect it must be something I overlooked.

Hay !

Your file should look like this :slight_smile:

<stringmods>
<StringTable>
<Language name="English">
    <string _locid="599289">The Flagship</string>
	<string _locid="599290">The Captain</string>
	<string _locid="599291">The Fort</string>
	<string _locid="599292">The Camp</string>
	<string _locid="599293">The Bay Dock</string>
	<string _locid="599294">5 Flamethrowers</string>
	<string _locid="599295">3 Flamethrowers</string>
	<string _locid="599296">2 Flamethrowers</string>
	<string _locid="599297">12 Falcon Tamers</string>
	<string _locid="599298">7 Falcon Tamers</string>
	<string _locid="599299">5 Falcon Tamers</string>
	<string _locid="599300">12 Corsairs</string>
	<string _locid="599301">7 Corsairs</string>
	<string _locid="599302">5 Corsairs</string>
	<string _locid="599303">15 Buccaneers</string>
</Language>
</StringTable>
</stringmods>

Note:
The Stringmods file seems not to overwrite existing strings.
So you would need to edit the scenarios ( i guess ) to use the string locid that you want it to use.

1 Like

Thanks for the reply!

If your Note is accurate, then that’s really unfortunate and should be considered a bug.
The workaround seems like even more of a pain than just putting the whole stringtabley.xml in the mod folder.

Looks like I’ll have to put this mod on hold until a fix comes.

1 Like