Play the unit in multiplayer
Every player needs the same mod, at the same version, set active.
In a multiplayer match every machine plays the same game data, so every player needs your mod, exactly as the host has it, set active.
The worked example
- Send each player the mod folder (or a
.zipof it). Keep the samemod.tomlidandversionfor everyone. - Each player installs it with Options > Install > ADD MOD... and presses SET ACTIVE (install).
- The host opens a room; the others join it.
A game with your unit and a game without it are different games, so a player with another mod active, or none, cannot join. One mod is active at a time.
How AEX matches mods
| The mod has | Matched by |
|---|---|
A mod.toml |
Its id and version; a package also by its content hash |
No mod.toml |
Its folder name in the mods folder |
On top of that, AEX compares a fingerprint of the files the game reads, so two copies that differ inside are told apart too.
A folder without mod.toml must have the same folder name on every machine.
ADD MOD... names the copy after the folder you picked, and adds a number when
that name is taken (my-unit-pack-2), so a folder without mod.toml can
end up named differently on two machines. Give the mod a mod.toml.
What goes wrong
A player whose mod differs from the host's is refused with:
Mods mismatch - server plays my-unit-pack@0.1.0, client stock TA. Choose the same mod in Options > Install (or start with the same --mod).
The joining player has no mod active, or another one. They set your mod active and join again.
Your copy of My Unit Pack 0.1.0 differs from the host's.
Both have a package of the same id and version, but its contents differ:
one of you changed it without changing version. Raise version whenever
the contents change, and send the new copy to everyone.
Next
That is the whole path. To change how build menus look and are filled, read a builder's pages; to give the unit a key, read a mod's default keys.