Skip to content

KcdMp_exec

Runs a Lua file from disk - the development way to try a client script.

The file is read from disk and run on the game thread on the next frame, with the game’s whole Lua (no sandbox: it is the player’s own file); a relative path is relative to the KCD:MP install folder (where KcdMp_client.dll lives). The same file can be named on the game’s command line as -KcdMp_exec <file.lua> - through the launcher’s Game arguments - to run two seconds after the level is ready. A syntax error is reported in the client log with its line. The scripts a server sends need none of this: they arrive with the join and run by themselves.

KcdMp_exec <file>
Parameter Type
file path the Lua file, relative to the install folder or absolute

nothing

KcdMp_exec scripts/arena_client.lua

KcdMp_log · the Console commands group of the index