-
Notifications
You must be signed in to change notification settings - Fork 2
10. Mods Guide
This guide covers creating a new infantry type in the game using the NCO mod and C&C mod configuration. You will create a new solider who you can build in-game and tweak the rules for.
This guide does not cover:
- Setting a text description for your new type
- Showing graphics for your unit in the modern graphics mode
- A white square will be shown when non in classic mode
- This can be configured seperately
- Setting a sidebar icon for your new type
If you want help on how to do the above, see the test folder I use for this mod which has an example Infantry mod in it here
- Open or create the
RULES.INIfile inside the mod folder (see here for details) - Add a
Modssection like so:
[Mods]
NewInfantry=LaserDudeThis tells NCO to create a new infantry type with the identifier LaserDude.
Below the Mods section create a new section for your mod:
[LaserDude]
BaseType=E1The BaseType is what the new infantry type should look, act and sound like. In this example a Minigunner will be seen in-game when you create this type.
Your RULES.INI should now look like this:
[Mods]
NewInfantry=LaserDude
[LaserDude]
BaseType=E1Note: New types will inherit ALL the rules of the base type, so you should refer to the RULES-DEFAULT.INI file and set new rules for the different things you want to change. For example: if you use a commando you will need to set the BuildLevel and ScenarioLevel rules for your new infantry type if you want to build it in a campaign mission.
Let's update our RULES.INI section for our new type:
[LaserDude]
BaseType=E1
PrimaryWeapon=Obelisk_Laser
Cost=200This soldier should now be equipped with a laser gun and cost around 200 credits (depending on difficulty level).
Now we have configured the NCO mod to create our new unit we must do the same for C&C. This is done by editing some files in the NCO mod directory.
- Open the
CNCModGameCommands.xmlfile inside theXMLfolder in a text editor - Add a new piece of text after the
modscomment:
<!-- mods -->
<Command Name="LaserDude">
<GameCommand>GAME_COMMAND_TD_MOD_CUSTOM_BUILD20</GameCommand>
</Command>Note: the 20 in the command above tells the game the ID of the new type - this starts at 20 for new infantry types and increases by one for each new type, in the order they appear in the rules. For example: setting NewInfantry=NewType,AnotherType would mean that NewType would have an ID of 20, and AnotherType has an ID of 21.
- Start C&C in the usual way
- Load a mission or skirmish
- Ensure you are in
Classicgrahics mode (spacebar to toggle) - Build a barracks/hand of nod
- Click on your new infantry type in the sidebar
- Your laser powered soldier should now be ready for battle