Build a mod folder and attach it
dos2_mod_installPacks a mod source folder into a .pak in the game's Mods folder, replacing the previous build, and optionally attaches it to a campaign's add-ons.
Instructions
Packs your own mod from a source folder into the game's Mods folder as .pak (overwriting a previous build) and, when campaign is given, adds it to that campaign's add-ons. UUID, name, version and folder come from the mod's meta.lsx.
Use it for mods you develop yourself; for a ready third-party .pak use dos2_addon, and for this server's bridge
use dos2_bridge_install. Fails if PublishVersion in meta.lsx is below a Definitive Edition editor version (use
909321303): the game would mark the mod as Classic and refuse it. The previous file is backed up first; undo with dos2_restore. Attaching: Fails with an error while the game process is running unless allow_running=true.
Returns the .pak path, packed files, module name and UUID, and the add-on list.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"source": "<source>"
},
"name": "dos2_mod_install"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| source | Yes | Absolute path to the mod's source folder; it must contain exactly one Mods/<mod folder>/meta.lsx. | |
| campaign | No | Campaign to attach the mod to as an add-on (name, folder, UUID or a part). Omit to only build the .pak. | |
| allow_running | No | Keep false. Set true only after the user has confirmed that the running game sits in the main menu: a write into a campaign that is loaded in the game gets lost or damages it. |