Mapdev:SMD: Difference between revisions
From Spring
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 1: | Line 1: | ||
== SMD Syntax == | == SMD Syntax == | ||
The SMD, to work correctly, must be set out correctly. The following are a few of these requirements that you have to follow: | The SMD, to work correctly, must be set out correctly. The following are a few of these requirements that you have to follow: | ||
| Line 25: | Line 21: | ||
ExtractorRadius=400; | ExtractorRadius=400; | ||
MapHardness=100; | MapHardness=100; | ||
DetailTex=mydetailtex.bmp; | |||
AutoShowMetal=1; | |||
[ATMOSPHERE] | [ATMOSPHERE] | ||
{ | { | ||
Skybox=space.dds; | |||
FogColor=0.7 0.7 0.8; | FogColor=0.7 0.7 0.8; | ||
FogStart=0.2; | FogStart=0.2; | ||
| Line 42: | Line 43: | ||
[WATER] | [WATER] | ||
{ | { | ||
WaterTexture=mywatertexture.jpg; | |||
WaterSurfaceColor=0.4 0.6 0.8; | |||
WaterPlaneColor=0.4 0.6 0.8; | |||
WaterBaseColor=0.4 0.6 0.8; | WaterBaseColor=0.4 0.6 0.8; | ||
WaterAbsorb=0.004 0.004 0.002; | WaterAbsorb=0.004 0.004 0.002; | ||
WaterMinColor=0.1 0.1 0.3; | WaterMinColor=0.1 0.1 0.3; | ||
WaterDamage=20; | |||
} | } | ||
[LIGHT] | [LIGHT] | ||
| Line 59: | Line 65: | ||
UnitSunColor=0.8 0.8 0.8; | UnitSunColor=0.8 0.8 0.8; | ||
UnitShadowDensity=0.8; | UnitShadowDensity=0.8; | ||
SpecularSunColor=0.3 0.3 0.3; | |||
} | } | ||
[TEAM0] | [TEAM0] | ||
| Line 123: | Line 130: | ||
<td valign="top">Used to define different terrain types that exist on the map. The value starts at 0 and goes on for as many terrain types as you have, where ''X'' is the type number. Which terrain type goes where on the map is determined by the typemap when compiling the map.</td> | <td valign="top">Used to define different terrain types that exist on the map. The value starts at 0 and goes on for as many terrain types as you have, where ''X'' is the type number. Which terrain type goes where on the map is determined by the typemap when compiling the map.</td> | ||
<td valign="top">[TERRAINTYPE0]</td> | <td valign="top">[TERRAINTYPE0]</td> | ||
</tr> | |||
<tr> | |||
<td valign="top">'''AutoShowMetal'''</td> | |||
<td valign="top">A boolean, turning it off makes it so the user must press F4 to view the metal map, leaving it on will make it so the metal map is turned on whenever they choose to build a metal extractor.</td> | |||
<td valign="top">AutoShowMetal=0;</td> | |||
</tr> | </tr> | ||
| Line 142: | Line 154: | ||
</tr> | </tr> | ||
<tr> | |||
<td valign="top">'''DetailTex'''</td> | |||
<td valign="top">The texture which will be shown on the map in the color of the texture map when a player zooms very far in. Leaving this blank will make the game default to detailtex2.bmp. It is assumed you can only use the bitmap format for these textures.</td> | |||
<td valign="top">DetailTex=mydetailtex.bmp;</td> | |||
</tr> | |||
<tr> | <tr> | ||
<td valign="top">'''ExtractorRadius'''</td> | <td valign="top">'''ExtractorRadius'''</td> | ||
| Line 224: | Line 242: | ||
<td valign="top">Speed multiplier for Ship when travelling on the parent terrain type. A value of '1' is normal speed, 0.5 will make them travel at half speed on the parent terrain type.</td> | <td valign="top">Speed multiplier for Ship when travelling on the parent terrain type. A value of '1' is normal speed, 0.5 will make them travel at half speed on the parent terrain type.</td> | ||
<td valign="top">shipmovespeed=1;</td> | <td valign="top">shipmovespeed=1;</td> | ||
</tr> | |||
<tr> | |||
<td valign="top">'''SkyBox'''</td> | |||
<td valign="top">The image to display in the sky during gameplay, rather than having the engine dynamically render one. This allows for complex skies, which may include stars, planets, etc overhead. Skyboxes are stored as .DDS cubeboxes. A skybox's .dds file should be placed in the maps directory of a compressed file, along with the .smf, .smd, and .smt files.</td> | |||
<td valign="top">Skybox=space.dds;</td> | |||
</tr> | </tr> | ||
| Line 230: | Line 253: | ||
<td valign="top">The color of the sky itself. Works the same way as <i>CloudColor</i> and <i>FogColor</i>.</td> | <td valign="top">The color of the sky itself. Works the same way as <i>CloudColor</i> and <i>FogColor</i>.</td> | ||
<td valign="top">SkyColor=0.1 0.15 0.7;</td> | <td valign="top">SkyColor=0.1 0.15 0.7;</td> | ||
</tr> | |||
<tr> | |||
<td valign="top">'''SpecularSunColor'''</td> | |||
<td valign="top">The color of the reflected light off of stuff (otherwise will be UnitSunColor)</td> | |||
<td valign="top">SpecularSunColor=0.1 0.15 0.7;</td> | |||
</tr> | </tr> | ||
| Line 293: | Line 321: | ||
<td valign="top">The color of the water at the surface.</td> | <td valign="top">The color of the water at the surface.</td> | ||
<td valign="top">WaterBaseColor=0.4 0.6 0.8;</td> | <td valign="top">WaterBaseColor=0.4 0.6 0.8;</td> | ||
</tr> | |||
<tr> | |||
<td valign="top">'''WaterDamage'''</td> | |||
<td valign="top">Amount of damage water does to units in it. Someone add the value that make water impassable (like lava) and the rate at which damage is applied. It is assumed for now that it does WaterDamage per 30 internal frames.</td> | |||
<td valign="top">WaterDamage=20;</td> | |||
</tr> | </tr> | ||
| Line 300: | Line 334: | ||
<td valign="top">WaterMinColor=0.1 0.1 0.3;</td> | <td valign="top">WaterMinColor=0.1 0.1 0.3;</td> | ||
</tr> | </tr> | ||
<tr> | |||
<td valign="top">'''WaterSurfaceColor'''</td> | |||
<td valign="top">Changes the surface color of the water (mother thinks this is an XOR thing with WaterTexture. WaterTexture is for non-reflective water and WaterSurfaceColor only for reflective water)</td> | |||
<td valign="top">WaterMinColor=0.1 0.1 0.3;</td> | |||
</tr> | |||
<tr> | |||
<td valign="top">'''WaterPlaneColor'''</td> | |||
<td valign="top">The color of the 'water plane' outside the map's bounds</td> | |||
<td valign="top">WaterPlaneColor=0.1 0.1 0.3;</td> | |||
</tr> | |||
<tr> | |||
<td valign="top">'''WaterTexture'''</td> | |||
<td valign="top">Replaces the default ocean texture with the one specified. Must apparently be jpeg format, though bitmap might work.</td> | |||
<td valign="top">WaterTexture=mywatertexture.jpg;</td> | |||
</tr> | |||
</table> | </table> | ||
Revision as of 08:30, 21 September 2005
SMD Syntax
The SMD, to work correctly, must be set out correctly. The following are a few of these requirements that you have to follow:
- All lines must end in a ';'. This is just like any C derived programming language
- Sections begin with a keyword wrapped in [Square brackets], and are wrapped in {Curly Brackets}
- Each different tag must be placed on a different line (?)
The following are some recomendations to help other people read your SMD.
- Blank lines are allowed, and can be placed to help distinguish between different sections
- You may place comments in the SMD, and again like C programming languages, these are preceded by a '//'. Anything following a comment marker is ignored by the parser.
- You can tabulate your SMD to help the overall readability, and to show where sections begin and end.
Example SMD
[MAP]
{
Description=Lot of metal in middle but look out for kbot walking over the mountains;
TidalStrength=20;
Gravity=130;
MaxMetal=0.03;
ExtractorRadius=400;
MapHardness=100;
DetailTex=mydetailtex.bmp;
AutoShowMetal=1;
[ATMOSPHERE]
{
Skybox=space.dds;
FogColor=0.7 0.7 0.8;
FogStart=0.2;
CloudColor=0.9 0.9 0.9;
SkyColor=0.1 0.15 0.7;
SunColor=1.0 1.0 1.0;
CloudDensity=0.55;
MinWind=5;
MaxWind=20;
}
[WATER]
{
WaterTexture=mywatertexture.jpg;
WaterSurfaceColor=0.4 0.6 0.8;
WaterPlaneColor=0.4 0.6 0.8;
WaterBaseColor=0.4 0.6 0.8;
WaterAbsorb=0.004 0.004 0.002;
WaterMinColor=0.1 0.1 0.3;
WaterDamage=20;
}
[LIGHT]
{
SunDir=0 1 2;
GroundAmbientColor=0.4 0.4 0.4;
GroundSunColor=0.7 0.7 0.7;
GroundShadowDensity=0.8;
UnitAmbientColor=0.3 0.3 0.3;
UnitSunColor=0.8 0.8 0.8;
UnitShadowDensity=0.8;
SpecularSunColor=0.3 0.3 0.3;
}
[TEAM0]
{
StartPosX=600;
StartPosZ=600;
}
[TEAM1]
{
StartPosX=3600;
StartPosZ=3600;
}
[TEAM2]
{
StartPosX=3600;
StartPosZ=600;
}
[TEAM3]
{
StartPosX=600;
StartPosZ=3600;
}
[TEAM4]
{
StartPosX=2000;
StartPosZ=600;
}
[TEAM5]
{
StartPosX=2000;
StartPosZ=3600;
}
//Up to [TEAM9]
[TERRAINTYPE0]
{
name=default;
hardness=1;
tankmovespeed=1;
kbotmovespeed=1;
hovermovespeed=1;
shipmovespeed=1;
}
}
