Logo
Spacer News Wiki Features F.A.Q. Team members Screenshots Download Messageboard Bug tracker Submit files
Top divider

Maps:SMD

[edit] 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.

[edit] 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;

	}
}

[edit] SMD Tags List

Variable Description Examples
[TEAMX] The number of the team, starting at 0 for player 1 and going on up to 9 for player 10, where X is the player number [TEAM3]
[TERRAINTYPEX] 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. [TERRAINTYPE0]
CloudColor The color of the clouds. The values are in the order Red, Green, Blue. For all intensive purposes, 0.0 is black and 1.0 is white; however, giving values higher than 1.0 will give brighter fog and less than 0.0 will give darker. CloudColor=0.9 0.9 0.9;
CloudDensity The number of clouds in the sky. A percentage in decimal form, 0.0 to 1.0. CloudDensity=0.55;
Description The description of the map that shows in the multiplayer battleroom. Description=Strong wind, good for 2v2 team games;
ExtractorRadius The radius of effect that a single extractor will extract from. If two radii intersect, both extractors will suffer from reduced output. ExtractorRadius=400;
GroundAmbientColor The ambient (non-sun-lit) color of ground, grass, trees and other features. GroundAmbientColor=0.4 0.4 0.4;
GroundShadowDensity How far from the non shadowed to the ambient color stuff in shadow will go. GroundShadowDensity=0.8;
GroundSunColor The color of ground where it is fully sun lit (added to GroundAmbientColor). GroundSunColor=0.7 0.7 0.7;
FogColor The color of the fog and the infinite plane below the world. The values are in the order Red, Green, Blue. For all intensive purposes, 0.0 is black and 1.0 is white; however, giving values higher than 1.0 will give brighter fog and less than 0.0 will give darker. FogColor=0.7 0.7 0.8;
FogStart The distance from the camera at which the fog will start. FogStart=0.2;
Hardness (terraintype) Used as a multiplier against the MapHardness value. Can be used to make a particular terrain type softer or harder. A value of '1' will make it as hard as MapHardness, and 0.5 will make it half as hard. hardness=0.75;
HoverNoveSpeed Speed multiplier for hovercraft 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. hovermovespeed=1;
KbotMoveSpeed Speed multiplier for Kbots 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. kbotmovespeed=1;
MapHardness Defines how much the terrain will deform due to explosions and weapons. MapHardness=100;
MaxMetal How much metal a map square with the maximum metal value gives. Unsure how this is calculated, but a value of around 0.03 will give OTA-esque levels of metal from metal extractors. MaxMetal=0.03;
MaxWind The maximum amount of energy the wind on the map will give. MaxWind=20;
MinWind The minimum amount of energy the wind on the map will give. MinWind=5;
Name (terraintype) Used to define the name of the type of terrain. "Snow" or "Rock" or whatever you want. Name=default;
ShipMoveSpeed 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. shipmovespeed=1;
SkyColor The color of the sky itself. Works the same way as CloudColor and FogColor. SkyColor=0.1 0.15 0.7;
StartPosX The X (east-west in the TA camera) coordinates on the map where the player will start. StartPosX=600;
StartPosZ The Z (north-south in the TA camera) coordinates on the map where the player will start. StartPosZ=600;
SunColor The color of the sun in the sky. This will also effect the size of the star. As the value increases (including over 1.0), the disc will get bigger; the inverse is also true. SunColor=1.0 1.0 1.0;
SunDir The direction of the sun, which is normalized by Spring. The Y-axis is up. Here's a basic chart for values:
1 .5 -10 .5 -1-1 .5 -1
1 .5 00 1 0-1 .5 0
1 .5 10 .5 1-1 .5 1
SunDir=0 1 2;
TankMoveSpeed Speed multiplier for tanks 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. tankmovespeed=1;
TidalStrength The amount of energy which will be given by tidal generators. TidalStrength=30;
UnitAmbientColor The ambient (non-sun-lit) color of units and corpses. UnitAmbientColor=0.3 0.3 0.3;
UnitShadowDensity How far from the non shadowed to the ambient color stuff in shadow will go. UnitShadowDensity=0.8;
UnitSunColor The color of units where they is fully sun lit (added to UnitAmbientColor). UnitSunColor=0.8 0.8 0.8;
WaterAbsorb How fast different colors (RGB in order) are absorbed by the water. Can be used to make the water look murky at deeper sections and so on. WaterAbsorb=0.004 0.004 0.002;
WaterBaseColor The color of the water at the surface. WaterBaseColor=0.4 0.6 0.8;
WaterMinColor The smallest values the water will go down to due to WaterAbsorb. WaterMinColor=0.1 0.1 0.3;

Retrieved from "http://spring.clan-sy.com/wiki/Maps:SMD"

This page has been accessed 2,613 times. This page was last modified 13:42, 24 April 2008.