Additive mod bug

I’ve been trying to make all Gaia buildings spawn lush
So I created major_gods_mods.xml in the right directory with the code below:

<civsmods>
	<civ><name>Gaia</name>
		<terraincreeps>
			<terraincreep creep="GaiaCreep" maxradius="20.0" growthrate="0.25" decayrate="0.5" minupdateinterval="4.5" maxupdateinterval="5.5" avoidunbuildable="" avoidimpassable="">
				<protounit mergeMode='add'>Temple</protounit>
				<protounit mergeMode='add'>Dock</protounit>
				<protounit mergeMode='add'>MilitaryBarracks</protounit>
				<protounit mergeMode='add'>CounterBarracks</protounit>
				<protounit mergeMode='add'>Armory</protounit>
				<protounit mergeMode='add'>SentryTower</protounit>
				<protounit mergeMode='add'>Palace</protounit>
				<protounit mergeMode='add'>MirrorTower</protounit>
				<protounit mergeMode='add'>Wonder</protounit>
			</terraincreep>
		</terraincreeps>
	</civ>
</civsmods>

When I use debug to see the major_gods.xml in C:\Users\User\AppData\Local\Temp\Age of Mythology Retold\Data\game\data\gameplay

Zeus is modified instead probably because it’s the first entry and during gameplay testing, Zeus’s sentry towers spawn lush but Gaia’s sentry towers do not

	<civ>
		<name>Gaia</name>
		<statsid>SP</statsid>
		<key>G</key>
		<culture>Greek</culture>
		<displaynameid>STR_CIV_ZEUS</displaynameid>
		<rollovernameid>STR_CIV_ZEUS_LR</rollovernameid>
		<titleid>STR_CIV_ZEUS_T</titleid>
		<agetech age="ArchaicAge">
			<tech>ArchaicAgeZeus</tech>
		</agetech>
		<deathmatchtech>DeathMatchGreek</deathmatchtech>
		<buildingefficiency>0.6</buildingefficiency>
		<extrabuildingefficiency>0.3</extrabuildingefficiency>
		<startingunits>
			<unit count="4" delay="2.00" x="0.00" y="0.00" z="-5.00">VillagerGreek</unit>
			<unit count="1" delay="4.00" x="6.00" y="0.00" z="0.00">Kataskopos</unit>
		</startingunits>
		<startingunits mode="deathmatch">
			<unit count="9" delay="2.00" x="0.00" y="0.00" z="0.00">VillagerGreek</unit>
			<unit count="1" delay="4.00" x="-12.00" y="0.00" z="0.00">Kataskopos</unit>
		</startingunits>
		<startingqueue>
			<unit autotrain="true">VillagerGreek</unit>
		</startingqueue>
		<startingqueue mode="deathmatch">
			<unit autotrain="true">VillagerGreek</unit>
			<unit prequeue="true">Jason</unit>
		</startingqueue>
		<startingresources>
			<food>200</food>
			<wood>250</wood>
			<gold>50</gold>
			<favor>10</favor>
		</startingresources>
		<startingresources mode="deathmatch">
			<food>15000</food>
			<wood>15000</wood>
			<gold>15000</gold>
			<favor>210</favor>
		</startingresources>
		<icon>resources\greek\static_color\major_gods\zeus_icon.png</icon>
		<portrait>resources\greek\static_color\major_gods\zeus_portrait.png</portrait>
		<breakoutportrait>resources\greek\static_color\major_gods\zeus_breakoutportrait.png</breakoutportrait>
		<minimapborderimage>ui\ingame\minimap\grk_min_panel</minimapborderimage>
		<backgroundscenario>backgrounds\\background_greek.mythscn</backgroundscenario>
		<terraincreeps>
			<terraincreep creep="GaiaCreep" maxradius="20.0" growthrate="0.25" decayrate="0.5" minupdateinterval="4.5" maxupdateinterval="5.5" avoidunbuildable="" avoidimpassable="">
				<protounit>Temple</protounit>
				<protounit>Dock</protounit>
				<protounit>MilitaryBarracks</protounit>
				<protounit>CounterBarracks</protounit>
				<protounit>Armory</protounit>
				<protounit>SentryTower</protounit>
				<protounit>Palace</protounit>
				<protounit>MirrorTower</protounit>
				<protounit>Wonder</protounit>
			</terraincreep>
		</terraincreeps>
	</civ>

So I guess the problem is the additive civs mod cannot precisely locate which civ to modify.

Then I tried to replace major_gods.xml completely, and the code was correctly placed but the game kept crashing.

If devs see this please let me know what is wrong or fix the additive mod.

2 Likes

can confirm this. there is no known syntax to change a specific civ.

Also some other files do not work additive (because of other reason), for example the proto_unit_commands.xml file can not be changed with a proto_unit_commands_mods.xml file.

Hahaha I was trying to do the same thing, but I played with the radius of the creep trying to encompass the whole map just for fun to see how it would look.
My game kept crashing which led me to believe I didn’t do something correctly with the files.
Now that you mentioned all this, yes, you’re right, additive mods aren’t functioning as expected so I would really like for devs to tweak/fix this.

Modding the
unit_type_data.xml
file also causes a bug: The minor god selection ingame when trying to advance gets blank.

Reproduce:
Copy paste the unit_type_data.xml into your mod and add at the end a new unittypeentry, eg.

	<unittypeentry>
		<unittype>HadesShadeUnit_Serp</unittype>
		<displaynameid>STR_EMB_ARCTIC_WOLF_NAME</displaynameid>
		<hidefromrollover></hidefromrollover>
	</unittypeentry>

or do it additive by using unit_type_data_mods.xml file with the same entry but also mergeMode=“add”.

Both of it result in the same bug, which should for sure not happen.

edit more bugs:
an mods containing any folder like “tactics” or “god_powers” can not be uploaded. The modmanager shows a wrong file size and the upload always gives the error “unable to connect to server”, while mods without these folders always work fine to upload (the mod works fine ingame, just no upload possible)