Warhammer 40,000: Gladius - Relics of War Wiki
Advertisement

Modding is supported by Gladius out of the box. Modders are free to modify it as they see fit, but the developers would like to note the following:

Bear in mind that Warhammer 40,000: Gladius - Relics of War contains IP owned by Games Workshop, and as a result you should consider a few things when creating mods for this title:

  • When uploading Warhammer 40,000: Gladius - Relics of War mods to the Steam Workshop, you’ll need to confirm that you’ve read the section on Mods in the game’s EULA. This is provided as a pop-up message when you are uploading.
  • Please ensure your mod meets the requirements laid out in the EULA, especially with regard to the treatment of Games Workshop and Warhammer 40,000: Gladius - Relics of War IP, and ensuring that no third party IP is present.
  • Do not include or alter content in a way that is offensive or denigrating to the world of Warhammer 40,000.
  • Please only include Warhammer 40,000 content in your mods – other Games Workshop IP such as Age of Sigmar or Warhammer Fantasy Battles is separate and is often licensed to other companies, or used in other games.
  • It is not permitted to charge or ask for money for your Warhammer 40,000: Gladius - Relics of War mods.

Warning[]

The game saves certain world data within its saved game files. If you load a saved game for testing mod changes, you will find the game behaves strangely—some mod changes will not be taken into account by simply reloading the game. Instead, you will need to start a new match whenever you want to try an alteration to your mod.

Recommendations[]

Changing in-game settings[]

When starting a new match, the game will play a faction cinematic by default. You can deactivate these cinematics on the game's menu by unmarking the Show Cinematics box in the General settings.

Preventing the game from deactivating mods upon crashing[]

Before you begin modding, you may save a lot of time by making a few small changes to the game's settings.

You are bound to cause your game to crash multiple times as you test new features while modding. By default, the game deactivates all mods whenever it crashes when launching to allow the user to make changes to its settings, forcing modders to have to reactivate their mods and relaunch the game every time that happens. In order to prevent that from happening and speed up the modding process, you can access the file Game.xml, using Notepad or a similar text editor, located in: [Driver]:\Users\[Username]\Documents\Proxy Studios\Gladius\Configuration and change a few configurations:

  1. Locate the <entry name="General/TerminateWithDisableMods" value="1"/> line (around line 115) and change 'value="1"' to 'value="0"' so that the game does not automatically deactivate all mods upon a crash. NOTE: If you add an external mod that causes the game to crash, you will have to revert this value to 1 in order to deactivate it from the game's Mods menu, or manually add the faulty mod on the file (instructions below).
  2. Locate the <entry name="General/TerminateWithMarkContentCorrupt" value="1"/> line below the one above and change its 'value="1"' to 'value="0"' to prevent the game from requiring a file validation on the platform the game was acquired, allowing you to continue working on mods without the need for an internet connection to reset the game whenever it crashes.

If you ever need to deactivate a mod without launching the game, you can either revert the TerminateWithDisableMods entry above and launch the game for it to crash, or use the line <entry name="Mods/Disabled" value=""/> on the file by adding the mod's hard drive location to the list in the following format:

  • <entry name="Mods/Disabled" value="[Drive]:/Users/[Username]/Documents/Proxy Studios/Gladius/Mods/[Mod Folder Name]"/> to deactivate a mod you've created manually on your computer.
  • <entry name="Mods/Disabled" value="[Drive]:/(...)/steamapps/workshop/content/489630/[Mod Workshop Number]"/> to deactivate a mod you've added from the Steam Workshop.
  • If you want to deactivate multiple mods, just add the other mods within the value field separated by a comma without spaces, like this: <entry name="Mods/Disabled" value="[Drive]:/Users/[Username]/Documents/Proxy Studios/Gladius/Mods/[Mod Folder Name],[Drive]:/(...)/steamapps/workshop/content/489630/[Mod Workshop Number]"/>. You can also deactivate mods manually on the main menu and reload the file to see an example of how it is set up.

Circumventing the Slitherine launcher[]

