Install Steam
login
|
language
简体中文 (Simplified Chinese)
繁體中文 (Traditional Chinese)
日本語 (Japanese)
한국어 (Korean)
ไทย (Thai)
Български (Bulgarian)
Čeština (Czech)
Dansk (Danish)
Deutsch (German)
Español - España (Spanish - Spain)
Español - Latinoamérica (Spanish - Latin America)
Ελληνικά (Greek)
Français (French)
Italiano (Italian)
Bahasa Indonesia (Indonesian)
Magyar (Hungarian)
Nederlands (Dutch)
Norsk (Norwegian)
Polski (Polish)
Português (Portuguese - Portugal)
Português - Brasil (Portuguese - Brazil)
Română (Romanian)
Русский (Russian)
Suomi (Finnish)
Svenska (Swedish)
Türkçe (Turkish)
Tiếng Việt (Vietnamese)
Українська (Ukrainian)
Report a translation problem
Not to mention it's quicker. If all modders switchhave time, knowledge and patience to speed-benchmarks their mods, heavy mod users would gain some serious loading time. Speaking as someone that spend several hours a week helping to debug error logs on reddit ;-)
______
You see how this mod is small? But using sequenced patches like you suggested have cut down the load time from nearly 2 sec - way much than I thought lol, I was ready to switch methods for a couple of ms - So I can only imagine for bigger mods (including some of mines I will upgrade soon now ^^).
And I still wantes to thank you just for being involved ;-) It's a great community we have here
After doing some test, another added benefit of writing the patch how you suggested is that the mod is loading a tiny bit quicker. 1713ms faster to be exact.
So I switch to the method you suggested. Many thanks for that :-D
The kind of "techhnical" thread I was talking about:
- https://ludeon.com/forums/index.php?topic=32874.msg381068#msg381068
- https://github.com/spoonshortage/A_Dog_Said/issues/3
You are correct. In fact I just upload a new version that use something similar (but with an enhanced version of vanilla patchOperation - ModCheck by Nightinggale). It permits me to display a personalised message even, depending on loaded mods.
While conditional statements are not something completely new to me (I'm a coder amateur), I'm just starting to understand how to use the whole system properly.
In fact the whole patching system was just introduced with A17 and technical conversation about xpath patching performance are still rare on the forum. Until recently, mostly because of Nightinggale and his Modcheck mod/tool.
Back to my patch, you are right and I was about to make a similar change.
Thank you for your interest, BTW
<Operation Class="PatchOperationSequence">
<success>Always</success>
<operations>
<li Class="PatchOperationTest">
<xpath>/Defs/ThingDef[defName = "Sandbags"]/minifiedDef</xpath>
<success>Invert</success>
</li>
<li Class="PatchOperationAdd">
<xpath>/Defs/ThingDef[defName = "Sandbags"]</xpath>
<value>
<minifiedDef>MinifiedFurniture</minifiedDef>
</value>
</li>
</operations>
</Operation>
XML error: Duplicate XML node name minifiedDef in this XML block: <ThingDef ParentName="BuildingBase"><defName>Sandbags</defName><label>sandbags</label><thingClass>Building</thingClass><category>Building</category><graphicData><texPath>Things/Building/Linked/Sandbags_Atlas</texPath>(...)
https://gist.github.com/2c3de0c36da84f5e117fdfc087d04101
If not it is another one I'm not aware of.