xforce / anno1800-mod-loader

The one and only mod loader for Anno 1800, supports loading of unpacked RDA files, XML merging and Python mods.
MIT License
367 stars 92 forks source link

How to patch the DLC data(scenario)? #160

Open dominions opened 2 years ago

dominions commented 2 years ago

I found the scenario data XML using a ScenarioBaseAssetGUID instead of GUID. It tries to edit it with the following codes(Anno 1800\mods\MyMod\data\config\export\main\asset\assets.xml) :

<ModOp Type="add" ScenarioBaseAssetGUID='25743' Path = "/Values/PopulationUpgrade/InputBenefitModifier">
    ......
</ModOp>

The log information is: No matching node for Path //Asset[ScenarioBaseAssetGUID = '25743']/Values/PopulationUpgrade/InputBenefitModifier

I notice that the XML files of scenario is define in a path like that: dlc10\scenario02\config\game\assets\scenario\config\export\main\asset. Does the mod patch file should place in similar ways, i.e. anno 1800/mods/MyMod/dlc10\scenario02\config\game\assets\scenario\config\export\main\asset? It fails with the error log: Failed to get original game file dlc10\scenario02\config\game\assets\scenario\config\export\main\asset\assets.xml

gav622007 commented 1 year ago

<ModOp Type="<function>" Path="//Asset[ScenarioBaseAssetGUID = '<ScenarioBasedAssetGUID number>']/Values/. . . . . ">

the patch file should be placed in the same way, i.e. mods/MyMod/data/dlc10\scenario02\config\game\assets\scenario\config\export\main\asset there is no "/data" in your file path