Additionally, you might want to skip the Slitherine launcher to speed up the mod testing process:

  • Right click over Gladius on your library, click on Properties, and on the "Launch Options" field, you can insert the entire executable file's address into the field, followed by %command% at the end, like this: [Drive]:\(...)\steamapps\common\Warhammer 40000 Gladius - Relics of War\Binaries\Windows-x86_64\Gladius.exe" %command%.
  • If you own Gladius on a different platform, find the equivalent installation folder. You may be able to quickly do this by creating a desktop shortcut with the platform, accessing its properties, and copying the information on the Target field.

Depending on your version of the game, creating a desktop shortcut for Gladius.exe from the Binaries\Windows-x86_64 folder might allow you to launch the game straight away as well.

Backing up the game's files & SSD storage[]

Although you may verify the game's integrity and download it again in case you corrupt the game's files, you may skip the need for that in the first place by making a copy of the game's Data folder, which contains all files that can be modded, to quickly replace them in case of corruption.

For that, just access the game's installation folder, copy, and then paste the Data folder. You can then access those duplicate files for consulting the them rather than the main Data folder, preventing accidental destruction.

Furthermore, the game most modded content as soon as it is initialized. You can speed up the initialization process by storing the game in an SSD drive instead of a hard drive disk.

In-game Debug Panel[]

The Debug Panel can be opened in-game, by default, using the Ctrl+D hotkey. This feature only works on Singleplayer.

The Debug Panel opened in the game, showcasing its various features.

Debug Panel 2

This is a powerful tool for testing purposes. You can, broadly speaking:

Debug Panel Functions
Button Function
Complete Action Instantly complete a city's designated production order. Only for the main construction building.
Complete Objective Completes the current quest's objective.
Fog of War Reveals all tiles of the map, removing the Fog of War.
Die Kill the currently-selected unit.
Dmg Damages the currently-selected unit by 1/5 of its Health.
Heal Heals the currently-selected unit to full Health.
Level Level up the currently-selected unit by 1 level.
Move Recover the action and movement points of the currently-selected unit.
Cd Resets the cooldown of all the currently-selected unit's abilities.
Player Selector Select the faction you want to target with your debug options. You can choose any player faction, or all of them.
Toggle AI Allows the game to play by itself. Press again to stop.
Unit Selector Allows you to select a unit of any kind to create it, even from other factions. The unit will be attributed to the faction currently selected.
Add Unit Will change the cursor to an area selection for placing the unit currently selected.
Building Selector Allows you to select a building of any kind to create it, even from other factions. The unit will be attributed to the faction currently selected. Note that buildings may not function properly without their respective faction's resources.
Add Building Will change the cursor to an area selection for placing the building currently selected. Must choose a city tile.
Upgrade Selector Allows you to select an upgrade for a unit. The upgrade needs to be valid for that unit.
Add Upgrade Select a valid unit for the chosen upgrade and press this button to add it to that unit.
Resource Selector & Count Allows you to give a specific amount of a designated resource to the faction currently selected.
Quest Selector Allows you to choose a specific quest from the current faction you are playing.
Start Quest Initiates the currently-selected quest. Note that skipping certain quests may lead to a crash due to non-existing elements.
Item Selector Allows you to choose an Jokaero Outpost item.
Add Item Adds the chosen item to the unit currently selected. Will be greyed out unless the unit has an item slot available.
Feature Selector Allows you to choose a specific terrain feature.
Add Feature Will change the cursor to an area selection for placing the feature currently selected.
Remove Feature Will change the cursor to an area selection for choosing a tile to remove its features, one at a time.
Raise Ground Will change the cursor to an area selection for choosing a tile to raise its height value by 1. Cannot increase past 4. The change will not happen visually until you rebuild the map.
Lower Ground Will change the cursor to an area selection for choosing a tile to decrease its height value by 1. Cannot decrease past 0. The change will not happen visually until you rebuild the map.
Build Ground Press this button to rebuild the map, taking into effect ground height changes. It may not properly rebuild certain visual elements, like the Cliff Highlights, but the game's logic will take the changes into account for unit behaviour.


