Home » MODDING HQ 1.13 » v1.13 General Development Talk » Changes to MercOpinions.xml
Changes to MercOpinions.xml[message #366228] Tue, 13 August 2024 00:50 Go to next message
Asdow is currently offline Asdow

 
Messages:146
Registered:August 2010
As a heads up to anyone working or playing mods and updating to newer 1.13 versions, I made changes to the MercOpinions.xml data format in this commit https://github.com/1dot13/source/commit/caa02cd6b7e65254888602bded5a664077ed88c5

Due to the change, the loading time of reading merc opinions from the file upon game startup dropped from ~4 seconds to ~0.01 seconds. For reference, loading ALL the xml files combined takes around 4.7 seconds, so that single file read was responsible for 85% of total load time.

I also wrote a small commandline utility tool to convert old MercOpinion.xml files to the new format, which can be downloaded from here: https://github.com/Asdow/JA2-ConvertXMLData
A ready made binary of it is available in the Releases and the readme has instructions on how to use it.

Report message to a moderator

Sergeant
Re: Changes to MercOpinions.xml[message #366335 is a reply to message #366228] Sun, 22 December 2024 00:37 Go to previous message
Asdow is currently offline Asdow

 
Messages:146
Registered:August 2010
Another heads up as I had to change the items.xml as I separated the raw bitmask <ItemFlag> tag into several individual tags, which is a whole lot readable and less error prone for modders.
Commit in question: https://github.com/1dot13/source/commit/c7d021f5f3dccb024ee9dddac29d25eb03d1ed70

The same convertxmldata tool can also be used to update Items.xml to the current format. The tool recognizes files based on filename and will automatically go through the correct reformatting.

[Updated on: Sun, 22 December 2024 00:37]

Report message to a moderator

Sergeant
Previous Topic: XML Clean-Up
Next Topic: Release Notes
Goto Forum:
  


Current Time: Sat Feb 15 22:41:28 GMT+2 2025

Total time taken to generate the page: 0.01014 seconds