Difference between revisions of "Mod Creation"
GoogleFrog (talk | contribs) |
(Fixes, polish) |
||
Line 1: | Line 1: | ||
− | Zero-K runs on the [https://springrts.com | + | Zero-K runs on the [https://springrts.com Spring engine], which supports a lot of modification of game files. The most advanced mods may amount to creating an entire new game. The Spring engine wiki is a valuable resource for game and mod development using the engine, especially the [https://springrts.com/wiki/Gamedev:Main gamedev page]. |
− | Familiarity with the [https://github.com/ZeroK-RTS/Zero-K | + | Familiarity with the [https://github.com/ZeroK-RTS/Zero-K game repository] or [https://github.com/ZeroK-RTS/Chobby main menu repository] is important for modding and downloading a searchable version is advised. See [[Developing#Getting_Sources]] for how to download a local version of the repository. |
== Cosmetic and UI changes == | == Cosmetic and UI changes == | ||
Line 9: | Line 9: | ||
=== Widgets === | === Widgets === | ||
− | For LuaUI changes you will need to enabled local widgets and load local widgets first through the advanced settings in Settings/Interface/Misc. Completely new widgets can also be added and loaded. | + | For LuaUI changes you will need to enabled local widgets and load local widgets first through the advanced settings in <code>Settings/Interface/Misc</code>. Completely new widgets can also be added and loaded. |
== Mechanics changes == | == Mechanics changes == | ||
Line 16: | Line 16: | ||
=== Mutator === | === Mutator === | ||
The relatively simpler way is to make a mutator, this is a game package that depends on the base game. Here is an example mutator [https://github.com/ZeroK-RTS/Zero-K/files/1963055/zk.sdd.zip]. Unzip it in games such, and yes, the folder should be named with the extension ".sdd". Your file stucture should look like this. | The relatively simpler way is to make a mutator, this is a game package that depends on the base game. Here is an example mutator [https://github.com/ZeroK-RTS/Zero-K/files/1963055/zk.sdd.zip]. Unzip it in games such, and yes, the folder should be named with the extension ".sdd". Your file stucture should look like this. | ||
+ | |||
[[File:Capture1.jpg]] | [[File:Capture1.jpg]] | ||
+ | |||
Overwrite any files to make edits. | Overwrite any files to make edits. | ||
Line 28: | Line 30: | ||
* 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. | * 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. | * 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. In this mod, the Lotus has 10 times its normal range. | + | * Your skirmish games should now use your modified local copy of zk.sdd. In this mod, the [[Lotus]] has 10 times its normal range. |
+ | |||
+ | [[Category:Development]] |
Revision as of 22:11, 30 April 2018
Zero-K runs on the Spring engine, which supports a lot of modification of game files. The most advanced mods may amount to creating an entire new game. The Spring engine wiki is a valuable resource for game and mod development using the engine, especially the gamedev page.
Familiarity with the game repository or main menu repository is important for modding and downloading a searchable version is advised. See Developing#Getting_Sources for how to download a local version of the repository.
Contents
Cosmetic and UI changes
Some changes can be made just by adding files to your install directory. The following subfolders of the game repository should support this (feel free to attempt more): unitpics, sounds, unittextures, bitmaps, anims, icons and LuaUI. Replace a file by perfectly matching its name and path.
Everything in the main menu repository can be overridden.
Widgets
For LuaUI changes you will need to enabled local widgets and load local widgets first through the advanced settings in Settings/Interface/Misc
. Completely new widgets can also be added and loaded.
Mechanics changes
Changing animations, unit behaviour, game mechanics or statistics is a little trickier than cosmetic changes. These changes are also incompatible with the base game. There are two ways to make these changes.
Mutator
The relatively simpler way is to make a mutator, this is a game package that depends on the base game. Here is an example mutator [1]. Unzip it in games such, and yes, the folder should be named with the extension ".sdd". Your file stucture should look like this.
Overwrite any files to make edits.
Full repository
Fork and clone the game repository as seen on the Developing page.
Running your mod
Start a Custom battle lobby, with a password, on the multiplayer server. Type "!game zk:dev" to switch to your mod, make sure you have a green tick. Other players can join and play your mod if they have the exact same mod files. If you made a mod with the full repository method then they can clone your fork on github.
Running your mod, singleplayer
- 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. In this mod, the Lotus has 10 times its normal range.