Steam Workshop[]

This section covers the steps needed to get a Mod uploaded to the Steam Workshop.

A PDF version of this guide is available here

Mod Location[]

Gladius uses non-destructive modding, i.e., the game’s core files are never modified. In order for Gladius to load mods, they must be placed in:

    • Windows:

          My Documents\Proxy Studios\Gladius\Mods\<mod name>

     • Linux:

          $HOME/.config/Proxy Studios/Gladius/Mods/<mod name>

replacing <mod name> with the name of the actual mod. Any mod files meant to replace their original counterparts must be named and placed in the correct directory hierarchy under the Data subfolder in the main <mod name> folder.

In the <mod name> folder, place a PNG image named Preview.png. This image will be used as the Steam Workshop thumbnail. The image should be less than 1 MB in size to ensure continued compatibility with the Steam Workshop platform.

Previewimagelocation

Mod Listing[]

Login to Steam and Launch Gladius. From the main menu, navigate to Extra → Mods:

Mainmenuextrahover
Extramenumodshover


If the mod is placed in the correct location in Step 1, then you should see it listed in the Mods menu:

Modlist


A mod that has not yet been uploaded to the Steam Workshop will have 2 icons for its entry:

  • Upload
    Upload
    Clicking this icon will begin the upload process to the Steam Workshop.
  • Open
    Open
    Clicking this icon will open up a file browser window for your operating system and show you the mod folder on the computer.
  • Enable
    Enable
    Clicking this icon will enable/disable the mod within the game.

Uploading to the Steam Workshop[]

Click on the Upload button in Step 2. A window will appear asking you to accept the publishing terms:

Eula

You must agree to these terms if you want your mod to be uploaded to the Steam Workshop.

Once you accept the terms and click the Agree button, the mod will start uploading. A successful upload to the Steam Workshop will display a prompt saying the mod was uploaded:

Moduploadedsuccess

An additional icon will now appear in the mod listing:

  • Details
    Moddetails
    Click this icon to open your Steam browser to the Steam Workshop page for the mod. You can now enter in information about the mod on the Steam Workshop and upload any additional media to showcase the mod.

After the mod has been successfully published to the Steam Workshop, the mod directory will now contain a file called SteamID.txt:

Steamid

This file is the unique Steam Workshop URL corresponding to the mod.


To update the current version on the Steam Workshop, simply re-upload the mod using same method as before.

Errors[]

Here are some common errors you might encounter when attempting to upload the mod:

  • k_EResultFail - Generic failure.
  • k_EResultInvalidParam - Either the provided app ID is invalid or doesn't match the consumer app ID of the item or, you have not enabled ISteamUGC for the provided app ID on the Steam Workshop Configuration App Admin page. The preview file is smaller than 16 bytes.
  • k_EResultAccessDenied - The user doesn't own a license for the provided app ID.
  • k_EResultFileNotFound - Failed to get the workshop info for the item or failed to read the preview file.
  • k_EResultLockingFailed - Failed to aquire UGC Lock.
  • k_EResultFileNotFound - The provided content folder is not valid.
  • k_EResultLimitExceeded - The preview image is too large, it must be less than 1 Megabyte; or there is not enough space available on the users Steam Cloud.
  • known and removed, tested Feature has been removed. no longer able to upload to Steam workshop.

General Modding[]

Practically every aspect of Gladius is moddable; only modifying the game logic remains inaccessible.

You can create new or modify existing:

  • units
  • factions
  • technologies
  • traits
  • items
  • features
  • quests
  • GUI
  • audio
  • cutscenes
  • models (meshes)
  • skins (materials)
  • animations
  • general game parameters


General Notes:

- References to game directories like \Data, \Resources, etc. are shorthand for

  • \Warhammer 40000 Gladius - Relics of War\Data;
  • \Warhammer 40000 Gladius - Relics of War\Resources;
  • etc.


where \Warhammer 40000 Gladius - Relics of War is the top-level game installation directory.

