My favorites | Sign in
Project Home Downloads Wiki Issues Source
Search
for
Developing  

Featured
Updated Feb 13, 2012 by maac...@gmail.com

What is in Source codes

  • /mods/zk game itself
    • units folder contains defintion of units
    • you can read wiki about game development for spring engine
  • /other contains various vital parts of infrastructure
    • ZeroKLobby - is the lobby program for windows used as main interface and downloader
    • Zero-K.info - is the website sources

Modifying source

Directly from web

  • Only suitable for small edits!
  • Ask developers in #zk channel or forums to get commit access
  • use "edit file" feature of this website's file browser to modify files

Using subversion

  • Get some sort of SVN interface. This will allow you to "checkout" (i.e. download) the SVN version of ZK. For Windows, I recommend Tortoise SVN. Download the appropriate version for your operating system and install it.

Tweaking game using subversion walkthrough

  • Do a "SVN Checkout" of the ZK SVN. In Windows, first create a folder in your My Games/Spring/Mods directory. Call it "ZK.sdd". Then, right-click on the folder and select "SVN Checkout". In the box labeled "URL of Repository", put in the URL https://zero-k.googlecode.com/svn/trunk/mods/zk . Leave everything else as-is and hit OK. This will start the download of the SVN version of ZK.
- Note: the svn address for modelbase is svn://springrts.com/modelbase .
  • After the download completes, ZK.sdd will contain all the files of the ZK mod. Experiment with them as you wish. The symbols on the files will tell you how they match up against the SVN version you last downloaded, refer to your SVN application for more information.
  • To update your SVN copy, right-click on ZK.sdd and select "SVN Update". This may not work completely if you have modified files. However, it will not erase your modifications. Note that your SVN copy is independent of your normal, Zero-K lobby copy; updating one does not update the other.
  • To revert files to their original content, right-click on files or folders and select "Tortoise SVN" -> "Revert". Tick all the files you want to revert.
  • To play your SVN copy, start spring.exe directly (in engine folder), select the mod "Zero-K $VERSION". Note that you will not be able to play your version with anybody else unless they have the exact same files that you do.

Submitting Changes using subversion

  • Before submitting any changes, make sure that your SVN copy of ZK is up-to-date and you have tested your version.
  • If you do not have commit access, you can create a patch. See Patches, below. Attach the patch to a new ticket. A dev will then review your ticket and commit it if it is approved.
  • If you do have commit access, you can commit directly. Right-click on ZK.sdd and select "SVN Commit". Enter a log message and select the files that you have changed and would like to include in the patch. Hit OK;
  • Server will ask you for a name and password. Login is your google code account, but password is special, get password here Enter this information and hit OK. After a short delay, you will get a done message. You may want to download the new version via ZK lobby and test again to make triple sure you have not introduced any crashbugs or the like.

Reverting Committed Changes

To revert changes that have already been committed, do the following:

  • Right-click on the folder or files you want to revert.
  • Select "Tortoise SVN" -> "Show log"...
  • After Tortoise SVN fetches the revision data, you should see a list of revisions. Right-click on the one you are interested in and select "Revert to this revision" or "Revert changes from this revision".
  • This will edit your local copy of ZK.sdd accordingly. Commit to finish the reversion. As always, make sure you test first.

Patches

One way to create a change is to use a patch. If you do not have commit access, this is the best way to submit a change. Even if you do have commit access, it can sometimes be a useful way to demonstrate a change, especially if you do not want to actually commit the change.

Creating Patches

  • Right-click on ZK.sdd and select "Tortoise SVN" -> "Create Patch".
  • In the box that pops up, select the files that you have changed and would like to include in the patch. Hit OK, then choose a place for the patch to be created.

Applying Patches

  • Right-click on ZK.sdd and select "Tortoise SVN" -> "Apply Patch".
  • Choose the patch file you would like to apply and hit OK.

Modifying other - lobby, website, autohosts etc

Etherpad link for website design coordination: http://etherpad.springrts.com/i3ZjJNl4qh

  • checkout entire /other folder using Subversion
  • install Visual Web Express 2010 (free express edition is good enough) for web development
  • install MVC 3 for web development
  • install Visual C# for non-web development
  • open Zero-K.sln in visual studio
  • right click asp.net -> properties -> web -> check "Specific Page" and leave it blank. otherwise you get errors when trying to host locally.
  • modify codes from visual studio, you can test them on your machine using F5 (things might run a little slow, because you have to pull some data from an external server)

Making stable version of ZK

Stable version is the version that is meant to be played, for instructions go there: MakingStable

PlanetWars

Changing faction info

Files involved:

DB

Faction.dbo (faction colors, name, shortname)

Site code

asp.net.csproj (icon references - uses shortname)
asp.net.publish.xml (as above)
img/factions/ (icons)

Lobby code

Utils.cs (tooltip color)

Mod

LuaUI/Configs/factions/ (icons)

Wiki

PlanetWarsFactions

Comment by project member oscar.ev...@gmail.com, Mar 10, 2012

Cob to Lua: http://files.caspring.org/misc/car/bos2lua/index.php Why are these tools never in the wiki... or anywhere, for that matter.


Sign in to add a comment
Powered by Google Project Hosting