Jump to content

How to mod strings.xml?


Sheepy

Recommended Posts

I mean, I can add text to strings.xml, or totally replace existing text.
But I can't seem to use MODMERGEREPLACE, MODMERGEWITH, or MODMERGEAPPEND in strings.xml.

I'm sure the syntax is right, because I can partially update xenopedia and research.

Is this a known limitation of the mod system?
Being able to replace partial string is very useful, I can have several mods that update different aspects of a gun without text conflict, and I can update multiple languages in one single mod.

Edited by Sheepy
Link to comment
Share on other sites

Dont use any command for the strings file. Its something like a hybrid between a spreadsheet and notepad file, but is considered a spreadsheet. No commands are needed for spreadsheet, if you the identifier is something known, it replaces it, if it isnt, it inserts it. If you want to know more in more detail read @llunak thread

or read the Modders Wisdom thread from this guy called @Charon.

Research and xenopedia are spreedsheets too so dont use any commands either.

 

Can you show me what you mean you update different things without text conflict ?

Link to comment
Share on other sites

I am creating a set of mods that tweak ground combat weapons.

One of them reduces heavy weapon recoil to 60.
Another converts machine guns to three round burst, snap = 3 rounds / burst = 9 rounds. (sfx updated and tested.)

They are working, and the set includes other mods like smaller pistol and baton, pistol burst fire, rifle mitigation etc.
The idea is that players can (de)activate the tweaks they want instead of being forced to accept everything in one mod.

Problem: the recoil mod set recoil (replaces description).  The machine gun mod adds a firing mode and adjusts existing mode (replaces description). Conflict.
Another problem: The French translation comes with xce.  I also have a Chinese translation in a full run test.  If I supports them, that is six mods instead of two (or 16 mods instead of 6).  I don't like that.  My translation supports 9 mods in one package.  Individually that'd be 10 mods to manage - as if the French mods does not make the list long enough.

If we can MODMERGEREPLACE strings.xml, the mods can result in correct description regardless of order / state, in addition to supporting multiple languages.

Edited by Sheepy
Link to comment
Share on other sites

8 hours ago, Sheepy said:

I am creating a set of mods that tweak ground combat weapons.

One of them reduces heavy weapon recoil to 60.
Another converts machine guns to three round burst, snap = 3 rounds / burst = 9 rounds. (sfx updated and tested.)

They are working, and the set includes other mods like smaller pistol and baton, pistol burst fire, rifle mitigation etc.
The idea is that players can (de)activate the tweaks they want instead of being forced to accept everything in one mod.

Problem: the recoil mod set recoil (replaces description).  The machine gun mod adds a firing mode and adjusts existing mode (replaces description). Conflict.
Another problem: The French translation comes with xce.  I also have a Chinese translation in a full run test.  If I supports them, that is six mods instead of two (or 16 mods instead of 6).  I don't like that.  My translation supports 9 mods in one package.  Individually that'd be 10 mods to manage - as if the French mods does not make the list long enough.

If we can MODMERGEREPLACE strings.xml, the mods can result in correct description regardless of order / state, in addition to supporting multiple languages.

You seemed to have missed my point, there are basically 2 types of files

1. Spreadsheet

2. Plain text ones

Both of them are following different rules. 1. Spreadsheet files dont take any commands ( seems to be wrong ), while 2. are capeable of doing so. Researches/Xenopedia/strings are spreadsheet, weapon_gc is plain text.

...

Reading throught the OP again lets me realise that i cant help you with the topic in question, because i have no experience in that.

Posting screenshots about what you did with the researches and xenopedia would be helpful.

Link to comment
Share on other sites

Thanks @Charon. Yes they take different commands:

  • Non-excel xml files take MODMERGEATTRIBUTE and MODMERGE for xml structure and properties. (ammos.xml, sounds.xml)
  • Excel files take  MODMERGEREPLACE and MODMERGEAPPEND for text content. (researches.xml, xenopedia.xml)

We just need to look at XCE to see examples of the second sets.  The XCE bundled Armoured Assault mod appends vehicle weapons to research:

Armoured Assault researches.q70.jpg

And the XCE bundled Furies, Terror, and Dreadnoughts mod modifies (partially replace) Xenopedia data:

xenopedia battleship.q80.jpg

strings.xml is an excel file, but it's the only one that does not take any commands.  My latest attempt ended like this:

rocketlauncer.q80.jpg

(Removing French does not fix it.  I can also confirm that multiple replace works in other files, but my data is not fit for human consumption :p )

 

So, what I want to ask is... is this a bug or a system limitation?

Edited by Sheepy
Link to comment
Share on other sites

I think nobody has gone that far with the system.

Dunno, looks like nobody else has done this before, at least i didnt see any other mods that have done what you attempt, you are on virgin lands.

Last option would be to look for non visible bugs, like a lot of vanilla files have.

 

Summa summarum: I cant tell you if thats the limitation of the system or if an invisible bug hinders your progress. Thats your adventure :).

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...