Modding Trench Engr.
This guide is for version 1.0.0 of the game. An older version refuses some of the fields in it.
A mod is a folder of text files, pictures and sounds. It can change the game's numbers, redraw its soldiers, guns and buildings, replace its sounds and music, and add units, armies, battlefields, battles and campaigns. A mod cannot contain code. Mods work in the game for Windows and on Android.

Six example mods come with this guide, in the downloads: a balance patch, a battlefield, a battle with its campaign, an army, and two sets of pictures. The Risen is a full mod to read after them: get it from the mod store.
The reference lists every id and name of the game, the words of a mission, and the game's messages about mods.
| I want to | Read |
|---|---|
| change a number | Your first mod |
| redraw a soldier, a tank, a gun, a building or an icon | Pictures |
| change a sound or the music | Sounds, Music |
| make a battle or a campaign | A new battle |
| make a unit or an army | A new unit, A new army |
| translate my mod | Languages and letters |
| give my mod to others | Sharing a mod |
| fix an error | Troubleshooting |
Downloads
These are the example mods of this guide. Each .zip holds one mod's folder. On Windows, unzip it so that the mod's folder is directly inside your mods folder, and start the game again. On Android, add the .zip itself in Settings > Gameplay > Mods, with Add a mod (.zip).
american-army.zip2 KB
A new army for custom battles and multiplayer: the Americans of 1918, with their own rifle and units, drawn as British soldiers.first-mission.zip4 KB
A new battle in a campaign of its own: a dawn attack on a copse on the Somme, July 1916.magenta-machines.zip45 KB
Pictures for a tank, an armoured car and a field gun in magenta, with every picture each of them uses.magenta-riflemen.zip39 KB
Pictures and a sound: the British riflemen and the rifle sections' icon drawn in magenta, and a new shot for the British rifle.new-battlefield.zip1 KB
A new battlefield for custom battles and multiplayer: the chalk ridges of Artois.veteran-sections.zip1 KB
A balance patch: steadier British rifle sections, a faster-firing SMLE, men of every army whose morale recovers faster, and a more forgiving Headquarters.fields.txt43 KB
Every field a mod can write, for this version of the mod format.
Your first mod
You make and test a mod on Windows. The game makes a small one for you to start from.
- On the main menu, press Mods, then Make a new mod. The game makes a folder named
my-modand opens it. - Open
changes.jsonin a text editor, such as Notepad. Do not use Word. The file has two example changes. Each is on a line that starts with//, and the game skips such a line. - Delete the
//at the start of one example's line, and save the file. - On the Mods screen, turn the mod on with its switch. A new mod is off.
- Start the game again. The mod's row says "Loaded.", and the change is in every new battle, the campaigns' too.
To see the change, play Skirmish > Custom battle as the British. Then change the number, and start the game again.
To make a second change in the same list, put a comma after the first one:
{
"weapons": [
{ "id": "smle", "patch": true, "fireInterval": 2.0 },
{ "id": "lebel", "patch": true, "fireInterval": 2.0 }
]
}
An id is the game's name for a thing: smle is the British rifle. The reference has every id, with the name you see in the game. The field list has every field, and What the numbers mean the main ones. We do not publish the game's numbers. To find a good one, try a value, play a battle, and change it again.
In mod.json, change the name, and write your name as the author. If your data has an error, the game starts without the mod, and the mod's row says what is wrong.
The mods folder
On Windows it is %LOCALAPPDATA%\TrenchEngr\mods, usually C:\Users\<you>\AppData\Local\TrenchEngr\mods. Press Open the mods folder on the Mods screen to open it. Each mod is a folder in it. To remove a mod, delete its folder and start the game again.
The game's log, log.txt, is one folder up. It has the errors and warnings of every mod.
The Mods screen
Press Mods on the main menu. The button is in the settings too, except during a battle.


A mod in the mods folder is on until you turn it off. The game reads its mods only when it starts. After every change, even of a switch, start the game again. At the end of a mod's row is its state:

The files of a mod

Name the folder after the mod's id. The game goes by the id, whatever the folder is called.
The .json files are plain text. { } holds fields, [ ] holds a list, and text goes in double quotes. Between two fields or two items there is a comma. // starts a comment, which the game skips to the end of the line. Write each field in the letter case of this guide: morale, and never Morale. Save the files as UTF-8 (in Notepad, the encoding "UTF-8").
Sharing a mod
Zip the mod's folder. On Windows 11, right-click it and choose Compress to > ZIP File. On Windows 10, choose Send to > Compressed (zipped) folder. Share the .zip.
On Windows, a player extracts the .zip into the mods folder. In Extract All, choose the mods folder itself as the place.

