Difference between revisions of "User:Aquanim/DraftMapMakingGuide"
m (→Useful Tools) |
m (→Tools) |
||
Line 89: | Line 89: | ||
* Ask a moderator to support/feature your map | * Ask a moderator to support/feature your map | ||
− | = Tools = | + | = Tools and Resources = |
+ | |||
+ | == Springboard == | ||
+ | |||
+ | == SpringMapEdit == | ||
+ | |||
+ | == Nobiax Texture Pack == | ||
== Startbox Editor Widget == | == Startbox Editor Widget == | ||
Line 101: | Line 107: | ||
That's more like it. Follow those instructions to create your startboxes, then open your infolog.lua (in the main zero-k directory) after you exit to retrieve the startbox information for copying into map_startboxes.lua. It's probably a good idea to turn the widget off after you are done with it. | That's more like it. Follow those instructions to create your startboxes, then open your infolog.lua (in the main zero-k directory) after you exit to retrieve the startbox information for copying into map_startboxes.lua. It's probably a good idea to turn the widget off after you are done with it. | ||
+ | |||
+ | == Upspring == |
Revision as of 00:22, 13 June 2020
Minimal Brief Guide
For more detail on each of these steps read the later sections of the document (TODO: when these are actually written lol)
This guide assumes that you are using a version of Zero-K installed through Steam. You can still make maps if you installed by some other method but you may need to modify some of the later steps.
Download Tools
- 7zip - https://www.7-zip.org/download.html
- pymapconv - clone or download https://github.com/Beherith/springrts_smf_compiler somewhere, then copy pymapconv.exe and nvdxt.exe to a new directory to keep things simple
- map blueprint - clone or download https://github.com/Aquanim/ZKMapBlueprint
Create Images
For a 10x10 (TitanDuel-size) map, create the following images with a tool of your choice:
- A height map grayscale image with dimensions 641 x 641, saved as an 8-bit .bmp or a 16-bit .png. (The latter is preferred but not all tools offer 16-bit output.) The brighter a pixel is the higher the corresponding part of the map will be.
- A texture map colour image with dimensions 5120 x 5120, saved as a .bmp
For a different size map, multiply the height/width of the map by 64 and add 1 to get the right size for the heightmap; multiply the height/width of the map by 512 to get the right size for the texture map.
Put these images in the same directory as pymapconv.exe from the previous step (may not strictly be required but keeps things simple).
TODO: SME and Springboard tools
Compile Your Map
Run pymapconv.exe and fill in the following fields...
- An output file name - ideally this should be the name of your map, possibly with a version number. File extension .smf, will also generate a .smt. IMPORTANT: Do not rename these files after compiling!
- Use the buttons to select the texture and heightmap images you made in the previous step.
- I expect the minimum/maximum height values to be overridden by mapinfo.lua later but you might as well set them.
- Scroll down to the NVDXT option and make sure it says "-Sinc -quality_highest". Also probably a good idea to tick the CLEAN option.
- Untick everything else, press "Save options as" if you like, then press the "Compile" button.
Construct .sdd File
- Rename ZKMapBlueprint_v0.0.sdd to have the name of your map. A version identifier is advisable as well. Keep the .sdd extension.
- Copy the .smf and .smt files produced by pymapconv.exe into the /maps subfolder of the .sdd folder. (There should be mapblueprint.smf and mapblueprint.smt files here, you can delete them.)
- In the root of the .sdd folder there should be a file "mapinfo.lua". Open this with a text editor. This file contains a bunch of stuff but there are only a few items we are interested in for now:
- Near the start of the file change the author, description, name, shortname and version variables to suit you and your map.
- Scroll down a bit to the "smf" section and change the maxheight and minheight numbers to suit your map. Also change the file name after smtFileName0 so that it has your .smt file's name.
- To test your map, copy the .sdd directory into the /maps folder of your Zero-K install. In the settings make sure that "Only featured maps" is disabled. Then open a Skirmish game, click on the current map, select your map from the list, and play. (You might want to make the enemy AI inactive. The minimap in the lobby will be blank, don't worry about this for now.)
- If you want to change your map you will need to replace the files in your ZK maps folder, then restart ZK, in order to load the new version.
Metal and Startboxes
Now that you can look at your height and texturemap ingame this is a good time to sort out your metal spots and start locations.
Metal spots
In the /mapconfig subfolder of the .sdd file there is a "map_metal_layout.lua" file. The blueprint contains two metal spots as an example; replace them with your own.
Startboxes
In the /mapconfig subfolder of the .sdd file there is a "map_startboxes.lua" file. This specifies each team's startboxes as well as default start locations.
Some hints for configuring the metal and startbox files:
- Startboxes are specified by their corner points reading clockwise around the polygon. More than one separate box for a given team is possible.
- Holding SPACE ingame will display a dialog box which (among other things) gives the X and Z coordinates of wherever your cursor is.
- The metal and startbox files are just LUA scripts. This means you don't have to write simple numbers to specify locations; you can perform arithmetic to make sure your map setup is symmetric (the startbox of the South-East team in the blueprint is an example). More advanced scripting is also possible, for example to make your startbox configuration dependent on the number of players or allyteams.
Useful Tools
Optional Extras
TODO: fill these in
You can skip this for now, but refer to the sections linked below if you want...
- Features (geovents, trees, rocks, etc)
- DNTS (fancy map details and specular map)
- Fancy mapinfo stuff (lighting, water effects, etc)
- Skybox (???)
- Other nonsense (particle effects, sound, etc)
Upload
Compress the contents of the .sdd file into a 7zip, then change the file extension to “.sd7”. If you remove the .sdd from your game maps directory and put the .sd7 in its place, the map should still work.
IMPORTANT: Make sure that when you open the archive you see mapinfo.lua and not your .sdd folder! If you get this wrong the map will not work correctly.
IMPORTANT: When you compress to 7zip make sure the compression is “non-solid”.
- Make a Springfiles account at https://springfiles.com/
- Pray to your deity of choice that whoever approves Springfiles accounts checks in this month
Alternatively, get somebody else who already has an account to upload the map for you. Your name will still be listed as the author and you should still be able to upload any later updates yourself.
- Upload your map
- Pray to your deity of choice that Springfiles is actually working this week
- If your map is not listed at https://api.springfiles.com/ within 24 hours ask for help in the #zkmap channel
- Eventually see your map on the ZK website - it will be unsupported by default so make sure you set your search filter accordingly
- Test your map on the live server so there is a publically accessible replay or two - games against AIs are fine
- Ask a moderator to support/feature your map
Tools and Resources
Springboard
SpringMapEdit
Nobiax Texture Pack
Startbox Editor Widget
Load your map in ZK, press Alt-F11 to access the widget list, press "Search" and enter "Startbox". Enable the Startbox Editor. The ingame description doesn't say much so let's consult the widget source file:
...well, that's not a good sign. Scroll down a bit further:
That's more like it. Follow those instructions to create your startboxes, then open your infolog.lua (in the main zero-k directory) after you exit to retrieve the startbox information for copying into map_startboxes.lua. It's probably a good idea to turn the widget off after you are done with it.