Mapdev:metal: Difference between revisions

From Spring
Jump to navigationJump to search
m added images.
m added more, cleaned.
Line 1: Line 1:
= Metal =
= Metal =
Metal maps are used for the built in resourcing scheme (Metal/Energy), they define metal areas on a battlefield based upon the values in the red channel of the metal map. This image is an intermediary file compiled into the SMF file using [[MapConv]] or [[MapConvNG]]
Metal maps are used for the built in resourcing scheme (Metal/Energy), they define metal areas on a battlefield based upon the values in the red channel of the metal map.


{{infobox|title=Caution|icon=icon-caution.png|icon-size=48|color=rgba(255,0,0,0.1)
{{infobox|title=Caution|icon=icon-caution.png|icon-size=48|color=rgba(255,0,0,0.1)
Line 24: Line 24:


== Image File ==
== Image File ==
* The metal map is an intermediary file compiled into the SMF file using [[MapConv]] or [[MapConvNG]].
* 8 bpp RGB
* 8 bpp RGB
{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
Line 47: Line 48:
|}
|}


* The red value of pixel corresponds to the metal value for that pixel.
* The red value of pixel corresponds to the metal value for that pixel.(would like to have a more detailed proof, perhaps pointing to some source code, or something.. unless its entirely defined by the game in which case blah).


= Additional Information =
== Patch Technique ==
If you do want perfect metal patches, use a 6x6 pixel pencil in your image editor with a red value of 255. This combined with setting the "MaxMetal" tag in the definitions to 1, will result in a perfect 2.0 metal generation per patch (using Balanaced Annihilation values). The game use isn't the point however. The fact is that if you can predict how much each spot will output (typically), using the "MaxMetal" parameter, you can easily scale the values up and down. As an example of another extreme, Evolution RTS dictates that all metal patches will output 0.5 metal regardless of the map settings. So whether you need to put a lot of thought into your metal map values depends entirely upon the game for which you are creating the map.
[[Category:Mapdev]]
[[Category:Mapdev]]
[[Category:Development]]
[[Category:Development]]

Revision as of 02:13, 21 December 2012

Metal

Metal maps are used for the built in resourcing scheme (Metal/Energy), they define metal areas on a battlefield based upon the values in the red channel of the metal map.

Caution
There are several games for Spring which use their own resourcing system. If you are creating a map for one of those games a metal map may not be necessary, however it is always nice if you can make your maps as compatible with other games as possible, but this is a choice left entirely up to you.
Example
Example Metal Map Ingame Result

Specification

mapinfo.lua

relevant sections of the mapinfo.lua file are:

mapinfo ={
   ...
   maxMetal        = 0.02,
   extractorRadius = 500.0,
   autoShowMetal   = true,
   ...
}

Image File

  • The metal map is an intermediary file compiled into the SMF file using MapConv or MapConvNG.
  • 8 bpp RGB
Spring Map Size* pixels = Spring Map Size * 64 + 1
2 129
4 257
6 385
... ...
32 2049
* must be multiples of 2
  • The red value of pixel corresponds to the metal value for that pixel.(would like to have a more detailed proof, perhaps pointing to some source code, or something.. unless its entirely defined by the game in which case blah).

Additional Information

Patch Technique

If you do want perfect metal patches, use a 6x6 pixel pencil in your image editor with a red value of 255. This combined with setting the "MaxMetal" tag in the definitions to 1, will result in a perfect 2.0 metal generation per patch (using Balanaced Annihilation values). The game use isn't the point however. The fact is that if you can predict how much each spot will output (typically), using the "MaxMetal" parameter, you can easily scale the values up and down. As an example of another extreme, Evolution RTS dictates that all metal patches will output 0.5 metal regardless of the map settings. So whether you need to put a lot of thought into your metal map values depends entirely upon the game for which you are creating the map.