mod.json directly.Say in the description which version of the game the mod needs, and which other mods. When you change a shared mod, give it a new version. On Windows, players replace the old folder with the new one.
Mods on Android
A player on Android adds the .zip itself:
- Put the
.zipon the phone. - In the game, press Mods, then Add a mod (.zip), and choose the file.
- Start the game again.
A new version replaces the mod with the same id. Remove on the mod's row takes it out. A .zip for Android holds one mod, is at most 64 MB, and unpacks to at most 128 MB and 4096 files. No two of its names differ only in capital letters.
The mod store
The game downloads mods from its mod store, on the Mods screen. We check and sign every mod, and every new version, before it is there. To have yours in it, send it to us on Discord.
Data files
mod.json
Every mod has a mod.json. This is the one of the example veteran-sections, with a shorter description:
{
"id": "veteran-sections",
"name": "Veteran Sections",
"version": "1.0",
"author": "Example",
"description": "British rifle sections steadier under fire.",
"format": 1
}
| Field | Needed | What to write |
|---|---|---|
id | yes | 1 to 32 characters: a to z, 0 to 9, - and _. It starts with a letter or a digit. Never change it once others use your mod. |
name | yes | 1 to 48 characters. |
format | yes | 1, the mod format of this version of the game. |
version | no | At most 16 characters. |
author | no | At most 48 characters. |
description | no | At most 400 characters. A line break is \n. |
after | no | The ids of mods that load before this one (The order mods load in). |
None of these texts can have a tab or an emoji.
Listing your data files
A mod with data has an index.json, which lists its data files. A mod without data has none.
{
"files": ["scenarios/copse_1916.json", "campaign.json"]
}
Write each path as it is in the mod's folder, in the same letter case, with / between folders. The game reads the files in this order.
A data file is one object, with any of these keys. Most of them hold a list of entries:
| Key | What it holds |
|---|---|
units, weapons, shells, abilities | what fights |
factions, callIns, aircraft, artilleryTempo, aiPersonalities, doctrines | the armies, their off-map support and aeroplanes, how much their guns fire, their commanders, and the campaigns' doctrines |
mapRecipes, terrain, structures | battlefields, kinds of ground, buildings and works |
scenarios, campaigns | battles and campaigns |
callers, calls, requestKinds, commendations | Headquarters: its telephone, its requests and its report |
rules, hq, texts | one object each: the rules of every battle, how often Headquarters asks for something, and the telephone's words |
Changing the game's numbers
An entry with "patch": true is a patch. It has the id of an entry of the game, or of a mod that loads before, and changes only the fields it names:
{
"units": [
{ "id": "gb_rifle_section", "patch": true, "morale": 70 }
],
"rules": {
"patch": true,
"morale": { "recoveryPerSecond": 1.4 }
}
}

In an object, the fields you leave out keep their value: a cost with only materiel leaves the manpower as it was. A list is replaced whole. [] empties it. rules and hq have no id. Always write "patch": true in them: without it, every field you leave out loses the game's value.
New entries and ids
An entry without "patch": true is a whole entry. With a new id, it is added to the game. With an id the game has, it takes that entry's place, and the fields you leave out take default values. A mod cannot remove an entry.
A new id has 1 to 32 characters, without spaces and accented letters. Start your ids with a short form of your mod's id, as the examples do (nb_, fm_), so that no other mod has the same one. A battle's id does not start with skirmish_ or operation_, and a battlefield's does not start with test.
For a unit, a weapon, an army, a battlefield or a battle, copy one of the examples and change it. For the other kinds, the reference has the fields an entry needs.
The field list
fields.txt has every field a mod can write, and its kind. Search it for the key and the field:
units[].morale: number
units[].members[].count: integer
units[].category: enum
units[].category: enum member Infantry
An enum takes one word of its enum member lines, such as "infantry", in any letter case. Some fields of the kind string take only certain words too.
What the numbers mean
Distances are in tiles (a tile is 4 metres), times in seconds of the battle, speeds in tiles a second.
| Field | What it means |
|---|---|
units[].speed, units[].vision | How fast it walks, and how far it sees. |
units[].morale | Higher holds longer. |
units[].suppressionResistance | How much fire frightens it. 1 is normal, lower is steadier. |
units[].concealment | How easily it is seen. 1 is normal, lower is harder to see. |
units[].cost, units[].reinforceCost | What the unit costs, and the manpower each replacement man costs. |
units[].deployTime | Seconds from the order until the unit arrives. |
weapons[].range, weapons[].minRange | How far it reaches, and how near it can fire. |
weapons[].accuracyNear, weapons[].accuracyFar | The chance of a hit, from 0 to 1, close up and at the end of its range. |
weapons[].fireInterval, aimTime, reloadTime | Seconds. Lower is faster. |
weapons[].damage | Higher is deadlier. A bullet of more damage also stops a man at once more often. |
weapons[].dispersion | How far its shells scatter at full range. Lower is closer. |
terrain[].cover, structures[].cover | The share of the shots that still hit a man in it. Lower protects more. |
terrain[].footCost and the other costs | Higher is slower. |
A new unit
This is a whole unit. Copy it into a data file and change it:
{
"units": [
{
"id": "my_raiders",
"name": "Raiders",
"faction": "gb",
"category": "infantry",
"role": "assault",
"icon": "assault",
"tags": ["assault"],
"members": [
{ "role": "officer", "weapon": "webley", "count": 1, "leader": true },
{
"role": "rifle",
"weapon": "smle",
"secondary": "mills_bomb",
"count": 6,
"grenades": 2
}
],
"speed": 3.3,
"vision": 25,
"morale": 75,
"abilities": ["sprint"],
"cost": { "manpower": 45 },
"reinforceCost": 6,
"deployTime": 18,
"ai": { "attack": 0.8, "assault": 0.9 },
"description": "Picked men for a raid on the trench opposite."
}
]
}

