Getting sources

Locate the repository you want to edit and click the "Fork" button on the GitHub website to create your own copy on GitHub

Locate your fork and click the "Clone or download -> Open in Desktop" button on the GitHub website to create a local repository on your computer

Before you start modifying sources:

Use GitHub Desktop to create a new branch in your repository for the specific changes you want to make; create the new branch from the master branch in the original ZeroK-RTS repository

After you finish modifying sources:

Use GitHub Desktop to commit your changes to your local repository

Use GitHub Desktop to publish or sync your commits to your repository on GitHub

Submit your changes for review: Use GitHub Desktop or the GitHub website to create a Pull Request from your new branch in your fork (the "head fork") into the master branch in the original ZeroK-RTS repository (the "base fork")

Modifying the game

Clone to desktop Zero-K game and save it to zk.sdd/. This folder should contain multiple files/folders, such as modinfo.lua.

To test source modifications, you'll need to enable developer mode. Do this by creating an empty text document "devmode.txt" in the same directory as Zero-K.exe. You may need to restart the lobby.

In the Settings menu a new tab appears: Developer. Edit the Singleplayer setting to be Zero-K Dev.

Your skirmish games should now use your modified local copy of zk.sdd.

Modifying lobby menu

Create a folder games/chobby.sdd in the Zero-K installation folder.

Clone to desktop Chobby and save it to chobby.sdd/. This folder should contain multiple files/folders, such as modinfo.lua.

Launch Zero-K.exe with the dev arg (i.e. Zero-K.exe dev)

Zero-K.exe launch flags

Zero-K.exe [rapid tag] [engine version]

Note that the engine specified in arg won't automatically use the main Zero-K folder as its datadir. Add a springsettings.cfg file to the engine version's folder with the tag SpringData = path_to_Zero-K_folder

Modifying infrastructure/tools

Initializing Website Database

You may need to setup the database connection for the website. In order to do that: Open Visual Studio, open the Server Explorer panel, right click Data Connections -> Add Connection -> Sql Server. Enter (localdb)\mssqllocaldb in the Server Name field, after which zero-k_local will appear in the dropdown list of databases.

Debugging infrastructure

To run a project right click it, choose "set as startup project" and hit F5 to run using debugger.

It's required that you install MS SQL Express on your local PC. Get one from here. The file you will need is called SQLEXPR_x64_ENU or SQLEXPR_x86_ENU. Make sure you install version that matches your version of Windows (i.e. x86 vs x64). During the installation leave all the parameters default except that I changed server name to SQLEXPRESS in one of the first steps of wizard.

Wiki

Unit pages

Run export_unit_templates.sh to generate wiki templates for each unit (see export_unit_templates.lua for some configuration options), then have the bot read the generated text files and edit the unit pages accordingly (requires Visual Studio setup as detailed above). The text output can also be used to manually edit pages.

Unit buildicons and radar icons should be uploaded by FTP to manual.zero-k.info (zero-k.info/zkmanual/www/unitpics and /icons respectively). Contact Licho or Histidine for login details.