View Issue Details

IDProjectCategoryLast Update
0021269AI War 2Bug - OtherJun 4, 2019 6:06 pm
ReporterTechSY730 Assigned ToBadgerBadger  
Status resolvedResolutionfixed 
Product VersionBETA 0.865 The Return Of Deepstriking 
Fixed in VersionBETA 0.866 Hotfix 
Summary0021269: Provide a way to override vanilla definitions from XMLMods
DescriptionRight now, there doesn't seem to be any way to override entries from the vanilla XML files from XMLMods

Approaches tried:
Copying the whole file from GameData into XMLMods, making your changes, and adding your mod to the load order.
Doesn't work. It doesn't matter if you put it above or below the "_Vanilla" entry. The changes just aren't picked up.

Redefining vanilla entries with the same name in a new XML file.
Doesn't work. The engine complains about duplicate definitions.

At least one of the approaches working would be nice.
Without it, you are forced to modify the real GameData/Configuration folder, which would get cumbersome quickly when maintaining multiple mods.
TagsNo tags attached.

Activities

BadgerBadger

Jun 4, 2019 5:35 pm

manager   ~0051835

Last edited: Jun 4, 2019 6:06 pm

Hey Chris,
     so part of this is that the docs from Keith ( https://wiki.arcengames.com/index.php?title=AI_War_2:_Basic_Stat_Modding) don't match the code. The docs say that XMLMods should be in the GameData directory, but the code actually looks in
string directoryPath = Engine_Universal.CurrentBaseDirectory + "XMLMods/" + ModNameOrNull + "/" + Table.SourceName + "/"; <==== Here it looks ine BaseDirectory instead of Engine_Universal.CurrentGameDataDirectory

Either we need to update the docs or change the code, and questions of taste like this I leave to your discretion. Edit: I updated the docs

In the meantime, as a workaround you can put the XMLMods directory in ~/AIWar2 not ~/AIWar2/GameData

TechSY730

Jun 4, 2019 5:40 pm

reporter   ~0051836

But my XMLMods folder is already in ./AIWar2, not AIWar2/GameData

RocketAssistedPuffin

Jun 4, 2019 5:41 pm

reporter   ~0051837

<entity name="MLRSGuardPost" is_partial_record="true"
            built_by="BasicGuardPostDrawBag"
            ship_or_structure_explosion_sfx="Turret_Explosion"
            ship_or_structure_explosion_if_on_other_planet_sfx="ShipLostOnOtherPlanet_Explosion"
      
            >
    <system name="FusionRockets" display_name="Fusion Rockets"
                category="Weapon" firing_timing="OnlyInRange"
                damage_per_shot="200" range="High1" shot_speed="Normal" rate_of_fire="Low"
                shots_per_salvo="16" fires_salvos_sequentially="true"
                shot_type_data="FusionRocket" target_sorter="Standard"
                >
    </system>
  </entity>

An ancient example of mine, from one of the mini-mods. The line I think you need is:
 is_partial_record="true"

That I think makes it an override. I noted in the forum post ( https://forums.arcengames.com/ai-war-ii-modding/mlrs-spam-filter-(heavily-nerfs-mlrs-corvette-post-turret)/ ) that this seems to duplicate the weapon though. This is really old, and I haven't used this since then (no need), so no idea if it'll still work.

BadgerBadger

Jun 4, 2019 5:51 pm

manager   ~0051838

It works. I just tried it. You need to put your mod after _Vanilla, put XMLMods in the right place, then also include the is_partial_record="true" line.

I copied over the full humanhomecommandstation, added is_partial_record then changed the description and I see my new version.

BadgerBadger

Jun 4, 2019 6:06 pm

manager   ~0051839

I've updated the wiki with correct instructions.

Issue History

Date Modified Username Field Change
Jun 4, 2019 4:25 pm TechSY730 New Issue
Jun 4, 2019 5:35 pm BadgerBadger Note Added: 0051835
Jun 4, 2019 5:40 pm TechSY730 Note Added: 0051836
Jun 4, 2019 5:41 pm BadgerBadger Note Edited: 0051835
Jun 4, 2019 5:41 pm RocketAssistedPuffin Note Added: 0051837
Jun 4, 2019 5:51 pm BadgerBadger Note Added: 0051838
Jun 4, 2019 6:06 pm BadgerBadger Assigned To => BadgerBadger
Jun 4, 2019 6:06 pm BadgerBadger Status new => resolved
Jun 4, 2019 6:06 pm BadgerBadger Resolution open => fixed
Jun 4, 2019 6:06 pm BadgerBadger Fixed in Version => BETA 0.866 Hotfix
Jun 4, 2019 6:06 pm BadgerBadger Note Added: 0051839
Jun 4, 2019 6:06 pm BadgerBadger Note Edited: 0051835