A custom battle offers the units of an army's units list. To add yours, patch the army: { "id": "gb", "patch": true, "units": [...] } in factions, with the army's whole list and your id at its end. It offers a unit only from its year to its lastYear. A battle of your own offers the units of a side's availableUnits.
A man is drawn as the figure his role names. A rifleman's weapon can change his figure. With a pistol he is an officer, or a bomber if his role is assault. With a submachine gun he is an smg, and with an anti-tank rifle an atrifle.

role that chooses each.Most bullets that hit a man stop him at once, whatever his health. The rest take some of his health. A unit's toughness, from 0 to 1, changes that. With "toughness": 0.75, three of four bullets that would have stopped him only take some of his health, and he falls when it is gone. The game's own units have no toughness.
A new army
A mod can add an army to the game's three: the British (gb), the French (fr) and the Germans (de). The example american-army.zip adds the Americans of 1918. Its army.json has these entries:
- A weapon of its own, the rifle
us_springfield. An army can also use the game's weapons. - Its units. Their
factionis the army's id. - Its stretcher bearers: one unit of two men with no weapon and no ability, with
"category": "infantry","nonCombatant": true,"canDig": false,"canCapture": falseand"canGarrison": false. Copyus_stretcher_bearers. - The army, in
factions: itsid,name,adjective("the American line"),color,like,stretcherBearers, theunitsit can buy, and thestartingUnitsit has at the start of a custom battle. One of its units is infantry with"role": "rifle": its staff buys those by itself. - An
artilleryTempoentry: how much its guns fire without orders. Copyus_1918.
like names the army it borrows from. Give every army one. With "like": "gb", it has the British soldiers' figures, emblem, voices and telephone. It carries no flag: only the game's three armies have flags.
Choose your army in Skirmish > Custom battle. A battle of your own uses it as a side's def, and a campaign as its faction.

An army's emblem is the name of a picture of your own, art/ui/emblem/<name>.png. With "headquarters": false, its player gets no requests, and the telephone never rings. If it has nobody who digs, or no gun and no call-in, the tools for that are grey. With "playable": false, a custom battle offers the army only as an enemy or an ally. (A multiplayer room offers every army.)
Guns and aeroplanes
A new army has no off-map support until you list call-ins in its callIns: some of the game's, or your own. This is a barrage for the Americans:
{
"callIns": [
{
"id": "us_field_barrage",
"name": "Field barrage",
"faction": "us",
"kind": "barrage",
"icon": "fire_he",
"cost": { "materiel": 100 },
"cooldown": 90,
"delay": 8,
"weapon": "offmap_field",
"shell": "he",
"rounds": 16,
"pattern": "area",
"radius": 5,
"duration": 15,
"description": "Two batteries fire on the target."
}
]
}
A call-in's icon is a picture of icon/cmd/. An army borrows no aircraft. For a battle's air_raid and raise_balloon, name them in its bomberAircraft and balloonAircraft.
An army's soldiers
The soldiers are drawn from two figure sets: spriteSet, and spriteSetEarly before steel helmets. To draw the Americans as the French, write "spriteSet": "fr" and "spriteSetEarly": "fr14".

