-
Notifications
You must be signed in to change notification settings - Fork 2
10. Mods Guide
This guide covers creating new types in the game using the NCO mod and C&C mod configuration. You will create a new solider and chemical tank 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 not using classic mode
- 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 new Infantry & Unit mod in it here. These are not things provided by the mod, they are supported out of the box by C&C for making mods using XML, text and image files.
- Open or create the
RULES.INIfile inside the mod folder (see here for details) - Add a
Modssection like so:
[Mods]
NewInfantry=LaserDude
NewUnits=ChemTankThis tells NCO to create a new infantry type with the identifier LaserDude and a new unit type with the identifier ChemTank.
Below the Mods section create a new section for your mod:
[LaserDude]
BaseType=E1
[ChemTank]
BaseType=FTNKThe 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 the LaserDude type and a Flame Tank when you build a ChemTank.
Your RULES.INI should now look like this:
[Mods]
NewInfantry=LaserDude
NewUnits=ChemTank
[LaserDude]
BaseType=E1
[ChemTank]
BaseType=FTNKNote: 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=200
[ChemTank]
BaseType=FTNK
BuildLevel=5
ScenarioLevel=5
Prerequisite=NONE
PrimaryWeapon=CHEMSPRAYThe new soldier should now be equipped with a laser gun and cost around 200 credits (depending on difficulty level).
The chemical tank can be built in level 5 on-wards and does not require any buildings other than an Airstrip.
Now we have configured the NCO mod to create our new units 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_BUILD1</GameCommand>
</Command>
<Command Name="ChemTank">
<GameCommand>GAME_COMMAND_TD_MOD_CUSTOM_BUILD2</GameCommand>
</Command>Note: The 1 and 2 in the command starts at 1 for new types and increases by one for each new type, in the order they appear in the XML file.
For example: setting NewInfantry=NewType,AnotherType would mean that NewType would have an ID of 1, and AnotherType has an ID of 2.
- Start C&C in the usual way
- Load NOD mission 5 (or a later level), or start a skirmish as NOD
- Ensure you are in
Classicgraphics mode (spacebar to toggle) - Build a Power Plant, Hand of Nod, Refinery and an Airstrip
- Click on your new infantry type in the sidebar
- Your laser powered soldier should now be ready for battle
- Click on your new chemical tank in the sidebar
- Your chemical spraying tank should now be ready for battle