- For brevity, the wiki uses the Windows backslash \ notation with regards to directory identification. Linux users should readily replace the backslash with a forward slash /.

Mod Location[]

As of patch 1.08, the game uses non-destructive modding (i.e., core files are not modified). In order for the game to load mods, they must be placed in:

  • (Windows) \My Documents\Proxy Studios\Gladius\Mods\<mod name>\Data\
  • (Linux) ~/.config/Proxy Studios/Gladius/Mods/<mod name>/Data/


replacing <mod name> with the name of the actual mod. Any mod files meant to replace their original counterparts must be named and placed in the correct directory hierarchy (detailed below) in order to be flagged as such by the engine.

The \Data Structure[]

All of the game's assets are located under \Warhammer 40000 Gladius - Relics of War\Data:

  • \Data\Audio: sound and music.
  • \Data\Cinematics: cut-scenes.
  • \Data\Core: in-game text and language translations.
  • \Data\GUI: user interface.
  • \Data\Scene: camera management.
  • \Data\Video: icons, textures, meshes, animations, fonts, and sprites.
  • Data\World: specific information on units, buildings, factions, weapons, and upgrades.

Rather than further enumerate individually all of the numerous sub-directories, the location of specific remaining content is best absorbed through particular modding ventures. For example, when creating a new "unit", that respective section of the modding guide will elaborate all the necessary files required under \Audio, \Video, \World, etc.

Log Files & Crashes[]

As with any general modding venture, there will often be times where changes will lead to a game crash. To help diagnose the source of the error, the game displays an on-screen error prompt and writes an error log to:

  • (Windows) \My Documents\Proxy Studios\Gladius\Logs\Gladius.error.log
  • (Linux) ~/.config/Proxy Studios/Gladius/Logs/Gladius.error.log


Consulting this log file is an excellent place to help narrow down the source of the error.

If the crash occurs on startup, the game will automatically re-download/verify core game files, then it disables all mods on next game launch.

Some general crash issues:

  • Crashing on game startup: Missing elements in \Data\Core and \Data\World
  • Crashing with error "Visual C++ runtime error": Missing elements in \Data\Video
  • Clicking on "New Game": Typically, missing faction base images for new factions or improper changes to WorldParameters.xml
  • Launching a new game: Typically, missing cutscenes in Data\Video or missing starting city/units
  • Settling a new city: Missing base city for your faction or having an invalid mesh for the city headquarters
  • Clicking on "Research": Bad references in Data\World\Upgrades and Data\Core files, missing icons in Data\Video, or a research that does not have enough researches leading to that tier
  • Clicking on Compendium: Missing flavor or description to some elements in Data\Core

XML Programming[]

Every aspect of the game outside of the engine is defined using XML. The difficulty posed to the modder is not XML per se, but rather the general game framework built using XML. In other words, Gladius XML. The engine recognizes certain predefined XML code structure that modders need to adhere to. Opening up an .xml file and changing a value or following a pattern to add to the existing code is trivial. Going through such an example is illustrated at the end of this page. Getting the engine to work with custom XML tags is the tricky part. In this section we give an example of a more intricate nature showcasing how the general Gladius XML framework is structured.


For this example we will consider a simple modification to the colour of the Menu button in the top-right corner of the world GUI. This button is defined using the following code:


\Data\GUI\Blueprints\World\TopBar.xml

   <?xml version="1.0" encoding="utf-8"?>
   <world:topBar type="topBar">
   	<container layoutAlignment="MiddleLeft" preferredSize="FillParent FillParent" weights="2 FillAll">
   		<label name="resourcesLabel" alignment="MiddleRight" preferredSize="WrapContent FillParent" stringStyle="<style name='Heading'/>"/>
   	</container>
   	<container layoutAlignment="MiddleCenter" preferredSize="FillParent FillParent" weights="1 FillAll">
   		<label name="turnLabel" alignment="MiddleCenter" preferredSize="FillParent FillParent" stringStyle="<style name='Heading'/>" wordCut="1"/>
   	</container>
   	<container layoutAlignment="MiddleRight" layoutGap="8 8" preferredSize="FillParent FillParent" weights="2 FillAll">
   		<label name="playerLabel" alignment="MiddleRight" preferredSize="FillParent FillParent" weights="1 FillAll" stringStyle="<style name='Heading'/>" wordCut="1"/>
		<!-- <button name="restartButton" preferredSize="148 FillParent" caption="<string name='GUI/RestartScenario'/>" type="emphasizedButton"/> -->
   		<button name="menuButton" preferredSize="148 FillParent" caption="<string name='GUI/Menu'/>" keys="Escape"/>
   	</container>
   </world:topBar>
   