Most sets have empty figures. To give your men a look of their own, draw them there, and give the army that set as its spriteSet and spriteSetEarly. Draw every picture that the set's rifleman has: for unit/fr14/rifle/walk/0, draw art/unit/fr14/flame/walk/0.png. A man with "role": "flame" is then drawn from it. (How to draw a soldier.)

fr14 leaves empty.The wounded, the stretcher bearers and the fallen are drawn as the set's own soldiers. So that none of your men lies wounded in their place, give the units "neverWounded": true. A hit then kills a man where it would wound him. To draw your own fallen, put them in art/unit/<army>/<figure>/, under the same names as the set's: body/0 to body/13, fall/fwd/0 to 4, fall/back/0 to 2, fall/side/0 and 1, fall/gas/0 to 3, and fall/blast/0. Such men drop no weapon when they fall.
Your men talk, call and cheer with the sounds of the army it is like. To give them voices of their own, add sounds with the army's id: spot_talk_risen, spot_call_risen and charge_cheer_risen for the army risen. Men that a script or a horde sends do not cheer.
A commander
defaultAi is the army's commander, an entry of aiPersonalities. An army without guns can have one with "attackStyle": "horde". It plans no attacks, and sends its men straight at the nearest enemy it knows of, in groups, again and again. A commander's armies are the armies that can have it. Without them, every army can, the game's too.
A new battlefield
A battlefield is an entry of mapRecipes. Skirmish > Custom battle and the multiplayer room list it beside the game's own. This one works, and the example new-battlefield.zip has more fields:
{
"mapRecipes": [
{
"id": "nb_artois_ridge",
"name": "Artois ridge",
"width": 288,
"height": 224,
"baseTerrain": "grass",
"villages": 4,
"villageBuildings": ["cottage", "cottage", "farmhouse", "barn"],
"landmarks": ["windmill", "chateau"],
"props": ["cart", "well", "crates"]
}
]
}
baseTerrain is a terrain. villageBuildings, landmarks and props are structures. With "climate": "winter", the map lies under snow.

A new battle
A battle is a mission of a campaign. The example first-mission.zip has both. Copy its folder into the mods folder. In mod.json, change the id. In campaign.json and scenarios/copse_1916.json, change the ids that start with fm_. index.json lists the two files. Then change the battle piece by piece, and start the game again after each change. The campaign is under Campaign on the main menu.
You can also patch one value of the game's own battles, such as music, timeLimit or startHour. Lists, such as units and triggers, are replaced whole.
The campaign
campaign.json has an entry of campaigns. Every mission is fought as the army in its faction, and the campaign offers that army's doctrines. Do not put a battle into one of the game's campaigns: a patch replaces their whole list of missions.

scenariois the mission's battle. A battle belongs to one campaign only.requireslists the missions that must be won first. While you work on a campaign, leave it empty: every mission can then be played.mapPositionis the place of the marker,[x, y]from 0 to 1. For a latitude and a longitude it is[(longitude - 1.4) / 6.4, (51.4 - latitude) / 4].mapTownsandmapRiversare what the staff map shows, from the list of names.pointsPerStaris the doctrine points of each star. A won battle has one star, and one more for each objective that is done and has"awardsStar": true, up to three.yearis a text here ("1916"). In a battle it is a number (1916).
The map and the sides
The battle is the entry of scenarios in scenarios/copse_1916.json, which has comments. The reference has every part of a battle. Places are in tiles, [x, y] from the north-west corner. An area is [x, y, width, height], and a line or a shape is its corners, [x1, y1, x2, y2, ...]. Angles are degrees: 0 is east, 90 south, 180 west, 270 north. Times are seconds of the battle.

