Editing Mod Creation
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
− | |||
− | |||
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]. | 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]. | ||
Line 6: | Line 4: | ||
== Cosmetic and UI changes == | == 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 | + | 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 === | === Widgets === | ||
− | + | 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 == | |
+ | 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 simple way is to make a mutator, this is a game package that depends on the base game. Here is an example mutator [[:File:Zk.sdd.zip|zk.sdd.zip]] to get you started. Unzip it in games, and yes, the folder should be named with the extension ".sdd". Your file stucture should look like this. | |
− | [[File: | + | [[File:Capture1.PNG]] |
− | + | Overwrite any files to make edits. | |
− | [[ | + | === Full repository === |
+ | Fork and clone the game repository as seen on the [[Developing]] page. This gives you a standalone version of the game that depends on nothing. Be warned, you will need to pull changes via git in order to receive updates. The advantages of this method are version control, a locally searchable repository, and the ability to eventually open pull requests and push content to be included in the base game (if you're keen). | ||
− | + | === Running your mod === | |
− | + | Start a Custom battle lobby, with a password, on the multiplayer server. Type <code>!game zk:dev</code> 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/campaign games should now use your modified local copy of zk.sdd. In this mod, the [[Lotus]] has 10 times its normal range. | ||
− | + | === Advanced mutator creation (offline only?) === | |
+ | * Download and extract [https://drive.google.com/open?id=1WlnSPyUR7b_XQfIgpZAYhED-o4XuaUqq this file] to your Zero-K folder. It should create the folder <code>Zero-K/games/newmod.sdd</code>. | ||
+ | * Enable developer mode (see above). Go to the Developer tab in Settings and edit the Singleplayer setting to 'Zero-K New Mod'. | ||
+ | * Your skirmish/campaign games should now use the contents of <tt>newmod.sdd</tt>. You can change this folder's contents to mod your game. | ||
+ | * To rename your mod or change the version number, change <code>Zero-K/games/newmod.sdd/modinfo.lua</code> and <code>Zero-K/LuaMenu/configs/gameConfig/newMod/mainConfig.lua</code>. | ||
+ | ** Make sure <code>zkBaseConfig._defaultGameArchiveName</code> in <tt>mainConfig.lua</tt> matches the name and version in <tt>modinfo.lua</tt>. | ||
+ | ** The folders <tt>games/newmod.sdd</tt> and <tt>LuaMenu/configs/gameConfig/newMod</tt> can also be renamed, if you wish to distribute your mod. | ||
− | [[Category:Development]] | + | [[Category:Development]] |