Editing User:Aquanim/DraftMapMakingGuide

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 4: Line 4:
  
 
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.
 
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.
 
If you want to see what the map's file structure is meant to look like overall, scroll to the [[https://zero-k.info/mediawiki/index.php?title=User:Aquanim/DraftMapMakingGuide#Skeleton_Of_A_Map Skeleton Of A Map]] section. It's also a good idea to un7zip some existing maps and take a look to see how they are set up (and borrow anything which seems useful for your map).
 
 
Some or all of these steps may be possible to do using just Springboard; I will leave that guide to somebody who is familiar with the Springboard workflow. I mostly use it for features.
 
  
 
== Download Tools ==
 
== Download Tools ==
Line 35: Line 31:
 
* Scroll down to the NVDXT option and make sure it says "-Sinc -quality_highest". Also probably a good idea to tick the CLEAN option.
 
* 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.<br />
 
* Untick everything else, press "Save options as" if you like, then press the "Compile" button.<br />
 
Troubleshooting:
 
* If your map's minimap looks like it is from an old version of your map or a different map entirely, there is probably an old minimap file which the compiler is reading. In the directory where your compiler .exe is, delete any images which look like a minimap (probably something like mini.bmp and/or mini.dds) then recompile.
 
  
 
== Construct .sdd File ==
 
== Construct .sdd File ==
Line 67: Line 60:
  
 
== Optional Extras ==
 
== Optional Extras ==
Scroll down to section 3 to see how to add...
+
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)
 
* Features (geovents, trees, rocks, etc)
 
* DNTS (fancy map details and specular map)
 
* DNTS (fancy map details and specular map)
 
* Fancy mapinfo stuff (lighting, water effects, etc)
 
* Fancy mapinfo stuff (lighting, water effects, etc)
* Skybox
+
* Skybox (???)
 
* Other nonsense (particle effects, sound, etc)
 
* Other nonsense (particle effects, sound, etc)
* Lava
 
  
 
== Upload ==
 
== Upload ==
  
