Getting Started
Acquire the Script
After purchasing the script through the sonoran store you may download the script through the keymaster account that purchased the script. Upon downloading extract the file to a safe place.
Install the Script
Inside the script package you just extracted will be two folders. Copy both to a folder in your server's resources folder called
[sonoranscripts]
note the[]
in the name, without them it will not work.In the
sonoran-powergrid
folder are three files you must change and configure:config.CHANGEME.lua
needs to be renamed toconfig.lua
discord.CHANGEME.lua
renamed todiscord.lua
And finally
systems.CHANGEME.json
renamed tosystems.json
.
You can open and edit the
config.lua
file to change the settings for the power grid script. You can also edit thediscord.lua
file to add discord webhook updates for when the state of the power grid changes. For more advanced users, you can add custom power grid stations in thesystems.json
file by following the templateFinally, in your
server.cfg
add the following:
Configuring the Script
This script utilizes two separate Lua configs. This is for security reasons. Having a separate config for your Discord Configuration keeps them server side only and safer from malicious clients.
Setting Up Permissions (Ace Permissions Only)
To use this script you must assign the permissions object to the groups which you would like to have permissions. You can find the objects needed in the config under Config.ace_perms
section in the config. To assign these perms you must add the lines to your server.cfg
or where ever you setup permissions on your server. You can learn more about Ace Permissions here.
Example:
System Location Config
You have two options for placing new systems:
You can use the command
/spawnnewsystem [prop] [name]
to initiate spawning a new system and generate the relevant config dataAfter running this command you must pull out, aim, and shoot with a gun to confirm placement.
You may need to modify some of the rotation values manually to get that perfect placement you are looking for.
You can manually copy and paste an existing config and then modify the values to meet your needs for the new system
systems.json
Property Explanation
systems.json
Property ExplanationProperty Name | Example | Notes |
---|---|---|
| 2 |
|
|
| Valid values are |
| This is a table that contains the x, y, and z coords of the power system | |
| This is a table that contains the x, y, and z rotation of the power system | |
|
| This is a human readable label for the power system, can have spaces |
| This is an table of devices attached to the power grid |
Commands
These are the default names of commands, they may have been modified by the server owner.
Command Name | Command Description | Required Permission |
---|---|---|
| This command will allow an admin to spawn a new power system using a gun placement system where the name argument is the label for the new power system and the prop argument is the text name of the model to use | Admin or as configured |
| This command will cancel the current power system placement if one is currently in progress. | N/A |
| This command will draw the ID of power systems which you are close to with 3D text near the base of the power system | N/A |
| This command will print the current positional data of the power system to the chat | Admin or as configured |
| This command will change the value which you specify of the power system you specify, run this command without arguments for example usage. All changes made with this command will be immediately saved | Admin or as configured |
| This command will completely reload the systems.json from the server's storage | Admin or as configured |
| This command will allow the admin to link a power system to a different system using a system similar to the gun placement system | Admin or as configured |
| This command will cancel the current link in progress | N/A |
Last updated