Warhammer 40,000: Gladius - Relics of War

Warhammer 40,000: Gladius - Relics of War

Create and Share Custom Mods
The best mods for Warhammer 40,000: Gladius live here. Mods are made by players, for players and are not officially licensed by Games Workshop. Click 'Learn More' below to read our Modder’s Guide.
Learn More
Upgrades: any way to enable an upgrade without researching?
For my mod I was going to have the player and AI start with pre-determined upgrades.

Is this even possible? I saw in the Factions file, for the Quest tags, that an upgrade can be given as a reward for a quest.

I tried adding an upgrade to the Factions tag, and also in the Cities tag, but in both case the game-engine raised an error.

Or is there an attribute to set to the <upgrade> tag that would enable the upgrade without going thru the research?
< >
Showing 1-6 of 6 comments
GrenadeMagnet6 21 May, 2022 @ 7:14pm 
I couldn't find a way to automatically enable an upgrade. In the Factions file I tried to add a new Quest that would enable the Upgrade as a reward for a simple objective, such as building the Headquarters, but the quest wasn't being recognized on Turn 1 or Turn 2.

I assume I would have to enable upgrades the "hard" way, by knowing which units, traits and buildings xml files have the requiredUpgrade as a dependency and removing that dependency from each file, to simulate a particular upgrade that was already researched.

I'm also not able to find a schema for the game's xml files that help guide mod on all the supported xml properties and attributes. Would have been a nice time-savers if the Developers had provided it.

Last edited by GrenadeMagnet6; 21 May, 2022 @ 7:16pm
Warempel 23 May, 2022 @ 1:16am 
If you want units to have extra traits "to simulate a particular upgrade that was already researched" (in other words: at game start) you just need to add these traits. In this case upgrades are irrelevant.

Otherwise it should be possible to add new traits that unlock as a quest reward using the requiredUpgrade dependancy. You could use Astra Militarum's first quest as an example.
zhaozilong93 23 May, 2022 @ 8:58am 
You can make a dummy tier 1 where it only has those upgrades. The AI will be forced to pick them, though that would take a few turns. Alternatively you can just disable the requiredUpgrade condition for whatever traits or actions you want the AI to have.
GrenadeMagnet6 23 May, 2022 @ 2:00pm 
Ok, thanks for the feedback. I was hoping to unlock particular upgrades or traits for all units for a faction in just one XML file when the game starts, for the player and the AI. But it seems like it would require to have all the affected units' individual xml files modified in the mod beforehand.

For my mod I'm designing an external system would determine what upgrades were available for each faction engaged in a war, to simulate scarcity of equipment that can occur. As the system would determine what upgrades each Faction has available, it would tell the player which mod files to change.

I'll have to see if it's simpler to do the opposite: to change the base mod files so all upgrades are available, and instead have the system instruct the player which upgrades to restrict for both the player's faction and the AI files. The system would also generate the required lines to modify with the correct xml tags already provided, so it's just a copy/paste exercise in the modded files for the players.

One limitation would be the enemy AI faction could not be the same as the player, otherwise the upgrade changes would be the same.
Last edited by GrenadeMagnet6; 23 May, 2022 @ 2:09pm
Warempel 24 May, 2022 @ 2:25am 
So ultimately you'll need something to flag / unlock the available upgrades as "researched" @ game start. I don't know how to do that, or if it's possible at all.

But you can hide the unavailable upgrades in the tech tree by adding 'visible = 0' in each individual .xml. That still requires a lot of files to be modded though. Note the AI may still be able to research these upgrades (I haven't tested that).
GrenadeMagnet6 24 May, 2022 @ 3:32pm 
Originally posted by Warempel:
So ultimately you'll need something to flag / unlock the available upgrades as "researched" @ game start. I don't know how to do that, or if it's possible at all.

But you can hide the unavailable upgrades in the tech tree by adding 'visible = 0' in each individual .xml. That still requires a lot of files to be modded though. Note the AI may still be able to research these upgrades (I haven't tested that).
Earlier I tested an Upgrade to have a required "Dummy" item previously researched and then the item was disable for the player in their Research screen. In this case I tested with the Level 1 FragGrenades for the Astra Militarum. I would hope that technique would also prevent the AI from researching a particular upgrade, but to your point, I would have to test further to see.
Last edited by GrenadeMagnet6; 24 May, 2022 @ 3:33pm
< >
Showing 1-6 of 6 comments
Per page: 1530 50