Compress the contents of the .sdd file into a 7z, 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.
+
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:''' 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 7z make sure the compression is “non-solid”. If using 7zip this is done by setting the "Solid Block size" option to "non solid".
+
'''IMPORTANT:''' When you compress to 7zip make sure the compression is “non-solid”.  
 
 
=== Uploading to Zero-K Server ===
 
 
 
* Go to https://zero-k.info/Maps
 
* Scroll down until you find the "Upload map or game (sd7 or sdz):" file on the right-hand side
 
* Upload your map
 
* 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 (they will also tag it as 1v1/teams/hilly/flat/whatever as appropriate)
 
 
 
If the upload step doesn't work there are two potential reasons:
 
* Your map isn't set up right. Test it locally again and make sure your map works.
 
* Something on the server has gone wrong. AFTER testing your map locally and finding that it works there, contact an admin. Uploading your map to a file-sharing service so the admin can look at it may help.
 
 
 
=== Uploading to Springfiles for use in other Spring communities ===
 
  
 
* Make a Springfiles account at https://springfiles.com/
 
* Make a Springfiles account at https://springfiles.com/
Line 108: Line 88:
 
* Test your map on the live server so there is a publically accessible replay or two - games against AIs are fine
 
* 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
 
* Ask a moderator to support/feature your map
 
= Skeleton Of A Map =
 
 
All you *really* need is the stuff in solid grey boxes: mapinfo.lua, .smf and .smt files, a metal layout, and a startbox config.
 
 
[[File:Mapskeleton.png|The skeleton of a map]]
 
 
(Note: Some of the things labelled as "necessary" probably technically aren't; there are many ways to construct a map that Spring will accept. This guide will walk you through one that should be reasonably coherent and up to date.)
 
  
 
= Tools and Resources =
 
= Tools and Resources =
Line 137: Line 109:
  
 
== Upspring ==
 
== Upspring ==
 
A tool for modifying models like those of tree features, etc. Might be useful if a feature is too large or too small. I'll leave this guide to somebody who actually understands modelling.
 
 
= Other Stuff =
 
 
== Features (geovents, trees, rocks, etc) ==
 
 
This method of placing features requires you to have some s11n gadgets in /LuaRules/Gadgets and some s11n and lcs stuff in the /libs/ folder. If your map doesn't have these then get them from the blueprint or some other map.
 
 
* Put the files defining the features you want in your map file. This includes a definition in the /features subdirectory, model files in the /objects3d directory, and textures in the /unittextures directory. The easiest way to get these is to borrow them from existing maps. There is a features library as well... ask around in #zkmap for a link then update this page.
 
* Load your map in Springboard
 
* Delete any features you have marking mex locations, otherwise you will end up with two copies of them and that is bad.
 
* Place features using Springboard.
 
* Open the "Export" window in Springboard, choose a file name, set the file type to "s11n object format" and export the file.
 
* The file will (probably?) have been exported to <springboard exe directory>/data/springboard/exports - copy this s11n file to the ./mapconfig subdirectory of your map.
 
* Make sure that in ./libs/s11n/s11n_load_map_features.lua that the "modelPath" variable points at your s11n file.
 
 
Troubleshooting:
 
* IF your features do not move when the ground under them is terraformed (a particular problem for geovents) go to ./libs/s11n/features_s11n.lua, look for the "CreateObject" function, and change it so that SetFeatureMoveCtrl is not being used to set MoveCtrl to true.
 
 
== DNTS ==
 
 
If you don't use DNTS but you do set detailTex in the "resources" section of mapinfo.lua then you will get some general detail map. This works better than flat colour but we can get fancier.
 
 
* Put the .dds or .tga files defining the detail map (commonly grass, pebbles, rocks, etc.) you want in your /maps subdirectory. Again these are most easily found by borrowing from other maps. [http://beherith.eat-peet.net/stuff/nobiax_spring_dnts/nobiax_spring_dnts.html This page] has some that may work (possibly with some effort).
 
* In mapinfo.lua, in the "resources" section, set splatDetailNormalTex1, splatDetailNormalTex2, splatDetailNormalTex3, splatDetailNormalTex4 to point to your detail files. These will in order be defined by the red, green, blue and alpha channels of your distribution image.
 
* Set splatDistrTex to point to your distribution image. This defines where each detail type appears on your map. This image will be stretched over your map; powers of two in the resolution are advised.
 
* Set specularTex to point to your specular image; what colour of light will be reflected from each part of the map. It is easy to go overboard with this so taking your texture map, darkening it significantly (or possibly increasing its transparency), and tuning from there is an okay strategy. Again, this image will be stretched over your map; powers of two in the resolution are advised.
 
* There is also some lightemission thing that I have not used and don't really understand [https://springrts.com/wiki/Mapdev:lightemission here]. The example image looks like Otago so try asking TheMooseIsLoose for advice?
 
 
== Water and lighting settings ==
 
 
I'm not an expert, tune these for yourself until it looks good. Try reading [https://springrts.com/wiki/Mapdev:water these] [https://springrts.com/wiki/Mapdev:mapinfo.lua#Lighting pages].
 
 
== Skybox ==
 
 
Borrow one from some other map then set it in mapinfo.lua, atmosphere section, variable "skyBox". If you want to make one yourself apparently pymapconv can put it in the right format.
 
 
== Particle and sound effects ==
 
 
Find a map that does the thing you want to do, look at how that map did it. For reference some fairly simple examples can be found in Rogues River (sound effects), Aurelian (precipitation), and Mercurial (plumes from the water).
 
 
== Lava ==
 
 
Good luck... I'm not sure anybody has come up with an entirely bug-free implementation of this yet. Banana Republic might be your best bet for a reference.
 

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)