mapnames arecipe, one of the battlefields, and aseed. The same seed gives the same ground.featuresadd woods, hills, roads, craters and more.factionsare the sides, two to eight. (In a battle the word means its sides.) A side'sdefis its army. Itscontrollerisplayer,ai, orpassive, which gives no orders.- Give enemies different
teamnumbers. Sides with the same number are allies, and a side without one is in team 0. Call the player's sideplayer, and name it inplayerFaction. Give the player an ally with a third side: the player's number, and"controller": "ai". - Give every sector an
income, such as{ "manpower": 0, "materiel": 0 }. A sector without one pays its owner. - The units of one entry stand in a row across the way they face,
spreadtiles apart. Nobody moves single units in this game. Each side's staff puts the units you place into the nearest trench that needs men, and keeps the rest as its reserve. - Give the battle a
datewith a month, such as "14 July 1916". The sun, the uniforms and the front on the staff map come from it. startHouris the clock at the start (4.5is 04:30).timeScaleis the minutes of the day that pass in each second of the battle.
"weather": { "initial": "fog", "dynamic": false, "script": [{ "at": 600, "weather": "rain" }] } starts in fog and brings rain after 600 seconds. The kinds are clear, overcast, rain, storm, fog and snow. With "dynamic": false, only your script changes the weather.
A battle can have its own scenery, with landmarks and props in its map. With "hq": { "requests": "scripted", "telephone": false }, Headquarters asks only what your script asks, and no telephone rings.
Leave out difficulty, setup, orderBudget and rearLine, which the game sets, and lines, remark, orders and step, which are for lessons.
Objectives and triggers
A side wins when all its primary objectives are done, or when all its enemies are beaten. It loses when one of its primary objectives fails. An objective with "primary": false is optional. When the timeLimit runs out, survive, hold_sectors and protect_units are done if they still hold, and an open primary objective of any other type has failed.

When the player has won and a star objective is still open, the battle goes on for up to three minutes. The victory is already sure.
A trigger runs its actions once, when all its conditions hold. Mission words lists the types of objectives, conditions and actions, and the fields each one reads.

- With
"mode": "any", one condition is enough. A condition with"not": trueholds when it is false. - With
"once": false, a trigger runs again, at most once everycooldownseconds. Without acooldownit runs at every check, twice a second. Triggers are checked in the order you wrote them. - To make the enemy attack a place, give the enemy's side the objective below. Without
"primary": false, it would win the battle by taking the place.
{
"id": "take_our_line",
"faction": "opfor",
"type": "capture_sectors",
"sectors": ["our_line"],
"primary": false,
"text": "Take the British line"
}
A wave
This trigger sends four German sections at the British trench after 300 seconds. Put it in the example's triggers:
{
"id": "wave_1",
"conditions": [{ "type": "time", "time": 300 }],
"actions": [
{
"type": "spawn_units",
"faction": "opfor",
"unit": "de_rifle_section",
"count": 4,
"at": [140, 56],
"spread": 12,
"fromEdge": false,
"tag": "script:wave_1"
},
{
"type": "move_units",
"faction": "opfor",
"tag": "script:wave_1",
"to": [40, 56],
"spread": 6,
"mode": "fast"
}
]
}
- Without
"fromEdge": false, the units come on at their side's rear edge, level withat. - In an action,
spreadscatters the units at random round the place. - A tag that starts with
script:keeps units for your script, in a battle'sunitstoo. They stay where you put them until you move them. Without it, the staff takes them.release_unitsgives them to the staff. fastruns, and does not stop when it is fired at.normalstops and fights when it meets the enemy.attackmakes a planned attack on a place that the enemy holds.routeis a list of places the units go through on the way, such as[[120, 56], [80, 40]].
Difficulty
Regular plays the battle as you wrote it. Recruit has fewer enemies, and gives the player more resources. Veteran does the opposite. With "difficultyScale": 0, the enemy's units are as many as you wrote on every level.
On Recruit and Veteran, a stat condition on the player's soldiersLost changes, in a trigger that fails a star objective or defeats the player. The number is rounded to 50, is never below 50, and takes the old one's place in the texts. For a smaller limit, use the condition casualties: it never changes.
Pictures
A mod can replace any picture of the game except its letters, and add new ones. Such a mod is a folder in the mods folder with two things in it: a file mod.json, and a folder art with PNG files. This is the whole mod.json:
{ "id": "my-pictures", "name": "My pictures", "format": 1 }
Each picture of the game has a name, such as unit/gb/rifle/advance/0. Your file for it is art/unit/gb/rifle/advance/0.png. The reference lists which pictures each unit is drawn from, and pictures.txt has the name and the size of every one.
We do not give out the game's pictures. Start from the two magenta examples: magenta-riflemen.zip has every picture of the British rifleman, and magenta-machines.zip every picture of a tank, an armoured car and a field gun. Copy an example's folder into the mods folder, change the id in its mod.json, and draw over its pictures. Start the game again after each change.

