Units template
A new unit or hero: its class, the command that recruits it, its images and its texts.
Steps
Copy this folder into
<game folder>\mods\and rename it.In
mod.jsonchangeid(lowercase letters, numbers and hyphens: it identifies your mod),name,authorsanddescription.Create the unit from an existing one. From the folder of the SDK:
node tools\create-unit.js <DATA folder> <your mod folder> MyUnit --base RHastatus --health 260 --damage 20 --armor 14 --building RBarracks --gold-cost 180 --time 9000 --key v --name "My unit"It writes the class, the command and the texts in the folders below. New units explains every option and where the DATA folder comes from.
Make the portrait and the button from PNG files with
tools\convert-image.js(Custom images).Delete the notes. Enable the mod in your profile and recruit the unit.
Folder layout
my-unit\
mod.json
README.md
data\
classes\
MyUnit.sc.xml
commands\
MyUnit.xml
gameres\
icons\
MyUnit.bmp
cmdbar\Actions\
train MyUnit.bmp
loc\
spanish.loc.xml
Going further
- Its own sprites instead of another unit's: Custom graphics and the graphics template (
units\MyUnit\). - A new ability, special or item for it: abilities, specials, items.
- The attributes that do something and the ones that crash the game: Unit stats.
Check and publish
node tools\validate-mod.js <your mod folder>
The validator reports problems with file and line without opening the game (Validating a mod). Zip the mod folder with its mod.json inside and publish it as described in Publishing on GameBanana.