Mapdev:mapinfo.lua: Difference between revisions
From Spring
Jump to navigationJump to search
→grass: filled out grass section |
→lighting: filled out |
||
| Line 336: | Line 336: | ||
... | ... | ||
lighting = { | lighting = { | ||
--// dynsun | |||
sunStartAngle = 0.0, | |||
sunOrbitTime = 1440.0, | |||
sunDir = {0.0, 1.0, 2.0, 1e9}, | |||
--// unit & ground lighting | |||
groundAmbientColor = {0.5, 0.5, 0.5}, | |||
groundDiffuseColor = {0.5, 0.5, 0.5}, | |||
groundSpecularColor = {0.1, 0.1, 0.1}, | |||
groundShadowDensity = 0.8, | |||
unitAmbientColor = {0.4, 0.4, 0.4}, | |||
unitDiffuseColor = {0.7, 0.7, 0.7}, | |||
unitSpecularColor = {0.7, 0.7, 0.7}, | |||
unitShadowDensity = 0.8, | |||
specularExponent = 100.0, | |||
}, | }, | ||
... | ... | ||
}</pre></code> | }</pre></code> | ||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;"> | ; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">sunStartAngle</span> [?] : <span style="color:#999999;">Default: ?</span>, ? | ||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">sunOrbitTime</span> [?] : <span style="color:#999999;">Default: ?</span>, ? | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">sunDir</span> [-inf-inf],[-inf-inf],[-inf-inf] : <span style="color:#999999;">Default: {0.0, 1.0,2.0} </span>, The direction of the sun, which is normalized by Spring. The Y-axis is up. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">groundAmbientColor</span> [0.0-1.0],[0.0-1.0],[0.0-1.0] : <span style="color:#999999;">Default: {0.5,0.5,0.5}</span>, The ambient (non-sun-lit) color of ground, grass, trees and other features. The values are in the order Red, Green, Blue. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">groundDiffuseColor</span> [0.0-1.0],[0.0-1.0],[0.0-1.0] : <span style="color:#999999;">Default: ?</span>, The color of ground where it is fully sun lit (added to GroundAmbientColor). The values are in the order Red, Green, Blue. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">groundSpecularColor</span> [0.0-1.0],[0.0-1.0],[0.0-1.0] : <span style="color:#999999;">Default: {0.1,0.1,0.1}</span>, ? and its effect when a specular map is present? | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">groundShadowDensity</span> [?] : <span style="color:#999999;">Default: 0.8</span>, How far from the non shadowed to the ambient color stuff in shadow will go. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">unitAmbientColor</span> [0.0-1.0],[0.0-1.0],[0.0-1.0] : <span style="color:#999999;">Default: {0.4,0.4,0.4}</span>, The ambient (non-sun-lit) color of units and corpses. The values are in the order Red, Green, Blue. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">unitDiffuseColor</span> [0.0-1.0],[0.0-1.0],[0.0-1.0] : <span style="color:#999999;">Default: ?</span>, The color of units where they is fully sun lit (added to UnitAmbientColor). The color of units where they is fully sun lit (added to UnitAmbientColor). The values are in the order Red, Green, Blue. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">unitSpecularColor</span> [0.0-1.0],[0.0-1.0],[0.0-1.0] : <span style="color:#999999;">Default: {0.7,0.7,0.7}</span>, ? | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">unitShadowDensity</span> [?] : <span style="color:#999999;">Default: 0.8</span>, How far from the non shadowed to the ambient color stuff in shadow will go. | |||
; <span style="color:#cccccc;text-shadow: #111 2px 2px 2px;">specularExponent</span> [?] : <span style="color:#999999;">Default: ?</span>, ? | |||
== water == | == water == | ||
Revision as of 02:45, 28 May 2012
mapinfo.lua Reference
Download the map blueprint
Thing are set out in sections with all relevant information for that section contained within.
variables are organised as such:
- VariableName [dimensions] Required
- Default: value, Description
If you notice something is incorrect, fix it please!
General Formatting
check Lua Documentation.
Sections
mapinfo
local mapinfo = {
name = "MyMap",
shortname = "",
description = "",
author = "",
version = "",
--mutator = "deployment";
--mapfile = "", --// location of smf/sm3 file (optional)
modtype = 3, --// 1=primary, 0=hidden, 3=map
depend = {"Map Helper v1"},
replace = {},
--startpic = "", --// deprecated
--StartMusic = "", --// deprecated
maphardness = 100,
notDeformable = false,
gravity = 130,
tidalStrength = 0,
maxMetal = 0.02,
extractorRadius = 500.0,
voidWater = false,
autoShowMetal = true,
smf = {
...
},
sound = {
...
},
resources = {
...
},
splats = {
...
},
atmosphere = {
...
},
grass = {
...
},
lighting = {
...
},
water = {
...
},
teams = {
...
},
terrainTypes = {
...
},
custom = {
...
},
}
- name [string] Required
- Name of the map
- shortname [string]
- description [string]
- The description of the map that shows in the multiplayer battleroom.
- author [string]
- Author of the map
- version [string]
- version, appended to name.
- mutator [string]
- ?
- mapfile [string]
- location of smf/sm3 file (optional)
- modtype [1-3] Required
- 1=primary, 0=hidden, 3=map
- depend [?] Required
- replace [?]
- maphardness [?]
- Default: 100, Defines how much a map will deform from impacts. Higher values mean less deformation, negative values will result in negative deformation (really funny looking)
- notDeformable [0|1]
- Default: 0,Setting it to 1 means that no explosions can deform the map.
- gravity [?]
- Default: 130, The force of gravity in units/sec^2
- tidalStrength [?]
- Default: 0,The amount of energy which will be given by tidal generators.
- maxMetal [?]
- Default: 0.02, How much metal a map square with the maximum metal value gives.
- extractorRadius [?]
- Default: 500, The radius of effect that a single extractor will extract from. If two radii intersect, both extractors will suffer from reduced output.
- voidWater [0|1]
- Default: 0, Voidwater means there will be no water plane, and all parts of the map under water will be completely transparent, to show the skybox through the map. For example, check Apophis_v2
- autoShowMetal [0|1]
- Default: 1, Defines wether the metal map (F4 mode) is shown automatically when a mex is queued for placement.
smf
local mapinfo = {
...
smf = {
minheight = 1000,
maxheight = -300,
smtFileName0 = "",
smtFileName1 = "",
smtFileName.. = "",
smtFileNameN = "",
},
...
}
- minheight [?]
- Overrides the minimum map height specified while compiling. Compile time height used if undefined
- maxheight [?]
- Overrides the maximum map height specified while compiling. Compile time height used if undefined
- smtFileName[N] [?]
- Default: ?, ?
sound
local mapinfo = {
...
sound = {
preset = "default",
passfilter = {
...
},
reverb = {
...
},
},
...
}
- preset [string]
- Default: "default", Sets the _reverb_ preset (= echo parameters), passfilter (the direct sound) is unchanged. To get a list of all possible presets check: EFXPresets.cpp
Hint: You can change the preset at runtime via:
- /tset UseEFX [1|0]
- /tset snd_eaxpreset preset_name (may change to a real cmd in the future)
- /tset snd_filter %gainlf %gainhf (may " " " " " " " " )
passfilter
Note, you likely want to set these tags due to the fact that they are _not_ set by `preset`! So if you want to create a muffled sound you need to use them.
local mapinfo = {
...
sound = {
...
passfilter = {
gainlf = 1.0,
gainhf = 1.0,
},
...
},
...
}
- gainlf [?]
- Default: ?, ?
- gainhf [?]
- Default: ?, ?
reverb
Normally you just want use the `preset` tag but you can use handtweak a preset if wanted with the following tags. To know their function & ranges check the official OpenAL1.1 SDK document.
local mapinfo = {
...
sound = {
...
reverb = {
--density
--diffusion
--gain
--gainhf
--gainlf
--decaytime
--decayhflimit
--decayhfratio
--decaylfratio
--reflectionsgain
--reflectionsdelay
--reflectionspan
--latereverbgain
--latereverbdelay
--latereverbpan
--echotime
--echodepth
--modtime
--moddepth
--airabsorptiongainhf
--hfreference
--lfreference
--roomrollofffactor
},
},
...
}
resources
local mapinfo = {
...
resources = {
grassBladeTex = "",
grassShadingTex = "",
detailTex = "",
specularTex = "",
splatDetailTex = "",
splatDistrTex = "",
skyReflectModTex = "",
detailNormalTex = "",
lightEmissionTex = "",
},
...
}
- grassBladeTex [string]
- Specifies the texture to be used on the grass blades themselves. Green-yellow gradients make for some interesting effects. Defaults to the internally generated blade texture.
- grassShadingTex [string]
- Specifies the color variation of the grass across the map. This defaults to the minimap, so the grass color can match the map color.
- detailTex [string]
- Specifies the detail texture for the map, for examples and a library, see this sticky thread
- specularTex [string]
- ?
- splatDetailTex [string]
- ?
- splatDistrTex [string]
- ?
- skyReflectModTex [string]
- ?
- detailNormalTex [string]
- ?
- lightEmissionTex [string]
- ?
splats
local mapinfo = {
...
splats = {
texScales = {0.02, 0.02, 0.02, 0.02},
texMults = {1.0, 1.0, 1.0, 1.0},
},
...
}
- texScales [?],[?],[?],[?]
- scale value for the splat texture in the RGBA channels respectively.
- texMults [?],[?],[?],[?]
- ? value for the splat texture in the RGBA channels respectively.
atmosphere
local mapinfo = {
...
atmosphere = {
minWind = 5.0,
maxWind = 25.0,
fogStart = 0.1,
fogEnd = 1.0,
fogColor = {0.7, 0.7, 0.8},
sunColor = {1.0, 1.0, 1.0},
skyColor = {0.1, 0.15, 0.7},
skyDir = {0.0, 0.0, -1.0},
skyBox = "",
cloudDensity = 0.5,
cloudColor = {1.0, 1.0, 1.0},
},
...
}
- minWind [?]
- Default: 5.0, The minimum amount of energy the wind on the map will give.
- maxWind [?]
- Default: 25, The maximum amount of energy the wind on the map will give.
- fogStart [?]
- Default: 0.1, The distance from the camera at which the fog will start.
- fogEnd [?]
- Default: ?, ?
- fogColor [0.0-1.0], [0.0-1.0], [0.0-1.0]
- Default: {0.7, 0.7, 0.8}, The color of the fog and the infinite plane below the world. The values are in the order Red, Green, Blue. However, giving values higher than 1.0 will give brighter fog and less than 0.0 will give darker.
- sunColor [?],[?],[?]
- Default: {1.0, 1.0, 1.0}, The color of the sun in the sky. The values are in the order Red, Green, Blue. This will also effect the size of the star. As the values increase (including over 1.0), the disc will get bigger; the inverse is also true.
- skyColor [?],[?],[?]
- Default: {0.1, 0.15, 0.7}, The color of the sky itself. The values are in the order Red, Green, Blue.
- skyDir [?],[?],[?]
- Default: {?, ?, ?}, ?
- skyBox [string]
- Specify a .dds skybox (also called skycube) for examples and resources see this thread
- cloudDensity [0.0-1.0]
- Default: 0.5, The number of clouds in the sky. A percentage in decimal form, 0.0 to 1.0.
- cloudColor [?],[?],[?]
- Default: {1.0, 1.0, 1.0}, The color of the clouds. The values are in the order Red, Green, Blue.
grass
local mapinfo = {
...
grass = {
bladeWaveScale = 1.0,
bladeWidth = 0.32,
bladeHeight = 4.0,
bladeAngle = 1.57,
bladeColor = {0.59, 0.81, 0.57},
},
...
}
- bladeWaveScale [?]
- Default: 1, Specifies how much the wind should effect grass blade movement, as well as the amplitude of the grass motion. Setting it to 0 will stop grass animation.
- bladeWidth [?]
- Default: 0.32, Specifies the width of each blade of grass.
- bladeHeight [?]
- Default: 4.0, Specifies the length of each blade of grass
- bladeAngle [?]
- Default: 1.57, Specifies the curvature of each blade of grass. Unit is radians. 0 means completely straight blades of grass.
- bladeColor [?],[?],[?]
- Default: {?, ?, ? }, does nothing when `grassBladeTex` is set
lighting
local mapinfo = {
...
lighting = {
--// dynsun
sunStartAngle = 0.0,
sunOrbitTime = 1440.0,
sunDir = {0.0, 1.0, 2.0, 1e9},
--// unit & ground lighting
groundAmbientColor = {0.5, 0.5, 0.5},
groundDiffuseColor = {0.5, 0.5, 0.5},
groundSpecularColor = {0.1, 0.1, 0.1},
groundShadowDensity = 0.8,
unitAmbientColor = {0.4, 0.4, 0.4},
unitDiffuseColor = {0.7, 0.7, 0.7},
unitSpecularColor = {0.7, 0.7, 0.7},
unitShadowDensity = 0.8,
specularExponent = 100.0,
},
...
}
- sunStartAngle [?]
- Default: ?, ?
- sunOrbitTime [?]
- Default: ?, ?
- sunDir [-inf-inf],[-inf-inf],[-inf-inf]
- Default: {0.0, 1.0,2.0} , The direction of the sun, which is normalized by Spring. The Y-axis is up.
- groundAmbientColor [0.0-1.0],[0.0-1.0],[0.0-1.0]
- Default: {0.5,0.5,0.5}, The ambient (non-sun-lit) color of ground, grass, trees and other features. The values are in the order Red, Green, Blue.
- groundDiffuseColor [0.0-1.0],[0.0-1.0],[0.0-1.0]
- Default: ?, The color of ground where it is fully sun lit (added to GroundAmbientColor). The values are in the order Red, Green, Blue.
- groundSpecularColor [0.0-1.0],[0.0-1.0],[0.0-1.0]
- Default: {0.1,0.1,0.1}, ? and its effect when a specular map is present?
- groundShadowDensity [?]
- Default: 0.8, How far from the non shadowed to the ambient color stuff in shadow will go.
- unitAmbientColor [0.0-1.0],[0.0-1.0],[0.0-1.0]
- Default: {0.4,0.4,0.4}, The ambient (non-sun-lit) color of units and corpses. The values are in the order Red, Green, Blue.
- unitDiffuseColor [0.0-1.0],[0.0-1.0],[0.0-1.0]
- Default: ?, The color of units where they is fully sun lit (added to UnitAmbientColor). The color of units where they is fully sun lit (added to UnitAmbientColor). The values are in the order Red, Green, Blue.
- unitSpecularColor [0.0-1.0],[0.0-1.0],[0.0-1.0]
- Default: {0.7,0.7,0.7}, ?
- unitShadowDensity [?]
- Default: 0.8, How far from the non shadowed to the ambient color stuff in shadow will go.
- specularExponent [?]
- Default: ?, ?
water
local mapinfo = {
...
water = {
},
...
}
- variable [range]
- Default: value, text
teams
local mapinfo = {
...
teams = {
},
...
}
- variable [range]
- Default: value, text
terrainTypes
local mapinfo = {
...
terrainTypes = {
},
...
}
- variable [range]
- Default: value, text
custom
local mapinfo = {
...
custom = {
},
...
}
- variable [range]
- Default: value, text