Save each picture as PNG with 8 bits per channel, not interlaced, at most 1024 pixels on a side, under a name in lower case. In GIMP, use File > Export As, choose PNG, turn "Interlacing" off and choose "8bpc RGBA". The normal PNG export of Aseprite and Paint.NET works. Any colours work. All the mods' pictures together fill at most two pages of 2048 x 2048 pixels.
Names that are new to the game are in log.txt. That is right for a new picture. If you meant to replace one, check its name.
How to draw them
Everything is seen from above. Soldiers, vehicles, guns and aircraft face right. The game turns them and draws their shadows, so light them from straight above and draw no shadow. A building has north at the top. Light it from the top left.
Draw a picture that replaces one at the size pictures.txt gives, and it is drawn where the game's was. At another size it is drawn at the same scale, so a larger picture is larger in the battle. The pictures under ui/ are stretched at another size: keep theirs.

d of 3.art/sprites.json gives the pictures in your art folder their pivot and their scale. The pivot, px and py, is counted in pixels from the top left corner. The scale, d, is a number from 1 to 4: a picture with "d": 3 is drawn at a third of its size. A picture that replaces one of the game's has that one's pivot and scale, and needs no entry. A new picture without an entry is drawn at full size, with its pivot in the middle of its bottom edge.
{
"unit/fr14/flame/aim/0": { "px": 9, "py": 10, "d": 3 }
}


d of 3, 2 and 1.Soldiers, vehicles, guns and aircraft have a d of 3. A tile is then 24 pixels of your picture. Buildings have 2, and a tile is 16 pixels. Icons have 1.
Soldiers
A set has a folder for each figure: unit/gb/rifle, unit/gb/officer and so on. A figure is a set of animations, and an animation is a row of numbered frames. You can replace any frame. You cannot add frames or change their speed. In battles before steel helmets, the soldiers are drawn from other sets, unit/gb14, unit/fr14 and unit/de14.

unit/gb/rifle/.The fallen and the wounded are not in a figure's folder. A set has one of each for all its men: fall, body and hurt. The stretcher bearers are in hurt too.

unit/gb/.Icons
A unit's icon names its picture: "icon": "rifle" is icon/unit/rifle. For an army other than the British, the game first looks for the picture with the army's id, such as icon/unit/rifle_us.

Buildings
A building's pivot is the top left corner of the tiles it stands on. What you draw outside them is drawn round the building.

A new structure with "sprite": "my_hut" is drawn from structure/my_hut/intact, damaged, ruined and rubble. Without damaged or ruined, intact is drawn. A hut with a width and a height of 2 is a picture of 32 x 32 pixels, with this entry for each state:
{
"structure/my_hut/intact": { "px": 0, "py": 0, "d": 2 }
}
The game's houses are drawn from many pictures: the farmhouse from 518. To redraw it with four, give it a sprite of your own. This is a patch in a data file. A mod with a data file also needs an index.json, which magenta-machines has.
{
"structures": [
{ "id": "farmhouse", "patch": true, "sprite": "my_farm" }
]
}
Draw art/structure/my_farm/intact.png and the other three states, with the entry above for each. For how large, look up structure/farmhouse/intact in pictures.txt. A patch is data, so online you then meet only players with the same mod.
Vehicles and guns
A new vehicle or gun needs an entry in art/sprites.json for each of its pictures, with "d": 3 and the pivot.

sprites.json and without it.A vehicle's pictures are in art/vehicle/<sprite>/, where <sprite> is the sprite of the unit's vehicle. Only hull/0 is needed.

sprite of a vehicle is the name of its folder.| Picture | What it shows |
|---|---|
hull/0 | The hull. Its pivot is the point the vehicle turns about. |
hull/1 to hull/8 | The hull with its tracks moved on. The number is 3 x the left track's position + the right's. In hull/5 the left track is at 1 and the right at 2. |
hull/9 | The tracks blurred, for a tank driving fast. |
damaged/0 to damaged/9 | The same pictures for a vehicle that has lost more than half its hull. |
turret, turret_damaged | The turret of a vehicle with "hasTurret": true. Its pivot is put on the hull's pivot. |
stripes, stripes_damaged | Stripes drawn over the hull in battles from June 1918, on a vehicle without strips. |
wreck | The vehicle destroyed. |

With hull/0 alone, the tracks do not move. Draw all ten hulls, or only the first.

Cars, lorries and the Mark I tanks have one hull, hull/0, and strips drawn over it for their moved wheels or tracks: run/l/1, run/l/2 and run/l/b (blurred) for the left side, and run/r/1, run/r/2 and run/r/b for the right. Draw all six. The strips in run_damaged go over damaged/0. A strip's pivot is measured from the strip's own top left corner, so it can be outside the strip.

