Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Mapdev:metal: Difference between revisions

From FIGHTORDER
imported>Enetheru
m Image File: removed fixme.
imported>Gajop
 
(6 intermediate revisions by 2 users not shown)
Line 2: Line 2:
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.
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)
{{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.}}
|body=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.}}
<center>
<center>
{| class="wikitable"
{| class="wikitable"
Line 15: Line 14:
== mapinfo.lua ==
== mapinfo.lua ==
* [[Mapdev:mapinfo.lua|mapinfo.lua]]
* [[Mapdev:mapinfo.lua|mapinfo.lua]]
<code><pre>mapinfo ={
<pre>mapinfo ={
   ...
   ...
   maxMetal        = 0.02,
   maxMetal        = 0.02,
Line 21: Line 20:
   autoShowMetal  = true,
   autoShowMetal  = true,
   ...
   ...
}</pre></code>
  smf = {
        ....
        metalmapTex = "",
        ....
    },
    ...
}</pre>


== Image File ==
== Image File ==
* The metal map is an intermediary file compiled into the SMF file using [[MapConv]] or [[MapConvNG]].
* 8 bpp RGB
* The red value of pixel corresponds to the metal value.
* The red value of pixel corresponds to the metal value.
<center>
{| class="wikitable" width="100%"
! width="15%" | File Location
| The metal map is an intermediary file compiled into the SMF file using [[MapConv]] or [[MapConvNG]], it can also be specified in the mapinfo.lua.
|-
! File Format
| Any that the Mapconv programs support
|-
! Colour Depth
| 8bpp
|-
! Channels
| Greyscale
|-
! Resolution
| <center>
{| class="wikitable" style="text-align: center;"
{| class="wikitable" style="text-align: center;"
!Spring Map Size<sup>*</sup>
!Spring Map Size<sup>*</sup>
!pixels = Spring Map Size * 64 + 1
!pixels = Spring Map Size * 32
|-
|-
| 2
| 2
| 129
| 64
|-
|-
| 4
| 4
| 257
| 128
|-
|-
| 6
| 6
| 385
| 256
|-
|-
| ...
| ...
Line 45: Line 62:
|-
|-
| 32
| 32
| 2049
| 1024
|-
|-
| style="text-align: left;font-style:italic" colspan=2 | &#42; must be multiples of 2
| style="text-align: left;font-style:italic" colspan=2 | &#42; must be multiples of 2
|}</center>
|}</center>
|}


= Additional Information =
= Additional Information =
Line 54: Line 72:
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.
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:Map Dev]]
[[Category:Development]]

Latest revision as of 14:08, 16 September 2020

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
Example
File:Mapdev-metal.png File:Mapdev-metal-example.png
Example Metal Map Ingame Result

Specification

mapinfo.lua

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

Image File

  • The red value of pixel corresponds to the metal value.
File Location The metal map is an intermediary file compiled into the SMF file using MapConv or MapConvNG, it can also be specified in the mapinfo.lua.
File Format Any that the Mapconv programs support
Colour Depth 8bpp
Channels Greyscale
Resolution
Spring Map Size* pixels = Spring Map Size * 32
2 64
4 128
6 256
... ...
32 1024
* must be multiples of 2

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.

Contents