Lua Interface - SirBitesalot/AvorionServerManager GitHub Wiki

The Lua Command Interface is a way to enable limited control over an avorion server without using the ingame console. To enable it click on Patch in the tools Section. This will automatically update your server.lua with the needed additions. Please Backup your server.lua if you have made changes to it. The "Clean" button will remove all changes made by the Avorion Server Manager.

The Lua interface is only needed until the real command line interface for windows is in the live branch. The next Avorion Server Manager release will able to use the new command line interface. Commands are dynamically loaded. That means you can create your own command. Some standard command definitions are stored in the file "CommandDefinitions.json" in the "Settings" folder. As the extension implies this is a JSON file and definition must follow the JSON standard. For more Information you can visit Wikipedia: https://en.wikipedia.org/wiki/JSON

An Example: { "DisplayName": "Save", "LuaName": "Server():save", "Id": 1, "ParameterNames": null }

DisplayName,LuaName,Id and ParameterNames are Identifiers do not change these. "Save" is the Name which will be displayed in the manager to refere to this command. Data type=String "Server():save" is the name/syntax in Lua for this command Data type=String

"1" this needs to be unique for each command and must be a positive number Data type=Number

In this case " ParameterNames" is followed by null. Which means this command does not have Parameters Data type=Array of Type String If another command would follow after this definition a comm would be needed after the closing bracket.

Example with Parameters: { "DisplayName": "Broadcast Message", "LuaName": "Server():broadcastChatMessage", "Id": 3, "ParameterNames": [ "sender", "messageType", "message" ] }