Contribution guide - ZeroGravityAntFarm/ZeroGravity-HighOrbit GitHub Wiki
So you forged the greatest Eldewrito map in history and want to share it with the zgaf community?
Prerequisites
- A working knowledge of git (This is not a guide on how to use git, nor will we help you learn. There are plenty of great resources for this online)
- Fundamental understanding of JSON and how it works
- A fun map and game type
How does all this work?
- First, an overview of how we do things. We utilize git to manage and deploy our map playlist. This lets us "pre-bake" server playlists in the form of branches. Whatever maps are in the master branch are deployed to the server on merges. The workflow looks like this: local commit to stage -> Pull request to master -> PR reviewed by the team -> PR approved and merged to master -> pipeline is triggered and map is deployed.
Cool story bro, how do I upload my map?
- First, clone the ZeroGravity-HighOrbit repository to your computer (we like to use git desktop). Switch to the Stage branch as your working branch. Open the repository in a file browser.
- Create a new empty folder in ZeroGravity-HighOrbit\maps. Place your sandbox.map and variant files into this folder you created. This folder should be the name of the map you have made. Your map file must be sandbox.map or else it will break the server. Likewise for the variant. See below for an example.
├───ZeroGravity-HighOrbit
│ └───maps
│ ├───GarysLab
| ├───sandbox.map
| ├───variant.zombiez
- Now we need to add your map to the voting.json file. Open this in a text editor, preferably one that supports syntax highlighting for json. I have provided an empty code block below that you can use as a template. Fill out this template with the name of the folder you put your map in. The mapName and typeName attributes MUST match the name of the folder you put your map and variant inside. The Display name can be anything you want and will be the name players see in the voting lobby.
{
"displayName": "AnythingYouWant",
"typeName": "YourFolderName",
"commands": [
"Server.SprintEnabled 0",
"Server.AssassinationEnabled 0",
"Server.NumberOfTeams 2"
],
"SpecificMaps": [
{
"displayName": "AnythingYouWant",
"mapName": "YourFolderName"
}
]
},
-
Add your new json section to the voting json file. You can place it anywhere in the list of maps (it will not change when or how often it is seen in the voting screen.) If the code block is added at the bottom of the file, the trailing comma at the end must be removed. Always run the new voting.json you've created through a validator (I personally like to use this one https://jsonlint.com/).
-
Commit your changes with a commit message comprising of the map you've added and who you are. After this is completed, open a Pull Request and one of the team members will review. That's it!