Is it possible to apply an XML diff-patch against aiscripts which are shipped by another extension (mod)?
After implementing a couple of smaller custom mods (a bit of a learning process) with some aiscripts, I ended-up looking whether I could hook-up some of my orders with notifications from the Report Current Status mod.
I wanted to keep my aiscripts mods independent from the Report Current Status mod, so I started to look into creating a separate integration mod that would patch my custom aiscripts in a similar way that the Report Current Status mod does it (it simply uses XML diff patching).
However, I seem to have hit a bit of a brick wall going down this path, and I'm trying to understand the limitations of the game engine. Namely, no matter what I did, I was not able to get the game engine to apply my patches. Here is the diff tidbit that I wrote to try things out:
Code: Select all
<?xml version="1.0" encoding="UTF-8"?>
<diff>
<add sel="/aiscript/order/params">
<param name="mycrap" type="bool" infinitevalue="true" default="false" text="My crap2" comment="Write to logbook"/>
</add>
</diff>
Code: Select all
[=ERROR=] 7312.57 AI::AIDirector::LoadAIScript(): Ignoring root node 'diff' in XML file 'extensions\azaghal_vro_fixes\aiscripts\order.move.wait2.xml'.
Code: Select all
[=ERROR=] 7365.88 Errors found; AI scripts not refreshed
I've even tried to ship my original extension as cat/dat thinking that perhaps game only allows patching of cat/dat-based extensions, but that did not seem to help either.
So, has anyone been in the similar situation? I haven't tried patching the md scripts yet to see if this is a general limitation perhaps, mind you - just the aiscripts.
Best regards,
Branko