A gun's pictures are in art/weapon/<sprite>/, where <sprite> is the sprite of the unit's crewWeapon. Only idle/0 is needed. The pivot of every picture but packed/0 is the point the gun turns about.
| Picture | What it shows |
|---|---|
idle/0 | The whole gun, ready to fire. |
mount, barrel | The gun in two parts, drawn in place of idle/0 when it has both. The barrel slides back when the gun fires. |
base | What stays still when the gun turns: the shells beside a field gun, or an anti-aircraft gun's lorry. |
packed/0 | A machine gun, a mortar or an anti-aircraft gun on the move. |
cover | The canvas covers of a field gun or howitzer on the move. A gun with covers has no packed/0. |



The flash is at the right end of a gun's barrel, at the right end of a turret, and for a gun in the hull at the outermost pixels of hull/0 on its side.
Give a new vehicle or gun a sprite name of its own. The game looks first for that name with _gb, _fr or _de at its end, by the army's figure set (a vehicle's needs a wreck). So one sprite can have a look for each army: weapon/fieldgun_gb is the 18-pounder, and weapon/fieldgun the German gun. For a gun, a folder with the id of its weapon comes before both.
Two units of one side with the same weapon are drawn as the same gun. For two looks, give them two weapons. The Mark I tanks are always drawn from vehicle/mk1_male and vehicle/mk1_female.
Aircraft
An aeroplane is drawn from aircraft/<sprite>/0 and aircraft/<sprite>/wreck, with "d": 3 and the pivot in the middle of the machine. Some of the game's aeroplanes change with the battle's date: the reference has the pictures of each.

aircraft/<sprite>/.Sounds
Put WAV files in a folder named sounds. sounds/rifle_shot_smle.wav replaces the sound rifle_shot_smle. For several takes, of which the game plays one each time, make a folder: sounds/rifle_shot_smle/one.wav, sounds/rifle_shot_smle/two.wav. The reference has the names of the sounds. The game's loud sounds have a near, a middle and a far version, and your file replaces all three. It loops if the game's sound does.
A name the game does not have adds a new sound, which never loops. Use it as the sound of a weapon, as the destroySound of a structure, or in a battle's sound action. The game's rifles, and every howitzer with an explosion radius of 5 tiles or more, always play their own: replace rifle_shot_smle, rifle_shot_lebel, rifle_shot_g98 or heavygun_fire. To change an engine, replace tank_engine, tank_tracks, truck_engine or aircraft_engine.
Export each sound as WAV, Signed 16-bit PCM, mono or stereo, at 8000 to 48000 Hz, under a name in lower case. In Audacity, use File > Export Audio, "WAV (Microsoft)", "Signed 16-bit PCM", 44100 Hz. The game does not read MP3 and OGG. It plays your file as loud as it is, so listen to it in a battle. A sound is at most 60 seconds long. All the mods' sounds together last at most about 4 minutes 45 seconds in mono at 44100 Hz, and half that in stereo.
Music
Put WAV files in a folder named music. menu.wav, briefing.wav, battle.wav and elegy.wav replace the game's four pieces. The elegy is for some battles, and for the report of a lost one. Any other name of 1 to 32 lower-case letters, digits and _ is a new piece: a battle plays music/verdun_theme.wav with "music": "verdun_theme".
A piece plays, rests a while, and starts again. The game's battle music grows with the fighting. A mod's piece plays the same all the time.
Export each piece as WAV, Signed 16-bit PCM, at 44100 or 22050 Hz, 2 seconds to 6 minutes long, at most 64 MB. The game plays music in mono at 22050 Hz, where a minute is about 2.6 MB. A mod has at most 16 pieces.
Languages and letters
The game translates its own texts. Yours are shown as you wrote them. To translate them, put a file for each language in a folder named text: fr.json, de.json, es.json, ru.json and tr.json. Each has your texts, letter for letter, and their translations:
{
"exact": {
"The Risen": "Les Revenants",
"Hold the line until dawn": "Tenez la ligne jusqu'à l'aube"
}
}
Translate each name, adjective, description, briefing, intro, epilogue, date, location, displayName and mapName, each objective's text and short, and each message's title, text and from. A title and its text are two entries. If a text has a limit on losses, also translate it with the numbers of Recruit and Veteran (Difficulty). Where the game has the same English text, such as "Rifle Section", its own translation is shown.
The game's font has these characters, and draws any other as a space:
- every printable ASCII character (space to
~); ¡ § ª « ° · º » ¿, and the lettersÀ Á Â Ä Æ Ç È É Ê Ë Í Î Ï Ñ Ó Ô Ö Ù Ú Û Ü ß à á â ä æ ç è é ê ë í î ï ñ ó ô ö ù ú û ü ÿ Œ œ Ÿ, and TurkishĞ ğ İ ı Ş ş;- the Cyrillic alphabet:
А-я,Ё,ё; ‑ – — ‘ ’ ‚ “ ” „ … №, the arrows← ↑ → ↓, and■ ● ★ ☆ ✓ ✗.
Multiplayer
Players play together only when they have the same data. Pictures, sounds, music and translations do not count.
A multiplayer battle is a custom battle. It uses a mod's battlefields, armies, units, weapons and rules, and none of its campaigns. The list of public battles shows the battles whose host has the same data as you.
When you join a battle by its room code and the host plays with mods from the mod store, Download and join gets them, starts the game again with them, and joins. Your own choice of mods comes back at the next start. If one of the host's mods is not in the store, you need the same mod to join.
Saves
A saved battle goes on only with the data it was played with. If you turn a data mod on or off, or change its data, Continue and Load saved battle do not offer an older save. The game keeps it, and the main menu says which mods it needs. A campaign of a mod that is off is not shown, and its progress is kept.
The order mods load in
The game loads its own data first, then each mod that is on. A patch changes the entry as the mods before left it. When two mods replace the same entry, picture or sound, the later one wins.

