Skip to main content

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

  1. 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.
Sonoran Software - Power Grid - Folders
  1. In the sonoran-powergrid folder are three files you must change and configure:
    1. config.CHANGEME.lua needs to be renamed to config.lua
    2. discord.CHANGEME.lua renamed to discord.lua
    3. And finally systems.CHANGEME.json renamed to systems.json.
Sonoran Software - Power Grid - Remove .CHANGEMEs
  1. You can open and edit the config.lua file to change the settings for the power grid script. You can also edit the discord.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 the systems.json file by following the template
  2. Finally, 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:
  1. You can use the command /spawnnewsystem [prop] [name] to initiate spawning a new system and generate the relevant config data
    • After 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.
    • Click here for more information.
  2. 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

Commands

These are the default names of commands, they may have been modified by the server owner.