Mapdev:SMD: Difference between revisions
From Spring
Jump to navigationJump to search
No edit summary |
No edit summary |
||
| Line 251: | Line 251: | ||
<tr> | <tr> | ||
<td valign="top">'''SunDir'''</td> | <td valign="top">'''SunDir'''</td> | ||
<td valign="top">The direction of the sun, which is normalized by Spring. The Y-axis is up. | <td valign="top">The direction of the sun, which is normalized by Spring. The Y-axis is up. In the following chart, using the values in a square will make shadows fall in that square if the shadow caster (like a unit) is placed in the center. ie: you use the values from the top-left (North-West) corner box, shadows will be cast in a North-Westerly direction: | ||
<center>[[Image:ShadowDirection.gif]]</center> | |||
</td> | </td> | ||
<td valign="top">SunDir=0 1 2;</td> | <td valign="top">SunDir=0 1 2;</td> | ||
Revision as of 07:11, 21 September 2005
Someone needs to make this into a wiki page...
http://wormhole.tauniverse.com/spring/guide/html/smd.html
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;
[ATMOSPHERE]
{
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]
{
WaterBaseColor=0.4 0.6 0.8;
WaterAbsorb=0.004 0.004 0.002;
WaterMinColor=0.1 0.1 0.3;
}
[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;
}
[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;
}
}