Specifically, we are interested in the third-last line <button name="menuButton" ... />. This tells us that the Menu button style is defined as <button>. Now, the definition for <button> is:


\Data\GUI\Skins\Default.xml

   <skin>
   	...
   	<button preferredSize="200 28"
   			pressedSound="Interface/Press">
   		<background texture="GUI/Button" color="1 1 1 1"
   				pressedTexture="GUI/Button" pressedColor="1 1 1 1"
   				padding="7 7" delta="2 2"/>
   		<content margin="4 2"/>
   	</button>
   	...
   </skin>
   


From this we see that the original texture used for a <button> is \Data\Video\Textures\GUI\Button.dds. We can proceed by either 1) changing what Button.dds looks like, 2) create a new image, for example, NewButton.dds, and set pressedTexture="GUI/NewButton", or 3) modify TopBar.xml. The modder is encouraged to try the first two approaches and see that they are inadequate solutions. The underlying image used by <button> is system-wide, so aspects of the UI that the modder never intended to change will, in fact, change. Therefore, we are left with implementing a Gladius XML solution.


The engine expects TopBar.xml to pass to it <button>. If the modder attempts to create a new custom XML tag, for example, <menuButton>, then the game will crash. However, the problem is not where to define it, but rather how to define it. There is no getting around the fact that <button> is a construct defined directly in the engine. Therefore, the modder is not going to be successful in trying to create a new construct that the engine does not inherently understand. What the modder can do is modify which <button> will be loaded:


\Data\GUI\Skins\Default.xml

   <skin>
   	...
   	<button preferredSize="200 28"
   			pressedSound="Interface/Press">
   		<background texture="GUI/Button" color="1 1 1 1"
   				pressedTexture="GUI/Button" pressedColor="1 1 1 1"
   				padding="7 7" delta="2 2"/>
   		<content margin="4 2"/>
   	</button>
   	...
   	<menuButton preferredSize="200 28"
   			pressedSound="Interface/Press">
   		<background texture="GUI/ButtonMenu" color="1 1 1 1"
   				pressedTexture="GUI/ButtonMenu" pressedColor="1 1 1 1"
   				padding="7 7" delta="2 2"/>
   		<content margin="4 2"/>
   	</menuButtonbutton>
   	...
   </skin>
   


So what we did was define a new XML tag <menuButton> that has the exactly same structure as <button>. Now, in TopBar.xml, we can reference this new button by the type attribute:


   <button type="menuButton" name="menuButton" ... />
   


The above example demonstrates that XML in-and-of-itself is insufficient beyond superficial manipulation of existing values. Advanced modding relies on understanding the underlying Gladius XML framework.

Modifiers[]

When creating or modifying units, buildings, traits, weapons, etc, modifiers are very important to know about. More information about their structure, lists of their components and explanations of their effects can be found in the modifiers page.

Image Editing[]

All images (apart from fonts) use the DDS file format. However, Gladius requires specific export settings for the DDS file. The following subsections contain links to free programs that can edit DDS files and instructions to set the correct export settings for the respective program.

Paint.NET[]

The export settings will appear only after first saving the file in Paint.NET. Use the following export settings:

   - DXT3 (Explicit Alpha)
   - Cluster fit (Slow/HQ)
   - Perceptual
   - Generate Mip Maps
   - Fant

