[GS] Giving the AI GDRs

Joined
Mar 12, 2019
Messages
100
I would like to create a mod to give the AI a giant death robot on turn 1. However, I ran into problems. Ideally, I would like to just give the AI a free GDR that doesn't have any maintenance and not alter the in-game GDR. So I started going through tutorials, etc. and I ended up being able to create a re-named GDR in the game but I am not sure that I am doing it correctly.

Here is what I did:
1) Found the official .artdef file and started copying over everything to the new mod. This got convoluted quite quickly, I was copying over AttachmentVisibilities, all the member combat stuff, etc. Do I even need to do this? Or am I going nuts here? A lot of the guides have you select "Slinger" under UnitCombat, but it appears that none of the DLC items are loaded in the asset editor.

Since I couldn't get that to work, I just decided to look at some other mods and have the game load an xml file to give the AI a GDR and to just reduce the resource costs, but I cannot get the game to reduce the resource cost of giant death robots! Here is the xml file, what am I doing wrong?

Code:
<GameData>
    <MajorStartingUnits>
        <Update>
            <Where Era="ERA_ANCIENT" Unit="UNIT_WARRIOR" AiOnly="true" />
            <Set Unit="UNIT_GIANT_DEATH_ROBOT" />
        </Update>
    </MajorStartingUnits>
    <Units>
        <Update>
            <Where UnitType ="UNIT_GIANT_DEATH_ROBOT" />
            <Set Maintenance="0" ResourceMaintenanceAmount ="0" />
        </Update>
    </Units>
</GameData>

Thanks!
 
Table "Units" has no column called "ResourceMaintenanceAmount".

"ResourceMaintenanceAmount" is only a column in table "Units_XP2".

The fatal syntax error of attempting to use an invalid column in table Units causes the Update to fail.
 
Thanks for the help! I tried using the tag <Units XP2> in previous attempts, but it appears that you need the underscore. The last problem that I ran into was relating to loading order. I could get the mod to work if I change the unit to something that was in the base game, but once I set it to a GDR it didn't work properly. So, thanks to your guide, I found out how to change the loading order and fixed the issue.

Is there any way to load assets from the expansions into the asset editor? I set the paths in modbuddy, but I am having problems with DLC assets.

For completion, here is the complete xml:

Code:
<GameData>
    <Units>
        <Update>
            <Where UnitType ="UNIT_GIANT_DEATH_ROBOT" />
            <Set Maintenance="0" />
        </Update>
    </Units>
    <Units_XP2>
        <Update>
            <Where UnitType ="UNIT_GIANT_DEATH_ROBOT" />
            <Set ResourceMaintenanceAmount ="0" />
        </Update>
    </Units_XP2>
    <MajorStartingUnits>
        <Row Era="ERA_ANCIENT" Unit="UNIT_GIANT_DEATH_ROBOT" NotStartTile="true" AiOnly ="true"/>
    </MajorStartingUnits>
</GameData>
 
I believe there is but you would have to look at the Asset tutorials in the Tutorials and References subforum for that sort of info.
There are also a couple of "Changes to Modding from Patch X" threads where I think this might be touched on also. Posts by Deliverator or Leugi would be the first searching I would make.
 
Back
Top Bottom