User:Aquanim/DraftMapMakingGuide

From Zero-K
Jump to navigation Jump to search

Minimal Brief Guide

For more detail on each of these steps read the later sections of the document.

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

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).

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.)

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. Holding SPACE ingame will display a dialog box which (among other things) gives the X and Z coordinates of wherever your cursor is. This will be helpful when setting up the following config files.

  1. Edit metal
  2. Edit startboxes

Optional Extras

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

  • Make a Springfiles account
  • Pray to your deity of choice that whoever approves Springfiles accounts checks in this month
  • Upload your map
  • Pray to your deity of choice that Springfiles is actually working this week
  • See your map on the ZK website

Tools

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:

Startboxeditor1.png

...well, that's not a good sign. Scroll down a bit further:

Startboxeditor2.png

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.