The only other thing to keep in mind while working with images in Paint.NET is to set an appropriate Opacity-Alpha value (which is accessible from the Colors palette -> More). Setting this value correctly might require some trial and error, especially if it's an image to which the game applies it's own additional filters.

GIMP - GNU Image Manipulator Program[]

Upon exporting, change the file extension to DDS then click Export. This will bring up the Export to DDS settings window. For Compression, select BC2 /DXT3 or BC3 / DXT5. For Mipmaps, select Generate mipmaps.

Dev-Provided Modding Resources[]

The development team at Proxy Studios has provided the community with official tools that can be used for modding. These are the same tools used in-house by the studio when creating game assets. Anyone who bought the game, automatically gets access to the tools:

  • \Resources\3dsMax. Exporting scripts from 3ds Max for animations, meshes, vegetation, and scenes.
  • \Resources\Scripts\ConvertFromWarhammerSpec.py. Python script to automatically convert 7e Codex values to in-game units.

A Simple Example Mod[]

By editing \Data\World\Blueprints\WorldParameters.xml you can add an option for larger maps. The original file contains the following code:

   <sizes>
   	<size dimension="27 27" recommendedPlayers="2"/>
   	<size dimension="33 33" recommendedPlayers="3"/>
   	<size dimension="38 38" recommendedPlayers="4"/>
   	<size dimension="46 46" recommendedPlayers="6"/>
   	<size dimension="53 53" recommendedPlayers="8"/>
   </sizes>
   


We can add a new line at the end to make a new map size, 80x80 with recommended player count of 16:

   <sizes>
   	<size dimension="27 27" recommendedPlayers="2"/>
   	<size dimension="33 33" recommendedPlayers="3"/>
   	<size dimension="38 38" recommendedPlayers="4"/>
   	<size dimension="46 46" recommendedPlayers="6"/>
   	<size dimension="53 53" recommendedPlayers="8"/>
   	<size dimension="80 80" recommendedPlayers="16"/>
   </sizes>
   


Now we must also locate the string reference, otherwise the game will crash. We do this by modifying \Data\Core\Languages\<...your language...>\WorldParameters.xml. The original file contains the following code:

   <language>
   	...
   	<entry name="Size" value="World Size"/>
   	<entry name="Size0" value="Tiny"/>
   	<entry name="Size0Hint" value="%1%: Recommended for 2 players."/>
   	<entry name="Size1" value="Small"/>
   	<entry name="Size1Hint" value="%1%: Recommended for 3 players."/>
   	<entry name="Size2" value="Medium"/>
   	<entry name="Size2Hint" value="%1%: Recommended for 4 players."/>
   	<entry name="Size3" value="Large"/>
   	<entry name="Size3Hint" value="%1%: Recommended for 6 players."/>
   	<entry name="Size4" value="Huge"/>
   	<entry name="Size4Hint" value="%1%: Recommended for 8 players."/>
   	...
   </language>
   

where the ... represent other code in the file but not directly pertinent for our mod. We want two follow the same structure as the above code and add two new lines at the end:

   <language>
   	...
   	<entry name="Size" value="World Size"/>
   	<entry name="Size0" value="Tiny"/>
   	<entry name="Size0Hint" value="%1%: Recommended for 2 players."/>
   	<entry name="Size1" value="Small"/>
   	<entry name="Size1Hint" value="%1%: Recommended for 3 players."/>
   	<entry name="Size2" value="Medium"/>
   	<entry name="Size2Hint" value="%1%: Recommended for 4 players."/>
   	<entry name="Size3" value="Large"/>
   	<entry name="Size3Hint" value="%1%: Recommended for 6 players."/>
   	<entry name="Size4" value="Huge"/>
   	<entry name="Size4Hint" value="%1%: Recommended for 8 players."/>
   	<entry name="Size5" value="Gigantic"/>
   	<entry name="Size5Hint" value="%1%: Recommended for 16 players or more."/>
   </language>
   


We now make sure that the above files are placed in the correct mod location under a suitable mod name and... tada! We just allowed for an epic map size!

Advertisement