Warhammer 40,000: Gladius - Relics of War

Warhammer 40,000: Gladius - Relics of War

33 ratings
How to make a new Unit (Basic)
By PotatoMcWhiskey
This guide will teach the user the very basics of creating a new unit from existing assets.
   
Award
Favorite
Favorited
Unfavorite
Credits
Major Credits to Elindos Phar, Qai and Kravix for assistance in the creation of this guide. This wouldn't exist without their help.
Introduction
The goal of this guide is to explain as simply as possible, the process by which you can create new units in the game from existing assets.
Required Software and Skill
To follow this guide, you will need software capable of editing .xml files.

Notepad++ and Sublime Text are two pieces of software that can do this.

You will also need or be willing to learn basic XML structure.
Procedure
  1. Locate the unit file you want to use as your "Base", in this example we will be using the guardsman unit located in (Data\World\Units\AstraMilitarum\Guardsman.xml)

  2. Copy the base unit file and rename it. We will rename our version to "Conscript"

  3. Now that the unit exists, we must make sure we take care of all of it's dependancies.

  4. Locate (Data\World\Buildings\AstraMilitarum\Infantry.xml) and add the line
    <produceUnit unit="AstraMilitarum/Conscript"/>
    I like to add them to the bottom of the file, see following image:


  5. Locate (Data\Core\Languages\English\Units.xml) and add the lines

    <entry name="AstraMilitarum/Conscript" value="Conscripts"/> <entry name="AstraMilitarum/ConscriptDescription" value="Light infantry unit."/> <entry name="AstraMilitarum/ConscriptFlavor" value="This is my description of the glorious Conscripts unit."/>

    Again I like to add them to the bottom of the file, see following image:


    NOTE: The exact text in the lines are different, because I have locally changed mine to add more flavor.
  6. Locate (Data\Video\Textures\Icons\Overlay\Units\AstraMilitarum\Guardsman.dds) and make a copy of it. Name it Conscript.dds
  7. Locate (Data\Video\Textures\Icons\Units\AstraMilitarum\Guardsman.dds) and make a copy of it. Name it Conscript.dds

  8. Your unit is now fully complete and ready to test. Test launch the game and see if it works. If the game crashes its likely you are missing something in the previous steps. I would recommend running a short test game to see if you can produce the unit.

  9. Once you have confirmed that the unit is working, you can now start making changes to it's core statistics. More advanced guides will cover how to add weapons, abilities, traits and so on.

    See following image for the changes I have made. I mostly changed the group size, the rowsize, and their basic statistics like health and accuracy:

Congratulations, you are now done and able to create basic units for any faction using existing assets. More advanced guides will cover how to create textures, models, Weapons etc.
Troubleshooting and FAQ
This section will be edited to answer any common questions or problems people run into following the guide.
8 Comments
lingeringfart64 18 Jun @ 12:26pm 
interesting..... I dont even know how to code :steamhappy:
War Criminal 17 Feb, 2021 @ 8:38am 
>"Also I think you can really break game play if you up stats to much just a thought."
is this a challenge?
Lord Dundar 15 Feb, 2019 @ 8:37am 
Just a thought the crash could be this
<produceUnit unit="SpaceMarines/Whirlwind" requiredUpgrade="SpaceMarines/Vindicator"/>
I wanted to Whirlwind to open up with the Vindicator research.
Lord Dundar 15 Feb, 2019 @ 8:35am 
I was trying to bring the Whirlwind to the Space Marines by moving over the Basilisk stats to a Hunter and renaming it. Looks like I caused a good crash, any advice on how to use other factions stats and weapons? Also I think you can really break game play if you up stats to much just a thought.
wikkyd 31 Aug, 2018 @ 8:26pm 
Looking forward to the advanced guide, I have a tyranid ravener I'd like to bring into the wildlife faction
ScheiteMeister 30 Jul, 2018 @ 9:16am 
I already solved the problem.
Thank you for responding though.
PotatoMcWhiskey  [author] 30 Jul, 2018 @ 9:15am 
@mickieMcGee did you save the file as .dds? See this page: https://gladiusrelicsofwar.gamepedia.com/Modding:Icons
ScheiteMeister 30 Jul, 2018 @ 4:51am 
I made a custom unit icon for several of my new units, but it comes out blank ingame(I use Gimp if that helps) do you have any idea why this is happening?