This system allows you to create .json
files that define mods reacting to game events, triggering actions, and optionally referencing shared parameters.
pgsql
CopierModifier
/Mods
├── /Addons
│ └── TeleportOnArrest.json
└── /Parameters
└── positions.json
"OnPlayerArrested"
.ModManager.TriggerEvent("OnPlayerArrested")
is called.ModAPI.TryExecute(...)
.action
is resolved from a registry and executed with the provided args
.json
CopierModifier
{
"modName": "TeleportOnArrest",
"eventName": "OnPlayerArrested",
"action": "TeleportPlayer",
"args": {
"x": "@prisonX",
"y": "@prisonY",
"z": "@prisonZ",
"chatMessage": "You have been arrested and moved."
}
}
args
block)Arg Name | Type | Description |
---|---|---|
x , y , z |
float |
Position/Scale/Rotation axis |
chatMessage |
string |
Message to display in in-game chat |
message |
string |
Log or console message |
amount |
int or float |
Used for money, health, damage, etc. |
soundName |
string |
Audio clip to play (not implemented yet) |
targetPlayer |
int |
ID of the targeted player |
delaySeconds |
float |
Delay before executing action (future feature) |
📝 Note: Any value starting with @
(like "@prisonX"
) will be resolved from the global parameters.
/Mods/Parameters/positions.json
)