Skip to content

mazinskihenry/service-level-configs

 
 

Repository files navigation

Valid Server Configs

About

Service Level Configs is a framework for configuration files and scripts that are in use to manage the 7th Cavalry gameservers. This is specifically for S3 and S6 Staff within the 7cav.us community to use for any modifications such as but not limited to,

  • Gameserver startup parameters,
  • Mods and or DLC's installed
  • Miscellaneous configuration files

    This is currently Work-In-Progress, Expect features to change.

Getting Started

To utilize this framework, If you do not have your own tools for working with github and json files we encourage you to download Github desktop and VScode

For changes to Game Configurations the following is required.

  1. You must be in a approved S3 or S6 Billet
  2. Are apart of the 7Cav github organization

JSON

Configurations are managed by using JSON.

JavaScript Object Notation (JSON) is our way of storing the configurations for each server instance.

For more information about these types of files Click Here

Where is the JSON?

To change the configuration of a given gameserver you will need to find the JSON file for it.

The current convention is /<Server Name>/<Game Name>/<Gameserver Type>/<Gameserver Name .json>

example: service-level-configs/mtreck/arma3/public/tacticalrealism2.json

Once you have located the json configuration file, you will need to either clone the repository or make changes via the github website.

Editing JSON configs

JSON configurations will have the following formatting:

{
    "server": {
        "env": {
            "SERVER_ID": "GameServer1",
            "SERVER_NAME": "DefaultGameServer",
            "IP_ADDRESS": "192.168.0.1",
            "PORT": "8080"
           }
         }
}

When editing our JSON configurations, keep in mind that there are Keys and Values. You will only be needed to edit values unless otherwise noted.

Keys:

{
"config": {
    "mykey": "",
    "mykey2": "",
    "yetanotherkey": ""
  }
}

As you can see in this example above, we have the "config": key and within config we have "mykey1":,"mykey2":,"yetanotherkey":

Values:

{
"config": {
    "key0": "value",
    "key1": "Killroywashere",
    "key2": "false"
  }
}

Here we have the values added to the keys.

"key0": = "value", "key1": = "Killroywashere", "key2": = "false"

Take note that the values can be boolean (true / false) or strings "this is a string of text"

Keys can be arrays such as "key": { } in which these can also contain multiple keys with values or even more nested arrays.

Example: "key": { "keyA": { "Key1": "value" }, "keyB": { "Key2": "value" } } which gives you "key" with 4 keys inside nested arrays.

Don't Forget the Comma!

A typical issue with editing JSON files is forgetting what the comma does for a given key and value within the JSON configurations.

{
    "server": {
        "env": {
            "SERVER_ID": "value",
            "SERVER_NAME": "value",
            "IP_ADDRESS": "value",
            "PORT": "value",
            "PARAMETERS": "value"
            },
        "cfg": {
            "Max_Bandwidth": "value",
            "Min_Bandwidth": "value",
            }
           }
}

The above is the correct formatting for json files.

Note that the "SERVER_ID": "value", has a comma on the end of the value but the "PARAMETERS": "value" does not.

This is because the "PARAMETERS": "value" is the last key within that array. the array being the key "env"

You can also note that "env": is also within the "server" array. This means that if its not the only Key within that array then you need to place a comma at the end of the } which indicates the end of that specific array.

As shown above you can see that the } for "env": has a comma at the end of it as well, but the "cfg": and its } does not. You can think of the { as the start of a array and the } as the end of an array.

Troubleshooting:

Further Documentation

For more detailed information, Check the Service-Level-Configs Wiki

About

Monorepo for Service Level Configs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • CSS 41.3%
  • Shell 19.5%
  • Python 18.5%
  • PowerShell 17.1%
  • Dockerfile 1.9%
  • Batchfile 1.7%