A mod loads after the mods named in its after, if they are there. Apart from that, mods load in the order of their ids, character by character: - first, then digits, _, and letters.
What a mod cannot change
- The letters of the font.
- The game's code: a mod uses the kinds of objective, trigger, ability, doctrine, request and commander that the game has.
- The weekly operations. A new army never fights in them. A mod's other changes apply there.
- The towns and rivers of the staff map.
Troubleshooting
A mod loads but changes nothing
Open log.txt, one folder above the mods folder, and search it for Mods and Content. It has warnings that the Mods screen does not show. Then check that:
- you started the game again after the change;
- each patch has
"patch": true, and the id is the one you meant; - no mod that loads later changes the same entry;
- the folders are named
art,sounds,musicandtext, in lower case; - each picture and sound has the exact name of the game's;
- a battle before steel helmets draws its soldiers from
unit/gb14,unit/fr14andunit/de14; - a house is drawn from all of its pictures (Buildings);
- the English of a translation is your text, letter for letter;
- a piece of music has the name that the battle's
musicgives.
Messages
Fix the first error, start the game again, and read the row again: some errors show only when the ones before them are gone. In a message, units[0].morale is the morale of the first entry of units, because a list counts from 0. The reference has all the messages. These are the common ones:
| Message | What to do |
|---|---|
| Line N, column M: not valid JSON. ... | Look at that place, and before it, for a missing comma, bracket or double quote. |
| The file ends too soon: a }, a ] or a closing quote is missing. | Close every {, [ and " that you opened. |
| Line N, (path): "Y" is not a field the game knows. ... | Fix the name's spelling or letter case, or move it to its right place. If the guide has the field, the game is older than 1.0.0. |
| Line N, (path): must be ... | Write a value of the kind it names. If it ends "without quotes.", take the quotes off. |
| This folder has no mod.json. | The mod's folder is inside another one. Move the inner folder into the mods folder. |
| X: rename it mod.json, in lower case. | Rename the file. |
| The file is not UTF-8 text: save it as UTF-8. | Save the file again with the encoding "UTF-8". |
| The mod's id must be 1 to 32 characters ... | Use only a to z, 0 to 9, - and _. |
| Two folders hold the mod 'Y' ...: keep one. | Delete one folder, or give one of the mods another id. |
| X: Listed in index.json but missing. | No file has that path, in exactly that letter case. |
| X: Patch of an unknown entry of "units", 'Y': ... | Check the id, and that the mod that adds it is on and loads first. |
| units/Y: Unknown member weapon 'Z'. | Any "Unknown": the id is misspelt, or its mod is off or loads later. |
| units/Y: Morale must be positive. | A value is out of its range. The message says the rule. |
| factions/Y: Missing stretcher bearers. | Give the army stretcherBearers. |
| factions/Y: startingUnits must list ... | Give the army startingUnits, with a unit that fights. |
| X: Unsupported PNG ... | Export it again as an 8-bit PNG, not interlaced. |
| X: ...: left out. Export it as WAV, ... | Export it again as the message says. |
| X: 'Y' is not a language the game translates into ... | Name the file fr.json, de.json, es.json, ru.json or tr.json. |
| The archive holds more than one mod.json: ... | Android: zip one mod's folder. |
If a message is not clear, ask us on Discord.