Hi all!
I've been modding Civ V for a while and got stuck in one aspect: updating existing units in XML with the Update tag.
The setup: I am not using Modbuddy. Instead, I placed my mod files in the Assets/DLC/Expansion2 directory and edited the Expansion2.Civ5Pkg file to hookup the new files. This works. I was able to create 13 new civilizations. I did this on purpose to be able to play with friends.
The problem: I want to now change existing unit data without modifying game files (I want to do it from my mod files). Specifically, I wan to to make Gatling Gun have 2 range by default.
What I tried:
<GameData>
<Units>
<Update>
<Set Range="2" />
<Where Type="UNIT_GATLINGGUN" />
</Update>
</GameData>
- this does not work
<GameData>
<Units>
<Update>
<Set Range="3" />
<Where Type="UNIT_ARCHER" />
</Update>
</GameData>
- I did this as a test to see if my setup and logic are correct and it works.
<Delete Type="UNIT_GATLINGGUN" />
- does not work
<Delete Type="UNIT_ARCHER" />
- again, as a test: it works
What I noticed:
- the gatling gun unit is initially declared in the CIV5Units_Expansion2.xml
- there is another definition in CIV5Units_Inherited_Expansion2.xml but here the "Replace" tag is used.
What I tried again:
- I commented out the entire "replace" tag from CIV5Units_Inherited_Expansion2.xml and deleted the unit in my file (used the "delete type=" entry). This worked. I then tried to update the range to 2 and it did not work.
- I added a "Replace" tag in my mod file (copy-pasted from CIV5Units_Inherited_Expansion2.xml and changed the range to 2 in the process) and every other entry associated with the Gatling gun in that file and it still does not work.
It seems that the CIV5Units_Inherited_Expansion2.xml is loaded after my mod file, ignoring the changes I make to it in my mod file or something...
Any help would be appreciated.
Thanks!
Moderator Action: Moved to main C&C forum as that is where questions are best answered. Good luck. leif[/mod]
I've been modding Civ V for a while and got stuck in one aspect: updating existing units in XML with the Update tag.
The setup: I am not using Modbuddy. Instead, I placed my mod files in the Assets/DLC/Expansion2 directory and edited the Expansion2.Civ5Pkg file to hookup the new files. This works. I was able to create 13 new civilizations. I did this on purpose to be able to play with friends.
The problem: I want to now change existing unit data without modifying game files (I want to do it from my mod files). Specifically, I wan to to make Gatling Gun have 2 range by default.
What I tried:
<GameData>
<Units>
<Update>
<Set Range="2" />
<Where Type="UNIT_GATLINGGUN" />
</Update>
</GameData>
- this does not work
<GameData>
<Units>
<Update>
<Set Range="3" />
<Where Type="UNIT_ARCHER" />
</Update>
</GameData>
- I did this as a test to see if my setup and logic are correct and it works.
<Delete Type="UNIT_GATLINGGUN" />
- does not work
<Delete Type="UNIT_ARCHER" />
- again, as a test: it works
What I noticed:
- the gatling gun unit is initially declared in the CIV5Units_Expansion2.xml
- there is another definition in CIV5Units_Inherited_Expansion2.xml but here the "Replace" tag is used.
What I tried again:
- I commented out the entire "replace" tag from CIV5Units_Inherited_Expansion2.xml and deleted the unit in my file (used the "delete type=" entry). This worked. I then tried to update the range to 2 and it did not work.
- I added a "Replace" tag in my mod file (copy-pasted from CIV5Units_Inherited_Expansion2.xml and changed the range to 2 in the process) and every other entry associated with the Gatling gun in that file and it still does not work.
It seems that the CIV5Units_Inherited_Expansion2.xml is loaded after my mod file, ignoring the changes I make to it in my mod file or something...
Any help would be appreciated.
Thanks!
Moderator Action: Moved to main C&C forum as that is where questions are best answered. Good luck. leif[/mod]
Last edited by a moderator: