Editing Blender To Zero-K

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 96: Line 96:
 
}</pre>
 
}</pre>
  
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.  You should probably also decide on a radius to set - leaving it out autogenerates a large radius covering the entire model, but for many reasons it's not always appropriate.  Examine similar units in game (ctrl-alt-B shows collision bounds, radius is the grey sphere) and match them if necessary.
+
Obviously if you are not using the atlas textures you will need to replace those names with the actual texture files you intend to use.  There are several other things that may need to be in this file, but as these differ per-unit you will need to decide what, if anything, to provide.
  
 
== Set up Zero-K mod that contains and uses your files ==
 
== Set up Zero-K mod that contains and uses your files ==
To get Zero-K to see your files and locally test your units (new or otherwise) you can use a mod, or download all the source and point your original version at it.  I will use a mod.
+
To get Zero-K to see your files and locally test your units (new or otherwise) you should use a mod.
  
This is selectable in local skirmish mode (and theoretically you can distribute them to test in multiplayer) which allows you to check everything works in the engine without requiring any changes to the official repositories or a local development copy of the game - all you need is a working copy of Zero-K.  You should eventually check it works with a properly set up dev copy (and that copy can be used for many changes, if necessary) but for now a mod is simpler.
+
This is selectable in local skirmish mode (and theoretically you can distribute them to test in multiplayer) which allows you to check everything works in the engine without requiring any changes to the official repositories or even building a local development copy of the game - all you need is a working copy of Zero-K.
  
 
=== Making the mod ===
 
=== Making the mod ===
 
Inside the Zero-K folder there is a games subfolder.  Inside that are numerous things, but if you make a new subfolder with a name ending in .sdd it will be read by the engine on startup.  A base mod is available to download [File:BaseMod.sdd.zip here] to build from if you would like an example.  More details on mod creation can be found here: [[Mod Creation]]
 
Inside the Zero-K folder there is a games subfolder.  Inside that are numerous things, but if you make a new subfolder with a name ending in .sdd it will be read by the engine on startup.  A base mod is available to download [File:BaseMod.sdd.zip here] to build from if you would like an example.  More details on mod creation can be found here: [[Mod Creation]]
  
Create a mod and fill out the modinfo.lua, making sure to change the name and description so you can tell it apart when you are selecting it.  If the depends tag is listed as <nowiki>[[rapid:/zk:stable]]</nowiki> you will have to manually change it to the latest ZK version in this format:
+
Create a mod and fill out the modinfo.lua, making sure to change the name and description so you can tell it apart when you are selecting it.
<pre>depend = {
 
[[Zero-K v1.8.10.0]]
 
},</pre>
 
Update the version number appropriately.
 
  
 
=== File locations ===
 
=== File locations ===
Line 128: Line 124:
  
 
Once you've selected your mod you should start the skirmish and attempt to test whatever you've actually changed.  At one point while doing this, Zero-K would not load because the interpreter for the mod's unitdef files was more strict than the main game's, so you may wish to follow the format used in the base mod (it overwrites lotus turrets) more exactly if you have this problem.
 
Once you've selected your mod you should start the skirmish and attempt to test whatever you've actually changed.  At one point while doing this, Zero-K would not load because the interpreter for the mod's unitdef files was more strict than the main game's, so you may wish to follow the format used in the base mod (it overwrites lotus turrets) more exactly if you have this problem.
 +
  
 
== Fix whatever isn't right ==
 
== Fix whatever isn't right ==
Line 197: Line 194:
  
 
Then run <pre>/luarules buildicon {unitname}</pre>. You can run it with no unit name and instead buildicons if you want to generate buildicons for every unit in the game.  It should output the icons to your Zero-K folder under the /buildicons folder.  You will then have to move it to the /unitpics folder of your mod, name it appropriately, and check it works.
 
Then run <pre>/luarules buildicon {unitname}</pre>. You can run it with no unit name and instead buildicons if you want to generate buildicons for every unit in the game.  It should output the icons to your Zero-K folder under the /buildicons folder.  You will then have to move it to the /unitpics folder of your mod, name it appropriately, and check it works.
 
=== Developer mode test with full file system ===
 
 
Now is the time to test against the full developer mode run - see [[Developing]] for information on how to set that up.  Copy your files to an up to date copy of the latest source files from GitHub and check if they work there. 
 
 
Once they do you should be ready to make a pull request.  If you forked from the development version as the linked instructions suggest, you should be able to use your fork to do this.
 
 
[[category:Development]]
 

Please note that all contributions to Zero-K are considered to be released under the Creative Commons Attribution-ShareAlike (see Zero-K:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

Cancel Editing help (opens in new window)