<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Forboding+angel</id>
	<title>Spring - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://springrts-wiki.p2004a.com/mediawiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Forboding+angel"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Forboding_angel"/>
	<updated>2026-11-08T16:47:04Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2009</id>
		<title>Animation-LuaCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2009"/>
		<updated>2022-11-17T08:30:21Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Example of parts needed to create a Mobile Builder */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Call-ins are calls from the engine, into the unit script. In other words, these functions are called, if they are defined, when a particular &#039;&#039;event&#039;&#039; happens.&lt;br /&gt;
&lt;br /&gt;
For Lua unit scripts, a new call-in mechanism has been implemented, which is faster than the regular call-in mechanism used for widgets and gadgets.&lt;br /&gt;
&lt;br /&gt;
Types for arguments are only shown where they&#039;re ambiguous. For a number of (common) arguments, the types are:&lt;br /&gt;
&lt;br /&gt;
* unitID: number&lt;br /&gt;
* piece: number&lt;br /&gt;
* axis: number (1 = x axis, 2 = y axis, 3 = z axis)&lt;br /&gt;
* heading/pitch: number (radians)&lt;br /&gt;
&lt;br /&gt;
== Generic ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Create&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called just after the unit script has been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These are called whenever the unit starts or stops moving. Typical use for them is to trigger wheels to start spinning, animate treads, or start/stop a walking animation. Since 95.0 they are only run when a unit transitions from zero to non-zero speed or vice versa, and no longer during in-place rotations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ChangeHeading&#039;&#039;&#039; ( number deltaHeading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when the unit changes heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when a (ground) unit reacts to an impulse. The start-skidding threshold (&#039;sqSkidSpeedMult&#039;) is configurable via [[Lua_MoveCtrl#MoveType-Controlling|MoveCtrl.SetGroundMoveTypeData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Killed&#039;&#039;&#039; ( number recentDamage, number maxHealth ) -&amp;gt; number corpseType&lt;br /&gt;
&lt;br /&gt;
This is called when the unit is killed. The severity of the kill may be calculated as severity=recentDamage/maxHealth &#039;&#039;(*100 so that it&#039;s in percent, no? at least that is how severity was expressed in Cob/bos, I think. Of course there&#039;s no reason to emulate that, just pointing it out for people &amp;quot;converting&amp;quot;)&#039;&#039;. Typically, this function would play a death animation for the unit, and finally return a corpse type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.WindChanged&#039;&#039;&#039; ( number heading, number strength ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called for wind generators whenever the wind direction or strength changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ExtractionRateChanged&#039;&#039;&#039; ( number rate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called for metal extractors each time their extraction rate (metal per second) changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.setSFXoccupy&#039;&#039;&#039; ( number curTerrainType ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when terrain type changes. Terrain type is calculated with the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If unit is being transported -&amp;gt; curTerrainType = 0&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is always upright -&amp;gt; curTerrainType = 2&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is not always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* If ground height &amp;lt; 0 and unit is always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* Otherwise -&amp;gt; curTerrainType = 4&lt;br /&gt;
&lt;br /&gt;
Where is curTerrainType = 3 ? :-)&lt;br /&gt;
&lt;br /&gt;
Candidate to be changed to something saner later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveRate&#039;&#039;&#039; ( number curRate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called only for certain types of aircraft (those which use &#039;&#039;CTAAirMoveType&#039;&#039;.) The move rate is determined by the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If the aircraft is landing or taking off -&amp;gt; curRate = 1&lt;br /&gt;
* Otherwise -&amp;gt; curRate = floor(curSpeed / maxSpeed * 3), clamped to be in the range [0, 2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryLandingPads&#039;&#039;&#039; ( ) -&amp;gt; { number piece1, number piece2, ... }&lt;br /&gt;
&lt;br /&gt;
Called one time for units with landing pads. Should return a table with pieces which should be used as landing pads. The number of pieces returned also determines the number of pads, so for Lua unit scripts there is no QueryLandingPadCount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Activate&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Deactivate&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Exact situation these are called depends a lot on the unit type. Factories are activated when they open their yard and deactivated when they close it. Aircraft are activated when they take off and deactivated when the land. Any unit that can be turned on or off is activated when it&#039;s turned on and deactivated when it&#039;s turned off. On &#039;&#039;script.SetUnitValue(COB.ACTIVATION, ...)&#039;&#039; one of these call-ins may be called too.&lt;br /&gt;
&lt;br /&gt;
== Weapons ==&lt;br /&gt;
&lt;br /&gt;
Weapon functions come in two variants.&lt;br /&gt;
&lt;br /&gt;
* Separate function with numeric weapon number suffix. (e.g. &#039;&#039;script.AimWeapon&amp;lt;u&amp;gt;1&amp;lt;/u&amp;gt;(heading, pitch)&#039;&#039;)&lt;br /&gt;
* Combined function which gets weapon number as second argument. (e.g. &#039;&#039;script.AimWeapon(&amp;lt;u&amp;gt;weaponNum&amp;lt;/u&amp;gt;, heading, pitch)&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only the first variant is listed here, so whenever you see a function whose name ends with a numeric one (&amp;quot;1&amp;quot;), you should either replace it with the actual weapon number, or you can write a single combined function that takes a &#039;&#039;weaponNum&#039;&#039; argument. For each script, all functions should use the same variant. Either all using name suffix, or all using combined functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimFromWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimWeapon1&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; boolean&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimShield1&#039;&#039;&#039; ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Weapon support. The return value of QueryWeapon and AimFromWeapon determines the pieces which will be used for aiming: typically e.g. the barrel for QueryWeapon and the turret for AimFromWeapon. AimWeapon is then called to allow the script to turn the weapons in the target direction, which is passed as the heading and pitch argument (in radians). Only if AimWeapon returns true, the weapon is actually fired. AimWeapon is called repeatedly, at a rate determined by the {{xtaglink|Gamedev:WeaponDefs|fireTolerance}} tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.FireWeapon1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Shot1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.EndBurst1&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
If after aiming the unit actually fires it&#039;s weapon, FireWeapon is called once at the beginning of the salvo. Shot is called just before each projectile is fired. RockUnit (see below) is called just after all projectiles for that frame have been fired. At the end of the salvo, EndBurst is called.&lt;br /&gt;
&lt;br /&gt;
Of these call-ins, FireWeapon is the more generic one and Shot and EndBurst are more specialized. FireWeapon is usually used to play a recoil animation or emit some smoke near the weapon&#039;s barrel using EmitSfx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BlockShot1&#039;&#039;&#039; ( targetUnitID, boolean userTarget ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Allows you to block a weapon from shooting. TargetUnitID may be nil: in this case the unit has a ground-attack order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TargetWeight1&#039;&#039;&#039; ( targetUnitID ) -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
Allows you to tweak the priority of the target for this particular weapon. The target priority is multiplied by the return value of this function. Lower priority targets are targeted first, so return a value smaller than 1 to prioritize a target, or return a value larger than 1 to avoid a target.&lt;br /&gt;
&lt;br /&gt;
The exact behavior of specific values shouldn&#039;t be relied upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.RockUnit&#039;&#039;&#039; ( x, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
A bit like the weapon-specific FireWeapon function, although this is called after any weapon fires. As argument it gets a two dimensional vector in the direction the unit just fired. This may be used to â€œrockâ€ the unit as a whole a bit as part of the firing animation. Note though that this vector is in world space, so for a truly realistic rock direction it needs to be rotated according to the unit&#039;s current heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.HitByWeapon&#039;&#039;&#039; ( x, z, weaponDefID, damage ) -&amp;gt; nil | number newDamage&lt;br /&gt;
&lt;br /&gt;
This is called if a unit has been hit by a weapon. (x, z) is the direction from which the projectile came in unit space (the reverse direction of the impulse, to be exact.) It also gets the weaponDefID of the weapon which is dealing the damage, and the amount of damage. If HitByWeapon returns a number, this number will replace the damage value calculated by the engine.&lt;br /&gt;
&lt;br /&gt;
Note: Pre Spring 95, this call-in runs just before the LuaRules UnitPreDamaged callin (see also [[LuaCallinReturn]]). If HitByWeapon overrides the damage, UnitPreDamaged will see the new damage value, and may override again the damage value. Starting Spring 95, it is run after UnitPreDamaged.&lt;br /&gt;
&lt;br /&gt;
== Builders and factories ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These notify the script when a builder or factory starts or stops building.&lt;br /&gt;
&lt;br /&gt;
The first variant (with heading and pitch arguments) is called for builders. For factories, the second variant is used. In this case the heading and pitch are not necessary, because the factory script specifies the build location itself using QueryBuildInfo.&lt;br /&gt;
&lt;br /&gt;
BTW, don&#039;t forget to set INBUILDSTANCE to 1 to start building! For lua script, that is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
  function script.StartBuilding(heading, pitch)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryBuildInfo&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For factories only. Should return the piece to which the unit which is going to be build will be attached while it&#039;s being build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryNanopiece&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
Called each time a nano particle is to be created. Should return the piece at which the particle will be spawned. This may be used to iterate through a few pieces, to simulate the factory/builder having multiple nanolathes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;N.B. As of 92.0 the results are cached and the function is called 31 times only. Deprecated in favour of Spring.SetUnitNanoPieces, which disables this callin when used.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of what is needed to create a Mobile Builder ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local nanoPieces = {[0] = nanopoint1}&lt;br /&gt;
local SIG_AIM = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add this to create()&lt;br /&gt;
Spring.SetUnitNanoPieces(unitID, nanoPieces)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
function RestoreAfterDelay()&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
    if building == false then&lt;br /&gt;
        Sleep(2000)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
    building = false&lt;br /&gt;
    StartThread(RestoreAfterDelay)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StartBuilding(heading, pitch)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
    building = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryNanoPiece()&lt;br /&gt;
    local nano = nanoPieces[nanoNum]&lt;br /&gt;
    return nano&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transports ==&lt;br /&gt;
&lt;br /&gt;
There are some different code paths inside Spring related to transports, each (unfortunately) also associated with a different set of unit script call-ins.&lt;br /&gt;
&lt;br /&gt;
This table shows for the three different {{xtaglink|Gamedev:UnitDefs|transportUnloadMethod}} for both air transports and ground transports which callins are used and roughly when and how often they are called. Refer to the documentation below for a description of the call-ins.&lt;br /&gt;
&lt;br /&gt;
The entire behavior around transports should be considered subject to change; it is obvious it is far from a perfect design currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; style=&amp;quot;border-spacing:0px;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Load&lt;br /&gt;
!UnloadLand (0)&lt;br /&gt;
!UnloadDrop (1)&lt;br /&gt;
!UnloadLandFlood (2)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|default unload&lt;br /&gt;
|fly over and drop unit&lt;br /&gt;
|land, then release all units at once&lt;br /&gt;
|-&lt;br /&gt;
|air&lt;br /&gt;
|BeginTransport (each)&amp;lt;br&amp;gt;QueryTransport (each)&lt;br /&gt;
|EndTransport (last)&lt;br /&gt;
|EndTransport (each)&lt;br /&gt;
|StartUnload (first)&amp;lt;br&amp;gt;TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|-&lt;br /&gt;
|ground&lt;br /&gt;
|TransportPickup (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Air transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BeginTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.QueryTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For an air transport, if any one unit is picked up, these two are called in succession and the passenger is attached to the piece returned by the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartUnload&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Signals the start of an unload cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Called when a passenger will be unloaded. Contrary to ground transports, Spring will detach the passenger after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
In UnloadLand and UnloadLandFlood behaviors, these are called one time after all units are unloaded. (The transport is empty.) For the UnloadDrop behavior, this is called for every unit that is unloaded.&lt;br /&gt;
&lt;br /&gt;
==== Example of what is needed for an air Transport ====&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- This assumes that the name of the piece where you want to attach the unit is &amp;quot;link&amp;quot;&lt;br /&gt;
function script.BeginTransport(passengerID)&lt;br /&gt;
    local unitHeight = Spring.GetUnitHeight(passengerID) -- This moves the unit down so that it appears as though the top of it is attached to where the link piece was set (usually underneath the transport)&lt;br /&gt;
    Move(link, y_axis, -unitHeight, 500)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryTransport()&lt;br /&gt;
    return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.EndTransport(passengerID)&lt;br /&gt;
    Move(link, y_axis, 0, 500) -- Once transport is complete, move the link piece back to where it was originally&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ground transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportPickup&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be loaded into the transport. This should eventually call AttachUnit to actually attach the unit. Assuming the transport is in range of the next passenger, this will be called again for the next passenger 16 frames later, &#039;&#039;unless&#039;&#039; the script enters the BUSY state: then Spring will not move on to the next passenger until the script leaves the BUSY state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be unloaded. This should eventually call DetachUnit to actually detach the unit, &#039;&#039;unless&#039;&#039; the used unload method is UnloadLandFlood, in which case Spring will actually detach the unit after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior, after the last unit has been unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passenger ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Falling&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
For a unit dropped from an UnloadDrop transport, this is called every frame to inform the script the unit is still falling. It may be used to show a parachute for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Landed&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called one time after the unit reached the ground. May be used to hide a parachute for example.&lt;br /&gt;
&lt;br /&gt;
== Internal ==&lt;br /&gt;
&lt;br /&gt;
These call-ins are NOT available to Lua unit scripts. They are called by the engine however, but always &#039;intercepted&#039; by the framework gadget. For completeness (or if you are poking at the gadget), they are listed here anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.TurnFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a move or turn finished. The framework gadget uses this to resume the coroutines which are waiting for the particular move or turn to be finished.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Destroy&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called right before the unit&#039;s script is destroyed. This may happen if the unit is being destroyed, but also if the unit&#039;s script is being replaced by another script. The framework gadget uses this to stop all threads and remove the unit from some internal data structures.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2008</id>
		<title>Animation-LuaCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2008"/>
		<updated>2022-11-17T08:29:54Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Example of what is needed for a Transport */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Call-ins are calls from the engine, into the unit script. In other words, these functions are called, if they are defined, when a particular &#039;&#039;event&#039;&#039; happens.&lt;br /&gt;
&lt;br /&gt;
For Lua unit scripts, a new call-in mechanism has been implemented, which is faster than the regular call-in mechanism used for widgets and gadgets.&lt;br /&gt;
&lt;br /&gt;
Types for arguments are only shown where they&#039;re ambiguous. For a number of (common) arguments, the types are:&lt;br /&gt;
&lt;br /&gt;
* unitID: number&lt;br /&gt;
* piece: number&lt;br /&gt;
* axis: number (1 = x axis, 2 = y axis, 3 = z axis)&lt;br /&gt;
* heading/pitch: number (radians)&lt;br /&gt;
&lt;br /&gt;
== Generic ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Create&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called just after the unit script has been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These are called whenever the unit starts or stops moving. Typical use for them is to trigger wheels to start spinning, animate treads, or start/stop a walking animation. Since 95.0 they are only run when a unit transitions from zero to non-zero speed or vice versa, and no longer during in-place rotations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ChangeHeading&#039;&#039;&#039; ( number deltaHeading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when the unit changes heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when a (ground) unit reacts to an impulse. The start-skidding threshold (&#039;sqSkidSpeedMult&#039;) is configurable via [[Lua_MoveCtrl#MoveType-Controlling|MoveCtrl.SetGroundMoveTypeData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Killed&#039;&#039;&#039; ( number recentDamage, number maxHealth ) -&amp;gt; number corpseType&lt;br /&gt;
&lt;br /&gt;
This is called when the unit is killed. The severity of the kill may be calculated as severity=recentDamage/maxHealth &#039;&#039;(*100 so that it&#039;s in percent, no? at least that is how severity was expressed in Cob/bos, I think. Of course there&#039;s no reason to emulate that, just pointing it out for people &amp;quot;converting&amp;quot;)&#039;&#039;. Typically, this function would play a death animation for the unit, and finally return a corpse type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.WindChanged&#039;&#039;&#039; ( number heading, number strength ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called for wind generators whenever the wind direction or strength changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ExtractionRateChanged&#039;&#039;&#039; ( number rate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called for metal extractors each time their extraction rate (metal per second) changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.setSFXoccupy&#039;&#039;&#039; ( number curTerrainType ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when terrain type changes. Terrain type is calculated with the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If unit is being transported -&amp;gt; curTerrainType = 0&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is always upright -&amp;gt; curTerrainType = 2&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is not always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* If ground height &amp;lt; 0 and unit is always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* Otherwise -&amp;gt; curTerrainType = 4&lt;br /&gt;
&lt;br /&gt;
Where is curTerrainType = 3 ? :-)&lt;br /&gt;
&lt;br /&gt;
Candidate to be changed to something saner later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveRate&#039;&#039;&#039; ( number curRate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called only for certain types of aircraft (those which use &#039;&#039;CTAAirMoveType&#039;&#039;.) The move rate is determined by the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If the aircraft is landing or taking off -&amp;gt; curRate = 1&lt;br /&gt;
* Otherwise -&amp;gt; curRate = floor(curSpeed / maxSpeed * 3), clamped to be in the range [0, 2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryLandingPads&#039;&#039;&#039; ( ) -&amp;gt; { number piece1, number piece2, ... }&lt;br /&gt;
&lt;br /&gt;
Called one time for units with landing pads. Should return a table with pieces which should be used as landing pads. The number of pieces returned also determines the number of pads, so for Lua unit scripts there is no QueryLandingPadCount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Activate&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Deactivate&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Exact situation these are called depends a lot on the unit type. Factories are activated when they open their yard and deactivated when they close it. Aircraft are activated when they take off and deactivated when the land. Any unit that can be turned on or off is activated when it&#039;s turned on and deactivated when it&#039;s turned off. On &#039;&#039;script.SetUnitValue(COB.ACTIVATION, ...)&#039;&#039; one of these call-ins may be called too.&lt;br /&gt;
&lt;br /&gt;
== Weapons ==&lt;br /&gt;
&lt;br /&gt;
Weapon functions come in two variants.&lt;br /&gt;
&lt;br /&gt;
* Separate function with numeric weapon number suffix. (e.g. &#039;&#039;script.AimWeapon&amp;lt;u&amp;gt;1&amp;lt;/u&amp;gt;(heading, pitch)&#039;&#039;)&lt;br /&gt;
* Combined function which gets weapon number as second argument. (e.g. &#039;&#039;script.AimWeapon(&amp;lt;u&amp;gt;weaponNum&amp;lt;/u&amp;gt;, heading, pitch)&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only the first variant is listed here, so whenever you see a function whose name ends with a numeric one (&amp;quot;1&amp;quot;), you should either replace it with the actual weapon number, or you can write a single combined function that takes a &#039;&#039;weaponNum&#039;&#039; argument. For each script, all functions should use the same variant. Either all using name suffix, or all using combined functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimFromWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimWeapon1&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; boolean&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimShield1&#039;&#039;&#039; ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Weapon support. The return value of QueryWeapon and AimFromWeapon determines the pieces which will be used for aiming: typically e.g. the barrel for QueryWeapon and the turret for AimFromWeapon. AimWeapon is then called to allow the script to turn the weapons in the target direction, which is passed as the heading and pitch argument (in radians). Only if AimWeapon returns true, the weapon is actually fired. AimWeapon is called repeatedly, at a rate determined by the {{xtaglink|Gamedev:WeaponDefs|fireTolerance}} tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.FireWeapon1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Shot1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.EndBurst1&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
If after aiming the unit actually fires it&#039;s weapon, FireWeapon is called once at the beginning of the salvo. Shot is called just before each projectile is fired. RockUnit (see below) is called just after all projectiles for that frame have been fired. At the end of the salvo, EndBurst is called.&lt;br /&gt;
&lt;br /&gt;
Of these call-ins, FireWeapon is the more generic one and Shot and EndBurst are more specialized. FireWeapon is usually used to play a recoil animation or emit some smoke near the weapon&#039;s barrel using EmitSfx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BlockShot1&#039;&#039;&#039; ( targetUnitID, boolean userTarget ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Allows you to block a weapon from shooting. TargetUnitID may be nil: in this case the unit has a ground-attack order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TargetWeight1&#039;&#039;&#039; ( targetUnitID ) -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
Allows you to tweak the priority of the target for this particular weapon. The target priority is multiplied by the return value of this function. Lower priority targets are targeted first, so return a value smaller than 1 to prioritize a target, or return a value larger than 1 to avoid a target.&lt;br /&gt;
&lt;br /&gt;
The exact behavior of specific values shouldn&#039;t be relied upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.RockUnit&#039;&#039;&#039; ( x, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
A bit like the weapon-specific FireWeapon function, although this is called after any weapon fires. As argument it gets a two dimensional vector in the direction the unit just fired. This may be used to â€œrockâ€ the unit as a whole a bit as part of the firing animation. Note though that this vector is in world space, so for a truly realistic rock direction it needs to be rotated according to the unit&#039;s current heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.HitByWeapon&#039;&#039;&#039; ( x, z, weaponDefID, damage ) -&amp;gt; nil | number newDamage&lt;br /&gt;
&lt;br /&gt;
This is called if a unit has been hit by a weapon. (x, z) is the direction from which the projectile came in unit space (the reverse direction of the impulse, to be exact.) It also gets the weaponDefID of the weapon which is dealing the damage, and the amount of damage. If HitByWeapon returns a number, this number will replace the damage value calculated by the engine.&lt;br /&gt;
&lt;br /&gt;
Note: Pre Spring 95, this call-in runs just before the LuaRules UnitPreDamaged callin (see also [[LuaCallinReturn]]). If HitByWeapon overrides the damage, UnitPreDamaged will see the new damage value, and may override again the damage value. Starting Spring 95, it is run after UnitPreDamaged.&lt;br /&gt;
&lt;br /&gt;
== Builders and factories ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These notify the script when a builder or factory starts or stops building.&lt;br /&gt;
&lt;br /&gt;
The first variant (with heading and pitch arguments) is called for builders. For factories, the second variant is used. In this case the heading and pitch are not necessary, because the factory script specifies the build location itself using QueryBuildInfo.&lt;br /&gt;
&lt;br /&gt;
BTW, don&#039;t forget to set INBUILDSTANCE to 1 to start building! For lua script, that is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
  function script.StartBuilding(heading, pitch)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryBuildInfo&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For factories only. Should return the piece to which the unit which is going to be build will be attached while it&#039;s being build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryNanopiece&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
Called each time a nano particle is to be created. Should return the piece at which the particle will be spawned. This may be used to iterate through a few pieces, to simulate the factory/builder having multiple nanolathes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;N.B. As of 92.0 the results are cached and the function is called 31 times only. Deprecated in favour of Spring.SetUnitNanoPieces, which disables this callin when used.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of parts needed to create a Mobile Builder ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local nanoPieces = {[0] = nanopoint1}&lt;br /&gt;
local SIG_AIM = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add this to create()&lt;br /&gt;
Spring.SetUnitNanoPieces(unitID, nanoPieces)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
function RestoreAfterDelay()&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
    if building == false then&lt;br /&gt;
        Sleep(2000)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
    building = false&lt;br /&gt;
    StartThread(RestoreAfterDelay)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StartBuilding(heading, pitch)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
    building = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryNanoPiece()&lt;br /&gt;
    local nano = nanoPieces[nanoNum]&lt;br /&gt;
    return nano&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transports ==&lt;br /&gt;
&lt;br /&gt;
There are some different code paths inside Spring related to transports, each (unfortunately) also associated with a different set of unit script call-ins.&lt;br /&gt;
&lt;br /&gt;
This table shows for the three different {{xtaglink|Gamedev:UnitDefs|transportUnloadMethod}} for both air transports and ground transports which callins are used and roughly when and how often they are called. Refer to the documentation below for a description of the call-ins.&lt;br /&gt;
&lt;br /&gt;
The entire behavior around transports should be considered subject to change; it is obvious it is far from a perfect design currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; style=&amp;quot;border-spacing:0px;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Load&lt;br /&gt;
!UnloadLand (0)&lt;br /&gt;
!UnloadDrop (1)&lt;br /&gt;
!UnloadLandFlood (2)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|default unload&lt;br /&gt;
|fly over and drop unit&lt;br /&gt;
|land, then release all units at once&lt;br /&gt;
|-&lt;br /&gt;
|air&lt;br /&gt;
|BeginTransport (each)&amp;lt;br&amp;gt;QueryTransport (each)&lt;br /&gt;
|EndTransport (last)&lt;br /&gt;
|EndTransport (each)&lt;br /&gt;
|StartUnload (first)&amp;lt;br&amp;gt;TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|-&lt;br /&gt;
|ground&lt;br /&gt;
|TransportPickup (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Air transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BeginTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.QueryTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For an air transport, if any one unit is picked up, these two are called in succession and the passenger is attached to the piece returned by the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartUnload&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Signals the start of an unload cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Called when a passenger will be unloaded. Contrary to ground transports, Spring will detach the passenger after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
In UnloadLand and UnloadLandFlood behaviors, these are called one time after all units are unloaded. (The transport is empty.) For the UnloadDrop behavior, this is called for every unit that is unloaded.&lt;br /&gt;
&lt;br /&gt;
==== Example of what is needed for an air Transport ====&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- This assumes that the name of the piece where you want to attach the unit is &amp;quot;link&amp;quot;&lt;br /&gt;
function script.BeginTransport(passengerID)&lt;br /&gt;
    local unitHeight = Spring.GetUnitHeight(passengerID) -- This moves the unit down so that it appears as though the top of it is attached to where the link piece was set (usually underneath the transport)&lt;br /&gt;
    Move(link, y_axis, -unitHeight, 500)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryTransport()&lt;br /&gt;
    return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.EndTransport(passengerID)&lt;br /&gt;
    Move(link, y_axis, 0, 500) -- Once transport is complete, move the link piece back to where it was originally&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ground transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportPickup&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be loaded into the transport. This should eventually call AttachUnit to actually attach the unit. Assuming the transport is in range of the next passenger, this will be called again for the next passenger 16 frames later, &#039;&#039;unless&#039;&#039; the script enters the BUSY state: then Spring will not move on to the next passenger until the script leaves the BUSY state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be unloaded. This should eventually call DetachUnit to actually detach the unit, &#039;&#039;unless&#039;&#039; the used unload method is UnloadLandFlood, in which case Spring will actually detach the unit after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior, after the last unit has been unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passenger ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Falling&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
For a unit dropped from an UnloadDrop transport, this is called every frame to inform the script the unit is still falling. It may be used to show a parachute for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Landed&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called one time after the unit reached the ground. May be used to hide a parachute for example.&lt;br /&gt;
&lt;br /&gt;
== Internal ==&lt;br /&gt;
&lt;br /&gt;
These call-ins are NOT available to Lua unit scripts. They are called by the engine however, but always &#039;intercepted&#039; by the framework gadget. For completeness (or if you are poking at the gadget), they are listed here anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.TurnFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a move or turn finished. The framework gadget uses this to resume the coroutines which are waiting for the particular move or turn to be finished.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Destroy&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called right before the unit&#039;s script is destroyed. This may happen if the unit is being destroyed, but also if the unit&#039;s script is being replaced by another script. The framework gadget uses this to stop all threads and remove the unit from some internal data structures.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2007</id>
		<title>Animation-LuaCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2007"/>
		<updated>2022-11-17T08:29:08Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Example of what is needed for a Transport */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Call-ins are calls from the engine, into the unit script. In other words, these functions are called, if they are defined, when a particular &#039;&#039;event&#039;&#039; happens.&lt;br /&gt;
&lt;br /&gt;
For Lua unit scripts, a new call-in mechanism has been implemented, which is faster than the regular call-in mechanism used for widgets and gadgets.&lt;br /&gt;
&lt;br /&gt;
Types for arguments are only shown where they&#039;re ambiguous. For a number of (common) arguments, the types are:&lt;br /&gt;
&lt;br /&gt;
* unitID: number&lt;br /&gt;
* piece: number&lt;br /&gt;
* axis: number (1 = x axis, 2 = y axis, 3 = z axis)&lt;br /&gt;
* heading/pitch: number (radians)&lt;br /&gt;
&lt;br /&gt;
== Generic ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Create&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called just after the unit script has been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These are called whenever the unit starts or stops moving. Typical use for them is to trigger wheels to start spinning, animate treads, or start/stop a walking animation. Since 95.0 they are only run when a unit transitions from zero to non-zero speed or vice versa, and no longer during in-place rotations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ChangeHeading&#039;&#039;&#039; ( number deltaHeading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when the unit changes heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when a (ground) unit reacts to an impulse. The start-skidding threshold (&#039;sqSkidSpeedMult&#039;) is configurable via [[Lua_MoveCtrl#MoveType-Controlling|MoveCtrl.SetGroundMoveTypeData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Killed&#039;&#039;&#039; ( number recentDamage, number maxHealth ) -&amp;gt; number corpseType&lt;br /&gt;
&lt;br /&gt;
This is called when the unit is killed. The severity of the kill may be calculated as severity=recentDamage/maxHealth &#039;&#039;(*100 so that it&#039;s in percent, no? at least that is how severity was expressed in Cob/bos, I think. Of course there&#039;s no reason to emulate that, just pointing it out for people &amp;quot;converting&amp;quot;)&#039;&#039;. Typically, this function would play a death animation for the unit, and finally return a corpse type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.WindChanged&#039;&#039;&#039; ( number heading, number strength ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called for wind generators whenever the wind direction or strength changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ExtractionRateChanged&#039;&#039;&#039; ( number rate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called for metal extractors each time their extraction rate (metal per second) changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.setSFXoccupy&#039;&#039;&#039; ( number curTerrainType ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when terrain type changes. Terrain type is calculated with the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If unit is being transported -&amp;gt; curTerrainType = 0&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is always upright -&amp;gt; curTerrainType = 2&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is not always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* If ground height &amp;lt; 0 and unit is always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* Otherwise -&amp;gt; curTerrainType = 4&lt;br /&gt;
&lt;br /&gt;
Where is curTerrainType = 3 ? :-)&lt;br /&gt;
&lt;br /&gt;
Candidate to be changed to something saner later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveRate&#039;&#039;&#039; ( number curRate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called only for certain types of aircraft (those which use &#039;&#039;CTAAirMoveType&#039;&#039;.) The move rate is determined by the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If the aircraft is landing or taking off -&amp;gt; curRate = 1&lt;br /&gt;
* Otherwise -&amp;gt; curRate = floor(curSpeed / maxSpeed * 3), clamped to be in the range [0, 2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryLandingPads&#039;&#039;&#039; ( ) -&amp;gt; { number piece1, number piece2, ... }&lt;br /&gt;
&lt;br /&gt;
Called one time for units with landing pads. Should return a table with pieces which should be used as landing pads. The number of pieces returned also determines the number of pads, so for Lua unit scripts there is no QueryLandingPadCount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Activate&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Deactivate&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Exact situation these are called depends a lot on the unit type. Factories are activated when they open their yard and deactivated when they close it. Aircraft are activated when they take off and deactivated when the land. Any unit that can be turned on or off is activated when it&#039;s turned on and deactivated when it&#039;s turned off. On &#039;&#039;script.SetUnitValue(COB.ACTIVATION, ...)&#039;&#039; one of these call-ins may be called too.&lt;br /&gt;
&lt;br /&gt;
== Weapons ==&lt;br /&gt;
&lt;br /&gt;
Weapon functions come in two variants.&lt;br /&gt;
&lt;br /&gt;
* Separate function with numeric weapon number suffix. (e.g. &#039;&#039;script.AimWeapon&amp;lt;u&amp;gt;1&amp;lt;/u&amp;gt;(heading, pitch)&#039;&#039;)&lt;br /&gt;
* Combined function which gets weapon number as second argument. (e.g. &#039;&#039;script.AimWeapon(&amp;lt;u&amp;gt;weaponNum&amp;lt;/u&amp;gt;, heading, pitch)&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only the first variant is listed here, so whenever you see a function whose name ends with a numeric one (&amp;quot;1&amp;quot;), you should either replace it with the actual weapon number, or you can write a single combined function that takes a &#039;&#039;weaponNum&#039;&#039; argument. For each script, all functions should use the same variant. Either all using name suffix, or all using combined functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimFromWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimWeapon1&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; boolean&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimShield1&#039;&#039;&#039; ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Weapon support. The return value of QueryWeapon and AimFromWeapon determines the pieces which will be used for aiming: typically e.g. the barrel for QueryWeapon and the turret for AimFromWeapon. AimWeapon is then called to allow the script to turn the weapons in the target direction, which is passed as the heading and pitch argument (in radians). Only if AimWeapon returns true, the weapon is actually fired. AimWeapon is called repeatedly, at a rate determined by the {{xtaglink|Gamedev:WeaponDefs|fireTolerance}} tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.FireWeapon1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Shot1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.EndBurst1&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
If after aiming the unit actually fires it&#039;s weapon, FireWeapon is called once at the beginning of the salvo. Shot is called just before each projectile is fired. RockUnit (see below) is called just after all projectiles for that frame have been fired. At the end of the salvo, EndBurst is called.&lt;br /&gt;
&lt;br /&gt;
Of these call-ins, FireWeapon is the more generic one and Shot and EndBurst are more specialized. FireWeapon is usually used to play a recoil animation or emit some smoke near the weapon&#039;s barrel using EmitSfx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BlockShot1&#039;&#039;&#039; ( targetUnitID, boolean userTarget ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Allows you to block a weapon from shooting. TargetUnitID may be nil: in this case the unit has a ground-attack order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TargetWeight1&#039;&#039;&#039; ( targetUnitID ) -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
Allows you to tweak the priority of the target for this particular weapon. The target priority is multiplied by the return value of this function. Lower priority targets are targeted first, so return a value smaller than 1 to prioritize a target, or return a value larger than 1 to avoid a target.&lt;br /&gt;
&lt;br /&gt;
The exact behavior of specific values shouldn&#039;t be relied upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.RockUnit&#039;&#039;&#039; ( x, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
A bit like the weapon-specific FireWeapon function, although this is called after any weapon fires. As argument it gets a two dimensional vector in the direction the unit just fired. This may be used to â€œrockâ€ the unit as a whole a bit as part of the firing animation. Note though that this vector is in world space, so for a truly realistic rock direction it needs to be rotated according to the unit&#039;s current heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.HitByWeapon&#039;&#039;&#039; ( x, z, weaponDefID, damage ) -&amp;gt; nil | number newDamage&lt;br /&gt;
&lt;br /&gt;
This is called if a unit has been hit by a weapon. (x, z) is the direction from which the projectile came in unit space (the reverse direction of the impulse, to be exact.) It also gets the weaponDefID of the weapon which is dealing the damage, and the amount of damage. If HitByWeapon returns a number, this number will replace the damage value calculated by the engine.&lt;br /&gt;
&lt;br /&gt;
Note: Pre Spring 95, this call-in runs just before the LuaRules UnitPreDamaged callin (see also [[LuaCallinReturn]]). If HitByWeapon overrides the damage, UnitPreDamaged will see the new damage value, and may override again the damage value. Starting Spring 95, it is run after UnitPreDamaged.&lt;br /&gt;
&lt;br /&gt;
== Builders and factories ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These notify the script when a builder or factory starts or stops building.&lt;br /&gt;
&lt;br /&gt;
The first variant (with heading and pitch arguments) is called for builders. For factories, the second variant is used. In this case the heading and pitch are not necessary, because the factory script specifies the build location itself using QueryBuildInfo.&lt;br /&gt;
&lt;br /&gt;
BTW, don&#039;t forget to set INBUILDSTANCE to 1 to start building! For lua script, that is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
  function script.StartBuilding(heading, pitch)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryBuildInfo&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For factories only. Should return the piece to which the unit which is going to be build will be attached while it&#039;s being build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryNanopiece&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
Called each time a nano particle is to be created. Should return the piece at which the particle will be spawned. This may be used to iterate through a few pieces, to simulate the factory/builder having multiple nanolathes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;N.B. As of 92.0 the results are cached and the function is called 31 times only. Deprecated in favour of Spring.SetUnitNanoPieces, which disables this callin when used.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of parts needed to create a Mobile Builder ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local nanoPieces = {[0] = nanopoint1}&lt;br /&gt;
local SIG_AIM = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add this to create()&lt;br /&gt;
Spring.SetUnitNanoPieces(unitID, nanoPieces)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
function RestoreAfterDelay()&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
    if building == false then&lt;br /&gt;
        Sleep(2000)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
    building = false&lt;br /&gt;
    StartThread(RestoreAfterDelay)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StartBuilding(heading, pitch)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
    building = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryNanoPiece()&lt;br /&gt;
    local nano = nanoPieces[nanoNum]&lt;br /&gt;
    return nano&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transports ==&lt;br /&gt;
&lt;br /&gt;
There are some different code paths inside Spring related to transports, each (unfortunately) also associated with a different set of unit script call-ins.&lt;br /&gt;
&lt;br /&gt;
This table shows for the three different {{xtaglink|Gamedev:UnitDefs|transportUnloadMethod}} for both air transports and ground transports which callins are used and roughly when and how often they are called. Refer to the documentation below for a description of the call-ins.&lt;br /&gt;
&lt;br /&gt;
The entire behavior around transports should be considered subject to change; it is obvious it is far from a perfect design currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; style=&amp;quot;border-spacing:0px;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Load&lt;br /&gt;
!UnloadLand (0)&lt;br /&gt;
!UnloadDrop (1)&lt;br /&gt;
!UnloadLandFlood (2)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|default unload&lt;br /&gt;
|fly over and drop unit&lt;br /&gt;
|land, then release all units at once&lt;br /&gt;
|-&lt;br /&gt;
|air&lt;br /&gt;
|BeginTransport (each)&amp;lt;br&amp;gt;QueryTransport (each)&lt;br /&gt;
|EndTransport (last)&lt;br /&gt;
|EndTransport (each)&lt;br /&gt;
|StartUnload (first)&amp;lt;br&amp;gt;TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|-&lt;br /&gt;
|ground&lt;br /&gt;
|TransportPickup (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Air transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BeginTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.QueryTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For an air transport, if any one unit is picked up, these two are called in succession and the passenger is attached to the piece returned by the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartUnload&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Signals the start of an unload cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Called when a passenger will be unloaded. Contrary to ground transports, Spring will detach the passenger after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
In UnloadLand and UnloadLandFlood behaviors, these are called one time after all units are unloaded. (The transport is empty.) For the UnloadDrop behavior, this is called for every unit that is unloaded.&lt;br /&gt;
&lt;br /&gt;
==== Example of what is needed for a Transport ====&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
-- This assumes that the name of the piece where you want to attach the unit is &amp;quot;link&amp;quot;&lt;br /&gt;
function script.BeginTransport(passengerID)&lt;br /&gt;
    local unitHeight = Spring.GetUnitHeight(passengerID) -- This moves the unit down so that it appears as though the top of it is attached to where the link piece was set (usually underneath the transport)&lt;br /&gt;
    Move(link, y_axis, -unitHeight, 500)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryTransport()&lt;br /&gt;
    return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.EndTransport(passengerID)&lt;br /&gt;
    Move(link, y_axis, 0, 500) -- Once transport is complete, move the link piece back to where it was originally&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ground transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportPickup&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be loaded into the transport. This should eventually call AttachUnit to actually attach the unit. Assuming the transport is in range of the next passenger, this will be called again for the next passenger 16 frames later, &#039;&#039;unless&#039;&#039; the script enters the BUSY state: then Spring will not move on to the next passenger until the script leaves the BUSY state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be unloaded. This should eventually call DetachUnit to actually detach the unit, &#039;&#039;unless&#039;&#039; the used unload method is UnloadLandFlood, in which case Spring will actually detach the unit after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior, after the last unit has been unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passenger ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Falling&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
For a unit dropped from an UnloadDrop transport, this is called every frame to inform the script the unit is still falling. It may be used to show a parachute for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Landed&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called one time after the unit reached the ground. May be used to hide a parachute for example.&lt;br /&gt;
&lt;br /&gt;
== Internal ==&lt;br /&gt;
&lt;br /&gt;
These call-ins are NOT available to Lua unit scripts. They are called by the engine however, but always &#039;intercepted&#039; by the framework gadget. For completeness (or if you are poking at the gadget), they are listed here anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.TurnFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a move or turn finished. The framework gadget uses this to resume the coroutines which are waiting for the particular move or turn to be finished.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Destroy&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called right before the unit&#039;s script is destroyed. This may happen if the unit is being destroyed, but also if the unit&#039;s script is being replaced by another script. The framework gadget uses this to stop all threads and remove the unit from some internal data structures.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2006</id>
		<title>Animation-LuaCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2006"/>
		<updated>2022-11-17T08:28:03Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Example of what is needed for a Transport */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Call-ins are calls from the engine, into the unit script. In other words, these functions are called, if they are defined, when a particular &#039;&#039;event&#039;&#039; happens.&lt;br /&gt;
&lt;br /&gt;
For Lua unit scripts, a new call-in mechanism has been implemented, which is faster than the regular call-in mechanism used for widgets and gadgets.&lt;br /&gt;
&lt;br /&gt;
Types for arguments are only shown where they&#039;re ambiguous. For a number of (common) arguments, the types are:&lt;br /&gt;
&lt;br /&gt;
* unitID: number&lt;br /&gt;
* piece: number&lt;br /&gt;
* axis: number (1 = x axis, 2 = y axis, 3 = z axis)&lt;br /&gt;
* heading/pitch: number (radians)&lt;br /&gt;
&lt;br /&gt;
== Generic ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Create&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called just after the unit script has been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These are called whenever the unit starts or stops moving. Typical use for them is to trigger wheels to start spinning, animate treads, or start/stop a walking animation. Since 95.0 they are only run when a unit transitions from zero to non-zero speed or vice versa, and no longer during in-place rotations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ChangeHeading&#039;&#039;&#039; ( number deltaHeading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when the unit changes heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when a (ground) unit reacts to an impulse. The start-skidding threshold (&#039;sqSkidSpeedMult&#039;) is configurable via [[Lua_MoveCtrl#MoveType-Controlling|MoveCtrl.SetGroundMoveTypeData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Killed&#039;&#039;&#039; ( number recentDamage, number maxHealth ) -&amp;gt; number corpseType&lt;br /&gt;
&lt;br /&gt;
This is called when the unit is killed. The severity of the kill may be calculated as severity=recentDamage/maxHealth &#039;&#039;(*100 so that it&#039;s in percent, no? at least that is how severity was expressed in Cob/bos, I think. Of course there&#039;s no reason to emulate that, just pointing it out for people &amp;quot;converting&amp;quot;)&#039;&#039;. Typically, this function would play a death animation for the unit, and finally return a corpse type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.WindChanged&#039;&#039;&#039; ( number heading, number strength ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called for wind generators whenever the wind direction or strength changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ExtractionRateChanged&#039;&#039;&#039; ( number rate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called for metal extractors each time their extraction rate (metal per second) changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.setSFXoccupy&#039;&#039;&#039; ( number curTerrainType ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when terrain type changes. Terrain type is calculated with the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If unit is being transported -&amp;gt; curTerrainType = 0&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is always upright -&amp;gt; curTerrainType = 2&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is not always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* If ground height &amp;lt; 0 and unit is always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* Otherwise -&amp;gt; curTerrainType = 4&lt;br /&gt;
&lt;br /&gt;
Where is curTerrainType = 3 ? :-)&lt;br /&gt;
&lt;br /&gt;
Candidate to be changed to something saner later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveRate&#039;&#039;&#039; ( number curRate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called only for certain types of aircraft (those which use &#039;&#039;CTAAirMoveType&#039;&#039;.) The move rate is determined by the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If the aircraft is landing or taking off -&amp;gt; curRate = 1&lt;br /&gt;
* Otherwise -&amp;gt; curRate = floor(curSpeed / maxSpeed * 3), clamped to be in the range [0, 2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryLandingPads&#039;&#039;&#039; ( ) -&amp;gt; { number piece1, number piece2, ... }&lt;br /&gt;
&lt;br /&gt;
Called one time for units with landing pads. Should return a table with pieces which should be used as landing pads. The number of pieces returned also determines the number of pads, so for Lua unit scripts there is no QueryLandingPadCount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Activate&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Deactivate&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Exact situation these are called depends a lot on the unit type. Factories are activated when they open their yard and deactivated when they close it. Aircraft are activated when they take off and deactivated when the land. Any unit that can be turned on or off is activated when it&#039;s turned on and deactivated when it&#039;s turned off. On &#039;&#039;script.SetUnitValue(COB.ACTIVATION, ...)&#039;&#039; one of these call-ins may be called too.&lt;br /&gt;
&lt;br /&gt;
== Weapons ==&lt;br /&gt;
&lt;br /&gt;
Weapon functions come in two variants.&lt;br /&gt;
&lt;br /&gt;
* Separate function with numeric weapon number suffix. (e.g. &#039;&#039;script.AimWeapon&amp;lt;u&amp;gt;1&amp;lt;/u&amp;gt;(heading, pitch)&#039;&#039;)&lt;br /&gt;
* Combined function which gets weapon number as second argument. (e.g. &#039;&#039;script.AimWeapon(&amp;lt;u&amp;gt;weaponNum&amp;lt;/u&amp;gt;, heading, pitch)&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only the first variant is listed here, so whenever you see a function whose name ends with a numeric one (&amp;quot;1&amp;quot;), you should either replace it with the actual weapon number, or you can write a single combined function that takes a &#039;&#039;weaponNum&#039;&#039; argument. For each script, all functions should use the same variant. Either all using name suffix, or all using combined functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimFromWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimWeapon1&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; boolean&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimShield1&#039;&#039;&#039; ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Weapon support. The return value of QueryWeapon and AimFromWeapon determines the pieces which will be used for aiming: typically e.g. the barrel for QueryWeapon and the turret for AimFromWeapon. AimWeapon is then called to allow the script to turn the weapons in the target direction, which is passed as the heading and pitch argument (in radians). Only if AimWeapon returns true, the weapon is actually fired. AimWeapon is called repeatedly, at a rate determined by the {{xtaglink|Gamedev:WeaponDefs|fireTolerance}} tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.FireWeapon1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Shot1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.EndBurst1&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
If after aiming the unit actually fires it&#039;s weapon, FireWeapon is called once at the beginning of the salvo. Shot is called just before each projectile is fired. RockUnit (see below) is called just after all projectiles for that frame have been fired. At the end of the salvo, EndBurst is called.&lt;br /&gt;
&lt;br /&gt;
Of these call-ins, FireWeapon is the more generic one and Shot and EndBurst are more specialized. FireWeapon is usually used to play a recoil animation or emit some smoke near the weapon&#039;s barrel using EmitSfx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BlockShot1&#039;&#039;&#039; ( targetUnitID, boolean userTarget ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Allows you to block a weapon from shooting. TargetUnitID may be nil: in this case the unit has a ground-attack order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TargetWeight1&#039;&#039;&#039; ( targetUnitID ) -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
Allows you to tweak the priority of the target for this particular weapon. The target priority is multiplied by the return value of this function. Lower priority targets are targeted first, so return a value smaller than 1 to prioritize a target, or return a value larger than 1 to avoid a target.&lt;br /&gt;
&lt;br /&gt;
The exact behavior of specific values shouldn&#039;t be relied upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.RockUnit&#039;&#039;&#039; ( x, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
A bit like the weapon-specific FireWeapon function, although this is called after any weapon fires. As argument it gets a two dimensional vector in the direction the unit just fired. This may be used to â€œrockâ€ the unit as a whole a bit as part of the firing animation. Note though that this vector is in world space, so for a truly realistic rock direction it needs to be rotated according to the unit&#039;s current heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.HitByWeapon&#039;&#039;&#039; ( x, z, weaponDefID, damage ) -&amp;gt; nil | number newDamage&lt;br /&gt;
&lt;br /&gt;
This is called if a unit has been hit by a weapon. (x, z) is the direction from which the projectile came in unit space (the reverse direction of the impulse, to be exact.) It also gets the weaponDefID of the weapon which is dealing the damage, and the amount of damage. If HitByWeapon returns a number, this number will replace the damage value calculated by the engine.&lt;br /&gt;
&lt;br /&gt;
Note: Pre Spring 95, this call-in runs just before the LuaRules UnitPreDamaged callin (see also [[LuaCallinReturn]]). If HitByWeapon overrides the damage, UnitPreDamaged will see the new damage value, and may override again the damage value. Starting Spring 95, it is run after UnitPreDamaged.&lt;br /&gt;
&lt;br /&gt;
== Builders and factories ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These notify the script when a builder or factory starts or stops building.&lt;br /&gt;
&lt;br /&gt;
The first variant (with heading and pitch arguments) is called for builders. For factories, the second variant is used. In this case the heading and pitch are not necessary, because the factory script specifies the build location itself using QueryBuildInfo.&lt;br /&gt;
&lt;br /&gt;
BTW, don&#039;t forget to set INBUILDSTANCE to 1 to start building! For lua script, that is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
  function script.StartBuilding(heading, pitch)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryBuildInfo&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For factories only. Should return the piece to which the unit which is going to be build will be attached while it&#039;s being build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryNanopiece&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
Called each time a nano particle is to be created. Should return the piece at which the particle will be spawned. This may be used to iterate through a few pieces, to simulate the factory/builder having multiple nanolathes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;N.B. As of 92.0 the results are cached and the function is called 31 times only. Deprecated in favour of Spring.SetUnitNanoPieces, which disables this callin when used.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of parts needed to create a Mobile Builder ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local nanoPieces = {[0] = nanopoint1}&lt;br /&gt;
local SIG_AIM = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add this to create()&lt;br /&gt;
Spring.SetUnitNanoPieces(unitID, nanoPieces)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
function RestoreAfterDelay()&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
    if building == false then&lt;br /&gt;
        Sleep(2000)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
    building = false&lt;br /&gt;
    StartThread(RestoreAfterDelay)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StartBuilding(heading, pitch)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
    building = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryNanoPiece()&lt;br /&gt;
    local nano = nanoPieces[nanoNum]&lt;br /&gt;
    return nano&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transports ==&lt;br /&gt;
&lt;br /&gt;
There are some different code paths inside Spring related to transports, each (unfortunately) also associated with a different set of unit script call-ins.&lt;br /&gt;
&lt;br /&gt;
This table shows for the three different {{xtaglink|Gamedev:UnitDefs|transportUnloadMethod}} for both air transports and ground transports which callins are used and roughly when and how often they are called. Refer to the documentation below for a description of the call-ins.&lt;br /&gt;
&lt;br /&gt;
The entire behavior around transports should be considered subject to change; it is obvious it is far from a perfect design currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; style=&amp;quot;border-spacing:0px;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Load&lt;br /&gt;
!UnloadLand (0)&lt;br /&gt;
!UnloadDrop (1)&lt;br /&gt;
!UnloadLandFlood (2)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|default unload&lt;br /&gt;
|fly over and drop unit&lt;br /&gt;
|land, then release all units at once&lt;br /&gt;
|-&lt;br /&gt;
|air&lt;br /&gt;
|BeginTransport (each)&amp;lt;br&amp;gt;QueryTransport (each)&lt;br /&gt;
|EndTransport (last)&lt;br /&gt;
|EndTransport (each)&lt;br /&gt;
|StartUnload (first)&amp;lt;br&amp;gt;TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|-&lt;br /&gt;
|ground&lt;br /&gt;
|TransportPickup (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Air transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BeginTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.QueryTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For an air transport, if any one unit is picked up, these two are called in succession and the passenger is attached to the piece returned by the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartUnload&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Signals the start of an unload cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Called when a passenger will be unloaded. Contrary to ground transports, Spring will detach the passenger after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
In UnloadLand and UnloadLandFlood behaviors, these are called one time after all units are unloaded. (The transport is empty.) For the UnloadDrop behavior, this is called for every unit that is unloaded.&lt;br /&gt;
&lt;br /&gt;
==== Example of what is needed for a Transport ====&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
function script.BeginTransport(passengerID)&lt;br /&gt;
    local unitHeight = Spring.GetUnitHeight(passengerID) -- This moves the unit down so that it appears as though the top of it is attached to where the link piece was set (usually underneath the transport)&lt;br /&gt;
    Move(link, y_axis, -unitHeight, 500)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryTransport()&lt;br /&gt;
    return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.EndTransport(passengerID)&lt;br /&gt;
    Move(link, y_axis, 0, 500) -- Once transport is complete, move the link piece back to where it was originally&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ground transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportPickup&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be loaded into the transport. This should eventually call AttachUnit to actually attach the unit. Assuming the transport is in range of the next passenger, this will be called again for the next passenger 16 frames later, &#039;&#039;unless&#039;&#039; the script enters the BUSY state: then Spring will not move on to the next passenger until the script leaves the BUSY state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be unloaded. This should eventually call DetachUnit to actually detach the unit, &#039;&#039;unless&#039;&#039; the used unload method is UnloadLandFlood, in which case Spring will actually detach the unit after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior, after the last unit has been unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passenger ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Falling&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
For a unit dropped from an UnloadDrop transport, this is called every frame to inform the script the unit is still falling. It may be used to show a parachute for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Landed&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called one time after the unit reached the ground. May be used to hide a parachute for example.&lt;br /&gt;
&lt;br /&gt;
== Internal ==&lt;br /&gt;
&lt;br /&gt;
These call-ins are NOT available to Lua unit scripts. They are called by the engine however, but always &#039;intercepted&#039; by the framework gadget. For completeness (or if you are poking at the gadget), they are listed here anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.TurnFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a move or turn finished. The framework gadget uses this to resume the coroutines which are waiting for the particular move or turn to be finished.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Destroy&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called right before the unit&#039;s script is destroyed. This may happen if the unit is being destroyed, but also if the unit&#039;s script is being replaced by another script. The framework gadget uses this to stop all threads and remove the unit from some internal data structures.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2005</id>
		<title>Animation-LuaCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2005"/>
		<updated>2022-11-17T08:27:45Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Air transports */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Call-ins are calls from the engine, into the unit script. In other words, these functions are called, if they are defined, when a particular &#039;&#039;event&#039;&#039; happens.&lt;br /&gt;
&lt;br /&gt;
For Lua unit scripts, a new call-in mechanism has been implemented, which is faster than the regular call-in mechanism used for widgets and gadgets.&lt;br /&gt;
&lt;br /&gt;
Types for arguments are only shown where they&#039;re ambiguous. For a number of (common) arguments, the types are:&lt;br /&gt;
&lt;br /&gt;
* unitID: number&lt;br /&gt;
* piece: number&lt;br /&gt;
* axis: number (1 = x axis, 2 = y axis, 3 = z axis)&lt;br /&gt;
* heading/pitch: number (radians)&lt;br /&gt;
&lt;br /&gt;
== Generic ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Create&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called just after the unit script has been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These are called whenever the unit starts or stops moving. Typical use for them is to trigger wheels to start spinning, animate treads, or start/stop a walking animation. Since 95.0 they are only run when a unit transitions from zero to non-zero speed or vice versa, and no longer during in-place rotations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ChangeHeading&#039;&#039;&#039; ( number deltaHeading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when the unit changes heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when a (ground) unit reacts to an impulse. The start-skidding threshold (&#039;sqSkidSpeedMult&#039;) is configurable via [[Lua_MoveCtrl#MoveType-Controlling|MoveCtrl.SetGroundMoveTypeData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Killed&#039;&#039;&#039; ( number recentDamage, number maxHealth ) -&amp;gt; number corpseType&lt;br /&gt;
&lt;br /&gt;
This is called when the unit is killed. The severity of the kill may be calculated as severity=recentDamage/maxHealth &#039;&#039;(*100 so that it&#039;s in percent, no? at least that is how severity was expressed in Cob/bos, I think. Of course there&#039;s no reason to emulate that, just pointing it out for people &amp;quot;converting&amp;quot;)&#039;&#039;. Typically, this function would play a death animation for the unit, and finally return a corpse type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.WindChanged&#039;&#039;&#039; ( number heading, number strength ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called for wind generators whenever the wind direction or strength changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ExtractionRateChanged&#039;&#039;&#039; ( number rate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called for metal extractors each time their extraction rate (metal per second) changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.setSFXoccupy&#039;&#039;&#039; ( number curTerrainType ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when terrain type changes. Terrain type is calculated with the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If unit is being transported -&amp;gt; curTerrainType = 0&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is always upright -&amp;gt; curTerrainType = 2&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is not always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* If ground height &amp;lt; 0 and unit is always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* Otherwise -&amp;gt; curTerrainType = 4&lt;br /&gt;
&lt;br /&gt;
Where is curTerrainType = 3 ? :-)&lt;br /&gt;
&lt;br /&gt;
Candidate to be changed to something saner later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveRate&#039;&#039;&#039; ( number curRate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called only for certain types of aircraft (those which use &#039;&#039;CTAAirMoveType&#039;&#039;.) The move rate is determined by the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If the aircraft is landing or taking off -&amp;gt; curRate = 1&lt;br /&gt;
* Otherwise -&amp;gt; curRate = floor(curSpeed / maxSpeed * 3), clamped to be in the range [0, 2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryLandingPads&#039;&#039;&#039; ( ) -&amp;gt; { number piece1, number piece2, ... }&lt;br /&gt;
&lt;br /&gt;
Called one time for units with landing pads. Should return a table with pieces which should be used as landing pads. The number of pieces returned also determines the number of pads, so for Lua unit scripts there is no QueryLandingPadCount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Activate&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Deactivate&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Exact situation these are called depends a lot on the unit type. Factories are activated when they open their yard and deactivated when they close it. Aircraft are activated when they take off and deactivated when the land. Any unit that can be turned on or off is activated when it&#039;s turned on and deactivated when it&#039;s turned off. On &#039;&#039;script.SetUnitValue(COB.ACTIVATION, ...)&#039;&#039; one of these call-ins may be called too.&lt;br /&gt;
&lt;br /&gt;
== Weapons ==&lt;br /&gt;
&lt;br /&gt;
Weapon functions come in two variants.&lt;br /&gt;
&lt;br /&gt;
* Separate function with numeric weapon number suffix. (e.g. &#039;&#039;script.AimWeapon&amp;lt;u&amp;gt;1&amp;lt;/u&amp;gt;(heading, pitch)&#039;&#039;)&lt;br /&gt;
* Combined function which gets weapon number as second argument. (e.g. &#039;&#039;script.AimWeapon(&amp;lt;u&amp;gt;weaponNum&amp;lt;/u&amp;gt;, heading, pitch)&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only the first variant is listed here, so whenever you see a function whose name ends with a numeric one (&amp;quot;1&amp;quot;), you should either replace it with the actual weapon number, or you can write a single combined function that takes a &#039;&#039;weaponNum&#039;&#039; argument. For each script, all functions should use the same variant. Either all using name suffix, or all using combined functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimFromWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimWeapon1&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; boolean&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimShield1&#039;&#039;&#039; ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Weapon support. The return value of QueryWeapon and AimFromWeapon determines the pieces which will be used for aiming: typically e.g. the barrel for QueryWeapon and the turret for AimFromWeapon. AimWeapon is then called to allow the script to turn the weapons in the target direction, which is passed as the heading and pitch argument (in radians). Only if AimWeapon returns true, the weapon is actually fired. AimWeapon is called repeatedly, at a rate determined by the {{xtaglink|Gamedev:WeaponDefs|fireTolerance}} tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.FireWeapon1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Shot1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.EndBurst1&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
If after aiming the unit actually fires it&#039;s weapon, FireWeapon is called once at the beginning of the salvo. Shot is called just before each projectile is fired. RockUnit (see below) is called just after all projectiles for that frame have been fired. At the end of the salvo, EndBurst is called.&lt;br /&gt;
&lt;br /&gt;
Of these call-ins, FireWeapon is the more generic one and Shot and EndBurst are more specialized. FireWeapon is usually used to play a recoil animation or emit some smoke near the weapon&#039;s barrel using EmitSfx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BlockShot1&#039;&#039;&#039; ( targetUnitID, boolean userTarget ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Allows you to block a weapon from shooting. TargetUnitID may be nil: in this case the unit has a ground-attack order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TargetWeight1&#039;&#039;&#039; ( targetUnitID ) -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
Allows you to tweak the priority of the target for this particular weapon. The target priority is multiplied by the return value of this function. Lower priority targets are targeted first, so return a value smaller than 1 to prioritize a target, or return a value larger than 1 to avoid a target.&lt;br /&gt;
&lt;br /&gt;
The exact behavior of specific values shouldn&#039;t be relied upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.RockUnit&#039;&#039;&#039; ( x, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
A bit like the weapon-specific FireWeapon function, although this is called after any weapon fires. As argument it gets a two dimensional vector in the direction the unit just fired. This may be used to â€œrockâ€ the unit as a whole a bit as part of the firing animation. Note though that this vector is in world space, so for a truly realistic rock direction it needs to be rotated according to the unit&#039;s current heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.HitByWeapon&#039;&#039;&#039; ( x, z, weaponDefID, damage ) -&amp;gt; nil | number newDamage&lt;br /&gt;
&lt;br /&gt;
This is called if a unit has been hit by a weapon. (x, z) is the direction from which the projectile came in unit space (the reverse direction of the impulse, to be exact.) It also gets the weaponDefID of the weapon which is dealing the damage, and the amount of damage. If HitByWeapon returns a number, this number will replace the damage value calculated by the engine.&lt;br /&gt;
&lt;br /&gt;
Note: Pre Spring 95, this call-in runs just before the LuaRules UnitPreDamaged callin (see also [[LuaCallinReturn]]). If HitByWeapon overrides the damage, UnitPreDamaged will see the new damage value, and may override again the damage value. Starting Spring 95, it is run after UnitPreDamaged.&lt;br /&gt;
&lt;br /&gt;
== Builders and factories ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These notify the script when a builder or factory starts or stops building.&lt;br /&gt;
&lt;br /&gt;
The first variant (with heading and pitch arguments) is called for builders. For factories, the second variant is used. In this case the heading and pitch are not necessary, because the factory script specifies the build location itself using QueryBuildInfo.&lt;br /&gt;
&lt;br /&gt;
BTW, don&#039;t forget to set INBUILDSTANCE to 1 to start building! For lua script, that is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
  function script.StartBuilding(heading, pitch)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryBuildInfo&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For factories only. Should return the piece to which the unit which is going to be build will be attached while it&#039;s being build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryNanopiece&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
Called each time a nano particle is to be created. Should return the piece at which the particle will be spawned. This may be used to iterate through a few pieces, to simulate the factory/builder having multiple nanolathes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;N.B. As of 92.0 the results are cached and the function is called 31 times only. Deprecated in favour of Spring.SetUnitNanoPieces, which disables this callin when used.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of parts needed to create a Mobile Builder ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local nanoPieces = {[0] = nanopoint1}&lt;br /&gt;
local SIG_AIM = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add this to create()&lt;br /&gt;
Spring.SetUnitNanoPieces(unitID, nanoPieces)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
function RestoreAfterDelay()&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
    if building == false then&lt;br /&gt;
        Sleep(2000)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
    building = false&lt;br /&gt;
    StartThread(RestoreAfterDelay)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StartBuilding(heading, pitch)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
    building = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryNanoPiece()&lt;br /&gt;
    local nano = nanoPieces[nanoNum]&lt;br /&gt;
    return nano&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transports ==&lt;br /&gt;
&lt;br /&gt;
There are some different code paths inside Spring related to transports, each (unfortunately) also associated with a different set of unit script call-ins.&lt;br /&gt;
&lt;br /&gt;
This table shows for the three different {{xtaglink|Gamedev:UnitDefs|transportUnloadMethod}} for both air transports and ground transports which callins are used and roughly when and how often they are called. Refer to the documentation below for a description of the call-ins.&lt;br /&gt;
&lt;br /&gt;
The entire behavior around transports should be considered subject to change; it is obvious it is far from a perfect design currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; style=&amp;quot;border-spacing:0px;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Load&lt;br /&gt;
!UnloadLand (0)&lt;br /&gt;
!UnloadDrop (1)&lt;br /&gt;
!UnloadLandFlood (2)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|default unload&lt;br /&gt;
|fly over and drop unit&lt;br /&gt;
|land, then release all units at once&lt;br /&gt;
|-&lt;br /&gt;
|air&lt;br /&gt;
|BeginTransport (each)&amp;lt;br&amp;gt;QueryTransport (each)&lt;br /&gt;
|EndTransport (last)&lt;br /&gt;
|EndTransport (each)&lt;br /&gt;
|StartUnload (first)&amp;lt;br&amp;gt;TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|-&lt;br /&gt;
|ground&lt;br /&gt;
|TransportPickup (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Air transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BeginTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.QueryTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For an air transport, if any one unit is picked up, these two are called in succession and the passenger is attached to the piece returned by the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartUnload&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Signals the start of an unload cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Called when a passenger will be unloaded. Contrary to ground transports, Spring will detach the passenger after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
In UnloadLand and UnloadLandFlood behaviors, these are called one time after all units are unloaded. (The transport is empty.) For the UnloadDrop behavior, this is called for every unit that is unloaded.&lt;br /&gt;
&lt;br /&gt;
==== Example of what is needed for a Transport ====&lt;br /&gt;
&amp;lt;nowiki&amp;gt;&lt;br /&gt;
function script.BeginTransport(passengerID)&lt;br /&gt;
    local unitHeight = Spring.GetUnitHeight(passengerID) -- This moves the unit down so that it appears as though the top of it is attached to where the link piece was set (usually underneath the transport)&lt;br /&gt;
    Move(link, y_axis, -unitHeight, 500)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryTransport()&lt;br /&gt;
    return link&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.EndTransport(passengerID)&lt;br /&gt;
    Move(link, y_axis, 0, 500) -- Once transport is complete, move the link piece back to where it was originally&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Ground transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportPickup&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be loaded into the transport. This should eventually call AttachUnit to actually attach the unit. Assuming the transport is in range of the next passenger, this will be called again for the next passenger 16 frames later, &#039;&#039;unless&#039;&#039; the script enters the BUSY state: then Spring will not move on to the next passenger until the script leaves the BUSY state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be unloaded. This should eventually call DetachUnit to actually detach the unit, &#039;&#039;unless&#039;&#039; the used unload method is UnloadLandFlood, in which case Spring will actually detach the unit after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior, after the last unit has been unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passenger ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Falling&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
For a unit dropped from an UnloadDrop transport, this is called every frame to inform the script the unit is still falling. It may be used to show a parachute for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Landed&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called one time after the unit reached the ground. May be used to hide a parachute for example.&lt;br /&gt;
&lt;br /&gt;
== Internal ==&lt;br /&gt;
&lt;br /&gt;
These call-ins are NOT available to Lua unit scripts. They are called by the engine however, but always &#039;intercepted&#039; by the framework gadget. For completeness (or if you are poking at the gadget), they are listed here anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.TurnFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a move or turn finished. The framework gadget uses this to resume the coroutines which are waiting for the particular move or turn to be finished.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Destroy&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called right before the unit&#039;s script is destroyed. This may happen if the unit is being destroyed, but also if the unit&#039;s script is being replaced by another script. The framework gadget uses this to stop all threads and remove the unit from some internal data structures.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2004</id>
		<title>Animation-LuaCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaCallins&amp;diff=2004"/>
		<updated>2022-11-17T08:24:19Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Builders and factories */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Introduction ==&lt;br /&gt;
&lt;br /&gt;
Call-ins are calls from the engine, into the unit script. In other words, these functions are called, if they are defined, when a particular &#039;&#039;event&#039;&#039; happens.&lt;br /&gt;
&lt;br /&gt;
For Lua unit scripts, a new call-in mechanism has been implemented, which is faster than the regular call-in mechanism used for widgets and gadgets.&lt;br /&gt;
&lt;br /&gt;
Types for arguments are only shown where they&#039;re ambiguous. For a number of (common) arguments, the types are:&lt;br /&gt;
&lt;br /&gt;
* unitID: number&lt;br /&gt;
* piece: number&lt;br /&gt;
* axis: number (1 = x axis, 2 = y axis, 3 = z axis)&lt;br /&gt;
* heading/pitch: number (radians)&lt;br /&gt;
&lt;br /&gt;
== Generic ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Create&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called just after the unit script has been created.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopMoving&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These are called whenever the unit starts or stops moving. Typical use for them is to trigger wheels to start spinning, animate treads, or start/stop a walking animation. Since 95.0 they are only run when a unit transitions from zero to non-zero speed or vice versa, and no longer during in-place rotations.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ChangeHeading&#039;&#039;&#039; ( number deltaHeading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when the unit changes heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopSkidding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
{{new|104.0}} Called when a (ground) unit reacts to an impulse. The start-skidding threshold (&#039;sqSkidSpeedMult&#039;) is configurable via [[Lua_MoveCtrl#MoveType-Controlling|MoveCtrl.SetGroundMoveTypeData]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Killed&#039;&#039;&#039; ( number recentDamage, number maxHealth ) -&amp;gt; number corpseType&lt;br /&gt;
&lt;br /&gt;
This is called when the unit is killed. The severity of the kill may be calculated as severity=recentDamage/maxHealth &#039;&#039;(*100 so that it&#039;s in percent, no? at least that is how severity was expressed in Cob/bos, I think. Of course there&#039;s no reason to emulate that, just pointing it out for people &amp;quot;converting&amp;quot;)&#039;&#039;. Typically, this function would play a death animation for the unit, and finally return a corpse type.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.WindChanged&#039;&#039;&#039; ( number heading, number strength ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called for wind generators whenever the wind direction or strength changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.ExtractionRateChanged&#039;&#039;&#039; ( number rate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called for metal extractors each time their extraction rate (metal per second) changes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.setSFXoccupy&#039;&#039;&#039; ( number curTerrainType ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when terrain type changes. Terrain type is calculated with the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If unit is being transported -&amp;gt; curTerrainType = 0&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is always upright -&amp;gt; curTerrainType = 2&lt;br /&gt;
* If ground height &amp;lt; -5 and unit is not always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* If ground height &amp;lt; 0 and unit is always upright -&amp;gt; curTerrainType = 1&lt;br /&gt;
* Otherwise -&amp;gt; curTerrainType = 4&lt;br /&gt;
&lt;br /&gt;
Where is curTerrainType = 3 ? :-)&lt;br /&gt;
&lt;br /&gt;
Candidate to be changed to something saner later on.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveRate&#039;&#039;&#039; ( number curRate ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called only for certain types of aircraft (those which use &#039;&#039;CTAAirMoveType&#039;&#039;.) The move rate is determined by the following rules (in this order):&lt;br /&gt;
&lt;br /&gt;
* If the aircraft is landing or taking off -&amp;gt; curRate = 1&lt;br /&gt;
* Otherwise -&amp;gt; curRate = floor(curSpeed / maxSpeed * 3), clamped to be in the range [0, 2]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryLandingPads&#039;&#039;&#039; ( ) -&amp;gt; { number piece1, number piece2, ... }&lt;br /&gt;
&lt;br /&gt;
Called one time for units with landing pads. Should return a table with pieces which should be used as landing pads. The number of pieces returned also determines the number of pads, so for Lua unit scripts there is no QueryLandingPadCount.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Activate&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Deactivate&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Exact situation these are called depends a lot on the unit type. Factories are activated when they open their yard and deactivated when they close it. Aircraft are activated when they take off and deactivated when the land. Any unit that can be turned on or off is activated when it&#039;s turned on and deactivated when it&#039;s turned off. On &#039;&#039;script.SetUnitValue(COB.ACTIVATION, ...)&#039;&#039; one of these call-ins may be called too.&lt;br /&gt;
&lt;br /&gt;
== Weapons ==&lt;br /&gt;
&lt;br /&gt;
Weapon functions come in two variants.&lt;br /&gt;
&lt;br /&gt;
* Separate function with numeric weapon number suffix. (e.g. &#039;&#039;script.AimWeapon&amp;lt;u&amp;gt;1&amp;lt;/u&amp;gt;(heading, pitch)&#039;&#039;)&lt;br /&gt;
* Combined function which gets weapon number as second argument. (e.g. &#039;&#039;script.AimWeapon(&amp;lt;u&amp;gt;weaponNum&amp;lt;/u&amp;gt;, heading, pitch)&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
Only the first variant is listed here, so whenever you see a function whose name ends with a numeric one (&amp;quot;1&amp;quot;), you should either replace it with the actual weapon number, or you can write a single combined function that takes a &#039;&#039;weaponNum&#039;&#039; argument. For each script, all functions should use the same variant. Either all using name suffix, or all using combined functions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimFromWeapon1&#039;&#039;&#039; ( ) -&amp;gt; number piece&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimWeapon1&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; boolean&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.AimShield1&#039;&#039;&#039; ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Weapon support. The return value of QueryWeapon and AimFromWeapon determines the pieces which will be used for aiming: typically e.g. the barrel for QueryWeapon and the turret for AimFromWeapon. AimWeapon is then called to allow the script to turn the weapons in the target direction, which is passed as the heading and pitch argument (in radians). Only if AimWeapon returns true, the weapon is actually fired. AimWeapon is called repeatedly, at a rate determined by the {{xtaglink|Gamedev:WeaponDefs|fireTolerance}} tag.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.FireWeapon1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.Shot1&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.EndBurst1&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
If after aiming the unit actually fires it&#039;s weapon, FireWeapon is called once at the beginning of the salvo. Shot is called just before each projectile is fired. RockUnit (see below) is called just after all projectiles for that frame have been fired. At the end of the salvo, EndBurst is called.&lt;br /&gt;
&lt;br /&gt;
Of these call-ins, FireWeapon is the more generic one and Shot and EndBurst are more specialized. FireWeapon is usually used to play a recoil animation or emit some smoke near the weapon&#039;s barrel using EmitSfx.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BlockShot1&#039;&#039;&#039; ( targetUnitID, boolean userTarget ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
Allows you to block a weapon from shooting. TargetUnitID may be nil: in this case the unit has a ground-attack order.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TargetWeight1&#039;&#039;&#039; ( targetUnitID ) -&amp;gt; number&lt;br /&gt;
&lt;br /&gt;
Allows you to tweak the priority of the target for this particular weapon. The target priority is multiplied by the return value of this function. Lower priority targets are targeted first, so return a value smaller than 1 to prioritize a target, or return a value larger than 1 to avoid a target.&lt;br /&gt;
&lt;br /&gt;
The exact behavior of specific values shouldn&#039;t be relied upon.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.RockUnit&#039;&#039;&#039; ( x, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
A bit like the weapon-specific FireWeapon function, although this is called after any weapon fires. As argument it gets a two dimensional vector in the direction the unit just fired. This may be used to â€œrockâ€ the unit as a whole a bit as part of the firing animation. Note though that this vector is in world space, so for a truly realistic rock direction it needs to be rotated according to the unit&#039;s current heading.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.HitByWeapon&#039;&#039;&#039; ( x, z, weaponDefID, damage ) -&amp;gt; nil | number newDamage&lt;br /&gt;
&lt;br /&gt;
This is called if a unit has been hit by a weapon. (x, z) is the direction from which the projectile came in unit space (the reverse direction of the impulse, to be exact.) It also gets the weaponDefID of the weapon which is dealing the damage, and the amount of damage. If HitByWeapon returns a number, this number will replace the damage value calculated by the engine.&lt;br /&gt;
&lt;br /&gt;
Note: Pre Spring 95, this call-in runs just before the LuaRules UnitPreDamaged callin (see also [[LuaCallinReturn]]). If HitByWeapon overrides the damage, UnitPreDamaged will see the new damage value, and may override again the damage value. Starting Spring 95, it is run after UnitPreDamaged.&lt;br /&gt;
&lt;br /&gt;
== Builders and factories ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( heading, pitch ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StartBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.StopBuilding&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
These notify the script when a builder or factory starts or stops building.&lt;br /&gt;
&lt;br /&gt;
The first variant (with heading and pitch arguments) is called for builders. For factories, the second variant is used. In this case the heading and pitch are not necessary, because the factory script specifies the build location itself using QueryBuildInfo.&lt;br /&gt;
&lt;br /&gt;
BTW, don&#039;t forget to set INBUILDSTANCE to 1 to start building! For lua script, that is&lt;br /&gt;
&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
  function script.StartBuilding(heading, pitch)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
  end&lt;br /&gt;
&lt;br /&gt;
  function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryBuildInfo&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For factories only. Should return the piece to which the unit which is going to be build will be attached while it&#039;s being build.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.QueryNanopiece&#039;&#039;&#039; ( ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
Called each time a nano particle is to be created. Should return the piece at which the particle will be spawned. This may be used to iterate through a few pieces, to simulate the factory/builder having multiple nanolathes.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;N.B. As of 92.0 the results are cached and the function is called 31 times only. Deprecated in favour of Spring.SetUnitNanoPieces, which disables this callin when used.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Example of parts needed to create a Mobile Builder ===&lt;br /&gt;
 &amp;lt;nowiki&amp;gt;&lt;br /&gt;
local nanoPieces = {[0] = nanopoint1}&lt;br /&gt;
local SIG_AIM = 2&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
-- Add this to create()&lt;br /&gt;
Spring.SetUnitNanoPieces(unitID, nanoPieces)&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
function RestoreAfterDelay()&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
    if building == false then&lt;br /&gt;
        Sleep(2000)&lt;br /&gt;
    end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StopBuilding()&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 0)&lt;br /&gt;
    building = false&lt;br /&gt;
    StartThread(RestoreAfterDelay)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetSignalMask(SIG_AIM)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.StartBuilding(heading, pitch)&lt;br /&gt;
    Signal(SIG_AIM)&lt;br /&gt;
    SetUnitValue(COB.INBUILDSTANCE, 1)&lt;br /&gt;
    building = true&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
function script.QueryNanoPiece()&lt;br /&gt;
    local nano = nanoPieces[nanoNum]&lt;br /&gt;
    return nano&lt;br /&gt;
end&lt;br /&gt;
 &amp;lt;/nowiki&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Transports ==&lt;br /&gt;
&lt;br /&gt;
There are some different code paths inside Spring related to transports, each (unfortunately) also associated with a different set of unit script call-ins.&lt;br /&gt;
&lt;br /&gt;
This table shows for the three different {{xtaglink|Gamedev:UnitDefs|transportUnloadMethod}} for both air transports and ground transports which callins are used and roughly when and how often they are called. Refer to the documentation below for a description of the call-ins.&lt;br /&gt;
&lt;br /&gt;
The entire behavior around transports should be considered subject to change; it is obvious it is far from a perfect design currently.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;1&amp;quot; style=&amp;quot;border-spacing:0px;&amp;quot;&lt;br /&gt;
|+&lt;br /&gt;
!&lt;br /&gt;
!Load&lt;br /&gt;
!UnloadLand (0)&lt;br /&gt;
!UnloadDrop (1)&lt;br /&gt;
!UnloadLandFlood (2)&lt;br /&gt;
|-&lt;br /&gt;
|&lt;br /&gt;
|&lt;br /&gt;
|default unload&lt;br /&gt;
|fly over and drop unit&lt;br /&gt;
|land, then release all units at once&lt;br /&gt;
|-&lt;br /&gt;
|air&lt;br /&gt;
|BeginTransport (each)&amp;lt;br&amp;gt;QueryTransport (each)&lt;br /&gt;
|EndTransport (last)&lt;br /&gt;
|EndTransport (each)&lt;br /&gt;
|StartUnload (first)&amp;lt;br&amp;gt;TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|-&lt;br /&gt;
|ground&lt;br /&gt;
|TransportPickup (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&lt;br /&gt;
|TransportDrop (each)&amp;lt;br&amp;gt;EndTransport (last)&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Air transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.BeginTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.QueryTransport&#039;&#039;&#039; ( passengerID ) -&amp;gt; number piece&lt;br /&gt;
&lt;br /&gt;
For an air transport, if any one unit is picked up, these two are called in succession and the passenger is attached to the piece returned by the second one.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.StartUnload&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Signals the start of an unload cycle.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior. Called when a passenger will be unloaded. Contrary to ground transports, Spring will detach the passenger after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
In UnloadLand and UnloadLandFlood behaviors, these are called one time after all units are unloaded. (The transport is empty.) For the UnloadDrop behavior, this is called for every unit that is unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Ground transports ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportPickup&#039;&#039;&#039; ( passengerID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be loaded into the transport. This should eventually call AttachUnit to actually attach the unit. Assuming the transport is in range of the next passenger, this will be called again for the next passenger 16 frames later, &#039;&#039;unless&#039;&#039; the script enters the BUSY state: then Spring will not move on to the next passenger until the script leaves the BUSY state.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.TransportDrop&#039;&#039;&#039; ( passengerID, x, y, z ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a passenger should be unloaded. This should eventually call DetachUnit to actually detach the unit, &#039;&#039;unless&#039;&#039; the used unload method is UnloadLandFlood, in which case Spring will actually detach the unit after the call.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.EndTransport&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Only called in UnloadLandFlood behavior, after the last unit has been unloaded.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Passenger ===&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Falling&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
For a unit dropped from an UnloadDrop transport, this is called every frame to inform the script the unit is still falling. It may be used to show a parachute for example.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Landed&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
This is called one time after the unit reached the ground. May be used to hide a parachute for example.&lt;br /&gt;
&lt;br /&gt;
== Internal ==&lt;br /&gt;
&lt;br /&gt;
These call-ins are NOT available to Lua unit scripts. They are called by the engine however, but always &#039;intercepted&#039; by the framework gadget. For completeness (or if you are poking at the gadget), they are listed here anyway.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.MoveFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;script.TurnFinished&#039;&#039;&#039; ( piece, axis ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called when a move or turn finished. The framework gadget uses this to resume the coroutines which are waiting for the particular move or turn to be finished.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;script.Destroy&#039;&#039;&#039; ( ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
Called right before the unit&#039;s script is destroyed. This may happen if the unit is being destroyed, but also if the unit&#039;s script is being replaced by another script. The framework gadget uses this to stop all threads and remove the unit from some internal data structures.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Modrules.lua&amp;diff=14473</id>
		<title>Modrules.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Modrules.lua&amp;diff=14473"/>
		<updated>2022-07-05T05:23:32Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* system */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Location==&lt;br /&gt;
&amp;lt;code&amp;gt;modrules.lua&amp;lt;/code&amp;gt; is a file in the &amp;lt;code&amp;gt;Gamedata/&amp;lt;/code&amp;gt; directory of a Spring game. &lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
This file controls various global parameters of the game, for example how fast units gain experience, what unit types can be transported, how fine grained the LOS system is, etc.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which parses the data from this file is viewable here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Misc/ModInfo.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&amp;lt;code&amp;gt;Modrules.lua&amp;lt;/code&amp;gt; is divided into several sub-tables containing tags specific to each section, as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===capture===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much of the original energy cost it requires to capture something.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===construction===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constructionDecay&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Do uncompleted building frames begin to decay if no builder is working on them?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constructionDecayTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 6.66&lt;br /&gt;
|description = The time in seconds before abandoned building frames begin to decay.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constructionDecaySpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.03&lt;br /&gt;
|description = How fast build progress decays for abandoned building frames. Note that the rate is inversely proportional to the {{xtaglink|Gamedev:UnitDefs|buildtime}} i.e. a building with a larger {{xtaglink|Gamedev:UnitDefs|buildtime}} will decay more slowly for a given value of this tag than a building with a shorter {{xtaglink|Gamedev:UnitDefs|buildtime}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===experience===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = experienceMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls the amount of experience gained by units engaging in combat. The formulae used are: &lt;br /&gt;
::&amp;lt;code&amp;gt;xp for damage = 0.1 * experienceMult * damage / target_HP * target_power / attacker_power&amp;lt;/code&amp;gt; &lt;br /&gt;
::&amp;lt;code&amp;gt;xp for kill = 0.1 * experienceMult * target_power / attacker_power&amp;lt;/code&amp;gt;. &lt;br /&gt;
: Where {{xtaglink|Gamedev:UnitDefs|power}} can be set by the UnitDef tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = powerScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how gaining experience changes the relative {{xtaglink|Gamedev:UnitDefs|power}} of the unit. The formula used is &amp;lt;code&amp;gt;Power multiplier = powerScale * (1 + xp / (xp + 1))&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = healthScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.7&lt;br /&gt;
|description = Controls how gaining experience increases the {{xtaglink|Gamedev:UnitDefs|maxDamage}} (total hitpoints) of the unit. The formula used is &amp;lt;code&amp;gt;Health multiplier = healthScale * (1 + xp / (xp + 1))&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reloadScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.4&lt;br /&gt;
|description = Controls how gaining experience decreases the {{xtaglink|Gamedev:UnitDefs|reloadTime}} of the unit&#039;s weapons. The formula used is &amp;lt;code&amp;gt;Rate of fire multiplier = reloadScale * (1 + xp / (xp + 1))&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===featureLOS===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = featureVisibility&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 3&lt;br /&gt;
|description = Controls the visibility of features. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - no default LOS for features, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Gaia features always visible, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - allyteam &amp;amp; Gaia features always visible, or &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; - all features always visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===fireAtDead===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireAtKilled&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Will units continue to target and fire on enemies which are running their &amp;lt;code&amp;gt;Killed()&amp;lt;/code&amp;gt; animation? (See [[Animation-LuaCallins#Generic]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireAtCrashing&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Will units continue to target and fire on enemy aircraft which are in the &#039;crashing&#039; state? (See [[Lua_SyncedCtrl#Unit_Control]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===flankingBonus===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = defaultMode&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = The default {{xtaglink|Gamedev:UnitDefs|flankingBonusMode}} for units. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - No flanking bonus. Mode &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; builds up the ability to move over time, and swings to face attacks, but does not respect the way the unit is facing. Mode &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; also can swing, but moves with the unit as it turns. Mode &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; stays with the unit as it turns and otherwise doesn&#039;t move, the ideal mode to simulate something such as tank armour. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===los===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = losMipLevel&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls the resolution of the LOS calculations. A higher value means lower resolution but increased performance. An increase by one level means half the resolution of the LOS map in both x and y direction. Must be between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt; inclusive.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = losMul&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|special = {{removed|101.0}}&lt;br /&gt;
|description = Multiplies all unit&#039;s {{xtaglink|Gamedev:UnitDefs|sightDistance}} by this value. Generally speaking you should always use the default.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airMipLevel&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls the resolution of the LOS vs. aircraft calculations. A higher value means lower resolution but increased performance. An increase by one level means half the resolution of the air-LOS map in both x and y direction. Must be between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;30&amp;lt;/code&amp;gt; inclusive. [http://springrts.com/mantis/view.php?id=4031#c11709] - jK describe for you what the value means.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airLosMul&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|special = {{removed|101.0}}&lt;br /&gt;
|description = Multiplies all unit&#039;s {{xtaglink|Gamedev:UnitDefs|airSightDistance}} by this value. Generally speaking you should always use the default.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarMipLevel&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 2&lt;br /&gt;
|description = Controls the resolution of the radar. See description of airMipLevel for details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===movement===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowAirPlanesToLeaveMap&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Are (gunship) aircraft allowed to fly outside the bounds of the map?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowAircraftToHitGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|90.0}}&lt;br /&gt;
|description = Are aircraft allowed to hit the ground whilst manoeuvring?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowPushingEnemyUnits&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|83.0}}&lt;br /&gt;
|description = Can enemy ground units push each other during collisions?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowCrushingAlliedUnits&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|85.0}}&lt;br /&gt;
|description = Can allied ground units crush each other during collisions? Units still have to be explicitly set as crushable using the &amp;lt;code&amp;gt;crushable&amp;lt;/code&amp;gt; parameter of [[Lua_SyncedCtrl#Unit_Control|Spring.SetUnitBlocking]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowUnitCollisionDamage&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|85.0}}&lt;br /&gt;
|description = Do unit-unit (skidding) collisions cause damage?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowUnitCollisionOverlap&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|89.0}}&lt;br /&gt;
|description = Can mobile units collision volumes overlap one another? Allows unit movement like [http://www.youtube.com/watch?v=mRtePUdVk2o this (video)] at the cost of more &#039;clumping&#039;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowGroundUnitGravity&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|92.0}}&lt;br /&gt;
|description = Allows fast moving mobile units to &#039;catch air&#039; as they move over terrain.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowHoverUnitStrafing&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true if using QTPFS pathfinder&lt;br /&gt;
|special = {{new|92.0}}&lt;br /&gt;
|description = Allows hovercraft units to slide in turns.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useClassicGroundMoveType&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|89.0}} {{removed|102.0}}&lt;br /&gt;
|description = A ticket back to unit movement circa 2009: no reversing, no {{xtaglink|Gamedev:UnitDefs|turninplace|false}}, no smooth collision handling, no nothing. For comparison of pathfinding code.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===paralyze===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = paralyzeOnMaxHealth&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Are units paralyzed when the level of emp is greater than their current health or their maximum health?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===reclaim===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = multiReclaim&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = Can multiple units reclaim a feature or only one? &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; implies the latter, all other values the former.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimMethod&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls how features are reclaimed. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - gradual reclaim, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - all reclaimed at end, any other positive value &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - reclaim in &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; chunks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitMethod&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls how units are reclaimed. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - gradual reclaim, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - all reclaimed at end, any other positive value &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - reclaim in &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; chunks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = featureEnergyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much energy should reclaiming a feature cost? Multiplier against the fraction of the features&#039; {{xtaglink|Gamedev:FeatureDefs|metal}} content reclaimed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitEnergyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much energy should reclaiming a unit cost? Multiplier against the fraction of the unit&#039;s {{xtaglink|Gamedev:UnitDefs|buildCostEnergy}} reclaimed. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitEfficiency&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How much metal should reclaiming a unit return? Multiplier against the unit&#039;s {{xtaglink|Gamedev:UnitDefs|buildCostMetal}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowEnemies&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can enemy units be reclaimed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowAllies&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can allied units be reclaimed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===repair===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much of the original energy cost it requires to repair something.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===resurrect===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = How much of the original energy cost it requires to resurrect something.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===sensors===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = requireSonarUnderWater&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then when underwater, units only get LOS if they also have sonar.&lt;br /&gt;
}}&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisibleOverridesCloaked&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|101.0}}&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then units will be visible even when cloaked (probably?).&lt;br /&gt;
}}&lt;br /&gt;
{{tag&lt;br /&gt;
|name = separateJammers&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|101.0}}&lt;br /&gt;
|description = When &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; each allyTeam only jams their own units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===system===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pathFinderSystem&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|special={{new|85.0}}&lt;br /&gt;
|description = Which pathfinder does the game use? Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - The legacy default pathfinder, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Quad-Tree Pathfinder System ([[QTPFS]])}} or &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - disabled.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pathFinderUpdateRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.007&lt;br /&gt;
|special={{new|98.0}}&lt;br /&gt;
|description = Controls how often the pathfinder updates; larger values means more rapid updates.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pathFinderRawDistMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.25&lt;br /&gt;
|special={{new|105.+ BAR}}&lt;br /&gt;
|description = Engine does raw move with a limited distance, this multiplier adjusts that}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowTake&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|103.0}}&lt;br /&gt;
|description = Enables and disables the {{var|/take}} [[UI_commands|UI command]].}}&lt;br /&gt;
&lt;br /&gt;
===transportability===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportAir&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can aircraft be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportShip&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can ships be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportHover&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can hovercraft be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can ground units be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = targetableTransportedUnits&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|89.0}}&lt;br /&gt;
|description = Can transported units be targeted by weapons? &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; allows both manual and automatic targeting.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Empty===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;modrules.lua&amp;lt;/code&amp;gt; can simply return an empty table like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you do this, Spring will use the default values.&lt;br /&gt;
&lt;br /&gt;
===Configurable by modoptions===&lt;br /&gt;
Interestingly &amp;lt;code&amp;gt;modrules.lua&amp;lt;/code&amp;gt; can read [[Modoptions.lua|modoptions]], so these parameters can be scripted to be configurable from the lobby.&lt;br /&gt;
For example to allow selecting either legacy default pathfinder or [[QTPFS]] via a modoption:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  system = {&lt;br /&gt;
    pathFinderSystem = (Spring.GetModOptions() and (Spring.GetModOptions().qtpfs == &amp;quot;1&amp;quot;) and 1) or 0,&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===External Examples===&lt;br /&gt;
[https://github.com/EvolutionRTS/Evolution-RTS/blob/master/Gamedata/modrules.lua &#039;Evolution RTS&#039; Modrules.lua]&lt;br /&gt;
&lt;br /&gt;
[[Category:gamedata]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Modrules.lua&amp;diff=14472</id>
		<title>Modrules.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Modrules.lua&amp;diff=14472"/>
		<updated>2021-05-30T03:34:22Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* External Examples */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Location==&lt;br /&gt;
&amp;lt;code&amp;gt;modrules.lua&amp;lt;/code&amp;gt; is a file in the &amp;lt;code&amp;gt;Gamedata/&amp;lt;/code&amp;gt; directory of a Spring game. &lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
This file controls various global parameters of the game, for example how fast units gain experience, what unit types can be transported, how fine grained the LOS system is, etc.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which parses the data from this file is viewable here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Misc/ModInfo.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
&amp;lt;code&amp;gt;Modrules.lua&amp;lt;/code&amp;gt; is divided into several sub-tables containing tags specific to each section, as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===capture===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much of the original energy cost it requires to capture something.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===construction===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constructionDecay&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Do uncompleted building frames begin to decay if no builder is working on them?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constructionDecayTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 6.66&lt;br /&gt;
|description = The time in seconds before abandoned building frames begin to decay.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constructionDecaySpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.03&lt;br /&gt;
|description = How fast build progress decays for abandoned building frames. Note that the rate is inversely proportional to the {{xtaglink|Gamedev:UnitDefs|buildtime}} i.e. a building with a larger {{xtaglink|Gamedev:UnitDefs|buildtime}} will decay more slowly for a given value of this tag than a building with a shorter {{xtaglink|Gamedev:UnitDefs|buildtime}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===experience===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = experienceMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls the amount of experience gained by units engaging in combat. The formulae used are: &lt;br /&gt;
::&amp;lt;code&amp;gt;xp for damage = 0.1 * experienceMult * damage / target_HP * target_power / attacker_power&amp;lt;/code&amp;gt; &lt;br /&gt;
::&amp;lt;code&amp;gt;xp for kill = 0.1 * experienceMult * target_power / attacker_power&amp;lt;/code&amp;gt;. &lt;br /&gt;
: Where {{xtaglink|Gamedev:UnitDefs|power}} can be set by the UnitDef tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = powerScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how gaining experience changes the relative {{xtaglink|Gamedev:UnitDefs|power}} of the unit. The formula used is &amp;lt;code&amp;gt;Power multiplier = powerScale * (1 + xp / (xp + 1))&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = healthScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.7&lt;br /&gt;
|description = Controls how gaining experience increases the {{xtaglink|Gamedev:UnitDefs|maxDamage}} (total hitpoints) of the unit. The formula used is &amp;lt;code&amp;gt;Health multiplier = healthScale * (1 + xp / (xp + 1))&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reloadScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.4&lt;br /&gt;
|description = Controls how gaining experience decreases the {{xtaglink|Gamedev:UnitDefs|reloadTime}} of the unit&#039;s weapons. The formula used is &amp;lt;code&amp;gt;Rate of fire multiplier = reloadScale * (1 + xp / (xp + 1))&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===featureLOS===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = featureVisibility&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 3&lt;br /&gt;
|description = Controls the visibility of features. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - no default LOS for features, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Gaia features always visible, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - allyteam &amp;amp; Gaia features always visible, or &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; - all features always visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===fireAtDead===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireAtKilled&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Will units continue to target and fire on enemies which are running their &amp;lt;code&amp;gt;Killed()&amp;lt;/code&amp;gt; animation? (See [[Animation-LuaCallins#Generic]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireAtCrashing&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Will units continue to target and fire on enemy aircraft which are in the &#039;crashing&#039; state? (See [[Lua_SyncedCtrl#Unit_Control]])&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===flankingBonus===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = defaultMode&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = The default {{xtaglink|Gamedev:UnitDefs|flankingBonusMode}} for units. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - No flanking bonus. Mode &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; builds up the ability to move over time, and swings to face attacks, but does not respect the way the unit is facing. Mode &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; also can swing, but moves with the unit as it turns. Mode &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; stays with the unit as it turns and otherwise doesn&#039;t move, the ideal mode to simulate something such as tank armour. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===los===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = losMipLevel&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls the resolution of the LOS calculations. A higher value means lower resolution but increased performance. An increase by one level means half the resolution of the LOS map in both x and y direction. Must be between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;6&amp;lt;/code&amp;gt; inclusive.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = losMul&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|special = {{removed|101.0}}&lt;br /&gt;
|description = Multiplies all unit&#039;s {{xtaglink|Gamedev:UnitDefs|sightDistance}} by this value. Generally speaking you should always use the default.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airMipLevel&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls the resolution of the LOS vs. aircraft calculations. A higher value means lower resolution but increased performance. An increase by one level means half the resolution of the air-LOS map in both x and y direction. Must be between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;30&amp;lt;/code&amp;gt; inclusive. [http://springrts.com/mantis/view.php?id=4031#c11709] - jK describe for you what the value means.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airLosMul&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|special = {{removed|101.0}}&lt;br /&gt;
|description = Multiplies all unit&#039;s {{xtaglink|Gamedev:UnitDefs|airSightDistance}} by this value. Generally speaking you should always use the default.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarMipLevel&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 2&lt;br /&gt;
|description = Controls the resolution of the radar. See description of airMipLevel for details.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===movement===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowAirPlanesToLeaveMap&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Are (gunship) aircraft allowed to fly outside the bounds of the map?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowAircraftToHitGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|90.0}}&lt;br /&gt;
|description = Are aircraft allowed to hit the ground whilst manoeuvring?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowPushingEnemyUnits&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|83.0}}&lt;br /&gt;
|description = Can enemy ground units push each other during collisions?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowCrushingAlliedUnits&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|85.0}}&lt;br /&gt;
|description = Can allied ground units crush each other during collisions? Units still have to be explicitly set as crushable using the &amp;lt;code&amp;gt;crushable&amp;lt;/code&amp;gt; parameter of [[Lua_SyncedCtrl#Unit_Control|Spring.SetUnitBlocking]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowUnitCollisionDamage&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|85.0}}&lt;br /&gt;
|description = Do unit-unit (skidding) collisions cause damage?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowUnitCollisionOverlap&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|89.0}}&lt;br /&gt;
|description = Can mobile units collision volumes overlap one another? Allows unit movement like [http://www.youtube.com/watch?v=mRtePUdVk2o this (video)] at the cost of more &#039;clumping&#039;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowGroundUnitGravity&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|92.0}}&lt;br /&gt;
|description = Allows fast moving mobile units to &#039;catch air&#039; as they move over terrain.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowHoverUnitStrafing&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true if using QTPFS pathfinder&lt;br /&gt;
|special = {{new|92.0}}&lt;br /&gt;
|description = Allows hovercraft units to slide in turns.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useClassicGroundMoveType&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|89.0}} {{removed|102.0}}&lt;br /&gt;
|description = A ticket back to unit movement circa 2009: no reversing, no {{xtaglink|Gamedev:UnitDefs|turninplace|false}}, no smooth collision handling, no nothing. For comparison of pathfinding code.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===paralyze===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = paralyzeOnMaxHealth&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Are units paralyzed when the level of emp is greater than their current health or their maximum health?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===reclaim===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = multiReclaim&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = Can multiple units reclaim a feature or only one? &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; implies the latter, all other values the former.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimMethod&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls how features are reclaimed. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - gradual reclaim, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - all reclaimed at end, any other positive value &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - reclaim in &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; chunks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitMethod&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = Controls how units are reclaimed. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - gradual reclaim, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - all reclaimed at end, any other positive value &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; - reclaim in &amp;lt;code&amp;gt;n&amp;lt;/code&amp;gt; chunks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = featureEnergyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much energy should reclaiming a feature cost? Multiplier against the fraction of the features&#039; {{xtaglink|Gamedev:FeatureDefs|metal}} content reclaimed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitEnergyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much energy should reclaiming a unit cost? Multiplier against the fraction of the unit&#039;s {{xtaglink|Gamedev:UnitDefs|buildCostEnergy}} reclaimed. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitEfficiency&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How much metal should reclaiming a unit return? Multiplier against the unit&#039;s {{xtaglink|Gamedev:UnitDefs|buildCostMetal}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowEnemies&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can enemy units be reclaimed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowAllies&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can allied units be reclaimed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===repair===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much of the original energy cost it requires to repair something.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===resurrect===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyCostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = How much of the original energy cost it requires to resurrect something.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
===sensors===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = requireSonarUnderWater&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then when underwater, units only get LOS if they also have sonar.&lt;br /&gt;
}}&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisibleOverridesCloaked&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|101.0}}&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then units will be visible even when cloaked (probably?).&lt;br /&gt;
}}&lt;br /&gt;
{{tag&lt;br /&gt;
|name = separateJammers&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|101.0}}&lt;br /&gt;
|description = When &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; each allyTeam only jams their own units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===system===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pathFinderSystem&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|special={{new|85.0}}&lt;br /&gt;
|description = Which pathfinder does the game use? Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - The legacy default pathfinder, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Quad-Tree Pathfinder System ([[QTPFS]])}} or &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - disabled.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pathFinderUpdateRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.007&lt;br /&gt;
|special={{new|98.0}}&lt;br /&gt;
|description = Controls how often the pathfinder updates; larger values means more rapid updates.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowTake&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|103.0}}&lt;br /&gt;
|description = Enables and disables the {{var|/take}} [[UI_commands|UI command]].}}&lt;br /&gt;
&lt;br /&gt;
===transportability===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportAir&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can aircraft be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportShip&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can ships be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportHover&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can hovercraft be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can ground units be transported?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = targetableTransportedUnits&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|89.0}}&lt;br /&gt;
|description = Can transported units be targeted by weapons? &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; allows both manual and automatic targeting.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
===Empty===&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;modrules.lua&amp;lt;/code&amp;gt; can simply return an empty table like this:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
return {}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
If you do this, Spring will use the default values.&lt;br /&gt;
&lt;br /&gt;
===Configurable by modoptions===&lt;br /&gt;
Interestingly &amp;lt;code&amp;gt;modrules.lua&amp;lt;/code&amp;gt; can read [[Modoptions.lua|modoptions]], so these parameters can be scripted to be configurable from the lobby.&lt;br /&gt;
For example to allow selecting either legacy default pathfinder or [[QTPFS]] via a modoption:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  system = {&lt;br /&gt;
    pathFinderSystem = (Spring.GetModOptions() and (Spring.GetModOptions().qtpfs == &amp;quot;1&amp;quot;) and 1) or 0,&lt;br /&gt;
  },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===External Examples===&lt;br /&gt;
[https://github.com/EvolutionRTS/Evolution-RTS/blob/master/Gamedata/modrules.lua &#039;Evolution RTS&#039; Modrules.lua]&lt;br /&gt;
&lt;br /&gt;
[[Category:gamedata]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_UnitDefs&amp;diff=12151</id>
		<title>Lua UnitDefs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_UnitDefs&amp;diff=12151"/>
		<updated>2020-02-14T02:57:44Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Add helpful &amp;quot;are you lost?&amp;quot; to page so that perhaps people who end up on the wrong page will figure it out sooner rather than later.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Lua_Scripting|Lua Scripting]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Were you looking for the unitDefs page for Game Developers?&#039;&#039;&#039; ([[Gamedev:UnitDefs]])&lt;br /&gt;
&lt;br /&gt;
==What is this==&lt;br /&gt;
The &#039;&#039;&#039;UnitDefs[]&#039;&#039;&#039; table holds information about the unit&#039;&#039;&#039;types&#039;&#039;&#039; used in the game. It is indexed by a number, and normally refered to as unitDefID. It is read-only. To access its tags you write, for example,&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    UnitDefs[unitDefID].name&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Note:&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
The name of the keys often vary from the ones in the [[Gamedev:UnitDefs]] files.&lt;br /&gt;
For example &#039;&#039;maxDamage&#039;&#039; is named &#039;&#039;health&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
==UnitDefs reverse lookup: UnitDefNames==&lt;br /&gt;
The &#039;&#039;&#039;UnitDefNames[]&#039;&#039;&#039; table holds the unitdefs and can be used to get the unitdef table for a known unitname:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    local unitDef = UnitDefNames[&amp;quot;supertank&amp;quot;]&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Print all unitDefs==&lt;br /&gt;
This example code prints all unitdefs, with all keys and their values (but not their subtables).&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
  for id,unitDef in pairs(UnitDefs) do&lt;br /&gt;
    for name,param in unitDef:pairs() do&lt;br /&gt;
      Spring.Echo(name,param)&lt;br /&gt;
    end&lt;br /&gt;
  end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Note that unitDef is a metatable, and requires the special iterator unitDef:pairs()&lt;br /&gt;
&lt;br /&gt;
==Useful keys/snippets==&lt;br /&gt;
&amp;lt;code&amp;gt; UnitDefs[unitDefID].id &amp;lt;/code&amp;gt; - gives back the unitDefID &lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; UnitDefs[unitDefID].name &amp;lt;/code&amp;gt; - the internal unit name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt; UnitDefs[unitDefID].humanName &amp;lt;/code&amp;gt; - the displayed unit name&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;UnitDefs[unitDefID].weapons&amp;lt;/code&amp;gt; - See [[Lua_WeaponDefs]], &amp;lt;code&amp;gt;UnitDefs[unitDefID].weapons[1].weaponDef&amp;lt;/code&amp;gt; returns the weaponDefID of the units first weapon, which apppears in the WeaponsDef table as &amp;lt;code&amp;gt;WeaponDefs[weaponDefID]&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
To read [[Gamedev:UnitDefs#customParams|custom parameters]] use:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    local myCustomParameters = UnitDefs[unitDefID].customParams&lt;br /&gt;
    if (myCustomParameters) then&lt;br /&gt;
      blub = myCustomParameters.blubfactor&lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
Key-names of the customParams table written must be lowercase and their values can only be strings.&lt;br /&gt;
&lt;br /&gt;
===Types of Units===&lt;br /&gt;
Sometimes one wants to check type of unit. Like is it a factory, is it a transport and so on.&lt;br /&gt;
Complete list: &amp;lt;ref&amp;gt;&#039;&#039;Spring 95, commit message&#039;&#039;,{{Sourcelinkhash|4e58b8b0f7af04065878d34e5e17523246739b0c}}&amp;lt;/ref&amp;gt;&lt;br /&gt;
&lt;br /&gt;
*isTransport&lt;br /&gt;
*isImmobile&lt;br /&gt;
*isBuilding&lt;br /&gt;
*isBuilder&lt;br /&gt;
*isMobileBuilder&lt;br /&gt;
*isStaticBuilder&lt;br /&gt;
*isFactory&lt;br /&gt;
*isExtractor&lt;br /&gt;
*isGroundUnit&lt;br /&gt;
*isAirUnit&lt;br /&gt;
*isStrafingAirUnit&lt;br /&gt;
*isHoveringAirUnit&lt;br /&gt;
*isFighterAirUnit&lt;br /&gt;
*isBomberAirUnit&lt;br /&gt;
&lt;br /&gt;
==Example UnitDef table==&lt;br /&gt;
In the form of key = value, where UnitDefs[unitDefID].key = value, with subtables at the bottom.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    activateWhenBuilt = true,&lt;br /&gt;
    airLosRadius = 5.2734375,&lt;br /&gt;
    airStrafe = true,&lt;br /&gt;
    armorType = 3,&lt;br /&gt;
    armoredMultiple = 1,&lt;br /&gt;
    autoHeal = 2.5,&lt;br /&gt;
    bankingAllowed = true,&lt;br /&gt;
    buildDistance = 112,&lt;br /&gt;
    buildRange3D = false,&lt;br /&gt;
    buildSpeed = 300,&lt;br /&gt;
    buildTime = 75000,&lt;br /&gt;
    builder = false,&lt;br /&gt;
    buildingDecalDecaySpeed = 0.10000000149012,&lt;br /&gt;
    buildingDecalSizeX = 4,&lt;br /&gt;
    buildingDecalSizeY = 4,&lt;br /&gt;
    buildingDecalType = -1,&lt;br /&gt;
    buildpicname = &amp;quot;CORCOM.DDS&amp;quot;,&lt;br /&gt;
    canAssist = true,&lt;br /&gt;
    canAttack = true,&lt;br /&gt;
    canAttackWater = true,&lt;br /&gt;
    canBeAssisted = true,&lt;br /&gt;
    canCapture = true,&lt;br /&gt;
    canCloak = true,&lt;br /&gt;
    canCrash = false,&lt;br /&gt;
    canDGun = false,&lt;br /&gt;
    canDropFlare = false,&lt;br /&gt;
    canFight = true,&lt;br /&gt;
    canFireControl = true,&lt;br /&gt;
    canFly = false,&lt;br /&gt;
    canGuard = true,&lt;br /&gt;
    canKamikaze = false,&lt;br /&gt;
    canLoopbackAttack = false,&lt;br /&gt;
    canManualFire = true,&lt;br /&gt;
    canMove = true,&lt;br /&gt;
    canParalyze = false,&lt;br /&gt;
    canPatrol = true,&lt;br /&gt;
    canReclaim = true,&lt;br /&gt;
    canRepair = true,&lt;br /&gt;
    canRepeat = true,&lt;br /&gt;
    canRestore = true,&lt;br /&gt;
    canResurrect = false,&lt;br /&gt;
    canSelfD = true,&lt;br /&gt;
    canSelfRepair = false,&lt;br /&gt;
    canStockpile = false,&lt;br /&gt;
    canSubmerge = false,&lt;br /&gt;
    cantBeTransported = false,&lt;br /&gt;
    capturable = true,&lt;br /&gt;
    captureSpeed = 900,&lt;br /&gt;
    cloakCost = 100,&lt;br /&gt;
    cloakCostMoving = 1000,&lt;br /&gt;
    cloakTimeout = 128,&lt;br /&gt;
    cobID = -1,&lt;br /&gt;
    collide = true,&lt;br /&gt;
    cost = 3111.4499511719,&lt;br /&gt;
    crashDrag = 0.0049999998882413,&lt;br /&gt;
    deathExplosion = &amp;quot;commander_blast&amp;quot;,&lt;br /&gt;
    decloakDistance = 50,&lt;br /&gt;
    decloakOnFire = true,&lt;br /&gt;
    decloakSpherical = true,&lt;br /&gt;
    dlHoverFactor = -1,&lt;br /&gt;
    energyCost = 26667,&lt;br /&gt;
    energyMake = 25,&lt;br /&gt;
    energyStorage = 0,&lt;br /&gt;
    energyUpkeep = 0,&lt;br /&gt;
    extractRange = 0,&lt;br /&gt;
    extractsMetal = 0,&lt;br /&gt;
    factoryHeadingTakeoff = true,&lt;br /&gt;
    fallSpeed = 0.20000000298023,&lt;br /&gt;
    fireState = -1,&lt;br /&gt;
    flankingBonusDirX = 0,&lt;br /&gt;
    flankingBonusDirY = 0,&lt;br /&gt;
    flankingBonusDirZ = 1,&lt;br /&gt;
    flankingBonusMax = 1.8999999761581,&lt;br /&gt;
    flankingBonusMin = 0.89999997615814,&lt;br /&gt;
    flankingBonusMobilityAdd = 0.0099999997764826,&lt;br /&gt;
    flankingBonusMode = 1,&lt;br /&gt;
    flareDelay = 0.30000001192093,&lt;br /&gt;
    flareDropVectorX = 0,&lt;br /&gt;
    flareDropVectorY = 0,&lt;br /&gt;
    flareDropVectorZ = 0,&lt;br /&gt;
    flareEfficiency = 0.5,&lt;br /&gt;
    flareReloadTime = 5,&lt;br /&gt;
    flareSalvoDelay = 0,&lt;br /&gt;
    flareSalvoSize = 4,&lt;br /&gt;
    flareTime = 90,&lt;br /&gt;
    floatOnWater = false,&lt;br /&gt;
    floater = false,&lt;br /&gt;
    frontToSpeed = 0.10000000149012,&lt;br /&gt;
    fullHealthFactory = false,&lt;br /&gt;
    hasShield = false,&lt;br /&gt;
    health = 3000,&lt;br /&gt;
    height = 50,&lt;br /&gt;
    hideDamage = true,&lt;br /&gt;
    highTrajectoryType = 0,&lt;br /&gt;
    holdSteady = false,&lt;br /&gt;
    hoverAttack = false,&lt;br /&gt;
    humanName = &amp;quot;Commander&amp;quot;,&lt;br /&gt;
    iconType = &amp;quot;corcom.user&amp;quot;,&lt;br /&gt;
    id = 261,&lt;br /&gt;
    idleAutoHeal = 2.5,&lt;br /&gt;
    idleTime = 1800,&lt;br /&gt;
    isAirBase = false,&lt;br /&gt;
    isAirUnit = false,&lt;br /&gt;
    isBomberAirUnit = false,&lt;br /&gt;
    isBuilder = true,&lt;br /&gt;
    isBuilding = false,&lt;br /&gt;
    isCommander = false,&lt;br /&gt;
    isExtractor = false,&lt;br /&gt;
    isFactory = false,&lt;br /&gt;
    isFeature = false,&lt;br /&gt;
    isFighterAirUnit = false,&lt;br /&gt;
    isFirePlatform = false,&lt;br /&gt;
    isGroundUnit = true,&lt;br /&gt;
    isHoveringAirUnit = false,&lt;br /&gt;
    isImmobile = false,&lt;br /&gt;
    isMobileBuilder = true,&lt;br /&gt;
    isStaticBuilder = false,&lt;br /&gt;
    isStrafingAirUnit = false,&lt;br /&gt;
    isTransport = false,&lt;br /&gt;
    jammerRadius = 0,&lt;br /&gt;
    kamikazeDist = 0,&lt;br /&gt;
    kamikazeUseLOS = false,&lt;br /&gt;
    leaveTracks = false,&lt;br /&gt;
    levelGround = true,&lt;br /&gt;
    loadingRadius = 220,&lt;br /&gt;
    losHeight = 40,&lt;br /&gt;
    losRadius = 14.0625,&lt;br /&gt;
    makesMetal = 0,&lt;br /&gt;
    mass = 5000,&lt;br /&gt;
    maxAcc = 0.18000000715256,&lt;br /&gt;
    maxAileron = 0.014999999664724,&lt;br /&gt;
    maxBank = 0.80000001192093,&lt;br /&gt;
    maxCoverage = 0,&lt;br /&gt;
    maxDec = 1.125,&lt;br /&gt;
    maxElevator = 0.0099999997764826,&lt;br /&gt;
    maxFuel = 0,&lt;br /&gt;
    maxHeightDif = 14.558809280396,&lt;br /&gt;
    maxPitch = 0.44999998807907,&lt;br /&gt;
    maxRepairSpeed = 300,&lt;br /&gt;
    maxRudder = 0.0040000001899898,&lt;br /&gt;
    maxSlope = -1,&lt;br /&gt;
    maxThisUnit = 32000,&lt;br /&gt;
    maxWaterDepth = 35,&lt;br /&gt;
    maxWeaponRange = 300,&lt;br /&gt;
    maxx = 17.423709869385,&lt;br /&gt;
    maxy = 48.386325836182,&lt;br /&gt;
    maxz = 14.10532283783,&lt;br /&gt;
    metalCost = 2667,&lt;br /&gt;
    metalMake = 1.5,&lt;br /&gt;
    metalStorage = 0,&lt;br /&gt;
    metalUpkeep = 0,&lt;br /&gt;
    midx = 0.66120779514313,&lt;br /&gt;
    midy = 19,&lt;br /&gt;
    midz = 1.7122877836227,&lt;br /&gt;
    minAirBasePower = 0,&lt;br /&gt;
    minCollisionSpeed = 1,&lt;br /&gt;
    minWaterDepth = -10000000,&lt;br /&gt;
    minx = -16.537784576416,&lt;br /&gt;
    miny = 0.058725833892822,&lt;br /&gt;
    minz = -9.709508895874,&lt;br /&gt;
    moveState = -1,&lt;br /&gt;
    myGravity = 0.40000000596046,&lt;br /&gt;
    name = &amp;quot;corcom&amp;quot;,&lt;br /&gt;
    nanoColorB = 0.20000000298023,&lt;br /&gt;
    nanoColorG = 0.69999998807907,&lt;br /&gt;
    nanoColorR = 0.20000000298023,&lt;br /&gt;
    needGeo = false,&lt;br /&gt;
    onOffable = false,&lt;br /&gt;
    power = 3111.4499511719,&lt;br /&gt;
    primaryWeapon = 2,&lt;br /&gt;
    rSpeed = 0,&lt;br /&gt;
    radarRadius = 700,&lt;br /&gt;
    radius = 22,&lt;br /&gt;
    reclaimSpeed = 300,&lt;br /&gt;
    reclaimable = false,&lt;br /&gt;
    refuelTime = 5,&lt;br /&gt;
    releaseHeld = false,&lt;br /&gt;
    reloadTime = 1,&lt;br /&gt;
    repairSpeed = 300,&lt;br /&gt;
    repairable = true,&lt;br /&gt;
    resurrectSpeed = 300,&lt;br /&gt;
    scriptName = &amp;quot;corcom.cob&amp;quot;,&lt;br /&gt;
    scriptPath = &amp;quot;corcom.cob&amp;quot;,&lt;br /&gt;
    seismicRadius = 0,&lt;br /&gt;
    seismicSignature = 0,&lt;br /&gt;
    selfDCountdown = 5,&lt;br /&gt;
    selfDExplosion = &amp;quot;commander_blast&amp;quot;,&lt;br /&gt;
    shieldPower = -1,&lt;br /&gt;
    showNanoFrame = true,&lt;br /&gt;
    showNanoSpray = true,&lt;br /&gt;
    showPlayerName = true,&lt;br /&gt;
    slideTolerance = 0,&lt;br /&gt;
    sonarJamRadius = 0,&lt;br /&gt;
    sonarRadius = 300,&lt;br /&gt;
    sonarStealth = false,&lt;br /&gt;
    speed = 37.5,&lt;br /&gt;
    speedToFront = 0.070000000298023,&lt;br /&gt;
    startCloaked = false,&lt;br /&gt;
    stealth = false,&lt;br /&gt;
    strafeToAttack = false,&lt;br /&gt;
    targfac = false,&lt;br /&gt;
    techLevel = 0,&lt;br /&gt;
    terraformSpeed = 1500,&lt;br /&gt;
    tidalGenerator = 0,&lt;br /&gt;
    tooltip = &amp;quot;Commander&amp;quot;,&lt;br /&gt;
    totalEnergyOut = 25,&lt;br /&gt;
    trackOffset = 0,&lt;br /&gt;
    trackStrength = 0,&lt;br /&gt;
    trackStretch = 1,&lt;br /&gt;
    trackType = -1,&lt;br /&gt;
    trackWidth = 32,&lt;br /&gt;
    transportByEnemy = false,&lt;br /&gt;
    transportCapacity = 0,&lt;br /&gt;
    transportMass = 100000,&lt;br /&gt;
    transportSize = 0,&lt;br /&gt;
    transportUnloadMethod = 0,&lt;br /&gt;
    turnInPlace = true,&lt;br /&gt;
    turnInPlaceSpeedLimit = 0.82499998807907,&lt;br /&gt;
    turnRadius = 500,&lt;br /&gt;
    turnRate = 1133,&lt;br /&gt;
    type = &amp;quot;&amp;quot;,&lt;br /&gt;
    unitFallSpeed = 0,&lt;br /&gt;
    upright = true,&lt;br /&gt;
    useBuildingGroundDecal = false,&lt;br /&gt;
    useSmoothMesh = true,&lt;br /&gt;
    verticalSpeed = 3,&lt;br /&gt;
    wantedHeight = 0,&lt;br /&gt;
    waterline = 0,&lt;br /&gt;
    windGenerator = 0,&lt;br /&gt;
    wingAngle = 0.079999998211861,&lt;br /&gt;
    wingDrag = 0.070000000298023,&lt;br /&gt;
    wreckName = &amp;quot;corcom_dead&amp;quot;,&lt;br /&gt;
    xsize = 4,&lt;br /&gt;
    zsize = 4,&lt;br /&gt;
&lt;br /&gt;
    buildOptions = {&lt;br /&gt;
        [1] = unitDefID1,&lt;br /&gt;
        [2] = unitDefID2,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
    collisionVolume = {&lt;br /&gt;
        boundingRadius = 1.0893974967364e-026,&lt;br /&gt;
        defaultToFootPrint = false,&lt;br /&gt;
        defaultToPieceTree = false,&lt;br /&gt;
        defaultToSphere = false,&lt;br /&gt;
        offsetX = 0,&lt;br /&gt;
        offsetY = 1,&lt;br /&gt;
        offsetZ = 1.089395031546e-026,&lt;br /&gt;
        scaleX = 6.4911419586111e-027,&lt;br /&gt;
        scaleY = 1.9340968033141e-038,&lt;br /&gt;
        scaleZ = 1.0894122878784e-026,&lt;br /&gt;
        type = &amp;quot;ellipsoid&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    customParams = {&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
    modCategories = {&lt;br /&gt;
        all = true,&lt;br /&gt;
        commander = true,&lt;br /&gt;
        notair = true,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
    model = {&lt;br /&gt;
        name = &amp;quot;CORCOM.s3o&amp;quot;,&lt;br /&gt;
        path = &amp;quot;objects3d/CORCOM.s3o&amp;quot;,&lt;br /&gt;
        type = &amp;quot;s3o&amp;quot;,&lt;br /&gt;
        textures = {&lt;br /&gt;
            tex1 = &amp;quot;Core_color.dds&amp;quot;,&lt;br /&gt;
            tex2 = &amp;quot;Core_other.dds&amp;quot;,&lt;br /&gt;
        },&lt;br /&gt;
    },&lt;br /&gt;
    moveDef = {&lt;br /&gt;
        crushStrength = 50,&lt;br /&gt;
        depth = 5000,&lt;br /&gt;
        depthMod = 0,&lt;br /&gt;
        family = &amp;quot;kbot&amp;quot;,&lt;br /&gt;
        heatMapping = false,&lt;br /&gt;
        heatMod = 0.0041666668839753,&lt;br /&gt;
        heatProduced = 60,&lt;br /&gt;
        id = 6,&lt;br /&gt;
        maxSlope = 0.41221469640732,&lt;br /&gt;
        name = &amp;quot;akbot2&amp;quot;,&lt;br /&gt;
        slopeMod = 9.6801977157593,&lt;br /&gt;
        type = &amp;quot;ground&amp;quot;,&lt;br /&gt;
        xsize = 3,&lt;br /&gt;
        zsize = 3,&lt;br /&gt;
    },&lt;br /&gt;
    noChaseCategories = {&lt;br /&gt;
        all = true,&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
    sounds = {&lt;br /&gt;
        activate = {},&lt;br /&gt;
        arrived = {},&lt;br /&gt;
        build = {&lt;br /&gt;
            [1] = {&lt;br /&gt;
                id = 208,&lt;br /&gt;
                name = &amp;quot;nanlath2&amp;quot;,&lt;br /&gt;
                volume = 1,&lt;br /&gt;
            },&lt;br /&gt;
            ...&lt;br /&gt;
        },&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
    weapons = {&lt;br /&gt;
        [1] = {&lt;br /&gt;
            fuelUsage = 0,&lt;br /&gt;
            mainDirX = 0,&lt;br /&gt;
            mainDirY = 0,&lt;br /&gt;
            mainDirZ = 0.99999564886093,&lt;br /&gt;
            maxAngleDif = -1,&lt;br /&gt;
            slavedTo = 0,&lt;br /&gt;
            weaponDef = 221,&lt;br /&gt;
            badTargets = {&lt;br /&gt;
                vtol = true,&lt;br /&gt;
            },&lt;br /&gt;
            onlyTargets = {&lt;br /&gt;
                all = true,&lt;br /&gt;
                antiemg = true,&lt;br /&gt;
                ...&lt;br /&gt;
            },&lt;br /&gt;
        },&lt;br /&gt;
        ...&lt;br /&gt;
    },&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Unit/Weapon damages and armor classes==&lt;br /&gt;
&lt;br /&gt;
For details on how to extract which units/weapons target/damage which units, see https://springrts.com/phpbb/viewtopic.php?f=44&amp;amp;t=34382&amp;amp;p=575738#p575738 (TODO: migrate info to wiki).&lt;br /&gt;
&lt;br /&gt;
==How to save unitDef tables to file==&lt;br /&gt;
To save all unitDefs to a file, including all tables, you can use&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
    local unitDef = UnitDefs[unitDefID]&lt;br /&gt;
    local t = {}&lt;br /&gt;
    for k,v in unitDef:pairs() do&lt;br /&gt;
        t[k] = v&lt;br /&gt;
    end&lt;br /&gt;
    table.save(t, &amp;quot;lua_unitDef_&amp;quot; .. unitDef.name .. &amp;quot;.lua&amp;quot;, &amp;quot;-- generated by table.save&amp;quot;)&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
The special iterator is needed because metatables. See https://springrts.com/phpbb/viewtopic.php?f=67&amp;amp;t=33778 for a widget to regenerate the example defs.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&amp;lt;references/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:UnitDefs&amp;diff=8605</id>
		<title>Gamedev:UnitDefs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:UnitDefs&amp;diff=8605"/>
		<updated>2020-02-14T02:31:18Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Nevermind, mediawiki&amp;#039;s search is even shittier than I thought.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Gamedev:Main|Development]] &amp;lt; [[Gamedev:Main]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
UnitDef files are .lua files stored in the &amp;lt;code&amp;gt;Units/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
UnitDef files have one purpose; to define the properties of units. They are the main description file for what attributes your unit should have and how it should behave.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which loads the tags from these files is viewable here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Units/UnitDef.cpp}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The engine source which reads the [[#sounds]] subtable can be found here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Units/UnitDefHandler.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
There follows a comprehensive (certain deprecated tags are not present) list of the tags available, their data type, default value and a brief description of what they do. Bear in mind that the source code linked above is the ultimate reference when dealing with these tags. &lt;br /&gt;
&lt;br /&gt;
In lua tables keys (i.e. the tags) should be lower case, here they are represented in camelCase for readability. In your files you may use the &amp;lt;code&amp;gt;lowerkeys&amp;lt;/code&amp;gt; function on your final table to ensure the keys are properly cased.&lt;br /&gt;
&lt;br /&gt;
It is usual to name the returned UnitDef table the internal &amp;lt;code&amp;gt;unitName&amp;lt;/code&amp;gt; desired for the unit.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = humanName&lt;br /&gt;
|description = This is simply the name of the unit as it appears to the player.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = description&lt;br /&gt;
|type = string&lt;br /&gt;
|default = name&lt;br /&gt;
|lua = tooltip&lt;br /&gt;
|description = This is the tooltip description of the unit seen by the player. It defaults to the {{taglink|name}} of the unit.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildPic&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = buildPicName&lt;br /&gt;
|description = The filename of the image to be used as the build picture, assumes &amp;lt;code&amp;gt;Unitpics/&amp;lt;/code&amp;gt; directory (see [[Gamedev:Buildpics]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = objectName&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = modelname&lt;br /&gt;
|description = The filename of the 3D model file for this unit, assumes &amp;lt;code&amp;gt;Objects3D/&amp;lt;/code&amp;gt; directory.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = script&lt;br /&gt;
|type = string&lt;br /&gt;
|default = unitName + &amp;quot;.cob&amp;quot;&lt;br /&gt;
|lua = scriptName&lt;br /&gt;
|description = The filename of the animation script file for this unit, assumes &amp;lt;code&amp;gt;Scripts/&amp;lt;/code&amp;gt; directory. Default assumes .cob file but [[Animation-LuaScripting | LUS]] should be preferred.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxDamage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = health&lt;br /&gt;
|description = The base &#039;hitpoints&#039; the unit will have.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = autoHeal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much health the unit will regain every second.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = idleAutoHeal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = How much health the unit will regain every second whilst it is idle.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = idleTime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 600&lt;br /&gt;
|description = The time in [[frames]] taken until a unit is considered to be idle.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildCostMetal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|lua = metalCost&lt;br /&gt;
|description = The amount of metal resource the unit costs to build. Cannot be below &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildCostEnergy&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = energyCost&lt;br /&gt;
|description = The amount of energy resource the unit costs to build.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The time taken to build the unit, in conjunction with the {{taglink|workerTime}} of the constructor. In [[Gamedev:UnitsOfMeasurement#Time|Resource Frames]], &amp;lt;code&amp;gt;Time to build = (buildTime / workerTime)&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; but cannot actually be below &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = buildCostMetal&lt;br /&gt;
|description = The mass of the unit, used in weapon impulse calculations. Cannot be less than &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be reclaimed by a builder?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = capturable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can a unit be stolen by a builder using the capture command?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = repairable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be repaired by a builder?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxRepairSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1e20&lt;br /&gt;
|description = The maximum cumulative speed at which this unit type can repair a single target.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = iconType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;default&amp;quot;&lt;br /&gt;
|description = The name of the radar icon type this unit should use (see [[Icontypes.lua]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = corpse&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = wreckName&lt;br /&gt;
|description = The name of the feature this unit should leave behind as a wreck when it dies (see [[Gamedev:FeatureDefs]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explodeAs&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of the weapon this unit should explode as when it is killed (see [[Gamedev:WeaponDefs]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selfDestructAs&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of the weapon this unit should explode as when it self destructs (see [[Gamedev:WeaponDefs]]). Also used as the {{taglink|kamikaze}} weapon.}}&lt;br /&gt;
&lt;br /&gt;
===Resources===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = harvestStorage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = {{new|97.0}}&lt;br /&gt;
|description = How much of the metal resource a unit can store when used as an engine-assisted resource &#039;harvester&#039;. See also [[Lua:Callins#API:UnitHarvestStorageFull|UnitHarvestStorageFull callin]] and [[Lua_SyncedRead#Unit_Informations|Spring.GetUnitHarvestStorage]] and [[Lua_SyncedCtrl#Unit_Resourcing|Spring.SetUnitHarvestStorage]] callouts.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalStorage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the metal resource storage the unit contributes.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyStorage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource storage the unit contributes.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = extractsMetal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the metal resource the unit extracts from the ground. The amount extracted depends on the metal map defined in the map itself. Works only for structures.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = windGenerator&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit generates which is dependant on the map wind. Works only for structures.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tidalGenerator&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit generates which is dependant on the maps tidal power. Clearly, this only works on water structures.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalUse&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = metalUpkeep&lt;br /&gt;
|description = The amount of the metal resource the unit consumes per game &#039;tick&#039; when activated.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyUse&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = energyUpkeep&lt;br /&gt;
|description = The amount of the energy resource the unit consumes per game &#039;tick&#039; when activated.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalMake&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the metal resource the unit generates unconditionally per game &#039;tick&#039;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyMake&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit generates unconditionally per game &#039;tick&#039;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = makesMetal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit turns into the metal resource per game &#039;tick&#039;.}}&lt;br /&gt;
&lt;br /&gt;
===Sensors===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = onOffable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit have an on/off button? Currently the activation status tied to this button also turns sensors (other than LOS) on and off.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = activateWhenBuilt&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the unit&#039;s activation status be on or off when it is created?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sightDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = losRadius&lt;br /&gt;
|description = The radius of the units sight (LOS is circular in Spring). &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airSightDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.5 * sightDistance&lt;br /&gt;
|lua = airLosRadius&lt;br /&gt;
|description = How far away the unit can see aircraft (and some FX).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = losEmitHeight&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 20.0&lt;br /&gt;
|lua = losHeight &lt;br /&gt;
|special = {{new|83.0}}&lt;br /&gt;
|description = How high up the unit is the point used to calculate it&#039;s LOS vs. the terrain?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarEmitHeight&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 20.0&lt;br /&gt;
|lua = radarHeight&lt;br /&gt;
|special = {{new|83.0}}&lt;br /&gt;
|description = How high up the unit is the point used to calculate it&#039;s radar vs. the terrain?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = radarRadius&lt;br /&gt;
|description = The radius of the units radar.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sonarDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = sonarRadius&lt;br /&gt;
|description = The radius of the units sonar.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarDistanceJam&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = jammerRadius&lt;br /&gt;
|description = The radius of the units radar jamming.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sonarDistanceJam&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = sonarJamRadius&lt;br /&gt;
|description = The radius of the units sonar jamming.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = stealth&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the unit undetectable by radar?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sonarStealth&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the unit undetectable by sonar?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = seismicDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = seismicRadius&lt;br /&gt;
|description = The radius of the unit&#039;s seismic (movement) sensor.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = seismicSignature&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0 for units with {{taglink|floater}}, {{taglink|canHover}} or {{taglink|canFly}}, otherwise sqrt(mass / 100.0)&lt;br /&gt;
|description = How fast the seismic ring expands in [[elmo]]s per frame. Each ping always lasts 15 [[frames]], so this also determines the maximum radius of the seismic ring.}}&lt;br /&gt;
&lt;br /&gt;
====Cloaking====&lt;br /&gt;
For units with {{taglink|canCloak|true}}:&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cloakCost&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The energy cost per tick to cloak the unit while it is stationary.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cloakCostMoving&lt;br /&gt;
|type = float&lt;br /&gt;
|default = cloakCost&lt;br /&gt;
|description = The energy cost per tick to cloak the unit while it is moving.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = initCloaked&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = startCloaked&lt;br /&gt;
|description = Is the unit cloaked as soon as it is created?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minCloakDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum distance (radius) which the unit must be from any enemy units to remain cloaked.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = decloakSpherical&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does {{taglink|minCloakDistance}} apply in 3D or only 2D? i.e. can aircraft flying above the unit decloak it?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = decloakOnFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit decloak when it fires a weapon?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cloakTimeout&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 128&lt;br /&gt;
|description = The minimum time, in [[frames]], between a decloak and subsequent re-cloak.}}&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canMove&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the unit be issued Move orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Attack orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canFight&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Fight orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canPatrol&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Patrol orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canGuard&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Guard orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
| name = canCloak&lt;br /&gt;
| type = bool&lt;br /&gt;
| default = false&lt;br /&gt;
| description =&lt;br /&gt;
Can the unit be issued Cloak orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canRepeat&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Repeat orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canSelfDestruct&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|lua = canSelfD&lt;br /&gt;
|description = Can the unit be issued a self destruct order?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = moveState&lt;br /&gt;
|type = int&lt;br /&gt;
|default = -1 for mobile units, 1 for structures&lt;br /&gt;
|description = The initial movement state for the unit. Can be {{value|-1}} - Inherits from factory, {{value|0}} - Hold Position, {{value|1}} - Manoeuvre or {{value|2}} - Roam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireState&lt;br /&gt;
|type = int&lt;br /&gt;
|default = -1 for units with {{taglink|noAutoFire|false}}, 2 otherwise&lt;br /&gt;
|description = The initial firing state for the unit. Can be {{value|-1}} - Inherits from factory, {{value|0}} - Hold Fire, {{value|1}} - Return Fire or {{value|2}} - Fire At Will. Since 104.0 there is an additional value {{value|3}} - Fire At Neutral.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noAutoFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = canFireControl&lt;br /&gt;
|description = Controls whether or not the unit has a fire state button.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canManualFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = description = Can the unit be issued ManualFire commands? A ManualFire command will fire any weapons with the {{xtaglink|Gamedev:WeaponDefs|commandfire}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Builder Commands====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canRestore&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|terraformSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued restore terrain commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canRepair&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|repairSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued repair commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canReclaim&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|reclaimSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued reclaim commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canResurrect&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|resurrectSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued resurrection commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canCapture&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|captureSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued capture commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Builder===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = builder&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = isBuilder&lt;br /&gt;
|description = Is the unit a builder?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 128.0&lt;br /&gt;
|description = How far away from itself the unit can build, measured to the centre of the unit being built. The minimum value is &amp;lt;code&amp;gt;38.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildRange3D&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the builders {{taglink|buildDistance}} apply in all 3 dimensions or only 2?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = workerTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = buildSpeed&lt;br /&gt;
|description = How fast the builder builds, used in conjunction with the {{taglink|buildTime}} of the unit being built. Effectively, &amp;lt;code&amp;gt;Time to build = buildTime / workerTime&amp;lt;/code&amp;gt;. If this value is &amp;lt;= &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; then {{taglink|builder}} is set to false.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = repairSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can repair other units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can reclaim other units and features.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = resurrectSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can resurrect corpse features back into living units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = captureSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can capture other units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = terraformSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder levels and restores terrain.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canAssist&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder&lt;br /&gt;
|description = Can the builder assist other constructions?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canBeAssisted&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the builder be assisted by other builders?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canSelfRepair&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the builder repair itself?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = showNanoSpray&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the builder emit OTA-style nanospray whilst constructing?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = nanoColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.2, 0.7, 0.2} aka green&lt;br /&gt;
|description = The RGB colour of a builders&#039; emitted nano particles if {{taglink|showNanoSpray|true}}. Also controls the RBG colour of a unit&#039;s own nanoframe if {{taglink|showNanoFrame|true}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fullHealthFactory&lt;br /&gt;
|type = bool&lt;br /&gt;
|defaul[[elmo]]s&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, units are repaired before they are allowed to leave the factory i.e. units from this factory will be healed back to 100% health if they are damaged during construction.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isAirbase&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = Is this unit an airbase? Aircraft may land and repair on units which are airbases.}}&lt;br /&gt;
&lt;br /&gt;
===Movement &amp;amp; Placement===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = &lt;br /&gt;
How wide the unit is in footprint units, left to right. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Movedefs.lua|footprintX}} of its {{taglink|movementClass}}. Also used for obstacle avoidance.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintZ&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = &lt;br /&gt;
How wide the unit is in footprint units, top to bottom. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Movedefs.lua|footprintZ}} of its {{taglink|movementClass}}. Also used for obstacle avoidance.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = yardmap&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = &lt;br /&gt;
Used to determine a structure from a mobile unit. A string of characters which defines in detail each &#039;footprint square&#039; of the structure. Each footprint square may be: &lt;br /&gt;
:: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; - &#039;Yard&#039; - Always open, unblocking, &lt;br /&gt;
:: &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; - &#039;Construction&#039; - Open and unblocking only while constructing (for factories, controlled via &amp;lt;code&amp;gt;COB.YARD_OPEN&amp;lt;/code&amp;gt; see [[Animation-LuaCallouts#Other]]), &lt;br /&gt;
:: &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; - &#039;Inversed Construction&#039; - Closed and blocking only while constructing (for factories, controlled via &amp;lt;code&amp;gt;COB.YARD_OPEN&amp;lt;/code&amp;gt; see [[Animation-LuaCallouts#Other]]) ({{new|89.0}}), &lt;br /&gt;
:: &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt; - &#039;Geothermal&#039; - Flags that the unit must be placed over a {{xtaglink|Gamedev:FeatureDefs|geoThermal}} feature, does not actually count as a square, &lt;br /&gt;
:: &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt; - &#039;High Resolution&#039; - Indicates that the yardmap will use double resolution with four times as many characters. Must be the &#039;&#039;&#039;first&#039;&#039;&#039; character, and does not count as a square itself ({{new|93.0}}),&lt;br /&gt;
::&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; - &#039;Obstacle&#039; - Always closed, blocking, all other chars are treated the same way.&lt;br /&gt;
: Tip: &#039;Draw&#039; out the yardmap over multiple lines. As of &amp;lt;span class=warning&amp;gt;89.0&amp;lt;/span&amp;gt; all whitespace characters are ignored, including newlines.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingMask&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = [http://en.wikipedia.org/wiki/Mask_(computing) Bitmask] representing the types of ground that this structure can be built on. Each digit of binary that is set to one means that a ground square with the corresponding digit set via [[Lua_SyncedCtrl#Ground|Spring.SetSquareBuildingMask]] can be built on.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = levelGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = For structures. Does the constructor have to level the ground underneath the build area before beginning to build the structure?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = movementClass&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = moveDef.name&lt;br /&gt;
|description = The name of the movement type a mobile, non aircraft, unit should use. See [[Movedefs.lua]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canHover&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Removed in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
|description = Is the unit a hovercraft? Hovercraft can cross water of any depth without a speed penalty. Hover&#039;s must also have &amp;lt;code&amp;gt;HOVER&amp;lt;/code&amp;gt; within the name of their {{taglink|movementClass}} (see [[Movedefs.lua]]).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = floater&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false if a {{taglink|moveClass}} is defined, if not true if {{taglink|waterline|true}}, false otherwise&lt;br /&gt;
|description = When a mobile unit is crossing water, or a structure is placed on water, does it float on top of the water or crawl / lay on the sea bed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = upright&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit follow the terrain or always remain upright? Generally used for walkers.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxSlope&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = maxHeightDif&lt;br /&gt;
|description = The maximum slope a building can be placed on. Mobile unit&#039;s use the {{xtaglink|Movedefs.lua|maxSlope}} set in their {{taglink|movementClass}}. The value is in degrees and is clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;89.0&amp;lt;/code&amp;gt;. This value is converted to a &amp;quot;maximum allowed height difference&amp;quot; (call it M), which involves a hard-coded constant. When a building gets placed, the height of each of its footprint squares is compared to a reference height (calculated for the build position). If the difference exceeds M for any square, that build position is rejected. The value readable from lua has been changed from that in the unitdef and reflects the internal engine value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = -10e6&lt;br /&gt;
|description = The minimum depth of water a building can be placed on. Mobile unit&#039;s use the {{xtaglink|Movedefs.lua|minWaterDepth}} set in their {{taglink|movementClass}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10e6&lt;br /&gt;
|description = The maximum depth of water a building can be placed on. Mobile unit&#039;s use the {{xtaglink|Movedefs.lua|maxWaterDepth}} set in their {{taglink|movementClass}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = waterline&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How low in the water does a ship sit? Higher values means the ship is lower in the water.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minCollisionSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The minimum net impact speed that will cause a unit to be damaged by collisions with another unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pushResistant&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the unit be pushed around by other units? Turning it on doesn&#039;t remove all pushing but is a marked improvement.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxVelocity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = speed&lt;br /&gt;
|description = The maximum speed attainable by the unit in [[elmo]]s per frame. If the value is -ve, the absolute value is used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxReverseVelocity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = rSpeed &lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description = The maximum speed attainable by the unit in reverse in [[elmo]]s per frame. If the value is -ve, the absolute value is used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = acceleration&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|lua = maxAcc&lt;br /&gt;
|description = The acceleration of the unit, in [[elmo]]s per frame&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. If the value is -ve, the absolute value is used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = brakeRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = acceleration&lt;br /&gt;
|lua = maxDec&lt;br /&gt;
|description = The deceleration of the unit, in [[elmo]]s per frame&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. If the value is -ve, the absolute value is used. For units with {{taglink|canFly|true}} this is multiplied by &amp;lt;code&amp;gt;0.1&amp;lt;/code&amp;gt;. Prior to 95.0 this was scaled by 0.1 for aircraft and the default was 3x acceleration.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = myGravity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.4&lt;br /&gt;
|description = As Spring aircraft are slower than real aircraft this tag allows to lower gravity to compensate. Multiplies against map gravity for aircraft, replaces map gravity for ground vehicles if non-zero.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How fast the unit can turn. &amp;lt;code&amp;gt;degrees per seconds = 0.16 * turnRate&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnInPlace&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit turn on the spot (like a person or tank) or must it be moving forwards to turn (like a car).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnInPlaceSpeedLimit&lt;br /&gt;
|type = float&lt;br /&gt;
|default = A complex formula based on {{taglink|turnRate}} and {{taglink|maxVelocity}}&lt;br /&gt;
|description = For units with {{taglink|turnInPlace|false}}, this defines the minimum speed it will slow down to (the speed at which the turn is actually performed can be higher depending on the angular difference and {{taglink|turnRate}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
| name = turnInPlaceAngleLimit&lt;br /&gt;
| type = float&lt;br /&gt;
| default = 0.0&lt;br /&gt;
| special = {{new|86.0}}&lt;br /&gt;
| description = For units with {{taglink|turnInPlace|true}}, defines the maximum angle (in degrees) of a turn above which it starts to brake.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = blocking&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit block the movement of other units? (Mines, i.e. non-mobile units with the {{taglink|kamikaze}} tag default to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crushResistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = mass&lt;br /&gt;
|special = {{new|85.0}}&lt;br /&gt;
|description = How resistant is the unit to being crushed? Any [[Movedefs.lua|&#039;&#039;&#039;MoveClass&#039;&#039;&#039;]] with a {{xtaglink|Movedefs.lua|crushStrength}} greater than this will crush the unit - IFF this has been enabled via [[Lua_SyncedCtrl#Unit_Control|Spring.SetUnitBlocking]] and the collider impulse exceeds that of the colidee.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Flanking===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMode&lt;br /&gt;
|type = int&lt;br /&gt;
|default = flankingBonus.defaultMode set in [[Modrules.lua]]&lt;br /&gt;
|description = The mode of operation of Spring&#039;s inbuilt flanking system. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - No flanking bonus. Mode &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; builds up the ability to move over time, and swings to face attacks, but does not respect the way the unit is facing. Mode &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; also can swing, but moves with the unit as it turns. Mode &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; stays with the unit as it turns and otherwise doesn&#039;t move, the ideal mode to simulate something such as tank armour.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusDir&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 1.0}&lt;br /&gt;
|description = This is the direction vector where the armour is facing; i.e. where the least damage is applied. The default is straight forwards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMax&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.9&lt;br /&gt;
|description = The maximum multiplier to the damage dealt, when a unit is hit from the opposite direction to {{taglink|flankingBonusDir}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMin&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9&lt;br /&gt;
|description = The minimum multiplier to the damage dealt, when a unit is hit from the same direction as {{taglink|flankingBonusDir}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMobilityAdd&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.01&lt;br /&gt;
|description = This defines the ability of {{taglink|flankingBonusDir}} to move over time. Its value is added to the mobility every [[SlowUpdate]]. When the unit is attacked, the build up mobility value is multiplied by a vector facing the attack, which is added to {{taglink|flankingBonusDir}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Aircraft===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canFly&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the unit fly, i.e. is it an aircraft?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canSubmerge&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the aircraft land underwater?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = factoryHeadingTakeoff&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Controls the take-off behaviour of aircraft with {{taglink|hoverAttack|true}}. &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; means planes start matching their heading right after taking off from the pad, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; means they maintain the heading of the pad until reaching {{taglink|cruiseAlt}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collide&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit collide with other aircraft, or can it occupy the same space?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = hoverAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Controls whether the aircraft flys and attacks like a fighter/bomber or a helicopter/gunship.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airStrafe&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = For aircraft with {{taglink|hoverAttack|true}}, controls if the unit strafes side to side while attacking or remains stationary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cruiseAlt&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = wantedHeight&lt;br /&gt;
|description = The altitude in [[elmo]]s which the unit attempts to fly at while cruising.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airHoverFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = -1.0&lt;br /&gt;
|lua = dlHoverFactor&lt;br /&gt;
|description = For aircraft with {{taglink|hoverAttack|true}}, less then &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means it can land and &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; indicates how much the unit will move during hovering on the spot.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bankingAllowed&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = For aircraft with {{taglink|hoverAttack|true}}, controls whether or not the unit banks when moving turning.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useSmoothMesh&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the aircraft follow the real map terrain or the special smoothed out navigation mesh generated by Spring specifically for aircraft?} Can become problematic for construction aircrafts, building in canyons.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxFuel&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = The maximum flight time in seconds before aircraft must return to an airbase to refuel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = refuelTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = The time in seconds required to refuel the aircraft at an airbase.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minAirbasePower&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = The minimum {{taglink|workerTime}} an airbase must have to repair / refuel this aircraft.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canLoopbackAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the aircraft perform an [http://en.wikipedia.org/wiki/Immelmann_turn Immelmann turn]?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Advanced Air Tags====&lt;br /&gt;
The following set of tags are not well understood and using non-default values can lead to undesired flight behaviours.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{{tag&lt;br /&gt;
|name = wingDrag&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.07&lt;br /&gt;
|description = The drag caused by the aircraft&#039;s wing. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = wingAngle&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.08&lt;br /&gt;
|description = The angle between the front and the wing plane.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = frontToSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = How far nose can be unaligned to speed vector before accelleration is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speedToFront&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.07&lt;br /&gt;
|description = Rate for the nose to align to new (true) direction change. Values above 0.1 may lead to cumulative speedup issues.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crashDrag&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.005&lt;br /&gt;
|description = The drag used when crashing. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxBank&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.8&lt;br /&gt;
|description = The maximum roll (z-axis rotation) the aircraft can achieve.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxPitch&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.45&lt;br /&gt;
|description = The maximum pitch (x-axis rotation) the aircraft tries to keep.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnRadius&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 500.0&lt;br /&gt;
|description = Hint to Spring unit AI about the required turning radius.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = verticalSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 3.0&lt;br /&gt;
|description = The speed of takeoff and landing, at least for gunships ({{taglink|hoverAttack|true}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxAileron&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.015&lt;br /&gt;
|description =  The maximum turn speed around the roll (z) axis.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxElevator&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.01&lt;br /&gt;
|description = The maximum turn speed around the pitch (x) axis.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxRudder&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.004&lt;br /&gt;
|description = The maximum turn speed around the yaw (y) axis.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxAcc&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.065&lt;br /&gt;
|description = The maximum acceleration or &#039;engine power&#039; of the aircraft.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = attackSafetyDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0&lt;br /&gt;
| special = Exists only in version 99.0&lt;br /&gt;
|description = Fighters abort dive toward target if within attackSafetyDistance and try to climb back to normal altitude while still moving toward target. It&#039;s disabled by default. Set to half of the minimum weapon range to avoid collisions, enemy fire, AOE damage. If set to greater than the weapon range, the unit will fly over the target like a bomber. This tag was removed in version 100.0 and changed to a [[Lua_MoveCtrl#MoveType-Controlling|Spring.SetMoveTypeData]] key.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Flares====&lt;br /&gt;
The following set of tags are rarely used and are hardcoded to only work vs. missile weapons. The texture is hardcoded to be &amp;lt;code&amp;gt;flareprojectiletexture&amp;lt;/code&amp;gt; defined in [[Resources.lua]].&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canDropFlare&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can this aircraft drop flares to distract missile weapons?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareReload&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|lua = flareReloadTime&lt;br /&gt;
|description = The time in seconds between successive flare drops.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareDelay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.3&lt;br /&gt;
|description = The delay between detecting an incoming missile and launching flares. Multiplied by a random number between 1 and 16.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareEfficiency&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = The probability that an incoming missile will target the flare instead of the aircraft.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareDropVector&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The direction vector which flares are emitted in.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareTime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 3&lt;br /&gt;
|description = The lifetime of a dropped flare in [[frames]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareSalvoSize&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How many flares are dropped at once?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareSalvoDelay&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The delay in [[frames]] between the release of each individual flare in a burst.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Transports===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportSize&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The size of units that the transport can pick up, in terms of the passengers {{taglink|footprintX}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minTransportSize&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The smallest size of unit that the transport can pick up, in terms of the passengers {{taglink|footprintX}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportCapacity&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The total number of units that the transport can pick up, with each unit multiplied by it&#039;s {{taglink|footprintX}} size. Prior to 101.0 if this tag is not present, then any Script.AttachUnit and Script.DropUnit call in the animation script will be ignored (See [[Animation-LuaCallouts#Other]]), in successive versions all units can use [[Lua_SyncedCtrl#Unit_Control|Spring.UnitAttach]] et al regardless of this tag.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportMass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 100000.0&lt;br /&gt;
|description = The total cumulative {{taglink|mass}} of passengers the transport can carry.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minTransportMass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum {{taglink|mass}} passenger the transport can carry.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = loadingRadius&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 220.0&lt;br /&gt;
|description = How far away in [[elmo]]s can the transporter pick up and drop units?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unloadSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = How spread out the passengers are when unloaded. Is multiplied by the passengers radius.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isFirePlatform&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can transported units still aim and shoot while loaded by this transport?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = holdSteady&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; - passengers are slaved to orientation of transporter attachment piece, if &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; - passengers are slaved to orientation of transporter body.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = releaseHeld&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the transporter unload it&#039;s passengers when it dies?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cantBeTransported&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false for mobile units, true for structures&lt;br /&gt;
|description = Controls if a unit is transportable at all or not. If &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; it is overridden by [[Modrules.lua]] &amp;lt;code&amp;gt;transportability&amp;lt;/code&amp;gt; subtable tags.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportByEnemy&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Controls if a unit can be transported by an enemy transport. i.e. can it be kidnapped.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportUnloadMethod&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = For air transports. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Land to unload individually, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Flyover drop (i.e. Parachute), or &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - Land and flood unload all passengers. Can be used on ground transports with mixed results.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fallSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.2&lt;br /&gt;
|description = For air transports with {{taglink|transportUnloadMethod|1}}. The speed in [[elmo]]s per second which units will fall at when released from the transport.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitFallSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Allows you to override {{taglink|fallSpeed}} for an individual passenger.}}&lt;br /&gt;
&lt;br /&gt;
===Categories===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = category&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The category tag is a string of separate words, each representing a category of units. There is a maximum of 32 categories. The primary purpose of categories is weapon targeting (See [[#weapons]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noChaseCategory&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The unit will still target enemies with a matching {{taglink|category}}, but will not chase after it if it moves out of weapon range.}}&lt;br /&gt;
&lt;br /&gt;
===Decals===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = leaveTracks&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit leave a track mark decal behind it when it moves? For mobile units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;stdTank&amp;quot;&lt;br /&gt;
|description = The filename of the image, without extension, assumed to be in &amp;lt;code&amp;gt;Bitmaps/Tracks/&amp;lt;/code&amp;gt;, to be used as the track decal. The red channel of the image controls the brightness and the green channel the alpha (how visible it is) of the track. Blue channel is unused.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackWidth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32.0&lt;br /&gt;
|description = The width of the track decal left on the ground, in [[elmo]]s.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackOffset&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How far back in [[elmo]]s the track should be drawn from the centre of the unit.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackStrength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32.0&lt;br /&gt;
|description = How visible or &#039;deep&#039; the track mark should be. Also used to determine how long the decal should last.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackStretch&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How much the track is stretched in the forward direction compared to the sides (i.e. used to change aspect ratio).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useBuildingGroundDecal&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = For structures, do they display a ground decal on the terrain under their model?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of the image to be used as ground decal. Assumed to be in &amp;lt;code&amp;gt;Unittextures/&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalSizeX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How wide the decal is left to right, in footprint units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalSizeY&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How wide the decal is top to bottom, in footprint units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalDecaySpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = A measure of how quickly the decal should fade out if the structure dies. Essentially this value is multiplied by the time since death and subtracted from the original alpha until the decal is fully transparent.}}&lt;br /&gt;
&lt;br /&gt;
===Collision Volumes===&lt;br /&gt;
For a deeper explanation of these tags, see [[Gamedev:CollisionVolumes]]. Note that all collision checks first do a pre-check with the unit &#039;&#039;radius&#039;&#039; before doing the colvol checks. Ergo the unit &#039;&#039;radius&#039;&#039; must be larger or equal to the colvol!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = usePieceCollisionVolumes&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = collisionVolume.defaultToPieceTree&lt;br /&gt;
|description = When turned on the model and UnitDef collision volumes are ignored and Spring generates a bounding box volume for each piece of the unit model. These volumes can be manipulated or replaced by [[Lua_SyncedCtrl#Unit_Control | Spring.SetUnitPieceCollisionVolumeData]]. Increases the performance cost of collision calculations.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useFootPrintCollisionVolume&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|92.0}}&lt;br /&gt;
|lua = .collisionVolume.defaultToFootprint&lt;br /&gt;
|description = Replaces any defined collision volume with a box with dimensions equal to the object&#039;s footprint (this also overrides any custom scaling and/or offsets).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following three tags can instead be replaced with a [[#collisionVolume]] subtable:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|lua = collisionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s collision volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere}} or a cylinder aligned to an axis; {{value|&amp;quot;cylX&amp;quot;}}, {{value|&amp;quot;cylY&amp;quot;}}, {{value|&amp;quot;cylZ&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeScales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = collisionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the collision volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeOffsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = collisionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the hit volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following tags have now been removed from the engine:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeTest&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|special = &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Removed in 90.0 (Now always continuous)&amp;lt;/span&amp;gt;&lt;br /&gt;
|description = The type of test used to detect collisions. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; (discrete) or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (continuous). Use the latter for catching high speed projectiles which may otherwise &#039;skip through&#039; small collision volumes, but beware of the increased performance cost.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = modelCenterOffset&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0} &lt;br /&gt;
|special = &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Removed in 89.0 (Now set via lua)&amp;lt;/span&amp;gt;&lt;br /&gt;
|description = How far from the model&#039;s defined centre should the centre of the unit be?}}&lt;br /&gt;
&lt;br /&gt;
===Selection Volumes===&lt;br /&gt;
Introduced in 104.0, units may now have custom selection volumes in exactly the same way as collision volumes were already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = usePieceSelectionVolumes&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.defaultToPieceTree&lt;br /&gt;
|description = When turned on the model and UnitDef selection volumes are ignored and Spring generates a bounding box volume for each piece of the unit model (the same volumes are used for collision and selection). These volumes can be manipulated or replaced by [[Lua_SyncedCtrl#Unit_Control | Spring.SetUnitPieceColisionVolumeData]]. Increases the performance cost of selection calculations.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useFootPrintSelectionVolume&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.defaultToFootprint&lt;br /&gt;
|description = Replaces any defined selection volume with a box with dimensions equal to the object&#039;s footprint (this also overrides any custom scaling and/or offsets).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following three tags can instead be replaced with a [[#selectionVolume]] subtable:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selectionVolumeType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = collisionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s selection volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere}} or a cylinder aligned to an axis; {{value|&amp;quot;cylX&amp;quot;}}, {{value|&amp;quot;cylY&amp;quot;}}, {{value|&amp;quot;cylZ&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selectionVolumeScales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the selection volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selectionVolumeOffsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the selection volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
===Attack Behaviours===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = highTrajectory&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = highTrajectoryType&lt;br /&gt;
|description = Can the unit fire it&#039;s (ballistic) weapons in a high trajectory arc? Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Low trajectory only, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - High trajectory only, or &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - Toggle button.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = kamikaze&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = canKamikaze&lt;br /&gt;
|description = Does the unit attack its target by blowing itself up?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = kamikazeDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = kamikazeDist&lt;br /&gt;
|description = How close to the target, in [[elmo]]s, the unit must get before detonating. Measured in 3D, not 2D.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = kamikazeUseLOS&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the target unit have to be in LOS when detonating or only within {{taglink|kamikazeDistance}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = strafeToAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the unit move sideways when it can&#039;t shoot?}}&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = decoyFor&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The UnitDef name (not human {{taglink|name}}) which this unit is a decoy for.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selfDestructCountdown&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 5&lt;br /&gt;
|lua = selfDCountdown&lt;br /&gt;
|description = The length in seconds taken between issuing self destruct order and the unit exploding.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = damageModifier&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|lua = armoredMultiple&lt;br /&gt;
|description = The multiplier applied to weapon damage when the units ARMORED status (See [[Lua_ConstCOB]]) is turned on.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isTargetingUpgrade&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = targFac&lt;br /&gt;
|description = Does the unit upgrade the targeting so that units shoot accurately at enemy units which are in radar but not in LOS.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isFeature&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit immediately die into it&#039;s {{taglink|corpse}} feature when built? Used mainly for making walls.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = hideDamage&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the units current health be invisible to enemy players?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = showPlayerName&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the unit display it&#039;s controlling player as its name instead of {{taglink|name}}. Generally used for commander or hero units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = showNanoFrame&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit show an OTA-style nanoframe whilst being constructed?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitRestricted&lt;br /&gt;
|type = int&lt;br /&gt;
|default = MAX_UNITS&lt;br /&gt;
|lua = maxThisUnit&lt;br /&gt;
|description = How many of this unit type may a player control at once? Defaults to being the maximum amount of units controllable. Is overridden by lobby unit restrictions.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = power&lt;br /&gt;
|type = float&lt;br /&gt;
|default = {{taglink|buildCostMetal}} + ({{taglink|buildCostEnergy}} / 60.0)&lt;br /&gt;
|description = The relative power of the unit. Used in weapon targeting priority and experience gain calculations.}}&lt;br /&gt;
&lt;br /&gt;
==Sub Tables==&lt;br /&gt;
&lt;br /&gt;
===collisionVolume===&lt;br /&gt;
The &amp;lt;code&amp;gt;collisionVolume&amp;lt;/code&amp;gt; subtable of a UnitDef replaces the older individual {{taglink|collisionVolumeType}}, {{taglink|collisionVolumeScales}} and {{taglink|collisionVolumeOffsets}} tags.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = type&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|lua = .collisionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s collision volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere&amp;quot;}} or a {{value|&amp;quot;cylinder&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = axis&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;z&amp;quot;&lt;br /&gt;
|description = Which axis does the unit&#039;s collision volume lie along? Can be {{value|&amp;quot;x&amp;quot;}}, {{value|&amp;quot;y&amp;quot;}} or {{value|&amp;quot;z&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .collisionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the collision volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = offsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .collisionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the hit volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
===selectionVolume===&lt;br /&gt;
The &amp;lt;code&amp;gt;selectionVolume&amp;lt;/code&amp;gt; subtable of a UnitDef can replace the individual {{taglink|selectionVolumeType}}, {{taglink|selectionVolumeScales}} and {{taglink|selectionVolumeOffsets}} tags.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = type&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|lua = .selectionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s selection volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere&amp;quot;}} or a {{value|&amp;quot;cylinder&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = axis&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;z&amp;quot;&lt;br /&gt;
|description = Which axis does the unit&#039;s selection volume lie along? Can be {{value|&amp;quot;x&amp;quot;}}, {{value|&amp;quot;y&amp;quot;}} or {{value|&amp;quot;z&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .selectionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the selection volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = offsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .selectionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the selection volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
===weapons===&lt;br /&gt;
The &amp;lt;code&amp;gt;weapons&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which weapons the unit has. It is a simple array (number indexed table) of &amp;lt;code&amp;gt;weaponName&amp;lt;/code&amp;gt;s (not the human readable &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;!).&lt;br /&gt;
&lt;br /&gt;
The following additional tags are associated with this subtable:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The &amp;lt;code&amp;gt;weaponName&amp;lt;/code&amp;gt; of the weapon (See [[Gamedev:WeaponDefs]]). If using the [[weapondefs_post.lua]] provided by [[springcontent.sdz]], you may include the WeaponDef tables within the UnitDef as the &amp;lt;code&amp;gt;weaponDefs&amp;lt;/code&amp;gt; subtable, and refer to them with &amp;lt;code&amp;gt;def&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;. This can be a useful way to organise definitions if units do not generally share weapons.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = badTargetCategory&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = A string of unit {{taglink|category}} entries which this weapon prefers to avoid targeting. i.e. given two units which &#039;&#039;can&#039;&#039; be targeted, any unit whose {{taglink|category}} matches any entry in this tag, will be targeted last. (See [[#Categories]])}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = onlyTargetCategory&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = A string of unit {{taglink|category}} entries which this weapon can target. i.e. any unit whose {{taglink|category}} does not match any entry in this tag, cannot be targeted by this weapon. (See [[#Categories]])}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = slaveTo&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The number of the weapon which this weapon is slaved to. A slaved weapon can only target what it&#039;s master is targeting. Weapon numbers start at &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and correspond to the index of the weapon within the subtable.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mainDir&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 1.0} i.e. forwards&lt;br /&gt;
|description = A vector representing the firing direction of this weapon if it has a limited firing arc. Used in conjunction with {{taglink|maxAngleDif}} (See [[Gamedev:WeaponMainDir]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxAngleDif&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 360.0&lt;br /&gt;
|description = How wide this weapons limited firing arc is in degrees. Symmetrical about {{taglink|mainDir}} i.e. &amp;lt;code&amp;gt;180.0&amp;lt;/code&amp;gt; is 90 degree freedom either way (See [[Gamedev:WeaponMainDir]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fuelUsage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much fuel in seconds is deducted from the units initial {{taglink|maxFuel}} when this weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
===buildOptions===&lt;br /&gt;
The &amp;lt;code&amp;gt;buildOptions&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which other units the unit can build (in the case of a builder) or produce (in the case of a factory).&lt;br /&gt;
It is a simple array (number indexed table) of &amp;lt;code&amp;gt;unitName&amp;lt;/code&amp;gt;s (not the human readable {{taglink|name}}!).&lt;br /&gt;
&lt;br /&gt;
There are no additional tags specific to this subtable.&lt;br /&gt;
&lt;br /&gt;
===SFXTypes===&lt;br /&gt;
The &amp;lt;code&amp;gt;SFXTypes&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which [[CEG]] effects are associated with the unit. It consists of two further subtables, with no additional tags specific to them.&lt;br /&gt;
&lt;br /&gt;
====explosionGenerators====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;explosionGenerators&amp;lt;/code&amp;gt; subtable of &amp;lt;code&amp;gt;SFXTypes&amp;lt;/code&amp;gt; tells Spring which [[CEG]]s the unit&#039;s script can call, via the &amp;lt;code&amp;gt;EmitSFX()&amp;lt;/code&amp;gt; callout (See [[Animation-LuaCallouts#Effects]]). It is a simple array (number indexed table) of CEG names, prefaced by the string &amp;lt;code&amp;gt;&amp;quot;custom:&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
====pieceExplosionGenerators====&lt;br /&gt;
{{new|83.0}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;pieceExplosionGenerators&amp;lt;/code&amp;gt; subtable of &amp;lt;code&amp;gt;SFXTypes&amp;lt;/code&amp;gt; tells Spring which [[CEG]]s the unit&#039;s script can pick at random to attach to a flying unit piece, created from the &amp;lt;code&amp;gt;Explode()&amp;lt;/code&amp;gt; callout (See [[Animation-LuaCallouts#Effects]]). It is a simple array (number indexed table) of CEG names, with no prefix.&lt;br /&gt;
&lt;br /&gt;
Forum thread (with examples): {{forumlink|topic=27554|title=pieceExplosionGenerators}}&lt;br /&gt;
&lt;br /&gt;
===sounds===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;sounds&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which sound files to play when the unit triggers various events.&lt;br /&gt;
&lt;br /&gt;
Files are assumed to be in the &amp;lt;code&amp;gt;Sounds/&amp;lt;/code&amp;gt; directory; accepted formats are .wav and .ogg, the former being assumed if no extension is given.&lt;br /&gt;
&lt;br /&gt;
Sounds can be defined in one of three ways:&lt;br /&gt;
&lt;br /&gt;
# Each event can be used as though it were a &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; tag referring to the filename.&lt;br /&gt;
# Each event can be the name of a subtable, which is a simple array containing the filenames. One sound is picked at random from the list each time the event occurs.&lt;br /&gt;
# Each event can be the name of a subtable, which is a simple array containing further tables, which contain the following tags:&lt;br /&gt;
{{tag&lt;br /&gt;
|name = file&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of the sound to play.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = volume&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The default volume of the sound.}}&lt;br /&gt;
&lt;br /&gt;
Spring checks any referenced sound filename to see if a SoundItem has been created, which allows greater control over how it is played (See [[Sounds.lua]]).&lt;br /&gt;
&lt;br /&gt;
====sounds Example====&lt;br /&gt;
&lt;br /&gt;
For clarification, here is an example of all three methods:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;sounds = {&lt;br /&gt;
  -- Method 1&lt;br /&gt;
  ok = &#039;oksound&#039;, -- .wav appended&lt;br /&gt;
  -- Method 2&lt;br /&gt;
  arrived = {&lt;br /&gt;
    &#039;arrived1.wav&#039;,&lt;br /&gt;
    &#039;arrived2.wav&#039;,&lt;br /&gt;
  },&lt;br /&gt;
  -- Method 3&lt;br /&gt;
  select = {&lt;br /&gt;
    { file = &#039;selsound1.ogg&#039;, volume = 2.0 },&lt;br /&gt;
    { file = &#039;selsound2.ogg&#039;, volume = 2.5 },&lt;br /&gt;
  },&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====sounds Events====&lt;br /&gt;
&lt;br /&gt;
The events called by the engine are as follows:&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = ok&lt;br /&gt;
|description = Unit is issued a command.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = select&lt;br /&gt;
|description = Unit is selected by the player.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = arrived&lt;br /&gt;
|description = Unit has arrived at its destination. Mobile ground units only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = build&lt;br /&gt;
|description = Unit begins building. Called for both factories and mobile construction units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = activate&lt;br /&gt;
|description = Unit is activated, i.e. Is turned on. Also called when a mobile ground unit starts moving.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = deactivate&lt;br /&gt;
|description = Unit deactivates, i.e. Is turned off.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = cant&lt;br /&gt;
|description = Unit cannot carry out this order. Loaded but not currently called by the engine.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = underattack&lt;br /&gt;
|description = Unit gets attacked. Loaded but not currently called by the engine.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===customParams===&lt;br /&gt;
The &amp;lt;code&amp;gt;customParams&amp;lt;/code&amp;gt; subtable of a UnitDef allows the game designer to give their units custom attributes, which can then be accessed via lua gadgets and widgets. It is a map (key-value pair indexed table) of strings. When accessing these attributes in lua the strings can be turned back into numbers, bools or even tables. This gives great control to game designers to essentially implement their own behaviour tags.&lt;br /&gt;
&lt;br /&gt;
There are no additional tags specific to this subtable&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
MC:L implements OO with inheritance (base classes in [http://sourceforge.net/p/mwspring/code/HEAD/tree/Gamedata/unitdefs_pre.lua#l36 unitdefs_pre.lua])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleRepoLinks&lt;br /&gt;
|path = units/&lt;br /&gt;
|entity = UnitDefs&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Dev]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:UnitDefs&amp;diff=8604</id>
		<title>Gamedev:UnitDefs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:UnitDefs&amp;diff=8604"/>
		<updated>2020-02-14T02:29:14Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Add some minor keywords, specifically &amp;quot;unitdef&amp;quot; as it will return zero results whereas unitdefs will return the expected results.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Gamedev:Main|Development]] &amp;lt; [[Gamedev:Main]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt;&#039;&#039;&#039;Keywords:&#039;&#039;&#039;&lt;br /&gt;
unitdef, unitdefs, unit files &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Location==&lt;br /&gt;
UnitDef files are .lua files stored in the &amp;lt;code&amp;gt;Units/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
UnitDef files have one purpose; to define the properties of units. They are the main description file for what attributes your unit should have and how it should behave.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which loads the tags from these files is viewable here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Units/UnitDef.cpp}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The engine source which reads the [[#sounds]] subtable can be found here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Units/UnitDefHandler.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
There follows a comprehensive (certain deprecated tags are not present) list of the tags available, their data type, default value and a brief description of what they do. Bear in mind that the source code linked above is the ultimate reference when dealing with these tags. &lt;br /&gt;
&lt;br /&gt;
In lua tables keys (i.e. the tags) should be lower case, here they are represented in camelCase for readability. In your files you may use the &amp;lt;code&amp;gt;lowerkeys&amp;lt;/code&amp;gt; function on your final table to ensure the keys are properly cased.&lt;br /&gt;
&lt;br /&gt;
It is usual to name the returned UnitDef table the internal &amp;lt;code&amp;gt;unitName&amp;lt;/code&amp;gt; desired for the unit.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = humanName&lt;br /&gt;
|description = This is simply the name of the unit as it appears to the player.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = description&lt;br /&gt;
|type = string&lt;br /&gt;
|default = name&lt;br /&gt;
|lua = tooltip&lt;br /&gt;
|description = This is the tooltip description of the unit seen by the player. It defaults to the {{taglink|name}} of the unit.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildPic&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = buildPicName&lt;br /&gt;
|description = The filename of the image to be used as the build picture, assumes &amp;lt;code&amp;gt;Unitpics/&amp;lt;/code&amp;gt; directory (see [[Gamedev:Buildpics]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = objectName&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = modelname&lt;br /&gt;
|description = The filename of the 3D model file for this unit, assumes &amp;lt;code&amp;gt;Objects3D/&amp;lt;/code&amp;gt; directory.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = script&lt;br /&gt;
|type = string&lt;br /&gt;
|default = unitName + &amp;quot;.cob&amp;quot;&lt;br /&gt;
|lua = scriptName&lt;br /&gt;
|description = The filename of the animation script file for this unit, assumes &amp;lt;code&amp;gt;Scripts/&amp;lt;/code&amp;gt; directory. Default assumes .cob file but [[Animation-LuaScripting | LUS]] should be preferred.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxDamage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = health&lt;br /&gt;
|description = The base &#039;hitpoints&#039; the unit will have.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = autoHeal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much health the unit will regain every second.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = idleAutoHeal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = How much health the unit will regain every second whilst it is idle.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = idleTime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 600&lt;br /&gt;
|description = The time in [[frames]] taken until a unit is considered to be idle.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildCostMetal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|lua = metalCost&lt;br /&gt;
|description = The amount of metal resource the unit costs to build. Cannot be below &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildCostEnergy&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = energyCost&lt;br /&gt;
|description = The amount of energy resource the unit costs to build.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The time taken to build the unit, in conjunction with the {{taglink|workerTime}} of the constructor. In [[Gamedev:UnitsOfMeasurement#Time|Resource Frames]], &amp;lt;code&amp;gt;Time to build = (buildTime / workerTime)&amp;lt;/code&amp;gt;. Defaults to &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; but cannot actually be below &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = buildCostMetal&lt;br /&gt;
|description = The mass of the unit, used in weapon impulse calculations. Cannot be less than &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be reclaimed by a builder?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = capturable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can a unit be stolen by a builder using the capture command?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = repairable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be repaired by a builder?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxRepairSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1e20&lt;br /&gt;
|description = The maximum cumulative speed at which this unit type can repair a single target.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = iconType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;default&amp;quot;&lt;br /&gt;
|description = The name of the radar icon type this unit should use (see [[Icontypes.lua]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = corpse&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = wreckName&lt;br /&gt;
|description = The name of the feature this unit should leave behind as a wreck when it dies (see [[Gamedev:FeatureDefs]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explodeAs&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of the weapon this unit should explode as when it is killed (see [[Gamedev:WeaponDefs]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selfDestructAs&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of the weapon this unit should explode as when it self destructs (see [[Gamedev:WeaponDefs]]). Also used as the {{taglink|kamikaze}} weapon.}}&lt;br /&gt;
&lt;br /&gt;
===Resources===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = harvestStorage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = {{new|97.0}}&lt;br /&gt;
|description = How much of the metal resource a unit can store when used as an engine-assisted resource &#039;harvester&#039;. See also [[Lua:Callins#API:UnitHarvestStorageFull|UnitHarvestStorageFull callin]] and [[Lua_SyncedRead#Unit_Informations|Spring.GetUnitHarvestStorage]] and [[Lua_SyncedCtrl#Unit_Resourcing|Spring.SetUnitHarvestStorage]] callouts.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalStorage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the metal resource storage the unit contributes.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyStorage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource storage the unit contributes.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = extractsMetal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the metal resource the unit extracts from the ground. The amount extracted depends on the metal map defined in the map itself. Works only for structures.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = windGenerator&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit generates which is dependant on the map wind. Works only for structures.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tidalGenerator&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit generates which is dependant on the maps tidal power. Clearly, this only works on water structures.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalUse&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = metalUpkeep&lt;br /&gt;
|description = The amount of the metal resource the unit consumes per game &#039;tick&#039; when activated.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyUse&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = energyUpkeep&lt;br /&gt;
|description = The amount of the energy resource the unit consumes per game &#039;tick&#039; when activated.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalMake&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the metal resource the unit generates unconditionally per game &#039;tick&#039;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyMake&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit generates unconditionally per game &#039;tick&#039;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = makesMetal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The amount of the energy resource the unit turns into the metal resource per game &#039;tick&#039;.}}&lt;br /&gt;
&lt;br /&gt;
===Sensors===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = onOffable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit have an on/off button? Currently the activation status tied to this button also turns sensors (other than LOS) on and off.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = activateWhenBuilt&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the unit&#039;s activation status be on or off when it is created?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sightDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = losRadius&lt;br /&gt;
|description = The radius of the units sight (LOS is circular in Spring). &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airSightDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.5 * sightDistance&lt;br /&gt;
|lua = airLosRadius&lt;br /&gt;
|description = How far away the unit can see aircraft (and some FX).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = losEmitHeight&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 20.0&lt;br /&gt;
|lua = losHeight &lt;br /&gt;
|special = {{new|83.0}}&lt;br /&gt;
|description = How high up the unit is the point used to calculate it&#039;s LOS vs. the terrain?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarEmitHeight&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 20.0&lt;br /&gt;
|lua = radarHeight&lt;br /&gt;
|special = {{new|83.0}}&lt;br /&gt;
|description = How high up the unit is the point used to calculate it&#039;s radar vs. the terrain?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = radarRadius&lt;br /&gt;
|description = The radius of the units radar.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sonarDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = sonarRadius&lt;br /&gt;
|description = The radius of the units sonar.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radarDistanceJam&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = jammerRadius&lt;br /&gt;
|description = The radius of the units radar jamming.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sonarDistanceJam&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = sonarJamRadius&lt;br /&gt;
|description = The radius of the units sonar jamming.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = stealth&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the unit undetectable by radar?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sonarStealth&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the unit undetectable by sonar?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = seismicDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = seismicRadius&lt;br /&gt;
|description = The radius of the unit&#039;s seismic (movement) sensor.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = seismicSignature&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0 for units with {{taglink|floater}}, {{taglink|canHover}} or {{taglink|canFly}}, otherwise sqrt(mass / 100.0)&lt;br /&gt;
|description = How fast the seismic ring expands in [[elmo]]s per frame. Each ping always lasts 15 [[frames]], so this also determines the maximum radius of the seismic ring.}}&lt;br /&gt;
&lt;br /&gt;
====Cloaking====&lt;br /&gt;
For units with {{taglink|canCloak|true}}:&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cloakCost&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The energy cost per tick to cloak the unit while it is stationary.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cloakCostMoving&lt;br /&gt;
|type = float&lt;br /&gt;
|default = cloakCost&lt;br /&gt;
|description = The energy cost per tick to cloak the unit while it is moving.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = initCloaked&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = startCloaked&lt;br /&gt;
|description = Is the unit cloaked as soon as it is created?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minCloakDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum distance (radius) which the unit must be from any enemy units to remain cloaked.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = decloakSpherical&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does {{taglink|minCloakDistance}} apply in 3D or only 2D? i.e. can aircraft flying above the unit decloak it?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = decloakOnFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit decloak when it fires a weapon?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cloakTimeout&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 128&lt;br /&gt;
|description = The minimum time, in [[frames]], between a decloak and subsequent re-cloak.}}&lt;br /&gt;
&lt;br /&gt;
===Commands===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canMove&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the unit be issued Move orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Attack orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canFight&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Fight orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canPatrol&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Patrol orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canGuard&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Guard orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
| name = canCloak&lt;br /&gt;
| type = bool&lt;br /&gt;
| default = false&lt;br /&gt;
| description =&lt;br /&gt;
Can the unit be issued Cloak orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canRepeat&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the unit be issued Repeat orders?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canSelfDestruct&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|lua = canSelfD&lt;br /&gt;
|description = Can the unit be issued a self destruct order?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = moveState&lt;br /&gt;
|type = int&lt;br /&gt;
|default = -1 for mobile units, 1 for structures&lt;br /&gt;
|description = The initial movement state for the unit. Can be {{value|-1}} - Inherits from factory, {{value|0}} - Hold Position, {{value|1}} - Manoeuvre or {{value|2}} - Roam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireState&lt;br /&gt;
|type = int&lt;br /&gt;
|default = -1 for units with {{taglink|noAutoFire|false}}, 2 otherwise&lt;br /&gt;
|description = The initial firing state for the unit. Can be {{value|-1}} - Inherits from factory, {{value|0}} - Hold Fire, {{value|1}} - Return Fire or {{value|2}} - Fire At Will. Since 104.0 there is an additional value {{value|3}} - Fire At Neutral.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noAutoFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = canFireControl&lt;br /&gt;
|description = Controls whether or not the unit has a fire state button.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canManualFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = description = Can the unit be issued ManualFire commands? A ManualFire command will fire any weapons with the {{xtaglink|Gamedev:WeaponDefs|commandfire}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Builder Commands====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canRestore&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|terraformSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued restore terrain commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canRepair&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|repairSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued repair commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canReclaim&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|reclaimSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued reclaim commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canResurrect&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|resurrectSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued resurrection commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canCapture&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder &amp;amp;&amp;amp; {{taglink|captureSpeed}} &amp;gt; 0&lt;br /&gt;
|description = Can the unit be issued capture commands? For builders only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Builder===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = builder&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = isBuilder&lt;br /&gt;
|description = Is the unit a builder?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 128.0&lt;br /&gt;
|description = How far away from itself the unit can build, measured to the centre of the unit being built. The minimum value is &amp;lt;code&amp;gt;38.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildRange3D&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the builders {{taglink|buildDistance}} apply in all 3 dimensions or only 2?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = workerTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = buildSpeed&lt;br /&gt;
|description = How fast the builder builds, used in conjunction with the {{taglink|buildTime}} of the unit being built. Effectively, &amp;lt;code&amp;gt;Time to build = buildTime / workerTime&amp;lt;/code&amp;gt;. If this value is &amp;lt;= &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; then {{taglink|builder}} is set to false.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = repairSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can repair other units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can reclaim other units and features.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = resurrectSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can resurrect corpse features back into living units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = captureSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder can capture other units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = terraformSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = workerTime&lt;br /&gt;
|description = How fast the builder levels and restores terrain.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canAssist&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = builder&lt;br /&gt;
|description = Can the builder assist other constructions?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canBeAssisted&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Can the builder be assisted by other builders?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canSelfRepair&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the builder repair itself?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = showNanoSpray&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the builder emit OTA-style nanospray whilst constructing?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = nanoColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.2, 0.7, 0.2} aka green&lt;br /&gt;
|description = The RGB colour of a builders&#039; emitted nano particles if {{taglink|showNanoSpray|true}}. Also controls the RBG colour of a unit&#039;s own nanoframe if {{taglink|showNanoFrame|true}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fullHealthFactory&lt;br /&gt;
|type = bool&lt;br /&gt;
|defaul[[elmo]]s&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;, units are repaired before they are allowed to leave the factory i.e. units from this factory will be healed back to 100% health if they are damaged during construction.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isAirbase&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = Is this unit an airbase? Aircraft may land and repair on units which are airbases.}}&lt;br /&gt;
&lt;br /&gt;
===Movement &amp;amp; Placement===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = &lt;br /&gt;
How wide the unit is in footprint units, left to right. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Movedefs.lua|footprintX}} of its {{taglink|movementClass}}. Also used for obstacle avoidance.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintZ&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = &lt;br /&gt;
How wide the unit is in footprint units, top to bottom. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Movedefs.lua|footprintZ}} of its {{taglink|movementClass}}. Also used for obstacle avoidance.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = yardmap&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = &lt;br /&gt;
Used to determine a structure from a mobile unit. A string of characters which defines in detail each &#039;footprint square&#039; of the structure. Each footprint square may be: &lt;br /&gt;
:: &amp;lt;code&amp;gt;y&amp;lt;/code&amp;gt; - &#039;Yard&#039; - Always open, unblocking, &lt;br /&gt;
:: &amp;lt;code&amp;gt;c&amp;lt;/code&amp;gt; - &#039;Construction&#039; - Open and unblocking only while constructing (for factories, controlled via &amp;lt;code&amp;gt;COB.YARD_OPEN&amp;lt;/code&amp;gt; see [[Animation-LuaCallouts#Other]]), &lt;br /&gt;
:: &amp;lt;code&amp;gt;i&amp;lt;/code&amp;gt; - &#039;Inversed Construction&#039; - Closed and blocking only while constructing (for factories, controlled via &amp;lt;code&amp;gt;COB.YARD_OPEN&amp;lt;/code&amp;gt; see [[Animation-LuaCallouts#Other]]) ({{new|89.0}}), &lt;br /&gt;
:: &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt; - &#039;Geothermal&#039; - Flags that the unit must be placed over a {{xtaglink|Gamedev:FeatureDefs|geoThermal}} feature, does not actually count as a square, &lt;br /&gt;
:: &amp;lt;code&amp;gt;h&amp;lt;/code&amp;gt; - &#039;High Resolution&#039; - Indicates that the yardmap will use double resolution with four times as many characters. Must be the &#039;&#039;&#039;first&#039;&#039;&#039; character, and does not count as a square itself ({{new|93.0}}),&lt;br /&gt;
::&amp;lt;code&amp;gt;o&amp;lt;/code&amp;gt; - &#039;Obstacle&#039; - Always closed, blocking, all other chars are treated the same way.&lt;br /&gt;
: Tip: &#039;Draw&#039; out the yardmap over multiple lines. As of &amp;lt;span class=warning&amp;gt;89.0&amp;lt;/span&amp;gt; all whitespace characters are ignored, including newlines.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingMask&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = [http://en.wikipedia.org/wiki/Mask_(computing) Bitmask] representing the types of ground that this structure can be built on. Each digit of binary that is set to one means that a ground square with the corresponding digit set via [[Lua_SyncedCtrl#Ground|Spring.SetSquareBuildingMask]] can be built on.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = levelGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = For structures. Does the constructor have to level the ground underneath the build area before beginning to build the structure?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = movementClass&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = moveDef.name&lt;br /&gt;
|description = The name of the movement type a mobile, non aircraft, unit should use. See [[Movedefs.lua]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canHover&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Removed in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
|description = Is the unit a hovercraft? Hovercraft can cross water of any depth without a speed penalty. Hover&#039;s must also have &amp;lt;code&amp;gt;HOVER&amp;lt;/code&amp;gt; within the name of their {{taglink|movementClass}} (see [[Movedefs.lua]]).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = floater&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false if a {{taglink|moveClass}} is defined, if not true if {{taglink|waterline|true}}, false otherwise&lt;br /&gt;
|description = When a mobile unit is crossing water, or a structure is placed on water, does it float on top of the water or crawl / lay on the sea bed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = upright&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit follow the terrain or always remain upright? Generally used for walkers.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxSlope&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = maxHeightDif&lt;br /&gt;
|description = The maximum slope a building can be placed on. Mobile unit&#039;s use the {{xtaglink|Movedefs.lua|maxSlope}} set in their {{taglink|movementClass}}. The value is in degrees and is clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;89.0&amp;lt;/code&amp;gt;. This value is converted to a &amp;quot;maximum allowed height difference&amp;quot; (call it M), which involves a hard-coded constant. When a building gets placed, the height of each of its footprint squares is compared to a reference height (calculated for the build position). If the difference exceeds M for any square, that build position is rejected. The value readable from lua has been changed from that in the unitdef and reflects the internal engine value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = -10e6&lt;br /&gt;
|description = The minimum depth of water a building can be placed on. Mobile unit&#039;s use the {{xtaglink|Movedefs.lua|minWaterDepth}} set in their {{taglink|movementClass}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10e6&lt;br /&gt;
|description = The maximum depth of water a building can be placed on. Mobile unit&#039;s use the {{xtaglink|Movedefs.lua|maxWaterDepth}} set in their {{taglink|movementClass}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = waterline&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How low in the water does a ship sit? Higher values means the ship is lower in the water.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minCollisionSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The minimum net impact speed that will cause a unit to be damaged by collisions with another unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pushResistant&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the unit be pushed around by other units? Turning it on doesn&#039;t remove all pushing but is a marked improvement.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxVelocity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = speed&lt;br /&gt;
|description = The maximum speed attainable by the unit in [[elmo]]s per frame. If the value is -ve, the absolute value is used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxReverseVelocity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = rSpeed &lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description = The maximum speed attainable by the unit in reverse in [[elmo]]s per frame. If the value is -ve, the absolute value is used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = acceleration&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|lua = maxAcc&lt;br /&gt;
|description = The acceleration of the unit, in [[elmo]]s per frame&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. If the value is -ve, the absolute value is used.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = brakeRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = acceleration&lt;br /&gt;
|lua = maxDec&lt;br /&gt;
|description = The deceleration of the unit, in [[elmo]]s per frame&amp;lt;sup&amp;gt;2&amp;lt;/sup&amp;gt;. If the value is -ve, the absolute value is used. For units with {{taglink|canFly|true}} this is multiplied by &amp;lt;code&amp;gt;0.1&amp;lt;/code&amp;gt;. Prior to 95.0 this was scaled by 0.1 for aircraft and the default was 3x acceleration.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = myGravity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.4&lt;br /&gt;
|description = As Spring aircraft are slower than real aircraft this tag allows to lower gravity to compensate. Multiplies against map gravity for aircraft, replaces map gravity for ground vehicles if non-zero.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How fast the unit can turn. &amp;lt;code&amp;gt;degrees per seconds = 0.16 * turnRate&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnInPlace&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit turn on the spot (like a person or tank) or must it be moving forwards to turn (like a car).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnInPlaceSpeedLimit&lt;br /&gt;
|type = float&lt;br /&gt;
|default = A complex formula based on {{taglink|turnRate}} and {{taglink|maxVelocity}}&lt;br /&gt;
|description = For units with {{taglink|turnInPlace|false}}, this defines the minimum speed it will slow down to (the speed at which the turn is actually performed can be higher depending on the angular difference and {{taglink|turnRate}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
| name = turnInPlaceAngleLimit&lt;br /&gt;
| type = float&lt;br /&gt;
| default = 0.0&lt;br /&gt;
| special = {{new|86.0}}&lt;br /&gt;
| description = For units with {{taglink|turnInPlace|true}}, defines the maximum angle (in degrees) of a turn above which it starts to brake.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = blocking&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit block the movement of other units? (Mines, i.e. non-mobile units with the {{taglink|kamikaze}} tag default to &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crushResistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = mass&lt;br /&gt;
|special = {{new|85.0}}&lt;br /&gt;
|description = How resistant is the unit to being crushed? Any [[Movedefs.lua|&#039;&#039;&#039;MoveClass&#039;&#039;&#039;]] with a {{xtaglink|Movedefs.lua|crushStrength}} greater than this will crush the unit - IFF this has been enabled via [[Lua_SyncedCtrl#Unit_Control|Spring.SetUnitBlocking]] and the collider impulse exceeds that of the colidee.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Flanking===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMode&lt;br /&gt;
|type = int&lt;br /&gt;
|default = flankingBonus.defaultMode set in [[Modrules.lua]]&lt;br /&gt;
|description = The mode of operation of Spring&#039;s inbuilt flanking system. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - No flanking bonus. Mode &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; builds up the ability to move over time, and swings to face attacks, but does not respect the way the unit is facing. Mode &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; also can swing, but moves with the unit as it turns. Mode &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; stays with the unit as it turns and otherwise doesn&#039;t move, the ideal mode to simulate something such as tank armour.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusDir&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 1.0}&lt;br /&gt;
|description = This is the direction vector where the armour is facing; i.e. where the least damage is applied. The default is straight forwards.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMax&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.9&lt;br /&gt;
|description = The maximum multiplier to the damage dealt, when a unit is hit from the opposite direction to {{taglink|flankingBonusDir}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMin&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9&lt;br /&gt;
|description = The minimum multiplier to the damage dealt, when a unit is hit from the same direction as {{taglink|flankingBonusDir}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flankingBonusMobilityAdd&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.01&lt;br /&gt;
|description = This defines the ability of {{taglink|flankingBonusDir}} to move over time. Its value is added to the mobility every [[SlowUpdate]]. When the unit is attacked, the build up mobility value is multiplied by a vector facing the attack, which is added to {{taglink|flankingBonusDir}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Aircraft===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canFly&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the unit fly, i.e. is it an aircraft?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canSubmerge&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the aircraft land underwater?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = factoryHeadingTakeoff&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Controls the take-off behaviour of aircraft with {{taglink|hoverAttack|true}}. &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; means planes start matching their heading right after taking off from the pad, &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; means they maintain the heading of the pad until reaching {{taglink|cruiseAlt}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collide&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit collide with other aircraft, or can it occupy the same space?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = hoverAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Controls whether the aircraft flys and attacks like a fighter/bomber or a helicopter/gunship.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airStrafe&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = For aircraft with {{taglink|hoverAttack|true}}, controls if the unit strafes side to side while attacking or remains stationary.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cruiseAlt&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = wantedHeight&lt;br /&gt;
|description = The altitude in [[elmo]]s which the unit attempts to fly at while cruising.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airHoverFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = -1.0&lt;br /&gt;
|lua = dlHoverFactor&lt;br /&gt;
|description = For aircraft with {{taglink|hoverAttack|true}}, less then &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means it can land and &amp;gt;= &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; indicates how much the unit will move during hovering on the spot.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bankingAllowed&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = For aircraft with {{taglink|hoverAttack|true}}, controls whether or not the unit banks when moving turning.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useSmoothMesh&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the aircraft follow the real map terrain or the special smoothed out navigation mesh generated by Spring specifically for aircraft?} Can become problematic for construction aircrafts, building in canyons.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxFuel&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = The maximum flight time in seconds before aircraft must return to an airbase to refuel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = refuelTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = The time in seconds required to refuel the aircraft at an airbase.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minAirbasePower&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = Removed in 101.0 in favour of more flexible lua custom commands&lt;br /&gt;
|description = The minimum {{taglink|workerTime}} an airbase must have to repair / refuel this aircraft.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canLoopbackAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the aircraft perform an [http://en.wikipedia.org/wiki/Immelmann_turn Immelmann turn]?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Advanced Air Tags====&lt;br /&gt;
The following set of tags are not well understood and using non-default values can lead to undesired flight behaviours.&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{{tag&lt;br /&gt;
|name = wingDrag&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.07&lt;br /&gt;
|description = The drag caused by the aircraft&#039;s wing. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = wingAngle&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.08&lt;br /&gt;
|description = The angle between the front and the wing plane.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = frontToSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = How far nose can be unaligned to speed vector before accelleration is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speedToFront&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.07&lt;br /&gt;
|description = Rate for the nose to align to new (true) direction change. Values above 0.1 may lead to cumulative speedup issues.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crashDrag&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.005&lt;br /&gt;
|description = The drag used when crashing. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxBank&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.8&lt;br /&gt;
|description = The maximum roll (z-axis rotation) the aircraft can achieve.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxPitch&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.45&lt;br /&gt;
|description = The maximum pitch (x-axis rotation) the aircraft tries to keep.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turnRadius&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 500.0&lt;br /&gt;
|description = Hint to Spring unit AI about the required turning radius.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = verticalSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 3.0&lt;br /&gt;
|description = The speed of takeoff and landing, at least for gunships ({{taglink|hoverAttack|true}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxAileron&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.015&lt;br /&gt;
|description =  The maximum turn speed around the roll (z) axis.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxElevator&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.01&lt;br /&gt;
|description = The maximum turn speed around the pitch (x) axis.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxRudder&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.004&lt;br /&gt;
|description = The maximum turn speed around the yaw (y) axis.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxAcc&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.065&lt;br /&gt;
|description = The maximum acceleration or &#039;engine power&#039; of the aircraft.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = attackSafetyDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0&lt;br /&gt;
| special = Exists only in version 99.0&lt;br /&gt;
|description = Fighters abort dive toward target if within attackSafetyDistance and try to climb back to normal altitude while still moving toward target. It&#039;s disabled by default. Set to half of the minimum weapon range to avoid collisions, enemy fire, AOE damage. If set to greater than the weapon range, the unit will fly over the target like a bomber. This tag was removed in version 100.0 and changed to a [[Lua_MoveCtrl#MoveType-Controlling|Spring.SetMoveTypeData]] key.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Flares====&lt;br /&gt;
The following set of tags are rarely used and are hardcoded to only work vs. missile weapons. The texture is hardcoded to be &amp;lt;code&amp;gt;flareprojectiletexture&amp;lt;/code&amp;gt; defined in [[Resources.lua]].&amp;lt;br /&amp;gt;&amp;lt;br /&amp;gt;&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canDropFlare&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can this aircraft drop flares to distract missile weapons?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareReload&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|lua = flareReloadTime&lt;br /&gt;
|description = The time in seconds between successive flare drops.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareDelay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.3&lt;br /&gt;
|description = The delay between detecting an incoming missile and launching flares. Multiplied by a random number between 1 and 16.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareEfficiency&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = The probability that an incoming missile will target the flare instead of the aircraft.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareDropVector&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The direction vector which flares are emitted in.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareTime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 3&lt;br /&gt;
|description = The lifetime of a dropped flare in [[frames]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareSalvoSize&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How many flares are dropped at once?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flareSalvoDelay&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The delay in [[frames]] between the release of each individual flare in a burst.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Transports===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportSize&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The size of units that the transport can pick up, in terms of the passengers {{taglink|footprintX}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minTransportSize&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The smallest size of unit that the transport can pick up, in terms of the passengers {{taglink|footprintX}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportCapacity&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The total number of units that the transport can pick up, with each unit multiplied by it&#039;s {{taglink|footprintX}} size. Prior to 101.0 if this tag is not present, then any Script.AttachUnit and Script.DropUnit call in the animation script will be ignored (See [[Animation-LuaCallouts#Other]]), in successive versions all units can use [[Lua_SyncedCtrl#Unit_Control|Spring.UnitAttach]] et al regardless of this tag.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportMass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 100000.0&lt;br /&gt;
|description = The total cumulative {{taglink|mass}} of passengers the transport can carry.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minTransportMass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum {{taglink|mass}} passenger the transport can carry.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = loadingRadius&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 220.0&lt;br /&gt;
|description = How far away in [[elmo]]s can the transporter pick up and drop units?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unloadSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = How spread out the passengers are when unloaded. Is multiplied by the passengers radius.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isFirePlatform&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can transported units still aim and shoot while loaded by this transport?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = holdSteady&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; - passengers are slaved to orientation of transporter attachment piece, if &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; - passengers are slaved to orientation of transporter body.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = releaseHeld&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the transporter unload it&#039;s passengers when it dies?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cantBeTransported&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false for mobile units, true for structures&lt;br /&gt;
|description = Controls if a unit is transportable at all or not. If &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt; it is overridden by [[Modrules.lua]] &amp;lt;code&amp;gt;transportability&amp;lt;/code&amp;gt; subtable tags.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportByEnemy&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Controls if a unit can be transported by an enemy transport. i.e. can it be kidnapped.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = transportUnloadMethod&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = For air transports. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Land to unload individually, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Flyover drop (i.e. Parachute), or &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - Land and flood unload all passengers. Can be used on ground transports with mixed results.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fallSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.2&lt;br /&gt;
|description = For air transports with {{taglink|transportUnloadMethod|1}}. The speed in [[elmo]]s per second which units will fall at when released from the transport.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitFallSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Allows you to override {{taglink|fallSpeed}} for an individual passenger.}}&lt;br /&gt;
&lt;br /&gt;
===Categories===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = category&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The category tag is a string of separate words, each representing a category of units. There is a maximum of 32 categories. The primary purpose of categories is weapon targeting (See [[#weapons]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noChaseCategory&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The unit will still target enemies with a matching {{taglink|category}}, but will not chase after it if it moves out of weapon range.}}&lt;br /&gt;
&lt;br /&gt;
===Decals===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = leaveTracks&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit leave a track mark decal behind it when it moves? For mobile units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;stdTank&amp;quot;&lt;br /&gt;
|description = The filename of the image, without extension, assumed to be in &amp;lt;code&amp;gt;Bitmaps/Tracks/&amp;lt;/code&amp;gt;, to be used as the track decal. The red channel of the image controls the brightness and the green channel the alpha (how visible it is) of the track. Blue channel is unused.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackWidth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32.0&lt;br /&gt;
|description = The width of the track decal left on the ground, in [[elmo]]s.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackOffset&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How far back in [[elmo]]s the track should be drawn from the centre of the unit.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackStrength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32.0&lt;br /&gt;
|description = How visible or &#039;deep&#039; the track mark should be. Also used to determine how long the decal should last.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trackStretch&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How much the track is stretched in the forward direction compared to the sides (i.e. used to change aspect ratio).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useBuildingGroundDecal&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = For structures, do they display a ground decal on the terrain under their model?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of the image to be used as ground decal. Assumed to be in &amp;lt;code&amp;gt;Unittextures/&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalSizeX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How wide the decal is left to right, in footprint units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalSizeY&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How wide the decal is top to bottom, in footprint units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalDecaySpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = A measure of how quickly the decal should fade out if the structure dies. Essentially this value is multiplied by the time since death and subtracted from the original alpha until the decal is fully transparent.}}&lt;br /&gt;
&lt;br /&gt;
===Collision Volumes===&lt;br /&gt;
For a deeper explanation of these tags, see [[Gamedev:CollisionVolumes]]. Note that all collision checks first do a pre-check with the unit &#039;&#039;radius&#039;&#039; before doing the colvol checks. Ergo the unit &#039;&#039;radius&#039;&#039; must be larger or equal to the colvol!&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = usePieceCollisionVolumes&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = collisionVolume.defaultToPieceTree&lt;br /&gt;
|description = When turned on the model and UnitDef collision volumes are ignored and Spring generates a bounding box volume for each piece of the unit model. These volumes can be manipulated or replaced by [[Lua_SyncedCtrl#Unit_Control | Spring.SetUnitPieceCollisionVolumeData]]. Increases the performance cost of collision calculations.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useFootPrintCollisionVolume&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|92.0}}&lt;br /&gt;
|lua = .collisionVolume.defaultToFootprint&lt;br /&gt;
|description = Replaces any defined collision volume with a box with dimensions equal to the object&#039;s footprint (this also overrides any custom scaling and/or offsets).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following three tags can instead be replaced with a [[#collisionVolume]] subtable:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|lua = collisionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s collision volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere}} or a cylinder aligned to an axis; {{value|&amp;quot;cylX&amp;quot;}}, {{value|&amp;quot;cylY&amp;quot;}}, {{value|&amp;quot;cylZ&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeScales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = collisionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the collision volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeOffsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = collisionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the hit volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following tags have now been removed from the engine:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionVolumeTest&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|special = &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Removed in 90.0 (Now always continuous)&amp;lt;/span&amp;gt;&lt;br /&gt;
|description = The type of test used to detect collisions. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; (discrete) or &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (continuous). Use the latter for catching high speed projectiles which may otherwise &#039;skip through&#039; small collision volumes, but beware of the increased performance cost.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = modelCenterOffset&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0} &lt;br /&gt;
|special = &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Removed in 89.0 (Now set via lua)&amp;lt;/span&amp;gt;&lt;br /&gt;
|description = How far from the model&#039;s defined centre should the centre of the unit be?}}&lt;br /&gt;
&lt;br /&gt;
===Selection Volumes===&lt;br /&gt;
Introduced in 104.0, units may now have custom selection volumes in exactly the same way as collision volumes were already defined.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = usePieceSelectionVolumes&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.defaultToPieceTree&lt;br /&gt;
|description = When turned on the model and UnitDef selection volumes are ignored and Spring generates a bounding box volume for each piece of the unit model (the same volumes are used for collision and selection). These volumes can be manipulated or replaced by [[Lua_SyncedCtrl#Unit_Control | Spring.SetUnitPieceColisionVolumeData]]. Increases the performance cost of selection calculations.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useFootPrintSelectionVolume&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.defaultToFootprint&lt;br /&gt;
|description = Replaces any defined selection volume with a box with dimensions equal to the object&#039;s footprint (this also overrides any custom scaling and/or offsets).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The following three tags can instead be replaced with a [[#selectionVolume]] subtable:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selectionVolumeType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = collisionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s selection volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere}} or a cylinder aligned to an axis; {{value|&amp;quot;cylX&amp;quot;}}, {{value|&amp;quot;cylY&amp;quot;}}, {{value|&amp;quot;cylZ&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selectionVolumeScales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the selection volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selectionVolumeOffsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|lua = .selectionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the selection volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
===Attack Behaviours===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = highTrajectory&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|lua = highTrajectoryType&lt;br /&gt;
|description = Can the unit fire it&#039;s (ballistic) weapons in a high trajectory arc? Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Low trajectory only, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - High trajectory only, or &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - Toggle button.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = kamikaze&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = canKamikaze&lt;br /&gt;
|description = Does the unit attack its target by blowing itself up?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = kamikazeDistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|lua = kamikazeDist&lt;br /&gt;
|description = How close to the target, in [[elmo]]s, the unit must get before detonating. Measured in 3D, not 2D.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = kamikazeUseLOS&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the target unit have to be in LOS when detonating or only within {{taglink|kamikazeDistance}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = strafeToAttack&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the unit move sideways when it can&#039;t shoot?}}&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = decoyFor&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The UnitDef name (not human {{taglink|name}}) which this unit is a decoy for.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = selfDestructCountdown&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 5&lt;br /&gt;
|lua = selfDCountdown&lt;br /&gt;
|description = The length in seconds taken between issuing self destruct order and the unit exploding.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = damageModifier&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|lua = armoredMultiple&lt;br /&gt;
|description = The multiplier applied to weapon damage when the units ARMORED status (See [[Lua_ConstCOB]]) is turned on.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isTargetingUpgrade&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|lua = targFac&lt;br /&gt;
|description = Does the unit upgrade the targeting so that units shoot accurately at enemy units which are in radar but not in LOS.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = isFeature&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit immediately die into it&#039;s {{taglink|corpse}} feature when built? Used mainly for making walls.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = hideDamage&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the units current health be invisible to enemy players?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = showPlayerName&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the unit display it&#039;s controlling player as its name instead of {{taglink|name}}. Generally used for commander or hero units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = showNanoFrame&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the unit show an OTA-style nanoframe whilst being constructed?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unitRestricted&lt;br /&gt;
|type = int&lt;br /&gt;
|default = MAX_UNITS&lt;br /&gt;
|lua = maxThisUnit&lt;br /&gt;
|description = How many of this unit type may a player control at once? Defaults to being the maximum amount of units controllable. Is overridden by lobby unit restrictions.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = power&lt;br /&gt;
|type = float&lt;br /&gt;
|default = {{taglink|buildCostMetal}} + ({{taglink|buildCostEnergy}} / 60.0)&lt;br /&gt;
|description = The relative power of the unit. Used in weapon targeting priority and experience gain calculations.}}&lt;br /&gt;
&lt;br /&gt;
==Sub Tables==&lt;br /&gt;
&lt;br /&gt;
===collisionVolume===&lt;br /&gt;
The &amp;lt;code&amp;gt;collisionVolume&amp;lt;/code&amp;gt; subtable of a UnitDef replaces the older individual {{taglink|collisionVolumeType}}, {{taglink|collisionVolumeScales}} and {{taglink|collisionVolumeOffsets}} tags.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = type&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|lua = .collisionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s collision volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere&amp;quot;}} or a {{value|&amp;quot;cylinder&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = axis&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;z&amp;quot;&lt;br /&gt;
|description = Which axis does the unit&#039;s collision volume lie along? Can be {{value|&amp;quot;x&amp;quot;}}, {{value|&amp;quot;y&amp;quot;}} or {{value|&amp;quot;z&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .collisionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the collision volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = offsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .collisionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the hit volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
===selectionVolume===&lt;br /&gt;
The &amp;lt;code&amp;gt;selectionVolume&amp;lt;/code&amp;gt; subtable of a UnitDef can replace the individual {{taglink|selectionVolumeType}}, {{taglink|selectionVolumeScales}} and {{taglink|selectionVolumeOffsets}} tags.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = type&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;s&amp;quot;&lt;br /&gt;
|lua = .selectionVolume.type&lt;br /&gt;
|description = What shape should the unit&#039;s selection volume be? Can be {{value|&amp;quot;box&amp;quot;}}, {{value|&amp;quot;sphere&amp;quot;}} or a {{value|&amp;quot;cylinder&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = axis&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;z&amp;quot;&lt;br /&gt;
|description = Which axis does the unit&#039;s selection volume lie along? Can be {{value|&amp;quot;x&amp;quot;}}, {{value|&amp;quot;y&amp;quot;}} or {{value|&amp;quot;z&amp;quot;}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scales&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .selectionVolume.scale{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The lengths of the selection volume in each of the three axes. Note that non-spherical ellipsoids and elliptical cylinders are not supported.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = offsets&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|lua = .selectionVolume.offset{X{{pipe}}Y{{pipe}}Z}&lt;br /&gt;
|description = The offset from the unit centre to the selection volume centre in each axis.}}&lt;br /&gt;
&lt;br /&gt;
===weapons===&lt;br /&gt;
The &amp;lt;code&amp;gt;weapons&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which weapons the unit has. It is a simple array (number indexed table) of &amp;lt;code&amp;gt;weaponName&amp;lt;/code&amp;gt;s (not the human readable &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;!).&lt;br /&gt;
&lt;br /&gt;
The following additional tags are associated with this subtable:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The &amp;lt;code&amp;gt;weaponName&amp;lt;/code&amp;gt; of the weapon (See [[Gamedev:WeaponDefs]]). If using the [[weapondefs_post.lua]] provided by [[springcontent.sdz]], you may include the WeaponDef tables within the UnitDef as the &amp;lt;code&amp;gt;weaponDefs&amp;lt;/code&amp;gt; subtable, and refer to them with &amp;lt;code&amp;gt;def&amp;lt;/code&amp;gt; rather than &amp;lt;code&amp;gt;name&amp;lt;/code&amp;gt;. This can be a useful way to organise definitions if units do not generally share weapons.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = badTargetCategory&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = A string of unit {{taglink|category}} entries which this weapon prefers to avoid targeting. i.e. given two units which &#039;&#039;can&#039;&#039; be targeted, any unit whose {{taglink|category}} matches any entry in this tag, will be targeted last. (See [[#Categories]])}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = onlyTargetCategory&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = A string of unit {{taglink|category}} entries which this weapon can target. i.e. any unit whose {{taglink|category}} does not match any entry in this tag, cannot be targeted by this weapon. (See [[#Categories]])}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = slaveTo&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The number of the weapon which this weapon is slaved to. A slaved weapon can only target what it&#039;s master is targeting. Weapon numbers start at &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and correspond to the index of the weapon within the subtable.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mainDir&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 1.0} i.e. forwards&lt;br /&gt;
|description = A vector representing the firing direction of this weapon if it has a limited firing arc. Used in conjunction with {{taglink|maxAngleDif}} (See [[Gamedev:WeaponMainDir]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxAngleDif&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 360.0&lt;br /&gt;
|description = How wide this weapons limited firing arc is in degrees. Symmetrical about {{taglink|mainDir}} i.e. &amp;lt;code&amp;gt;180.0&amp;lt;/code&amp;gt; is 90 degree freedom either way (See [[Gamedev:WeaponMainDir]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fuelUsage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much fuel in seconds is deducted from the units initial {{taglink|maxFuel}} when this weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
===buildOptions===&lt;br /&gt;
The &amp;lt;code&amp;gt;buildOptions&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which other units the unit can build (in the case of a builder) or produce (in the case of a factory).&lt;br /&gt;
It is a simple array (number indexed table) of &amp;lt;code&amp;gt;unitName&amp;lt;/code&amp;gt;s (not the human readable {{taglink|name}}!).&lt;br /&gt;
&lt;br /&gt;
There are no additional tags specific to this subtable.&lt;br /&gt;
&lt;br /&gt;
===SFXTypes===&lt;br /&gt;
The &amp;lt;code&amp;gt;SFXTypes&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which [[CEG]] effects are associated with the unit. It consists of two further subtables, with no additional tags specific to them.&lt;br /&gt;
&lt;br /&gt;
====explosionGenerators====&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;explosionGenerators&amp;lt;/code&amp;gt; subtable of &amp;lt;code&amp;gt;SFXTypes&amp;lt;/code&amp;gt; tells Spring which [[CEG]]s the unit&#039;s script can call, via the &amp;lt;code&amp;gt;EmitSFX()&amp;lt;/code&amp;gt; callout (See [[Animation-LuaCallouts#Effects]]). It is a simple array (number indexed table) of CEG names, prefaced by the string &amp;lt;code&amp;gt;&amp;quot;custom:&amp;quot;&amp;lt;/code&amp;gt;. &lt;br /&gt;
&lt;br /&gt;
====pieceExplosionGenerators====&lt;br /&gt;
{{new|83.0}}&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;pieceExplosionGenerators&amp;lt;/code&amp;gt; subtable of &amp;lt;code&amp;gt;SFXTypes&amp;lt;/code&amp;gt; tells Spring which [[CEG]]s the unit&#039;s script can pick at random to attach to a flying unit piece, created from the &amp;lt;code&amp;gt;Explode()&amp;lt;/code&amp;gt; callout (See [[Animation-LuaCallouts#Effects]]). It is a simple array (number indexed table) of CEG names, with no prefix.&lt;br /&gt;
&lt;br /&gt;
Forum thread (with examples): {{forumlink|topic=27554|title=pieceExplosionGenerators}}&lt;br /&gt;
&lt;br /&gt;
===sounds===&lt;br /&gt;
&lt;br /&gt;
The &amp;lt;code&amp;gt;sounds&amp;lt;/code&amp;gt; subtable of a UnitDef tells Spring which sound files to play when the unit triggers various events.&lt;br /&gt;
&lt;br /&gt;
Files are assumed to be in the &amp;lt;code&amp;gt;Sounds/&amp;lt;/code&amp;gt; directory; accepted formats are .wav and .ogg, the former being assumed if no extension is given.&lt;br /&gt;
&lt;br /&gt;
Sounds can be defined in one of three ways:&lt;br /&gt;
&lt;br /&gt;
# Each event can be used as though it were a &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; tag referring to the filename.&lt;br /&gt;
# Each event can be the name of a subtable, which is a simple array containing the filenames. One sound is picked at random from the list each time the event occurs.&lt;br /&gt;
# Each event can be the name of a subtable, which is a simple array containing further tables, which contain the following tags:&lt;br /&gt;
{{tag&lt;br /&gt;
|name = file&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of the sound to play.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = volume&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The default volume of the sound.}}&lt;br /&gt;
&lt;br /&gt;
Spring checks any referenced sound filename to see if a SoundItem has been created, which allows greater control over how it is played (See [[Sounds.lua]]).&lt;br /&gt;
&lt;br /&gt;
====sounds Example====&lt;br /&gt;
&lt;br /&gt;
For clarification, here is an example of all three methods:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;sounds = {&lt;br /&gt;
  -- Method 1&lt;br /&gt;
  ok = &#039;oksound&#039;, -- .wav appended&lt;br /&gt;
  -- Method 2&lt;br /&gt;
  arrived = {&lt;br /&gt;
    &#039;arrived1.wav&#039;,&lt;br /&gt;
    &#039;arrived2.wav&#039;,&lt;br /&gt;
  },&lt;br /&gt;
  -- Method 3&lt;br /&gt;
  select = {&lt;br /&gt;
    { file = &#039;selsound1.ogg&#039;, volume = 2.0 },&lt;br /&gt;
    { file = &#039;selsound2.ogg&#039;, volume = 2.5 },&lt;br /&gt;
  },&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
====sounds Events====&lt;br /&gt;
&lt;br /&gt;
The events called by the engine are as follows:&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = ok&lt;br /&gt;
|description = Unit is issued a command.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = select&lt;br /&gt;
|description = Unit is selected by the player.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = arrived&lt;br /&gt;
|description = Unit has arrived at its destination. Mobile ground units only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = build&lt;br /&gt;
|description = Unit begins building. Called for both factories and mobile construction units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = activate&lt;br /&gt;
|description = Unit is activated, i.e. Is turned on. Also called when a mobile ground unit starts moving.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = deactivate&lt;br /&gt;
|description = Unit deactivates, i.e. Is turned off.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = cant&lt;br /&gt;
|description = Unit cannot carry out this order. Loaded but not currently called by the engine.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{ItemType&lt;br /&gt;
|name = underattack&lt;br /&gt;
|description = Unit gets attacked. Loaded but not currently called by the engine.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===customParams===&lt;br /&gt;
The &amp;lt;code&amp;gt;customParams&amp;lt;/code&amp;gt; subtable of a UnitDef allows the game designer to give their units custom attributes, which can then be accessed via lua gadgets and widgets. It is a map (key-value pair indexed table) of strings. When accessing these attributes in lua the strings can be turned back into numbers, bools or even tables. This gives great control to game designers to essentially implement their own behaviour tags.&lt;br /&gt;
&lt;br /&gt;
There are no additional tags specific to this subtable&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
MC:L implements OO with inheritance (base classes in [http://sourceforge.net/p/mwspring/code/HEAD/tree/Gamedata/unitdefs_pre.lua#l36 unitdefs_pre.lua])&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{ExampleRepoLinks&lt;br /&gt;
|path = units/&lt;br /&gt;
|entity = UnitDefs&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Dev]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Mapdev:sunDir&amp;diff=14038</id>
		<title>Mapdev:sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Mapdev:sunDir&amp;diff=14038"/>
		<updated>2020-02-14T02:20:29Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Add a possibly more colloquial term&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt; sun, position, direction, sunDir, sun position, sun direction, sun grid &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;br /&gt;
&lt;br /&gt;
https://drive.google.com/file/d/15t9gVU0fsqzPequvxePgVTEe5IhCDw29/view?usp=sharing&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Mapdev:sunDir&amp;diff=14037</id>
		<title>Mapdev:sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Mapdev:sunDir&amp;diff=14037"/>
		<updated>2020-02-14T02:11:31Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Apparently I have to be more pedantic with the keywords&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt; sun, position, direction, sunDir, sun position, sun direction &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;br /&gt;
&lt;br /&gt;
https://drive.google.com/file/d/15t9gVU0fsqzPequvxePgVTEe5IhCDw29/view?usp=sharing&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18074</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18074"/>
		<updated>2020-02-14T02:10:35Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The droids you are looking for are in another castle: https://springrts.com/wiki/Mapdev:sunDir&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Mapdev:sunDir&amp;diff=14036</id>
		<title>Mapdev:sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Mapdev:sunDir&amp;diff=14036"/>
		<updated>2020-02-14T02:08:55Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Created page with &amp;quot;&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt; sun, position, direction, sunDir &amp;lt;/div&amp;gt;  This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt; sun, position, direction, sunDir &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;br /&gt;
&lt;br /&gt;
https://drive.google.com/file/d/15t9gVU0fsqzPequvxePgVTEe5IhCDw29/view?usp=sharing&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18073</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18073"/>
		<updated>2020-02-14T02:05:03Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: This page is going to end up being deleted, but in the process I learned a little about how to do some basic wiki stuffs. For those wiki changelog purists out there.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt; sun, position, direction, sunDir &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the wiki but has long since been lost.&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;br /&gt;
&lt;br /&gt;
https://drive.google.com/file/d/15t9gVU0fsqzPequvxePgVTEe5IhCDw29/view?usp=sharing&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18072</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18072"/>
		<updated>2020-02-14T02:00:30Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Apparently you can keyword stuff without doing it in the title&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;div class=&amp;quot;keywords&amp;quot;&amp;gt; Foo, Bar, Blaz &amp;lt;/div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the wiki but has long since been lost.&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;br /&gt;
&lt;br /&gt;
https://drive.google.com/file/d/15t9gVU0fsqzPequvxePgVTEe5IhCDw29/view?usp=sharing&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18071</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18071"/>
		<updated>2020-02-14T01:58:15Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the wiki but has long since been lost.&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;br /&gt;
&lt;br /&gt;
https://drive.google.com/file/d/15t9gVU0fsqzPequvxePgVTEe5IhCDw29/view?usp=sharing&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18070</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18070"/>
		<updated>2020-02-14T01:56:40Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the wiki but has long since been lost.&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
&lt;br /&gt;
[[File:Map_Grid.png]]&lt;br /&gt;
&lt;br /&gt;
If someone wants to make it better, here is a link to the PSD:&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18069</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18069"/>
		<updated>2020-02-14T01:55:23Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the wiki but has long since been lost.&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;br /&gt;
[[File:File.jpg]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=File:Map_Grid.png&amp;diff=21903</id>
		<title>File:Map Grid.png</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=File:Map_Grid.png&amp;diff=21903"/>
		<updated>2020-02-14T01:55:09Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: A grid which shows sun position using sunDir in 2d, representing the X and Z axes.&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Summary ==&lt;br /&gt;
A grid which shows sun position using sunDir in 2d, representing the X and Z axes.&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18068</id>
		<title>Sun Position Direction sunDir</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sun_Position_Direction_sunDir&amp;diff=18068"/>
		<updated>2020-02-14T01:53:25Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Created page with &amp;quot;The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the w...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;The title of this page has been keyword stuffed in order to hopefully catch any terms mappers might use when trying to find this grid. This grid existed 10+ years ago in the wiki but has long since been lost.&lt;br /&gt;
&lt;br /&gt;
This grid is meant to show on a 2d plane, where the sun position will be on your map and the values needed for x and z axis positioning.&lt;br /&gt;
&lt;br /&gt;
WARNING - It is entirely possible that the engine causes these values to be mirrored when the map loads, so pay attention. You can make it super easy to see where the sun position is by lowering it significantly (e.g. y = 0.2) and using terrain and trees to see the shadow positions. A little janky, but it works.&lt;br /&gt;
&lt;br /&gt;
Without further adieu, the grid:&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=UI_commands&amp;diff=18828</id>
		<title>UI commands</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=UI_commands&amp;diff=18828"/>
		<updated>2019-10-14T03:20:21Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Lists of commands, some are even explained */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Lua_Scripting|Lua Scripting]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
=How to use the console=&lt;br /&gt;
The ingame chat is the console. Open with hitting the `&amp;lt;code&amp;gt;return&amp;lt;/code&amp;gt;` or `&amp;lt;code&amp;gt;enter&amp;lt;/code&amp;gt;` key.&lt;br /&gt;
If you want to enter a command into ingame chat, you must add a &amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt; in front&amp;lt;br&amp;gt;&lt;br /&gt;
for example: &amp;lt;code&amp;gt;/commandhelp&amp;lt;/code&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
Some commands will also autocomplete if you press &amp;lt;code&amp;gt;TAB&amp;lt;/code&amp;gt;. So if you enter &amp;quot;/com&amp;quot; and then to press TAB, it will complete it to `/command` and tells you there is `/commandhelp` &amp;amp; `/commandlist`, if you now enter either `l` or `h` and press TAB again it will complete to one of them.&lt;br /&gt;
&lt;br /&gt;
Also commands are not case-sensitive.&lt;br /&gt;
&lt;br /&gt;
=Lists of commands, some are even explained=&lt;br /&gt;
&lt;br /&gt;
For a complete (excluding Lua commands &amp;amp; some engine `actions`) use:&lt;br /&gt;
&amp;lt;code&amp;gt;/commandlist&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Example output (104.0):&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow:auto; width:auto;&amp;quot;&amp;gt;&lt;br /&gt;
Chat commands plus description&lt;br /&gt;
==============================&lt;br /&gt;
/Atm                             (synced)    Gives 1000 metal and 1000 energy to the issuing players team&lt;br /&gt;
/Cheat                           (synced)    Enables/Disables cheating, which is required for a lot of other commands to be usable&lt;br /&gt;
/Destroy                         (synced)    Destroys one or multiple units by unit-ID, instantly&lt;br /&gt;
/DevLua                          (synced)    Enables/Disables Lua dev-mode (can cause desyncs if enabled)&lt;br /&gt;
/EditDefs                        (synced)    Allows/Disallows editing of unit-, feature- and weapon-defs through Lua&lt;br /&gt;
/Give [amount] &amp;lt;objectName|&#039;all&#039;&amp;gt;(synced)    Places one or multiple units of a single or multiple types on the map, instantly; by default to your own team. Example : /give 10 corkrog 3 - gives team 3 10 corkrogs.&lt;br /&gt;
/GlobalLOS                       (synced)    Enables/Disables global line-of-sight, which makes the whole map permanently visible to everyone or to a specific allyteam&lt;br /&gt;
/GodMode                         (synced)    Enables/Disables god-mode, which allows all players (even spectators) to control all units (even during replays, which will DESYNC them)&lt;br /&gt;
/LuaGaia                         (synced)    Allows reloading or disabling LuaGaia, and to send a chat message to LuaGaia scripts&lt;br /&gt;
/LuaRules                        (synced)    Allows reloading or disabling LuaRules, and to send a chat message to LuaRules scripts&lt;br /&gt;
/NoCost                          (synced)    Enables/Disables everything-for-free, which allows everyone to build everything for zero resource costs&lt;br /&gt;
/NoHelp                          (synced)    Enables/Disables widgets (LuaUI control)&lt;br /&gt;
/NoSpecDraw                      (synced)    Allows/Disallows spectators to draw on the map&lt;br /&gt;
/NoSpectatorChat                 (synced)    Enables/Disables spectators to use the chat&lt;br /&gt;
/ReloadCEGs                      (synced)    Reloads CEG scripts&lt;br /&gt;
/ReloadCOB                       (synced)    Reloads COB scripts&lt;br /&gt;
/Skip                            (synced)    Fast-forwards to a given frame, or stops fast-forwarding&lt;br /&gt;
/Take                            (synced)    Transfers all units of allied teams without any active players to the team of the issuing player&lt;br /&gt;
/AdvMapShading                   (unsynced)  Set or toggle advanced map shading mode&lt;br /&gt;
/AdvModelShading                 (unsynced)  Set or toggle advanced model shading mode&lt;br /&gt;
/AIControl                       (unsynced)  Creates a new instance of a Skirmish AI, to let it controll a specific team&lt;br /&gt;
/AIKill                          (unsynced)  Kills the Skirmish AI controlling a specified team&lt;br /&gt;
/AIList                          (unsynced)  Prints a list of all currently active Skirmish AIs&lt;br /&gt;
/AIReload                        (unsynced)  Reloads the Skirmish AI controlling a specified team&lt;br /&gt;
/AirMesh                         (unsynced)  Show/Hide the smooth air-mesh map overlay&lt;br /&gt;
/AllMapMarks                     (unsynced)  Show/Hide all map marks drawn so far&lt;br /&gt;
/Ally                            (unsynced)  Starts/Ends alliance of the local players ally-team with another ally-team&lt;br /&gt;
/ATM                             (unsynced)  Redirects command /ATM to its synced processor&lt;br /&gt;
/BufferText                      (unsynced)  Write the argument string(s) directly to the console history, but not anywhere else. This is useful for fast manual issuing of the command, later on&lt;br /&gt;
/Chat                            (unsynced)  Starts waiting for intput to be sent to &lt;br /&gt;
/ChatAll                         (unsynced)  Starts waiting for intput to be sent to All&lt;br /&gt;
/ChatAlly                        (unsynced)  Starts waiting for intput to be sent to Ally&lt;br /&gt;
/ChatSpec                        (unsynced)  Starts waiting for intput to be sent to Spec&lt;br /&gt;
/ClearMapMarks                   (unsynced)  Remove all map marks drawn so far&lt;br /&gt;
/Clock                           (unsynced)  Shows a small digital clock indicating the local time&lt;br /&gt;
/CmdColors                       (unsynced)  Reloads cmdcolors.txt&lt;br /&gt;
/CommandHelp                     (unsynced)  Prints info about a specific chat command (so far only synced/unsynced and the description)&lt;br /&gt;
/CommandList                     (unsynced)  Prints all the available chat commands with description (if available) to the console&lt;br /&gt;
/Console                         (unsynced)  Enables/Disables the in-game console&lt;br /&gt;
/ControlUnit                     (unsynced)  Start to first-person-control a unit&lt;br /&gt;
/Crash                           (unsynced)  Invoke an artificial crash through a NULL-pointer dereference (SIGSEGV)&lt;br /&gt;
/CreateVideo                     (unsynced)  Start/Stop capturing a video of the game in progress&lt;br /&gt;
/Cross                           (unsynced)  Allows one to exchange and modify the appearance of the cross/mouse-pointer in first-person-control view&lt;br /&gt;
/CtrlPanel                       (unsynced)  Reloads GUI config&lt;br /&gt;
/Debug                           (unsynced)  Enable/Disable debug rendering mode&lt;br /&gt;
/DebugColVol                     (unsynced)  Enable/Disable drawing of collision volumes&lt;br /&gt;
/DebugDrawAI                     (unsynced)  Enables/Disables debug drawing for AIs&lt;br /&gt;
/DebugGL                         (unsynced)  Enable/Disable OpenGL debug-context output&lt;br /&gt;
/DebugGLErrors                   (unsynced)  Enable/Disable OpenGL debug-errors&lt;br /&gt;
/DebugInfo                       (unsynced)  Print debug info to the chat/log-file about either: sound, profiling&lt;br /&gt;
/DebugPath                       (unsynced)  Enable/Disable drawing of pathfinder debug-data&lt;br /&gt;
/DebugTraceRay                   (unsynced)  Enable/Disable drawing of traceray debug-data&lt;br /&gt;
/DecGUIOpacity                   (unsynced)  Decreases the opacity(see-through-ness) of GUI elements&lt;br /&gt;
/DecreaseViewRadius              (unsynced)  Decrease the view radius (higher performance, uglier view)&lt;br /&gt;
/Deselect                        (unsynced)  Deselects all currently selected units&lt;br /&gt;
/Destroy                         (unsynced)  Destroys one or multiple units by unit-ID, instantly&lt;br /&gt;
/DistDraw                        (unsynced)  Set the distance between units and camera, at which they turn into far-textures (flat/texture-only representation) (Graphic setting)&lt;br /&gt;
/DistIcon                        (unsynced)  Set the distance between units and camera, at which they turn into icons (Graphic setting)&lt;br /&gt;
/DivByZero                       (unsynced)  Invoke an artificial crash by performing a division-by-Zero&lt;br /&gt;
/DrawInMap                       (unsynced)  Enables drawing on the map&lt;br /&gt;
/DrawLabel                       (unsynced)  Draws a label on the map at the current mouse-pointer position&lt;br /&gt;
/DrawTrees                       (unsynced)  Enable/Disable engine-tree rendering&lt;br /&gt;
/DumpState                       (unsynced)  dump game-state to file&lt;br /&gt;
/DynamicSky                      (unsynced)  Enable/Disable dynamic-sky rendering&lt;br /&gt;
/Echo                            (unsynced)  Write a string to the log file&lt;br /&gt;
/EndGraph                        (unsynced)  Enables/Disables the statistics graphs shown at the end of the game&lt;br /&gt;
/Exception                       (unsynced)  Invoke an artificial crash by throwing an std::runtime_error&lt;br /&gt;
/Font                            (unsynced)  Reloads the fonts&lt;br /&gt;
/FPS                             (unsynced)  Shows/Hides the frames-per-second indicator&lt;br /&gt;
/FPSHud                          (unsynced)  Enables/Disables HUD (GUI interface) shown in first-person-control mode&lt;br /&gt;
/Fullscreen                      (unsynced)  Switches fullscreen mode&lt;br /&gt;
/GameInfo                        (unsynced)  Enables/Disables game-info panel rendering&lt;br /&gt;
/GatherMode                      (unsynced)  Enter/Leave gather-wait command mode&lt;br /&gt;
/Give                            (unsynced)  Places one or multiple units of a single or multiple types on the map, instantly; by default to your own team&lt;br /&gt;
/GrabInput                       (unsynced)  Prevents/Enables the mouse from leaving the game window (windowed mode only)&lt;br /&gt;
/GroundDecals                    (unsynced)  Disable/Enable ground-decals rendering. Ground-decals are things like scars appearing on the map after an explosion.&lt;br /&gt;
/GroundDetail                    (unsynced)  Set the level of ground detail&lt;br /&gt;
/Group                           (unsynced)  Allows modifying the members of a group&lt;br /&gt;
/Group0                          (unsynced)  Allows modifying the members of group 0&lt;br /&gt;
/Group1                          (unsynced)  Allows modifying the members of group 1&lt;br /&gt;
/Group2                          (unsynced)  Allows modifying the members of group 2&lt;br /&gt;
/Group3                          (unsynced)  Allows modifying the members of group 3&lt;br /&gt;
/Group4                          (unsynced)  Allows modifying the members of group 4&lt;br /&gt;
/Group5                          (unsynced)  Allows modifying the members of group 5&lt;br /&gt;
/Group6                          (unsynced)  Allows modifying the members of group 6&lt;br /&gt;
/Group7                          (unsynced)  Allows modifying the members of group 7&lt;br /&gt;
/Group8                          (unsynced)  Allows modifying the members of group 8&lt;br /&gt;
/Group9                          (unsynced)  Allows modifying the members of group 9&lt;br /&gt;
/HardwareCursor                  (unsynced)  Enables/Disables hardware mouse-cursor support&lt;br /&gt;
/HideInterface                   (unsynced)  Hide/Show the GUI controlls&lt;br /&gt;
/IncGUIOpacity                   (unsynced)  Increases the opacity(see-through-ness) of GUI elements&lt;br /&gt;
/IncreaseViewRadius              (unsynced)  Increase the view radius (lower performance, nicer view)&lt;br /&gt;
/Info                            (unsynced)  Shows/Hides the player roster&lt;br /&gt;
/InputTextGeo                    (unsynced)  Move and/or resize the input-text field (the &amp;quot;Say: &amp;quot; thing)&lt;br /&gt;
/LastMsgPos                      (unsynced)  Moves the camera to show the position of the last message&lt;br /&gt;
/LessClouds                      (unsynced)  Decreases the density of clouds (higher performance)&lt;br /&gt;
/LessTrees                       (unsynced)  Decreases distance from the camera at which trees are still drawn&lt;br /&gt;
/LODScale                        (unsynced)  Set the scale for either of: LOD (level-of-detail), shadow-LOD, reflection-LOD, refraction-LOD&lt;br /&gt;
/LuaGaia                         (unsynced)  Redirects command /LuaGaia to its synced processor&lt;br /&gt;
/LuaRules                        (unsynced)  Redirects command /LuaRules to its synced processor&lt;br /&gt;
/LuaSave                         (unsynced)  Save the game state to a specific file, add -y to overwrite when file is already present&lt;br /&gt;
/LuaUI                           (unsynced)  Allows one to reload or disable LuaUI, or alternatively to send a chat message to LuaUI&lt;br /&gt;
/MapBorder                       (unsynced)  Set or toggle map-border rendering&lt;br /&gt;
/MapMarks                        (unsynced)  Enables/Disables map marks rendering&lt;br /&gt;
/mapmeshdrawer                   (unsynced)  Switch map-mesh rendering modes: 0=GCM, 1=HLOD, 2=ROAM&lt;br /&gt;
/MapShadowPolyOffset             (unsynced)  &lt;br /&gt;
/MaxNanoParticles                (unsynced)  Set the maximum number of nano-particles (Graphic setting)&lt;br /&gt;
/MaxParticles                    (unsynced)  Set the maximum number of particles (Graphics setting)&lt;br /&gt;
/MiniMap                         (unsynced)  FIXME document subcommands&lt;br /&gt;
/MoreClouds                      (unsynced)  Increases the density of clouds (lower performance)&lt;br /&gt;
/MoreTrees                       (unsynced)  Increases distance from the camera at which trees are still drawn&lt;br /&gt;
/Mouse1                          (unsynced)  Simulates a mouse button press of button 1&lt;br /&gt;
/Mouse2                          (unsynced)  Simulates a mouse button press of button 2&lt;br /&gt;
/Mouse3                          (unsynced)  Simulates a mouse button press of button 3&lt;br /&gt;
/Mouse4                          (unsynced)  Simulates a mouse button press of button 4&lt;br /&gt;
/Mouse5                          (unsynced)  Simulates a mouse button press of button 5&lt;br /&gt;
/MoveBack                        (unsynced)  Moves the camera Back a bit&lt;br /&gt;
/MoveDown                        (unsynced)  Moves the camera Down a bit&lt;br /&gt;
/MoveFast                        (unsynced)  Moves the camera Fast a bit&lt;br /&gt;
/MoveForward                     (unsynced)  Moves the camera Forward a bit&lt;br /&gt;
/MoveLeft                        (unsynced)  Moves the camera Left a bit&lt;br /&gt;
/MoveRight                       (unsynced)  Moves the camera Right a bit&lt;br /&gt;
/MoveSlow                        (unsynced)  Moves the camera Slow a bit&lt;br /&gt;
/MoveUp                          (unsynced)  Moves the camera Up a bit&lt;br /&gt;
/MuteSound                       (unsynced)  Mute/Unmute the current sound system&lt;br /&gt;
/NoLuaDraw                       (unsynced)  Allow/Disallow Lua to draw on the map&lt;br /&gt;
/PasteText                       (unsynced)  Paste either the argument string(s) or if none given, the content of the clip-board to chat input&lt;br /&gt;
/Pause                           (unsynced)  Pause/Unpause the game&lt;br /&gt;
/QuitForce                       (unsynced)  Exits game to system&lt;br /&gt;
/QuitMenu                        (unsynced)  Opens the quit-menu, if it is not already open&lt;br /&gt;
/QuitMessage                     (unsynced)  Deprecated, see /Quit instead (was used to quite the game immediately)&lt;br /&gt;
/ReloadForce                     (unsynced)  Exits game to menu&lt;br /&gt;
/ReloadGame                      (unsynced)  Restarts the game with the initially provided start-script&lt;br /&gt;
/ReloadShaders                   (unsynced)  Reloads all engine shaders&lt;br /&gt;
/ResBar                          (unsynced)  Shows/Hides team resource storage indicator bar&lt;br /&gt;
/Resync                          (unsynced)  Redirects command /Resync to its synced processor&lt;br /&gt;
/SafeGL                          (unsynced)  Enables/Disables OpenGL safe-mode&lt;br /&gt;
/Save                            (unsynced)  Save the game state to a specific file, add -y to overwrite when file is already present&lt;br /&gt;
/SaveGame                        (unsynced)  Save the game state to QuickSave.ssf (BROKEN)&lt;br /&gt;
/Say                             (unsynced)  Say something in (public) chat&lt;br /&gt;
/ScreenShot                      (unsynced)  Take a low quality JPG screen-shot of the current view&lt;br /&gt;
/ScreenShot png                  (unsynced)  Take a high quality PNG screen-shot of the current view&lt;br /&gt;
/Select                          (unsynced)  &amp;lt;chat command description: Select&amp;gt;&lt;br /&gt;
/SelectCycle                     (unsynced)  &amp;lt;chat command description: SelectUnits&amp;gt;&lt;br /&gt;
/SelectUnits                     (unsynced)  &amp;lt;chat command description: SelectUnits&amp;gt;&lt;br /&gt;
/Send                            (unsynced)  Send a string as raw network message to the game host (for debugging only)&lt;br /&gt;
/Set                             (unsynced)  Set a config key=value pair&lt;br /&gt;
/Shadows                         (unsynced)  Disables/Enables shadows rendering: -1=disabled, 0=off, 1=full shadows, 2=skip terrain shadows&lt;br /&gt;
/ShareDialog                     (unsynced)  Opens the share dialog, which allows you to send units and resources to other players&lt;br /&gt;
/ShowElevation                   (unsynced)  Enable rendering of the auxiliary height-map overlay&lt;br /&gt;
/ShowMetalMap                    (unsynced)  Enable rendering of the auxiliary metal-map overlay&lt;br /&gt;
/ShowPathCost                    (unsynced)  Enable rendering of the path cost-map overlay&lt;br /&gt;
/ShowPathFlow                    (unsynced)  Enable/Disable rendering of the path flow-map overlay&lt;br /&gt;
/ShowPathHeat                    (unsynced)  Enable/Disable rendering of the path heat-map overlay&lt;br /&gt;
/ShowPathTraversability          (unsynced)  Enable rendering of the path traversability-map overlay&lt;br /&gt;
/ShowPathType                    (unsynced)  Shows path traversability for a given MoveDefName, MoveDefID or UnitDefName&lt;br /&gt;
/ShowStandard                    (unsynced)  Disable rendering of all auxiliary map overlays&lt;br /&gt;
/SlowDown                        (unsynced)  Decreases the simulation speed. The engine will try to simulate less frames per second&lt;br /&gt;
/SoundChannelEnable              (unsynced)  Enable/Disable specific sound channels: UnitReply, General, Battle, UserInterface, Music&lt;br /&gt;
/SoundDevice                     (unsynced)  Switch the sound output system (currently only OpenAL / NullAudio)&lt;br /&gt;
/SpecFullView                    (unsynced)  Sets or toggles between full LOS or ally-team LOS, if the local user is a spectator&lt;br /&gt;
/Spectator                       (unsynced)  Lets the local user give up control over a team, and start spectating&lt;br /&gt;
/SpecTeam                        (unsynced)  Lets the local user specify the team to follow, if he is a spectator&lt;br /&gt;
/Speed                           (unsynced)  Shows/Hides the simulation speed indicator&lt;br /&gt;
/SpeedControl                    (unsynced)  Sets how server adjusts speed according to player&#039;s load (CPU), 1: use average, 2: use highest,&lt;br /&gt;
/SpeedUp                         (unsynced)  Increases the simulation speed. The engine will try to simulate more frames per second&lt;br /&gt;
/Take                            (unsynced)  Redirects command /Take to its synced processor&lt;br /&gt;
/Team                            (unsynced)  Lets the local user change to another team&lt;br /&gt;
/TeamHighlight                   (unsynced)  Enables/Disables uncontrolled team blinking&lt;br /&gt;
/ToggleInfo                      (unsynced)  Toggles current info texture view&lt;br /&gt;
/ToggleLOS                       (unsynced)  Enable rendering of the auxiliary LOS-map overlay&lt;br /&gt;
/ToolTip                         (unsynced)  Enables/Disables the general tool-tips, displayed when hovering over units. features or the map&lt;br /&gt;
/Track                           (unsynced)  Start following the selected unit(s) with the camera&lt;br /&gt;
/TrackMode                       (unsynced)  Shift through different ways of following selected unit(s)&lt;br /&gt;
/TrackOff                        (unsynced)  Stop following the selected unit(s) with the camera&lt;br /&gt;
/TSet                            (unsynced)  Set a config key=value pair in the overlay, meaning it will not be persisted for future games&lt;br /&gt;
/ViewSelection                   (unsynced)  Moves the camera to the center of the currently selected units&lt;br /&gt;
/VSync                           (unsynced)  Enables/Disables vertical-sync (Graphics setting)&lt;br /&gt;
/W                               (unsynced)  Say something in private to a specific player, by player-name&lt;br /&gt;
/Water                           (unsynced)  Set water rendering mode: 0=basic, 1=reflective, 2=dynamic, 3=reflective&amp;amp;refractive, 4=bump-mapped&lt;br /&gt;
/WByNum                          (unsynced)  Say something in private to a specific player, by player-ID&lt;br /&gt;
/WireMap                         (unsynced)  Toggle wireframe-mode drawing of map geometry&lt;br /&gt;
/WireModel                       (unsynced)  Toggle wireframe-mode drawing of model geometry&lt;br /&gt;
/WireSky                         (unsynced)  Toggle wireframe-mode drawing of skydome geometry&lt;br /&gt;
/WireTree                        (unsynced)  Toggle wireframe-mode drawing of tree geometry&lt;br /&gt;
/WireWater                       (unsynced)  Toggle wireframe-mode drawing of water geometry&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
More commands:&lt;br /&gt;
&amp;lt;pre style=&amp;quot;overflow:auto; width:auto;&amp;quot;&amp;gt;&lt;br /&gt;
/bind &amp;lt;keyset&amp;gt; &amp;lt;action&amp;gt;                      Binds a key or key combination. Example with a key: /bind a reclaim. Example with a &amp;quot;key combination&amp;quot;: /bind ctrl+a reclaim&lt;br /&gt;
/luagaia reload                              Reloads gaia gadgets&lt;br /&gt;
/luarules reload                             Reloads gadgets&lt;br /&gt;
/luaui reload&lt;br /&gt;
/luaui tweakgui                              Tweak mode on&lt;br /&gt;
/Setmaxspeed #	                             Changes the maximum speed (default is 3.0)&lt;br /&gt;
/Setminspeed #                               Changes the minimum speed (default is 0.3)&lt;br /&gt;
/unbind &amp;lt;keyset&amp;gt; &amp;lt;action&amp;gt;                    Unbinds a key or key combination. Example: /unbind a reclaim.&lt;br /&gt;
/unbindaction &amp;lt;action&amp;gt;	                     Unbinds all keybinds that uses &amp;lt;action&amp;gt;.&lt;br /&gt;
/unbindkeyset &amp;lt;keyset&amp;gt;	                     Unbinds all bindings that uses &amp;lt;keyset&amp;gt;.&lt;br /&gt;
/unbindall	                             Unbinds all keys except the chat keybinding.&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Scripting=&lt;br /&gt;
In Lua scripts, these commands can be used like this:&amp;lt;br&amp;gt;&lt;br /&gt;
Spring.SendCommands(&amp;quot;resbar 0&amp;quot;)&amp;lt;br&amp;gt;&lt;br /&gt;
notice the missing / when used like this.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Help]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Movedefs.lua&amp;diff=14820</id>
		<title>Movedefs.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Movedefs.lua&amp;diff=14820"/>
		<updated>2019-03-23T01:01:08Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* depthModParams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Movedefs.lua=&lt;br /&gt;
==Location==&lt;br /&gt;
&amp;lt;code&amp;gt;movedefs.lua&amp;lt;/code&amp;gt; is a file in the &amp;lt;code&amp;gt;Gamedata/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
This file defines &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; which are used to determine pathing for units.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which parses the data from this file is viewable here: &lt;br /&gt;
* {{sourcelink|file=rts/Sim/MoveTypes/MoveDefHandler.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
A mobile unit is assigned a &#039;&#039;&#039;MoveClass&#039;&#039;&#039; using the {{xtaglink|Gamedev:UnitDefs|movementClass}} tag. The engine determines the unit&#039;s pathfinding based on the properties of the &#039;&#039;&#039;MoveClass&#039;&#039;&#039;, so analogous properties (e.g. {{xtaglink|Gamedev:UnitDefs|footprintX}}) in the [[Gamedev:UnitDefs|UnitDef]] should be the same for optimal behaviour.&lt;br /&gt;
&lt;br /&gt;
All &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; must belong to one of four possible types. A &#039;&#039;&#039;MoveClass&#039;&#039;&#039; is assigned a type simply by including it within the name string e.g. &amp;lt;code&amp;gt;Tank_MyMoveClassName&amp;lt;/code&amp;gt;. Types are used in &#039;&#039;&#039;[[Mapdev:terraintype|TypeMaps]]&#039;&#039;&#039; of Spring maps, which allow mappers to set per-type speed multipliers. &lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
* &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt; - A ground based &#039;&#039;&#039;MoveClass&#039;&#039;&#039;. The default type if no matching type string is found.&lt;br /&gt;
* &amp;lt;code&amp;gt;Tank&amp;lt;/code&amp;gt; - A ground based &#039;&#039;&#039;MoveClass&#039;&#039;&#039;. Identical to &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt; other than interaction with &#039;&#039;&#039;TypeMaps&#039;&#039;&#039;.&lt;br /&gt;
* &amp;lt;code&amp;gt;Ship&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Boat&amp;lt;/code&amp;gt; - Are synonyms. All ships / boat &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; must belong to this type to behave as ships.&lt;br /&gt;
* &amp;lt;code&amp;gt;Hover&amp;lt;/code&amp;gt; - All hovercraft &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; (traverse any depth of water without speed reduction) must belong to this class, as well as having {{xtaglink|Gamedev:UnitDefs|canHover}} in their [[Gamedev:UnitDefs|UnitDef]] to behave as hovers.&lt;br /&gt;
&lt;br /&gt;
==MoveClass Tags==&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of the &#039;&#039;&#039;MoveClass&#039;&#039;&#039;. Usually passed by the sub-table variable name rather than using this tag (See [[#Example]]). Prior to 9.50 this had to contain &amp;quot;tank&amp;quot;, &amp;quot;hover&amp;quot;, &amp;quot;ship&amp;quot; or &amp;quot;boat&amp;quot; respectively for non-Bot types. This is now set using {{taglink|speedModClass}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speedModClass&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|special = {{new|95.0}}&lt;br /&gt;
|description = Determines the speed modifier class used (See [[Mapdev:terraintype]]). Accepted values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = Tank, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; = KBot, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; = Hover, &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; = Ship.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How wide the &#039;&#039;&#039;MoveClass&#039;&#039;&#039; is in footprint units, left to right. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Gamedev:UnitDefs|footprintX}} of its [[Gamedev:UnitDefs|UnitDef]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintZ&lt;br /&gt;
|type = int&lt;br /&gt;
|default = footprintX&lt;br /&gt;
|description = How wide the &#039;&#039;&#039;MoveClass&#039;&#039;&#039; is in footprint units, top to bottom. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Gamedev:UnitDefs|footprintZ}} of its [[Gamedev:UnitDefs|UnitDef]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crushStrength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = Power of a unit with this &#039;&#039;&#039;MoveClass&#039;&#039;&#039; to crush features and units. Any features with a {{xtaglink|Gamedev:FeatureDefs|crushResistance}} less than this value will be crushed on contact. Any units with crushing enabled via [[Lua_SyncedCtrl#Unit_Control|Spring.SetUnitBlocking]]), in an impact where collider impulse exceeds collidee impulse and whose {{xtaglink|Gamedev:UnitDefs|crushResistance}} is less than this value will also be crushed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxSlope&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 60.0 (15.0 for hover types)&lt;br /&gt;
|description = The maximum steepness of slope a unit with this &#039;&#039;&#039;MoveClass&#039;&#039;&#039; can climb in degrees. For further details see [[#How_slope_is_determined]].}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = slopeMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 4.0 / (maxSlope + 0.001)&lt;br /&gt;
|description = How much a slope will slow a unit, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means no slowdown.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = avoidMobilesOnPath&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Do the units attempt to avoid other mobile units when pathing?&lt;br /&gt;
* Pro: groups moving without a ctrl-order clump much less&lt;br /&gt;
* Contra: groups moving with a ctrl-order are less organized&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowTerrainCollisions&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|96.0}}&lt;br /&gt;
|description = Disable this to improve handling of large (&amp;gt;4 x 4) footprint units (See {{mantis|4217}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowRawMovement&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|description = Enables native &amp;quot;raw move&amp;quot; (straight-line path) support  (See also [[Lua_SyncedCtrl|Spring.SetUnitMoveGoal]] and {{mantis|4412}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Heat Tags ===&lt;br /&gt;
These tags are used in unit avoidance. &lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatMapping&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = This enables/disables generation and usage of path heats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0042&lt;br /&gt;
|description = The pathfinder cost modifier that is multiplied by the heat of the current square.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatProduced&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 30&lt;br /&gt;
|description = How much heat to place on a square if a path goes through it. &amp;lt;code&amp;gt;heat set = max(currentSquareHeat, heatProduced)&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Tank &amp;amp; Bot-Only Tags ===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = depthMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description =  How much water will slow amphibious units. The deeper the water, the slower the movement.&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Replaced with a subtable in Spring 86.x&amp;lt;/span&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The maximum depth of water in [[elmo]]s the unit can wade through.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Ship-Only Tags ===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = The minimum depth of water in [[elmo]]s the ship requires to float in.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = subMarine&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the ship a submarine; can it move underneath other ships?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Sub Tables==&lt;br /&gt;
===depthModParams===&lt;br /&gt;
Only read for &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Tank&amp;lt;/code&amp;gt; &#039;&#039;&#039;MoveClasses&#039;&#039;&#039;, the depthModParams group contains several sub-tags. Depthmod is a system for changing the speed of units depending on how deep they are underwater.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       new formula is given by&lt;br /&gt;
         if h &amp;lt; depthModParams.minHeight: 1.0&lt;br /&gt;
         if h &amp;gt; depthModParams.maxHeight: 0.0&lt;br /&gt;
         else:&lt;br /&gt;
           depthScale = MAX(0.01, MIN(depthModParams.maxScale, (a * h * h) + (b * h) + c))&lt;br /&gt;
           depthMod = 1 / depthScale&lt;br /&gt;
       where&lt;br /&gt;
         h = unit&#039;s absolute height below water surface&lt;br /&gt;
         a = depthModParams.quadraticCoeff&lt;br /&gt;
         b = depthModParams.linearCoeff&lt;br /&gt;
         c = depthModParams.constantCoeff&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minHeight &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description =  The minimum depth where the depthMod curve applies.  If the unit is shallower than the minHeight, no change in speed occurs. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxHeight &lt;br /&gt;
|type = float&lt;br /&gt;
|default = MAX_FLOAT&lt;br /&gt;
|description =  The maximum depth where the depthMod curve applies.  If the unit is deeper than the maxHeight, the unit is immobilized.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following tags control the behavior of the unit within the active portion of the curve (depth is greater than {{taglink|minHeight}} but less than {{taglink|maxHeight}}). It would be best to simply open up your graphing program of choice and use the provided formula, but if you&#039;re scared of graphs you should read the descriptions below:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = MAX_FLOAT&lt;br /&gt;
|description =  This is the cap on how severe the depth effect can be. For example, lets say that you use a maxScale value of 2. If a unit is at the depth where its scale reaches the max (usually near its maximum depth; with a maxScale value of 2), the slowest it will go is half of its maximum speed. In other words, (maxVelocity / maxScale). Therefore, as another example, a value of 4 would cause the unit&#039;s maximum speed (near the units maximum depth) to be 25% of it&#039;s maxVelocity.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = quadraticCoeff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description =  The application of the speed-divider effect is modelled as a quadratic.  This is the &amp;quot;depth-squared&amp;quot; component of that.  That is, a value set here will be applied exponentially as the unit gets deeper, therefore it is best to use very small numbers for this tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = linearCoeff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = depthMod&lt;br /&gt;
|description =  The application of the speed-divider effect is modelled as a quadratic.  This component makes divisor increase linearly with the depth of the unit.  So with a value of 0.1, for example, a unit would go from 1/2 speed to 1/3 speed and 1/3 speed to 1/4 speed each time it goes 10 units deeper.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constantCoeff &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description =  The application of the speed-divider effect is modelled as a quadratic.  This is the constant component of the divisor.  If you want a gradual decrease of speed and your {{taglink|minHeight|0}} (the waterline) then this value &#039;&#039;&#039;must&#039;&#039;&#039; be 1.  Using less than 1 will cause the unit to go &#039;&#039;faster&#039;&#039; as it hits the water, and using greater than 1 will cause the unit to abruptly slow down the moment it gets its feet wet.  If you&#039;re not using {{taglink|minHeight|0}}, you&#039;ll have to adjust this value accordingly to get a smooth application of the depthMod divider.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===speedModMults===&lt;br /&gt;
{{new|86.0}}&lt;br /&gt;
&lt;br /&gt;
These previously hard-coded variables allow control over how the pathfinder (default only, not [[QTPFS]], see [[Modrules.lua]]) calculates the cost for a &#039;&#039;&#039;MoveClass&#039;&#039;&#039; for squares containing mobile units, if and only if {{taglink|avoidMobilesOnPath|true}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mobileBusyMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = The cost multiplier for mobile units which are &#039;Busy&#039;; Not currently being built and with a non-empty command queue, but not moving on a path. Clamped to values above &amp;lt;code&amp;gt;0.01&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mobileIdleMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.35&lt;br /&gt;
|description = The cost multiplier for mobile units which are &#039;Idle&#039;; Either currently being built or with an empty command queue. Clamped to values above &amp;lt;code&amp;gt;0.01&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mobileMoveMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.65&lt;br /&gt;
|description = The cost multiplier for mobile units which are &#039;Moving&#039;; Trying to follow their own path. Clamped to values above &amp;lt;code&amp;gt;0.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==How slope is determined==&lt;br /&gt;
Spring doesn&#039;t represent terrain slopes in degrees, internally it uses&lt;br /&gt;
&amp;lt;code&amp;gt;(1.0 - the terrain normal&#039;s y-component)&amp;lt;/code&amp;gt; so the slope of vertical faces is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and that of horizontal ones &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. A unit&#039;s &amp;lt;code&amp;gt;maxSlope&amp;lt;/code&amp;gt; value (which is in&lt;br /&gt;
degrees in its movedef) is converted so that the &amp;quot;can we go here?&amp;quot; (ie&lt;br /&gt;
&amp;quot;&amp;lt;code&amp;gt;maxSlope &amp;gt; terrainSlope&amp;lt;/code&amp;gt;?&amp;quot;) comparisons are meaningful, the formula&lt;br /&gt;
is &amp;lt;code&amp;gt;1.0 - cos(DEG2RAD(maxSlope * 1.5))&amp;lt;/code&amp;gt;. If you want to know the terrain angle in degrees, compute &amp;lt;code&amp;gt;RAD2DEG(arccos(1.0 - terrainSlope))&amp;lt;/code&amp;gt;. For a bot with a &amp;lt;code&amp;gt;maxSlope&amp;lt;/code&amp;gt; of 36 degrees (~0.41221 in &amp;quot;Spring format&amp;quot;), the maximum tolerable terrain angle is approximately&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RAD2DEG(arccos(1.0 - 0.41221))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or 54 degrees. If &amp;lt;code&amp;gt;maxSlope&amp;lt;/code&amp;gt; was &amp;lt;code&amp;gt;30&amp;lt;/code&amp;gt;, the MTTA would be 45, and if it was &amp;lt;code&amp;gt;60&amp;lt;/code&amp;gt; (the highest sensible value due to that 1.5 scalar and the absence of overhanging cliffs) the bot could mount any terrain. In other words you do not need the long mathematical derivation, just remember that&lt;br /&gt;
&amp;lt;code&amp;gt;maxTerrainAngle = maxSlope * 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--kloot, Thu Jul 31, 2008&lt;br /&gt;
&lt;br /&gt;
==Code to check your movdefs==&lt;br /&gt;
{{forumlink|topic=24866|title=A resource to check movedefs}} that game developers have used for years and find it quite useful.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===External Examples===&lt;br /&gt;
[http://imolarpg.dyndns.org/trac/balatest/browser/trunk/gamedata/movedefs.lua &#039;Balanced Annihilation&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[http://spring1944.svn.sourceforge.net/viewvc/spring1944/trunk/S44Main.sdd/gamedata/movedefs.lua?&amp;amp;view=markup &#039;Spring: 1944&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/trunk/SpringTutorialGame.sdd/Gamedata/movedefs.lua &#039;Spring Tutorial Game&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/gamedata/movedefs.lua &#039;ZeroK&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[[Category:Gamedata]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Movedefs.lua&amp;diff=14819</id>
		<title>Movedefs.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Movedefs.lua&amp;diff=14819"/>
		<updated>2019-03-23T00:53:45Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* depthModParams */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;=Movedefs.lua=&lt;br /&gt;
==Location==&lt;br /&gt;
&amp;lt;code&amp;gt;movedefs.lua&amp;lt;/code&amp;gt; is a file in the &amp;lt;code&amp;gt;Gamedata/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
This file defines &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; which are used to determine pathing for units.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which parses the data from this file is viewable here: &lt;br /&gt;
* {{sourcelink|file=rts/Sim/MoveTypes/MoveDefHandler.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
A mobile unit is assigned a &#039;&#039;&#039;MoveClass&#039;&#039;&#039; using the {{xtaglink|Gamedev:UnitDefs|movementClass}} tag. The engine determines the unit&#039;s pathfinding based on the properties of the &#039;&#039;&#039;MoveClass&#039;&#039;&#039;, so analogous properties (e.g. {{xtaglink|Gamedev:UnitDefs|footprintX}}) in the [[Gamedev:UnitDefs|UnitDef]] should be the same for optimal behaviour.&lt;br /&gt;
&lt;br /&gt;
All &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; must belong to one of four possible types. A &#039;&#039;&#039;MoveClass&#039;&#039;&#039; is assigned a type simply by including it within the name string e.g. &amp;lt;code&amp;gt;Tank_MyMoveClassName&amp;lt;/code&amp;gt;. Types are used in &#039;&#039;&#039;[[Mapdev:terraintype|TypeMaps]]&#039;&#039;&#039; of Spring maps, which allow mappers to set per-type speed multipliers. &lt;br /&gt;
&lt;br /&gt;
===Types===&lt;br /&gt;
* &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt; - A ground based &#039;&#039;&#039;MoveClass&#039;&#039;&#039;. The default type if no matching type string is found.&lt;br /&gt;
* &amp;lt;code&amp;gt;Tank&amp;lt;/code&amp;gt; - A ground based &#039;&#039;&#039;MoveClass&#039;&#039;&#039;. Identical to &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt; other than interaction with &#039;&#039;&#039;TypeMaps&#039;&#039;&#039;.&lt;br /&gt;
* &amp;lt;code&amp;gt;Ship&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;Boat&amp;lt;/code&amp;gt; - Are synonyms. All ships / boat &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; must belong to this type to behave as ships.&lt;br /&gt;
* &amp;lt;code&amp;gt;Hover&amp;lt;/code&amp;gt; - All hovercraft &#039;&#039;&#039;MoveClasses&#039;&#039;&#039; (traverse any depth of water without speed reduction) must belong to this class, as well as having {{xtaglink|Gamedev:UnitDefs|canHover}} in their [[Gamedev:UnitDefs|UnitDef]] to behave as hovers.&lt;br /&gt;
&lt;br /&gt;
==MoveClass Tags==&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of the &#039;&#039;&#039;MoveClass&#039;&#039;&#039;. Usually passed by the sub-table variable name rather than using this tag (See [[#Example]]). Prior to 9.50 this had to contain &amp;quot;tank&amp;quot;, &amp;quot;hover&amp;quot;, &amp;quot;ship&amp;quot; or &amp;quot;boat&amp;quot; respectively for non-Bot types. This is now set using {{taglink|speedModClass}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speedModClass&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|special = {{new|95.0}}&lt;br /&gt;
|description = Determines the speed modifier class used (See [[Mapdev:terraintype]]). Accepted values are &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; = Tank, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; = KBot, &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; = Hover, &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; = Ship.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How wide the &#039;&#039;&#039;MoveClass&#039;&#039;&#039; is in footprint units, left to right. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Gamedev:UnitDefs|footprintX}} of its [[Gamedev:UnitDefs|UnitDef]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintZ&lt;br /&gt;
|type = int&lt;br /&gt;
|default = footprintX&lt;br /&gt;
|description = How wide the &#039;&#039;&#039;MoveClass&#039;&#039;&#039; is in footprint units, top to bottom. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;. For mobile units this should be the same as the {{xtaglink|Gamedev:UnitDefs|footprintZ}} of its [[Gamedev:UnitDefs|UnitDef]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crushStrength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = Power of a unit with this &#039;&#039;&#039;MoveClass&#039;&#039;&#039; to crush features and units. Any features with a {{xtaglink|Gamedev:FeatureDefs|crushResistance}} less than this value will be crushed on contact. Any units with crushing enabled via [[Lua_SyncedCtrl#Unit_Control|Spring.SetUnitBlocking]]), in an impact where collider impulse exceeds collidee impulse and whose {{xtaglink|Gamedev:UnitDefs|crushResistance}} is less than this value will also be crushed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxSlope&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 60.0 (15.0 for hover types)&lt;br /&gt;
|description = The maximum steepness of slope a unit with this &#039;&#039;&#039;MoveClass&#039;&#039;&#039; can climb in degrees. For further details see [[#How_slope_is_determined]].}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = slopeMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 4.0 / (maxSlope + 0.001)&lt;br /&gt;
|description = How much a slope will slow a unit, &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means no slowdown.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = avoidMobilesOnPath&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Do the units attempt to avoid other mobile units when pathing?&lt;br /&gt;
* Pro: groups moving without a ctrl-order clump much less&lt;br /&gt;
* Contra: groups moving with a ctrl-order are less organized&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowTerrainCollisions&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|96.0}}&lt;br /&gt;
|description = Disable this to improve handling of large (&amp;gt;4 x 4) footprint units (See {{mantis|4217}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowRawMovement&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|104.0}}&lt;br /&gt;
|description = Enables native &amp;quot;raw move&amp;quot; (straight-line path) support  (See also [[Lua_SyncedCtrl|Spring.SetUnitMoveGoal]] and {{mantis|4412}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Heat Tags ===&lt;br /&gt;
These tags are used in unit avoidance. &lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatMapping&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = This enables/disables generation and usage of path heats.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0042&lt;br /&gt;
|description = The pathfinder cost modifier that is multiplied by the heat of the current square.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatProduced&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 30&lt;br /&gt;
|description = How much heat to place on a square if a path goes through it. &amp;lt;code&amp;gt;heat set = max(currentSquareHeat, heatProduced)&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Tank &amp;amp; Bot-Only Tags ===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = depthMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description =  How much water will slow amphibious units. The deeper the water, the slower the movement.&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Replaced with a subtable in Spring 86.x&amp;lt;/span&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The maximum depth of water in [[elmo]]s the unit can wade through.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Ship-Only Tags ===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minWaterDepth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = The minimum depth of water in [[elmo]]s the ship requires to float in.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = subMarine&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the ship a submarine; can it move underneath other ships?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Sub Tables==&lt;br /&gt;
===depthModParams===&lt;br /&gt;
Only read for &amp;lt;code&amp;gt;Bot&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;Tank&amp;lt;/code&amp;gt; &#039;&#039;&#039;MoveClasses&#039;&#039;&#039;, the depthModParams group contains several sub-tags. Depthmod is a system for changing the speed of units depending on how deep they are underwater.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
       new formula is given by&lt;br /&gt;
         if h &amp;lt; depthModParams.minHeight: 1.0&lt;br /&gt;
         if h &amp;gt; depthModParams.maxHeight: 0.0&lt;br /&gt;
         else:&lt;br /&gt;
           depthScale = MAX(0.01, MIN(depthModParams.maxScale, (a * h * h) + (b * h) + c))&lt;br /&gt;
           depthMod = 1 / depthScale&lt;br /&gt;
       where&lt;br /&gt;
         h = unit&#039;s absolute height below water surface&lt;br /&gt;
         a = depthModParams.quadraticCoeff&lt;br /&gt;
         b = depthModParams.linearCoeff&lt;br /&gt;
         c = depthModParams.constantCoeff&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minHeight &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description =  The minimum depth where the depthMod curve applies.  If the unit is shallower than the minHeight, no change in speed occurs. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxHeight &lt;br /&gt;
|type = float&lt;br /&gt;
|default = MAX_FLOAT&lt;br /&gt;
|description =  The maximum depth where the depthMod curve applies.  If the unit is deeper than the maxHeight, the unit is immobilized.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
The following tags control the behavior of the unit within the active portion of the curve (depth is greater than {{taglink|minHeight}} but less than {{taglink|maxHeight}}). It would be best to simply open up your graphing program of choice and use the provided formula, but if you&#039;re scared of graphs you should read the descriptions below:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxScale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = MAX_FLOAT&lt;br /&gt;
|description =  This is the cap on how severe the depth effect can be. For example, lets say that you use a maxScale value of 2. If a unit is near its maximum depth (with a maxScale value of 2), the slowest it will go is half of its maximum speed. In other words, (maxVelocity / maxScale). Therefore, as another example, a value of 4 would cause the unit&#039;s maximum speed (near maximum depth) to be 25% of it&#039;s maxVelocity.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = quadraticCoeff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description =  The application of the speed-divider effect is modelled as a quadratic.  This is the &amp;quot;depth-squared&amp;quot; component of that.  That is, a value set here will be applied exponentially as the unit gets deeper, therefore it is best to use very small numbers for this tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = linearCoeff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = depthMod&lt;br /&gt;
|description =  The application of the speed-divider effect is modelled as a quadratic.  This component makes divisor increase linearly with the depth of the unit.  So with a value of 0.1, for example, a unit would go from 1/2 speed to 1/3 speed and 1/3 speed to 1/4 speed each time it goes 10 units deeper.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = constantCoeff &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description =  The application of the speed-divider effect is modelled as a quadratic.  This is the constant component of the divisor.  If you want a gradual decrease of speed and your {{taglink|minHeight|0}} (the waterline) then this value &#039;&#039;&#039;must&#039;&#039;&#039; be 1.  Using less than 1 will cause the unit to go &#039;&#039;faster&#039;&#039; as it hits the water, and using greater than 1 will cause the unit to abruptly slow down the moment it gets its feet wet.  If you&#039;re not using {{taglink|minHeight|0}}, you&#039;ll have to adjust this value accordingly to get a smooth application of the depthMod divider.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===speedModMults===&lt;br /&gt;
{{new|86.0}}&lt;br /&gt;
&lt;br /&gt;
These previously hard-coded variables allow control over how the pathfinder (default only, not [[QTPFS]], see [[Modrules.lua]]) calculates the cost for a &#039;&#039;&#039;MoveClass&#039;&#039;&#039; for squares containing mobile units, if and only if {{taglink|avoidMobilesOnPath|true}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mobileBusyMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = The cost multiplier for mobile units which are &#039;Busy&#039;; Not currently being built and with a non-empty command queue, but not moving on a path. Clamped to values above &amp;lt;code&amp;gt;0.01&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mobileIdleMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.35&lt;br /&gt;
|description = The cost multiplier for mobile units which are &#039;Idle&#039;; Either currently being built or with an empty command queue. Clamped to values above &amp;lt;code&amp;gt;0.01&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mobileMoveMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.65&lt;br /&gt;
|description = The cost multiplier for mobile units which are &#039;Moving&#039;; Trying to follow their own path. Clamped to values above &amp;lt;code&amp;gt;0.01&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==How slope is determined==&lt;br /&gt;
Spring doesn&#039;t represent terrain slopes in degrees, internally it uses&lt;br /&gt;
&amp;lt;code&amp;gt;(1.0 - the terrain normal&#039;s y-component)&amp;lt;/code&amp;gt; so the slope of vertical faces is &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; and that of horizontal ones &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;. A unit&#039;s &amp;lt;code&amp;gt;maxSlope&amp;lt;/code&amp;gt; value (which is in&lt;br /&gt;
degrees in its movedef) is converted so that the &amp;quot;can we go here?&amp;quot; (ie&lt;br /&gt;
&amp;quot;&amp;lt;code&amp;gt;maxSlope &amp;gt; terrainSlope&amp;lt;/code&amp;gt;?&amp;quot;) comparisons are meaningful, the formula&lt;br /&gt;
is &amp;lt;code&amp;gt;1.0 - cos(DEG2RAD(maxSlope * 1.5))&amp;lt;/code&amp;gt;. If you want to know the terrain angle in degrees, compute &amp;lt;code&amp;gt;RAD2DEG(arccos(1.0 - terrainSlope))&amp;lt;/code&amp;gt;. For a bot with a &amp;lt;code&amp;gt;maxSlope&amp;lt;/code&amp;gt; of 36 degrees (~0.41221 in &amp;quot;Spring format&amp;quot;), the maximum tolerable terrain angle is approximately&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;RAD2DEG(arccos(1.0 - 0.41221))&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
or 54 degrees. If &amp;lt;code&amp;gt;maxSlope&amp;lt;/code&amp;gt; was &amp;lt;code&amp;gt;30&amp;lt;/code&amp;gt;, the MTTA would be 45, and if it was &amp;lt;code&amp;gt;60&amp;lt;/code&amp;gt; (the highest sensible value due to that 1.5 scalar and the absence of overhanging cliffs) the bot could mount any terrain. In other words you do not need the long mathematical derivation, just remember that&lt;br /&gt;
&amp;lt;code&amp;gt;maxTerrainAngle = maxSlope * 1.5&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
--kloot, Thu Jul 31, 2008&lt;br /&gt;
&lt;br /&gt;
==Code to check your movdefs==&lt;br /&gt;
{{forumlink|topic=24866|title=A resource to check movedefs}} that game developers have used for years and find it quite useful.&lt;br /&gt;
&lt;br /&gt;
==Example==&lt;br /&gt;
===External Examples===&lt;br /&gt;
[http://imolarpg.dyndns.org/trac/balatest/browser/trunk/gamedata/movedefs.lua &#039;Balanced Annihilation&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[http://spring1944.svn.sourceforge.net/viewvc/spring1944/trunk/S44Main.sdd/gamedata/movedefs.lua?&amp;amp;view=markup &#039;Spring: 1944&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/trunk/SpringTutorialGame.sdd/Gamedata/movedefs.lua &#039;Spring Tutorial Game&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/gamedata/movedefs.lua &#039;ZeroK&#039; movedefs.lua]&lt;br /&gt;
&lt;br /&gt;
[[Category:Gamedata]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Games&amp;diff=9089</id>
		<title>Games</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Games&amp;diff=9089"/>
		<updated>2016-11-26T03:51:25Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__There are a number of games made for the Spring Engine. Some of the more popular ones are listed below, sorted by their terms of use. &amp;lt;!--(/license schemes?)--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You can download games automatically, using your lobby (see [[Read_Me_First|Read Me First]]). &lt;br /&gt;
&lt;br /&gt;
Games can also be [[Getting_Spring_Content_and_Links|downloaded manually]], as sdz files, and placed into ../Spring/Games. Read the advice on [[Read_Me_First|this page]] if your lobby does not find your games. Some games also offer a stand-alone installer.&lt;br /&gt;
&lt;br /&gt;
=Open Source=&lt;br /&gt;
&#039;&#039;These games are all free to download and play and may be open to modifications, however, be sure to read the licenses before doing so.&#039;&#039;&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;[http://zero-k.info/ Zero-K]&amp;lt;/h2&amp;gt;&lt;br /&gt;
([http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/legal.txt GPL, PD])&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Zero-k_image.jpg|300px|link=http://zero-k.info/]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Zero-K is a fast, competitive game with a focus on a streamlined economy and advanced interface that takes the focus off tedious tasks and back on the action. A huge roster of interesting, unique units and a variety of unit abilities provides tremendous tactical and strategic depth to the game. [http://zero-k.info Download link]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;&#039;&#039;&#039;[http://spring1944.org/ Spring: 1944]&#039;&#039;&#039;&amp;lt;/h2&amp;gt;([https://github.com/spring1944/spring1944/blob/master/docs/License.txt CC-BY-NC])&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:S44_tigers.jpg|300px|link=http://spring1944.org/]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Spring:1944 is a WWII themed game with four fully functional sides (US, Germany, USSR, Britain), period-accurate units and strengths. Realism comes second only to creating a game that is fun and accessible to play.&lt;br /&gt;
|-&lt;br /&gt;
|  | &amp;lt;h2&amp;gt;[http://www.evolutionrts.info Evolution RTS]&amp;lt;/h2&amp;gt;([http://creativecommons.org/licenses/by-nc-nd/3.0/us/ CC-BY-SA])&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Evoimg.jpg|300px|link=http://www.evolutionrts.info]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | A new war is brewing. A violent conflict, between the Six Colonies, each one convinced that it was in the right, each one sure of its own ability to defeat its enemies. But they need Generals. They need soldiers. They need you.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;[[Kernel Panic]]&amp;lt;/h2&amp;gt;([[Kernel_Panic#License:|FOSS, with only 2 FOSS maps]])&amp;lt;!-- Since you should be able to remove those, I wonâ€™t mark it as non-free. Other maps have non-free license or no license at all.) --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Kernel_Panic_3.4.jpg|300px|link=Kernel Panic]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | A game based around combat &#039;&#039;&#039;inside&#039;&#039;&#039; a computer, with 3 unique sides: the System, the Hacker and the Network waging war in a matrix of DOOM! No resource economy exists in KP, with the only constraints being time and space.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;&#039;&#039;&#039;[http://www.moddb.com/games/conflict-terra Conflict Terra]&#039;&#039;&#039;&amp;lt;/h2&amp;gt;([http://code.google.com/p/conflictterra/source/browse/games/CT/License.txt FOSS])&amp;lt;!-- The sounds from EvoRTS were removed, so we&#039;re clean now. --&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:CT_Hojos.png|300px|link=http://www.moddb.com/games/conflict-terra]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | A unique game with heavy emphasis on mobility and featuring Spring&#039;s first major &amp;quot;collect and drop-off&amp;quot; economy, Conflict Terra boasts a distinctive art style.  Play as one of two factions in an ever-changing battlefield as you struggle to come out on top.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;&#039;&#039;&#039;[http://springfiles.com/spring/games/edge-1 On The Edge]&#039;&#039;&#039;&amp;lt;/h2&amp;gt;  (GPL, [http://creativecommons.org/licenses/by-nc-sa/3.0/us/ CC-BY-NC-SA])&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:start3.jpg|300px|link=http://springfiles.com/spring/games/edge-1]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | First Spring MOBA with unique pre-game hero setup. Under heavy development. How to setup working the game read on [http://springrts.com/phpbb/viewtopic.php?f=55&amp;amp;t=31476 On The Edge forum thread]&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;[http://www.metalfactions.pt Metal Factions]&amp;lt;/h2&amp;gt;&lt;br /&gt;
([http://www.metalfactions.pt/about.html#license CC-BY-ND, with GPL/PD code])&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Mf_spring_wiki.jpg|300px|link=http://www.metalfactions.pt]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | An evolving game that started as a TA mod and currently features four factions: AVEN, GEAR, CLAW and SPHERE. Commanders can morph to fit into different play styles and be easily revived. Economy scaling is more strictly tied to map control. &lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt;[http://www.indiedb.com/games/the-cursed The Cursed]&amp;lt;/h2&amp;gt;&lt;br /&gt;
([http://creativecommons.org/licenses/by-nc-sa/4.0 CC-BY-NC-SA])&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:cursed_logo.jpg|300px|link=http://www.indiedb.com/games/the-cursed]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | The game is about bones, undead, demons, space marines and magic settled in a futuristic environment. It is a fresh   mixture of gameplay elements from many popular RTS games like Starcraft and C&amp;amp;C.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Proprietary=&lt;br /&gt;
&#039;&#039;These games may or may not be free to play. Modifying their content (i.e. the art assets) is not allowed without the game authors explicit permission, although the code is GPL and some games include large GPL-friendly content collections.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt; [https://springrts.com/phpbb/viewforum.php?f=46 Star Wars: Imperial Winter] &amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Imperial Winter assault.jpg|300px|link=https://springrts.com/phpbb/viewforum.php?f=46]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | A Star Wars themed game set in the troubled post-Return of the Jedi era.&lt;br /&gt;
|-&lt;br /&gt;
| &amp;lt;h2&amp;gt; [https://springrts.com/phpbb/viewforum.php?f=69 Journeywar] &amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:JwLogo.jpg|300px|link=https://springrts.com/phpbb/viewtopic.php?f=69&amp;amp;t=23275&amp;amp;start=1180]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |  Journeywar is the final battle between Combine and Exobiotics. Join the fight and rediscover the HL- Universe from a new, strategic perspective. Download in Springlogbby as jw:test archive.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=TA-derived=&lt;br /&gt;
&#039;&#039;At least parts of these games are derived from data of the  Total Annihilation game (copyright Atari). As such, their distribution is potentially in breach of copyright laws and therefore not officially endorsed by the Spring RTS team.&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
{|&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;h2&amp;gt; [http://springrts.com/wiki/Balanced_Annihilation Balanced Annihilation] &amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:BAScreenShot.jpg|300px|link=http://springrts.com/phpbb/viewforum.php?f=44]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Balanced Annihilation (BA) is a mature game and new versions feature only minor balance tweaks.&lt;br /&gt;
&lt;br /&gt;
BA gameplay develops in stages of progressively heavier units with a growing economy. Many strategies are viable in BA, including focusing on map control, aggression, defense, air power, sea power, or mobility.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;h2&amp;gt; [http://springfiles.com/spring/games/tech-annihilation-8 Tech Annihilation] &amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Tech_Annihilation.png|300px|link=http://springfiles.com/spring/games/tech-annihilation-8]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; |This Game is bigger, greater and more epic! Tech your Commander from a tiny Commander to a Galactic Commander! (by &#039;&#039;[BoS]Senna&#039;&#039;, currently no homepage)&lt;br /&gt;
|-&lt;br /&gt;
|&amp;lt;h2&amp;gt;[http://nota.machys.net/downloads NOTA]&amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:notAgame02.jpg|300px|link=http://nota.machys.net/downloads]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Not Original Total Annihilation is a rethink of the Total Annihilation universe with a focus on strategic, base oriented gameplay. With its revised unit scale, huge battles erupt engaging hundreds of units and scores of unit types. NOTA&#039;s completely rethought air and sea gameplay forces participation in all elements and places the tide of conflict in your hands.&lt;br /&gt;
|-&lt;br /&gt;
|  &amp;lt;h2&amp;gt; [[XTA]] &amp;lt;/h2&amp;gt;&lt;br /&gt;
|-&lt;br /&gt;
| [[Image:Screen508_s.jpg|300px|link=XTA]]&lt;br /&gt;
| valign=&amp;quot;top&amp;quot; | Originally developed as a Total Annihilation game by the Swedish Yankspankers, XTA is the Original Public Game released with first versions of Spring. Development of this game by the SYs has stopped a while ago, but it is still played and actively developed by the community.&lt;br /&gt;
|&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
=Installing Games in Spring=&lt;br /&gt;
Quite a few of the games listed above come with standalone installers, which makes things easy. Check their website to find out! &lt;br /&gt;
&lt;br /&gt;
In some cases however, the game will only distribute a game-file, for example &#039;&#039;BA750&#039;&#039;&#039;&#039;&#039;.sd7&#039;&#039;&#039; or &#039;&#039;XTA&#039;&#039;&#039;&#039;&#039;.sdz&#039;&#039;&#039;. For these games, you have to [[Download|install the stand-alone Spring-Engine]] first, and then place the game-file in the &#039;&#039;...\My Documents\My Games\Spring\Games\&#039;&#039; or &#039;&#039;...\Spring\games\&#039;&#039; folder (&#039;&#039;~/.spring/games/&#039;&#039; on Linux/Unix/Mac).&lt;br /&gt;
You may install multiple games in the same engine installation.&lt;br /&gt;
&lt;br /&gt;
To play a game, you also need a [[Maps|map]].&lt;br /&gt;
&lt;br /&gt;
Still not enough Games? There are [[Getting_Spring_Content_and_Links|some more]], not listed here or make your [[Game_and_Unit_development|own Game]]!&lt;br /&gt;
&lt;br /&gt;
[[Category: Games]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18696</id>
		<title>Tutorial:MapDevWithBlueprint(Forb)</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18696"/>
		<updated>2016-11-18T01:34:40Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Specular Map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Getting Started (Tools) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blueprint:&amp;amp;nbsp;&#039;&#039;&#039;[https://github.com/jk3064/Map-Blueprint https://github.com/jk3064/Map-Blueprint]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The only other tool really needed is &amp;quot;Mapconv&amp;quot;. The other tools available are there simply to make your life easier. A list of common mapping tools are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConv|Mapconv]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConvNG|MapConvNG - For use with Linux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMFED &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grout &#039;&#039;&#039;(Deprecated, no longer useful unless texture was generated with L3dt utilizing tiles)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMD Creator &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Start Position Editor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Das Bruce&#039;s Mapconv frontend]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These tools have been compiled into a zip available here:&amp;amp;nbsp;[http://springfiles.com/spring/tools/mapping-tools http://springfiles.com/spring/tools/mapping-tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep in mind that mapconv is still being developed, so it may be necessary to update the included Mapconv to a later version, located here:&amp;amp;nbsp;[http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458 http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458]&lt;br /&gt;
&lt;br /&gt;
= The Components of a Map =&lt;br /&gt;
&lt;br /&gt;
== Texture Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps mus be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you understand how to make a texture map and it also assumes that you know how to use terrain generation software.&lt;br /&gt;
&lt;br /&gt;
Commonly used terrain generation programs are:&lt;br /&gt;
&lt;br /&gt;
Spring Map Edit (Does not work on 64bit machines)&lt;br /&gt;
&lt;br /&gt;
L3DT&lt;br /&gt;
&lt;br /&gt;
WorldMachine&lt;br /&gt;
&lt;br /&gt;
Bryce3D&lt;br /&gt;
&lt;br /&gt;
Carrara&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Texture Map (generated by Carrara):&lt;br /&gt;
&lt;br /&gt;
[[File:exampletexturemap.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heightmap ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Height Maps are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need a good image editing program to make heightmaps. Many of the aforementioned terrain generation programs will also generate heightmaps as well, but you can draw them by hand. They can be either 8bit or 16bit greyscale PNG. If you have photoshop or the gimp, you can use these programs to help you create your heightmap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example of a 16bit heightmap:&lt;br /&gt;
&lt;br /&gt;
[[File:Heightmapexample.png]]&lt;br /&gt;
&lt;br /&gt;
Heightmaps work upon the idea of height according to color values. Black is the lowest, white is the heighest. In spring mapping, the waterline is defined by a negative height value. In other words, you define the heights of the map, &amp;amp;nbsp;anything below 0 is under water. So on this heightmap, you might use -50 for the lowest value and 300 for the highest height value. The aforementioned tool &amp;quot;Mapconv Gui (a.k.a Das Bruce&#039;s MapConv Gui) has a waterline calculator that will help you calculate the correct waterline for your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metal Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Metal Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Spring, metal maps are used for the built in resourcing scheme (Metal/Energy). You do not have to use this scheme. In fact, there are several games for Spring who use their own resourcing systems added on using Lua. If you are creating this map for one of those games, a metal map is not strictly necessary (in other words you can just us a black image), 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metalmaps show metal areas on a map based upon the amount of red on the image (make sure red is the only color used!). On this map you can see that the &amp;quot;Patch Technique&amp;quot; is used, which is pretty common among spring maps, but you are not limited to using this scheme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;MaxMetal&amp;quot; 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&#039;t the point however. The fact is that if you can predict how much each spot will output (typically), using the &amp;quot;MaxMetal&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Metal Map:&lt;br /&gt;
&lt;br /&gt;
[[File:Examplemetal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature Map ==&lt;br /&gt;
&lt;br /&gt;
This part is easy...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DO NOT USE THIS FOR ANY REASON WHATSOEVER!!!&#039;&#039;&#039; Just use a flat black image for the featuremap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Feature maps used to be quite complicated, but all that changed with the advent of Smoth&#039;s FeaturePlacer (short featuremap history below).&lt;br /&gt;
&lt;br /&gt;
Now featuremaps are use simply for the purpose of placing grass. Grass coverage is defined by blue pixels on the feature map. The more blue the pixel is (the closer to blue 255 it is), the thicker grass will be at that location. Grass is entirely optional, but can be customized via map parameters and adds a nice touch to your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Feature Map:&lt;br /&gt;
&lt;br /&gt;
[[File:examplefeature.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== A brief history of featuremaps ===&lt;br /&gt;
&lt;br /&gt;
Feature maps were (and still are) a single RGB image where features such as grass, geothermal vents and trees, as well as structures, etc were &amp;quot;placed&amp;quot; using pixels on the image. This method was extremely imprecise and involved recompiling the map many times in order to simply move a tree from one location to another.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Map (MapConv) =&lt;br /&gt;
&lt;br /&gt;
== Texture Specifications ==&lt;br /&gt;
&lt;br /&gt;
Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps must be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Height Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metal Map dimensions are Texture Map size / 16 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 16 = 512x512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&lt;br /&gt;
&lt;br /&gt;
== Using MapConv ==&lt;br /&gt;
&lt;br /&gt;
[[MapConv]] is a command line program that is generally started via a batch file .&lt;br /&gt;
&lt;br /&gt;
Below is an example set of parameters given to mapconv:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;MapConv -i -l -c 0 -x 101 -n 100 -o EvoRTS-Craggy_Creek-v01.smf -t terrain.png -a height6.png -m metal.png -f feature.png -z &amp;quot;nvdxt.exe -dxt1a -nmips 4 -Sinc -quality_highest -file&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once compiled, you will get 2 new files: &amp;amp;lt;mapname.smt&amp;amp;gt; and &amp;amp;lt;mapname.smf&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Utilizing Blueprint =&lt;br /&gt;
&lt;br /&gt;
Unzip the blueprint archive into your Spring Maps folder.&lt;br /&gt;
&lt;br /&gt;
[[File:mapcontainer.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will notice a new folder called &amp;quot;mapcontainer.sdd&amp;quot;. The .sdd ending on the folder name is very important for testing as &amp;amp;lt;foldername&amp;amp;gt;.sdd tells spring to load map files from that folder. This way you can work on your maps without having to zip them up over and over again.&lt;br /&gt;
&lt;br /&gt;
== mapcontainer.sdd ==&lt;br /&gt;
&lt;br /&gt;
Inside the map container folder you have the following file/folder structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;LuaGaia&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapconfig&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maphelper&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maps&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapinfo.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapoptions.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Now, copy your compiled map files (the &amp;lt;code&amp;gt;.smt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.smf&amp;lt;/code&amp;gt; files) into the &amp;quot;maps&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
= Texture Splatting using SSMF =&lt;br /&gt;
&lt;br /&gt;
SSMF mapping is adding detail textures all over the map based upon specified distribution areas. This will make your map infinitely more detailed and beautiful.&lt;br /&gt;
&lt;br /&gt;
Adding SSMF to a map consists of the following steps:&lt;br /&gt;
&lt;br /&gt;
== Distribution Map ==&lt;br /&gt;
&lt;br /&gt;
The Distribution map is essentially an atlas telling spring where to spread your detail textures. Lets have a look at an example distribution map:&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplatdistribution.jpg&lt;br /&gt;
&lt;br /&gt;
Each channel corresponds to a different texture referenced in the detail texture map. These areas are set using the channels of the image and are generally saved using the Targa format ( .tga ), sized at 1024x1024.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplechannels.jpg&lt;br /&gt;
&lt;br /&gt;
Save your distribution map as splatdistribution.tga, and place it in the maps folder alongside the smf and smt files.&lt;br /&gt;
&lt;br /&gt;
Once you have your distribution map, you need to set up your detail textures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Detail Textures ==&lt;br /&gt;
&lt;br /&gt;
Detail textures are made by adding a texture to each channel of an image.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplattex.jpg&lt;br /&gt;
&lt;br /&gt;
There are a total of 4 texture slots available. One for R, G, B, and one for the Alpha Channel. When you have your detail textures ready, save the file as splattex.tga (Targa - 1024x1024) and place it in the maps folder alongside splatdistribution.tga&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Specular Map ==&lt;br /&gt;
&lt;br /&gt;
A specular map controls brightness and &amp;quot;shinyness&amp;quot; of your map. The more light you add to a particular portion of your specular map, the brighter and more reflective that portion of the map will be. Specular maps should be 1024x1024 and saved as specularmap.bmp. Of course placed in the maps folder with the other ssmf maps.&lt;br /&gt;
&lt;br /&gt;
A specular map can cause your map to look like molten plastic. Most of us don&#039;t really use specular maps except for certain circumstances.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplespecularmap.jpg&lt;br /&gt;
&lt;br /&gt;
== Grass Shading Map ==&lt;br /&gt;
By default spring&#039;s grass pulls the minimap to use for coloration of the grass patches. You can override this with &#039;&#039;grassShadingTex&#039;&#039;. Below is an example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Grass map&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Grass map in game&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_example.jpegâ€Ž|120px|alt=grassmap example |grassmap]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This is a section of grassmap image. This image applied to the entire map which determines the color of grass.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_ingame.jpgâ€Ž|300px|alt=grassmapp applied in game|in game]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Normal Map ==&lt;br /&gt;
&lt;br /&gt;
Normal maps (in this case) are used to add &amp;quot;fake&amp;quot; 3d detail to a flat 2d image. It is a technique of manipulating lighting to give the appearance of looking at a 3d object, when actually it is just 2D.&lt;br /&gt;
&lt;br /&gt;
This is what a normal map looks like:&lt;br /&gt;
[[File:examplenormalmap.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Placing Features =&lt;br /&gt;
&lt;br /&gt;
As previously mentioned, features can now be placed via LUA based upon a coordinate system that looks similar to this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;local features = {&amp;amp;nbsp;&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		unitlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		buildinglist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		objectlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_4&#039;, x = 7760, z = 112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreea_3&#039;, x = 2520, z = 6904, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeblo_5&#039;, x = 7736, z = 536, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_1&#039;, x = 2504, z = 7112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;geovent&#039;, x = 177, z = 192, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;return features&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Of course, features can be placed by editing the set.lua file in a text editor, but that would take an extremely long time. Enter FeaturePlacer.&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Feature Placer ==&lt;br /&gt;
&lt;br /&gt;
* [[Map Making: Feature Placer|Feature Placer]]&lt;br /&gt;
&lt;br /&gt;
= Configuring Map Parameters (Mapinfo.lua) =&lt;br /&gt;
&lt;br /&gt;
Admittedly, the default values used in blueprint mapinfo are awful. It may be wise for you to download another map that has used blueprint and copy and paste it&#039;s mapinfo contents into yours. However, you are also free to use the default or use the provided example.&lt;br /&gt;
&lt;br /&gt;
In time, the mapinfo tags will be documented and this will like to that page. As it is the tags and values are pretty easy to figure out for the most part.&lt;br /&gt;
&lt;br /&gt;
== MapInfo.lua ==&lt;br /&gt;
* [[Map_Making:mapinfo.lua|MapInfo.lua]]&lt;br /&gt;
&lt;br /&gt;
= Skyboxes =&lt;br /&gt;
&lt;br /&gt;
*[[Skyboxcreation|Notes about skyboxes]] notes on a prerendered sky box or cube map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Mutators =&lt;br /&gt;
&lt;br /&gt;
Mutators are files that add new content to exiting game files. &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; is an example of a mutator.&lt;br /&gt;
&lt;br /&gt;
This section needs a proper description.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808 http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808]&lt;br /&gt;
&lt;br /&gt;
= Archiving a Map =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Spring reads two different archive formats, 7zip and zip. Both archives are named sd7 and sdz, respectively. 7zip files are made by The 7zip archive program, available at&amp;amp;nbsp;[http://www.7-zip.org/ http://www.7-zip.org/]&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Navigate to your mapcontainer.sdd folder and zip it&#039;s contents into either a .7z file or .zip (7zip format is &#039;&#039;&#039;HIGHLY RECOMMENDED&#039;&#039;&#039;!), usually naming schemes follow the actual mapname (&amp;amp;lt;mapname.sd7&amp;amp;gt;, such as&amp;amp;nbsp;EvoRTS-Craggy_Creek-v08.sd7&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Make sure that the archive is non-solid!&#039;&#039;&#039; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:examplearchivewith7zip.jpg]]&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Once completed, copy the sd7/sdz file to your maps folder. At this point, be sure to remove the .sdd ending from your mapcontainer.sdd folder (or change the map name/version contained withing), otherwise you might get sync errors because spring is reading from the wrong archive source.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
*[[Maps:SpringMapEdit|Frostregen&#039;s SpringMapEdit]]. 3D editing, Compiles and import SM2 directly. Beginner friendly but still powerful.&lt;br /&gt;
*[[MapConv]] Map converter program, compiles maps.&lt;br /&gt;
*[[MapConvNG]] Rewrite of MapConv that works on linux / 64 bit.&lt;br /&gt;
*[[Maps:Map Designer]]&amp;amp;nbsp;&#039;&#039;&#039;(Outdated, Deprecated)&#039;&#039;&#039; Hugh&#039;s 3D map designer. Splatting, heightmap editing, splat painting, SM3&lt;br /&gt;
*[http://www.springfiles.com/show_file.php?id=1679 Starting position creator]: Or you can always find out the hard way which x/y coordinates are good by starting spring and having a look at the mouse cursor coordinates.&lt;br /&gt;
*[http://code.google.com/p/conflictterra/source/browse/games/CT/luaui/widgets/tp_coordinate_help.lua Coordinate Helper widget] A small widget that helps you with finding coordinates ie for start positions. Every time you put down a marker it will log its position in [[Infolog.txt]] and also in MAPNAME_coordinates.txt Helpfull if you need to get lots of map coordinates and do not want to write them down by hand. (it writes SpawnResource in front of the coordinates but you can ignore or edit the widget)&lt;br /&gt;
&lt;br /&gt;
= Minimal barebones template with no extras =&lt;br /&gt;
If you want a completely barebones template with no extra configuration needed (useful for testing), Extract the  blueprint files, then delete everything except mapinfo.lua and everything in maps folder (except your .smf and .smt files). Next copy paste following to mapinfo.lua (not the most minimal but minimal enough):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local mapinfo = {&lt;br /&gt;
   name        = &amp;quot;MyMap&amp;quot;,&lt;br /&gt;
   shortname   = &amp;quot;&amp;quot;,&lt;br /&gt;
   description = &amp;quot;&amp;quot;,&lt;br /&gt;
   author      = &amp;quot;&amp;quot;,&lt;br /&gt;
   version     = &amp;quot;&amp;quot;,&lt;br /&gt;
   modtype     = 3, --// 3=map&lt;br /&gt;
&lt;br /&gt;
   teams = {&lt;br /&gt;
      [0] = {startPos = {x = 8, z = 8}},&lt;br /&gt;
      [1] = {startPos = {x = 16, z = 16}},   &lt;br /&gt;
   },&lt;br /&gt;
}&lt;br /&gt;
return mapinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In summary: maps folder with .smf.and .smt files and single mapinfo.lua file. You should be now able to test your map immediately (if files are placed to mapcontainer.sdd).&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Map making]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18695</id>
		<title>Tutorial:MapDevWithBlueprint(Forb)</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18695"/>
		<updated>2016-11-18T01:33:02Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Feature Map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Getting Started (Tools) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blueprint:&amp;amp;nbsp;&#039;&#039;&#039;[https://github.com/jk3064/Map-Blueprint https://github.com/jk3064/Map-Blueprint]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The only other tool really needed is &amp;quot;Mapconv&amp;quot;. The other tools available are there simply to make your life easier. A list of common mapping tools are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConv|Mapconv]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConvNG|MapConvNG - For use with Linux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMFED &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grout &#039;&#039;&#039;(Deprecated, no longer useful unless texture was generated with L3dt utilizing tiles)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMD Creator &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Start Position Editor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Das Bruce&#039;s Mapconv frontend]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These tools have been compiled into a zip available here:&amp;amp;nbsp;[http://springfiles.com/spring/tools/mapping-tools http://springfiles.com/spring/tools/mapping-tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep in mind that mapconv is still being developed, so it may be necessary to update the included Mapconv to a later version, located here:&amp;amp;nbsp;[http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458 http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458]&lt;br /&gt;
&lt;br /&gt;
= The Components of a Map =&lt;br /&gt;
&lt;br /&gt;
== Texture Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps mus be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you understand how to make a texture map and it also assumes that you know how to use terrain generation software.&lt;br /&gt;
&lt;br /&gt;
Commonly used terrain generation programs are:&lt;br /&gt;
&lt;br /&gt;
Spring Map Edit (Does not work on 64bit machines)&lt;br /&gt;
&lt;br /&gt;
L3DT&lt;br /&gt;
&lt;br /&gt;
WorldMachine&lt;br /&gt;
&lt;br /&gt;
Bryce3D&lt;br /&gt;
&lt;br /&gt;
Carrara&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Texture Map (generated by Carrara):&lt;br /&gt;
&lt;br /&gt;
[[File:exampletexturemap.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heightmap ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Height Maps are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need a good image editing program to make heightmaps. Many of the aforementioned terrain generation programs will also generate heightmaps as well, but you can draw them by hand. They can be either 8bit or 16bit greyscale PNG. If you have photoshop or the gimp, you can use these programs to help you create your heightmap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example of a 16bit heightmap:&lt;br /&gt;
&lt;br /&gt;
[[File:Heightmapexample.png]]&lt;br /&gt;
&lt;br /&gt;
Heightmaps work upon the idea of height according to color values. Black is the lowest, white is the heighest. In spring mapping, the waterline is defined by a negative height value. In other words, you define the heights of the map, &amp;amp;nbsp;anything below 0 is under water. So on this heightmap, you might use -50 for the lowest value and 300 for the highest height value. The aforementioned tool &amp;quot;Mapconv Gui (a.k.a Das Bruce&#039;s MapConv Gui) has a waterline calculator that will help you calculate the correct waterline for your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metal Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Metal Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Spring, metal maps are used for the built in resourcing scheme (Metal/Energy). You do not have to use this scheme. In fact, there are several games for Spring who use their own resourcing systems added on using Lua. If you are creating this map for one of those games, a metal map is not strictly necessary (in other words you can just us a black image), 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metalmaps show metal areas on a map based upon the amount of red on the image (make sure red is the only color used!). On this map you can see that the &amp;quot;Patch Technique&amp;quot; is used, which is pretty common among spring maps, but you are not limited to using this scheme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;MaxMetal&amp;quot; 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&#039;t the point however. The fact is that if you can predict how much each spot will output (typically), using the &amp;quot;MaxMetal&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Metal Map:&lt;br /&gt;
&lt;br /&gt;
[[File:Examplemetal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature Map ==&lt;br /&gt;
&lt;br /&gt;
This part is easy...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DO NOT USE THIS FOR ANY REASON WHATSOEVER!!!&#039;&#039;&#039; Just use a flat black image for the featuremap.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Feature maps used to be quite complicated, but all that changed with the advent of Smoth&#039;s FeaturePlacer (short featuremap history below).&lt;br /&gt;
&lt;br /&gt;
Now featuremaps are use simply for the purpose of placing grass. Grass coverage is defined by blue pixels on the feature map. The more blue the pixel is (the closer to blue 255 it is), the thicker grass will be at that location. Grass is entirely optional, but can be customized via map parameters and adds a nice touch to your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Feature Map:&lt;br /&gt;
&lt;br /&gt;
[[File:examplefeature.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== A brief history of featuremaps ===&lt;br /&gt;
&lt;br /&gt;
Feature maps were (and still are) a single RGB image where features such as grass, geothermal vents and trees, as well as structures, etc were &amp;quot;placed&amp;quot; using pixels on the image. This method was extremely imprecise and involved recompiling the map many times in order to simply move a tree from one location to another.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Map (MapConv) =&lt;br /&gt;
&lt;br /&gt;
== Texture Specifications ==&lt;br /&gt;
&lt;br /&gt;
Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps must be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Height Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metal Map dimensions are Texture Map size / 16 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 16 = 512x512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&lt;br /&gt;
&lt;br /&gt;
== Using MapConv ==&lt;br /&gt;
&lt;br /&gt;
[[MapConv]] is a command line program that is generally started via a batch file .&lt;br /&gt;
&lt;br /&gt;
Below is an example set of parameters given to mapconv:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;MapConv -i -l -c 0 -x 101 -n 100 -o EvoRTS-Craggy_Creek-v01.smf -t terrain.png -a height6.png -m metal.png -f feature.png -z &amp;quot;nvdxt.exe -dxt1a -nmips 4 -Sinc -quality_highest -file&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once compiled, you will get 2 new files: &amp;amp;lt;mapname.smt&amp;amp;gt; and &amp;amp;lt;mapname.smf&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Utilizing Blueprint =&lt;br /&gt;
&lt;br /&gt;
Unzip the blueprint archive into your Spring Maps folder.&lt;br /&gt;
&lt;br /&gt;
[[File:mapcontainer.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will notice a new folder called &amp;quot;mapcontainer.sdd&amp;quot;. The .sdd ending on the folder name is very important for testing as &amp;amp;lt;foldername&amp;amp;gt;.sdd tells spring to load map files from that folder. This way you can work on your maps without having to zip them up over and over again.&lt;br /&gt;
&lt;br /&gt;
== mapcontainer.sdd ==&lt;br /&gt;
&lt;br /&gt;
Inside the map container folder you have the following file/folder structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;LuaGaia&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapconfig&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maphelper&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maps&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapinfo.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapoptions.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Now, copy your compiled map files (the &amp;lt;code&amp;gt;.smt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.smf&amp;lt;/code&amp;gt; files) into the &amp;quot;maps&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
= Texture Splatting using SSMF =&lt;br /&gt;
&lt;br /&gt;
SSMF mapping is adding detail textures all over the map based upon specified distribution areas. This will make your map infinitely more detailed and beautiful.&lt;br /&gt;
&lt;br /&gt;
Adding SSMF to a map consists of the following steps:&lt;br /&gt;
&lt;br /&gt;
== Distribution Map ==&lt;br /&gt;
&lt;br /&gt;
The Distribution map is essentially an atlas telling spring where to spread your detail textures. Lets have a look at an example distribution map:&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplatdistribution.jpg&lt;br /&gt;
&lt;br /&gt;
Each channel corresponds to a different texture referenced in the detail texture map. These areas are set using the channels of the image and are generally saved using the Targa format ( .tga ), sized at 1024x1024.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplechannels.jpg&lt;br /&gt;
&lt;br /&gt;
Save your distribution map as splatdistribution.tga, and place it in the maps folder alongside the smf and smt files.&lt;br /&gt;
&lt;br /&gt;
Once you have your distribution map, you need to set up your detail textures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Detail Textures ==&lt;br /&gt;
&lt;br /&gt;
Detail textures are made by adding a texture to each channel of an image.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplattex.jpg&lt;br /&gt;
&lt;br /&gt;
There are a total of 4 texture slots available. One for R, G, B, and one for the Alpha Channel. When you have your detail textures ready, save the file as splattex.tga (Targa - 1024x1024) and place it in the maps folder alongside splatdistribution.tga&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Specular Map ==&lt;br /&gt;
&lt;br /&gt;
A specular map controls brightness and &amp;quot;shinyness&amp;quot; of your map. The more light you add to a particular portion of your specular map, the brighter and more reflective that portion of the map will be. Specular maps should be 1024x1024 and saved as specularmap.bmp. Of course placed in the maps folder with the other ssmf maps.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplespecularmap.jpg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Grass Shading Map ==&lt;br /&gt;
By default spring&#039;s grass pulls the minimap to use for coloration of the grass patches. You can override this with &#039;&#039;grassShadingTex&#039;&#039;. Below is an example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Grass map&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Grass map in game&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_example.jpegâ€Ž|120px|alt=grassmap example |grassmap]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This is a section of grassmap image. This image applied to the entire map which determines the color of grass.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_ingame.jpgâ€Ž|300px|alt=grassmapp applied in game|in game]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Normal Map ==&lt;br /&gt;
&lt;br /&gt;
Normal maps (in this case) are used to add &amp;quot;fake&amp;quot; 3d detail to a flat 2d image. It is a technique of manipulating lighting to give the appearance of looking at a 3d object, when actually it is just 2D.&lt;br /&gt;
&lt;br /&gt;
This is what a normal map looks like:&lt;br /&gt;
[[File:examplenormalmap.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Placing Features =&lt;br /&gt;
&lt;br /&gt;
As previously mentioned, features can now be placed via LUA based upon a coordinate system that looks similar to this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;local features = {&amp;amp;nbsp;&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		unitlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		buildinglist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		objectlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_4&#039;, x = 7760, z = 112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreea_3&#039;, x = 2520, z = 6904, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeblo_5&#039;, x = 7736, z = 536, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_1&#039;, x = 2504, z = 7112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;geovent&#039;, x = 177, z = 192, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;return features&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Of course, features can be placed by editing the set.lua file in a text editor, but that would take an extremely long time. Enter FeaturePlacer.&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Feature Placer ==&lt;br /&gt;
&lt;br /&gt;
* [[Map Making: Feature Placer|Feature Placer]]&lt;br /&gt;
&lt;br /&gt;
= Configuring Map Parameters (Mapinfo.lua) =&lt;br /&gt;
&lt;br /&gt;
Admittedly, the default values used in blueprint mapinfo are awful. It may be wise for you to download another map that has used blueprint and copy and paste it&#039;s mapinfo contents into yours. However, you are also free to use the default or use the provided example.&lt;br /&gt;
&lt;br /&gt;
In time, the mapinfo tags will be documented and this will like to that page. As it is the tags and values are pretty easy to figure out for the most part.&lt;br /&gt;
&lt;br /&gt;
== MapInfo.lua ==&lt;br /&gt;
* [[Map_Making:mapinfo.lua|MapInfo.lua]]&lt;br /&gt;
&lt;br /&gt;
= Skyboxes =&lt;br /&gt;
&lt;br /&gt;
*[[Skyboxcreation|Notes about skyboxes]] notes on a prerendered sky box or cube map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Mutators =&lt;br /&gt;
&lt;br /&gt;
Mutators are files that add new content to exiting game files. &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; is an example of a mutator.&lt;br /&gt;
&lt;br /&gt;
This section needs a proper description.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808 http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808]&lt;br /&gt;
&lt;br /&gt;
= Archiving a Map =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Spring reads two different archive formats, 7zip and zip. Both archives are named sd7 and sdz, respectively. 7zip files are made by The 7zip archive program, available at&amp;amp;nbsp;[http://www.7-zip.org/ http://www.7-zip.org/]&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Navigate to your mapcontainer.sdd folder and zip it&#039;s contents into either a .7z file or .zip (7zip format is &#039;&#039;&#039;HIGHLY RECOMMENDED&#039;&#039;&#039;!), usually naming schemes follow the actual mapname (&amp;amp;lt;mapname.sd7&amp;amp;gt;, such as&amp;amp;nbsp;EvoRTS-Craggy_Creek-v08.sd7&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Make sure that the archive is non-solid!&#039;&#039;&#039; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:examplearchivewith7zip.jpg]]&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Once completed, copy the sd7/sdz file to your maps folder. At this point, be sure to remove the .sdd ending from your mapcontainer.sdd folder (or change the map name/version contained withing), otherwise you might get sync errors because spring is reading from the wrong archive source.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
*[[Maps:SpringMapEdit|Frostregen&#039;s SpringMapEdit]]. 3D editing, Compiles and import SM2 directly. Beginner friendly but still powerful.&lt;br /&gt;
*[[MapConv]] Map converter program, compiles maps.&lt;br /&gt;
*[[MapConvNG]] Rewrite of MapConv that works on linux / 64 bit.&lt;br /&gt;
*[[Maps:Map Designer]]&amp;amp;nbsp;&#039;&#039;&#039;(Outdated, Deprecated)&#039;&#039;&#039; Hugh&#039;s 3D map designer. Splatting, heightmap editing, splat painting, SM3&lt;br /&gt;
*[http://www.springfiles.com/show_file.php?id=1679 Starting position creator]: Or you can always find out the hard way which x/y coordinates are good by starting spring and having a look at the mouse cursor coordinates.&lt;br /&gt;
*[http://code.google.com/p/conflictterra/source/browse/games/CT/luaui/widgets/tp_coordinate_help.lua Coordinate Helper widget] A small widget that helps you with finding coordinates ie for start positions. Every time you put down a marker it will log its position in [[Infolog.txt]] and also in MAPNAME_coordinates.txt Helpfull if you need to get lots of map coordinates and do not want to write them down by hand. (it writes SpawnResource in front of the coordinates but you can ignore or edit the widget)&lt;br /&gt;
&lt;br /&gt;
= Minimal barebones template with no extras =&lt;br /&gt;
If you want a completely barebones template with no extra configuration needed (useful for testing), Extract the  blueprint files, then delete everything except mapinfo.lua and everything in maps folder (except your .smf and .smt files). Next copy paste following to mapinfo.lua (not the most minimal but minimal enough):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local mapinfo = {&lt;br /&gt;
   name        = &amp;quot;MyMap&amp;quot;,&lt;br /&gt;
   shortname   = &amp;quot;&amp;quot;,&lt;br /&gt;
   description = &amp;quot;&amp;quot;,&lt;br /&gt;
   author      = &amp;quot;&amp;quot;,&lt;br /&gt;
   version     = &amp;quot;&amp;quot;,&lt;br /&gt;
   modtype     = 3, --// 3=map&lt;br /&gt;
&lt;br /&gt;
   teams = {&lt;br /&gt;
      [0] = {startPos = {x = 8, z = 8}},&lt;br /&gt;
      [1] = {startPos = {x = 16, z = 16}},   &lt;br /&gt;
   },&lt;br /&gt;
}&lt;br /&gt;
return mapinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In summary: maps folder with .smf.and .smt files and single mapinfo.lua file. You should be now able to test your map immediately (if files are placed to mapcontainer.sdd).&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Map making]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18694</id>
		<title>Tutorial:MapDevWithBlueprint(Forb)</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18694"/>
		<updated>2016-11-18T01:32:18Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Feature Map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Getting Started (Tools) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blueprint:&amp;amp;nbsp;&#039;&#039;&#039;[https://github.com/jk3064/Map-Blueprint https://github.com/jk3064/Map-Blueprint]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The only other tool really needed is &amp;quot;Mapconv&amp;quot;. The other tools available are there simply to make your life easier. A list of common mapping tools are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConv|Mapconv]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConvNG|MapConvNG - For use with Linux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMFED &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grout &#039;&#039;&#039;(Deprecated, no longer useful unless texture was generated with L3dt utilizing tiles)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMD Creator &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Start Position Editor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Das Bruce&#039;s Mapconv frontend]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These tools have been compiled into a zip available here:&amp;amp;nbsp;[http://springfiles.com/spring/tools/mapping-tools http://springfiles.com/spring/tools/mapping-tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep in mind that mapconv is still being developed, so it may be necessary to update the included Mapconv to a later version, located here:&amp;amp;nbsp;[http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458 http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458]&lt;br /&gt;
&lt;br /&gt;
= The Components of a Map =&lt;br /&gt;
&lt;br /&gt;
== Texture Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps mus be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you understand how to make a texture map and it also assumes that you know how to use terrain generation software.&lt;br /&gt;
&lt;br /&gt;
Commonly used terrain generation programs are:&lt;br /&gt;
&lt;br /&gt;
Spring Map Edit (Does not work on 64bit machines)&lt;br /&gt;
&lt;br /&gt;
L3DT&lt;br /&gt;
&lt;br /&gt;
WorldMachine&lt;br /&gt;
&lt;br /&gt;
Bryce3D&lt;br /&gt;
&lt;br /&gt;
Carrara&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Texture Map (generated by Carrara):&lt;br /&gt;
&lt;br /&gt;
[[File:exampletexturemap.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heightmap ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Height Maps are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need a good image editing program to make heightmaps. Many of the aforementioned terrain generation programs will also generate heightmaps as well, but you can draw them by hand. They can be either 8bit or 16bit greyscale PNG. If you have photoshop or the gimp, you can use these programs to help you create your heightmap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example of a 16bit heightmap:&lt;br /&gt;
&lt;br /&gt;
[[File:Heightmapexample.png]]&lt;br /&gt;
&lt;br /&gt;
Heightmaps work upon the idea of height according to color values. Black is the lowest, white is the heighest. In spring mapping, the waterline is defined by a negative height value. In other words, you define the heights of the map, &amp;amp;nbsp;anything below 0 is under water. So on this heightmap, you might use -50 for the lowest value and 300 for the highest height value. The aforementioned tool &amp;quot;Mapconv Gui (a.k.a Das Bruce&#039;s MapConv Gui) has a waterline calculator that will help you calculate the correct waterline for your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metal Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Metal Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Spring, metal maps are used for the built in resourcing scheme (Metal/Energy). You do not have to use this scheme. In fact, there are several games for Spring who use their own resourcing systems added on using Lua. If you are creating this map for one of those games, a metal map is not strictly necessary (in other words you can just us a black image), 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metalmaps show metal areas on a map based upon the amount of red on the image (make sure red is the only color used!). On this map you can see that the &amp;quot;Patch Technique&amp;quot; is used, which is pretty common among spring maps, but you are not limited to using this scheme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;MaxMetal&amp;quot; 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&#039;t the point however. The fact is that if you can predict how much each spot will output (typically), using the &amp;quot;MaxMetal&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Metal Map:&lt;br /&gt;
&lt;br /&gt;
[[File:Examplemetal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature Map ==&lt;br /&gt;
&lt;br /&gt;
This part is easy...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;DO NOT USE THIS FOR ANY REASON WHATSOEVER!!!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Feature maps used to be quite complicated, but all that changed with the advent of Smoth&#039;s FeaturePlacer (short featuremap history below).&lt;br /&gt;
&lt;br /&gt;
Now featuremaps are use simply for the purpose of placing grass. Grass coverage is defined by blue pixels on the feature map. The more blue the pixel is (the closer to blue 255 it is), the thicker grass will be at that location. Grass is entirely optional, but can be customized via map parameters and adds a nice touch to your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Feature Map:&lt;br /&gt;
&lt;br /&gt;
[[File:examplefeature.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== A brief history of featuremaps ===&lt;br /&gt;
&lt;br /&gt;
Feature maps were (and still are) a single RGB image where features such as grass, geothermal vents and trees, as well as structures, etc were &amp;quot;placed&amp;quot; using pixels on the image. This method was extremely imprecise and involved recompiling the map many times in order to simply move a tree from one location to another.&lt;br /&gt;
&lt;br /&gt;
= Compiling a Map (MapConv) =&lt;br /&gt;
&lt;br /&gt;
== Texture Specifications ==&lt;br /&gt;
&lt;br /&gt;
Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps must be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Height Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metal Map dimensions are Texture Map size / 16 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 16 = 512x512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&lt;br /&gt;
&lt;br /&gt;
== Using MapConv ==&lt;br /&gt;
&lt;br /&gt;
[[MapConv]] is a command line program that is generally started via a batch file .&lt;br /&gt;
&lt;br /&gt;
Below is an example set of parameters given to mapconv:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;MapConv -i -l -c 0 -x 101 -n 100 -o EvoRTS-Craggy_Creek-v01.smf -t terrain.png -a height6.png -m metal.png -f feature.png -z &amp;quot;nvdxt.exe -dxt1a -nmips 4 -Sinc -quality_highest -file&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once compiled, you will get 2 new files: &amp;amp;lt;mapname.smt&amp;amp;gt; and &amp;amp;lt;mapname.smf&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Utilizing Blueprint =&lt;br /&gt;
&lt;br /&gt;
Unzip the blueprint archive into your Spring Maps folder.&lt;br /&gt;
&lt;br /&gt;
[[File:mapcontainer.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will notice a new folder called &amp;quot;mapcontainer.sdd&amp;quot;. The .sdd ending on the folder name is very important for testing as &amp;amp;lt;foldername&amp;amp;gt;.sdd tells spring to load map files from that folder. This way you can work on your maps without having to zip them up over and over again.&lt;br /&gt;
&lt;br /&gt;
== mapcontainer.sdd ==&lt;br /&gt;
&lt;br /&gt;
Inside the map container folder you have the following file/folder structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;LuaGaia&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapconfig&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maphelper&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maps&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapinfo.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapoptions.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Now, copy your compiled map files (the &amp;lt;code&amp;gt;.smt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.smf&amp;lt;/code&amp;gt; files) into the &amp;quot;maps&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
= Texture Splatting using SSMF =&lt;br /&gt;
&lt;br /&gt;
SSMF mapping is adding detail textures all over the map based upon specified distribution areas. This will make your map infinitely more detailed and beautiful.&lt;br /&gt;
&lt;br /&gt;
Adding SSMF to a map consists of the following steps:&lt;br /&gt;
&lt;br /&gt;
== Distribution Map ==&lt;br /&gt;
&lt;br /&gt;
The Distribution map is essentially an atlas telling spring where to spread your detail textures. Lets have a look at an example distribution map:&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplatdistribution.jpg&lt;br /&gt;
&lt;br /&gt;
Each channel corresponds to a different texture referenced in the detail texture map. These areas are set using the channels of the image and are generally saved using the Targa format ( .tga ), sized at 1024x1024.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplechannels.jpg&lt;br /&gt;
&lt;br /&gt;
Save your distribution map as splatdistribution.tga, and place it in the maps folder alongside the smf and smt files.&lt;br /&gt;
&lt;br /&gt;
Once you have your distribution map, you need to set up your detail textures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Detail Textures ==&lt;br /&gt;
&lt;br /&gt;
Detail textures are made by adding a texture to each channel of an image.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplattex.jpg&lt;br /&gt;
&lt;br /&gt;
There are a total of 4 texture slots available. One for R, G, B, and one for the Alpha Channel. When you have your detail textures ready, save the file as splattex.tga (Targa - 1024x1024) and place it in the maps folder alongside splatdistribution.tga&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Specular Map ==&lt;br /&gt;
&lt;br /&gt;
A specular map controls brightness and &amp;quot;shinyness&amp;quot; of your map. The more light you add to a particular portion of your specular map, the brighter and more reflective that portion of the map will be. Specular maps should be 1024x1024 and saved as specularmap.bmp. Of course placed in the maps folder with the other ssmf maps.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplespecularmap.jpg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Grass Shading Map ==&lt;br /&gt;
By default spring&#039;s grass pulls the minimap to use for coloration of the grass patches. You can override this with &#039;&#039;grassShadingTex&#039;&#039;. Below is an example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Grass map&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Grass map in game&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_example.jpegâ€Ž|120px|alt=grassmap example |grassmap]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This is a section of grassmap image. This image applied to the entire map which determines the color of grass.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_ingame.jpgâ€Ž|300px|alt=grassmapp applied in game|in game]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Normal Map ==&lt;br /&gt;
&lt;br /&gt;
Normal maps (in this case) are used to add &amp;quot;fake&amp;quot; 3d detail to a flat 2d image. It is a technique of manipulating lighting to give the appearance of looking at a 3d object, when actually it is just 2D.&lt;br /&gt;
&lt;br /&gt;
This is what a normal map looks like:&lt;br /&gt;
[[File:examplenormalmap.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Placing Features =&lt;br /&gt;
&lt;br /&gt;
As previously mentioned, features can now be placed via LUA based upon a coordinate system that looks similar to this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;local features = {&amp;amp;nbsp;&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		unitlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		buildinglist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		objectlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_4&#039;, x = 7760, z = 112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreea_3&#039;, x = 2520, z = 6904, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeblo_5&#039;, x = 7736, z = 536, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_1&#039;, x = 2504, z = 7112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;geovent&#039;, x = 177, z = 192, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;return features&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Of course, features can be placed by editing the set.lua file in a text editor, but that would take an extremely long time. Enter FeaturePlacer.&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Feature Placer ==&lt;br /&gt;
&lt;br /&gt;
* [[Map Making: Feature Placer|Feature Placer]]&lt;br /&gt;
&lt;br /&gt;
= Configuring Map Parameters (Mapinfo.lua) =&lt;br /&gt;
&lt;br /&gt;
Admittedly, the default values used in blueprint mapinfo are awful. It may be wise for you to download another map that has used blueprint and copy and paste it&#039;s mapinfo contents into yours. However, you are also free to use the default or use the provided example.&lt;br /&gt;
&lt;br /&gt;
In time, the mapinfo tags will be documented and this will like to that page. As it is the tags and values are pretty easy to figure out for the most part.&lt;br /&gt;
&lt;br /&gt;
== MapInfo.lua ==&lt;br /&gt;
* [[Map_Making:mapinfo.lua|MapInfo.lua]]&lt;br /&gt;
&lt;br /&gt;
= Skyboxes =&lt;br /&gt;
&lt;br /&gt;
*[[Skyboxcreation|Notes about skyboxes]] notes on a prerendered sky box or cube map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Mutators =&lt;br /&gt;
&lt;br /&gt;
Mutators are files that add new content to exiting game files. &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; is an example of a mutator.&lt;br /&gt;
&lt;br /&gt;
This section needs a proper description.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808 http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808]&lt;br /&gt;
&lt;br /&gt;
= Archiving a Map =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Spring reads two different archive formats, 7zip and zip. Both archives are named sd7 and sdz, respectively. 7zip files are made by The 7zip archive program, available at&amp;amp;nbsp;[http://www.7-zip.org/ http://www.7-zip.org/]&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Navigate to your mapcontainer.sdd folder and zip it&#039;s contents into either a .7z file or .zip (7zip format is &#039;&#039;&#039;HIGHLY RECOMMENDED&#039;&#039;&#039;!), usually naming schemes follow the actual mapname (&amp;amp;lt;mapname.sd7&amp;amp;gt;, such as&amp;amp;nbsp;EvoRTS-Craggy_Creek-v08.sd7&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Make sure that the archive is non-solid!&#039;&#039;&#039; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:examplearchivewith7zip.jpg]]&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Once completed, copy the sd7/sdz file to your maps folder. At this point, be sure to remove the .sdd ending from your mapcontainer.sdd folder (or change the map name/version contained withing), otherwise you might get sync errors because spring is reading from the wrong archive source.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
*[[Maps:SpringMapEdit|Frostregen&#039;s SpringMapEdit]]. 3D editing, Compiles and import SM2 directly. Beginner friendly but still powerful.&lt;br /&gt;
*[[MapConv]] Map converter program, compiles maps.&lt;br /&gt;
*[[MapConvNG]] Rewrite of MapConv that works on linux / 64 bit.&lt;br /&gt;
*[[Maps:Map Designer]]&amp;amp;nbsp;&#039;&#039;&#039;(Outdated, Deprecated)&#039;&#039;&#039; Hugh&#039;s 3D map designer. Splatting, heightmap editing, splat painting, SM3&lt;br /&gt;
*[http://www.springfiles.com/show_file.php?id=1679 Starting position creator]: Or you can always find out the hard way which x/y coordinates are good by starting spring and having a look at the mouse cursor coordinates.&lt;br /&gt;
*[http://code.google.com/p/conflictterra/source/browse/games/CT/luaui/widgets/tp_coordinate_help.lua Coordinate Helper widget] A small widget that helps you with finding coordinates ie for start positions. Every time you put down a marker it will log its position in [[Infolog.txt]] and also in MAPNAME_coordinates.txt Helpfull if you need to get lots of map coordinates and do not want to write them down by hand. (it writes SpawnResource in front of the coordinates but you can ignore or edit the widget)&lt;br /&gt;
&lt;br /&gt;
= Minimal barebones template with no extras =&lt;br /&gt;
If you want a completely barebones template with no extra configuration needed (useful for testing), Extract the  blueprint files, then delete everything except mapinfo.lua and everything in maps folder (except your .smf and .smt files). Next copy paste following to mapinfo.lua (not the most minimal but minimal enough):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local mapinfo = {&lt;br /&gt;
   name        = &amp;quot;MyMap&amp;quot;,&lt;br /&gt;
   shortname   = &amp;quot;&amp;quot;,&lt;br /&gt;
   description = &amp;quot;&amp;quot;,&lt;br /&gt;
   author      = &amp;quot;&amp;quot;,&lt;br /&gt;
   version     = &amp;quot;&amp;quot;,&lt;br /&gt;
   modtype     = 3, --// 3=map&lt;br /&gt;
&lt;br /&gt;
   teams = {&lt;br /&gt;
      [0] = {startPos = {x = 8, z = 8}},&lt;br /&gt;
      [1] = {startPos = {x = 16, z = 16}},   &lt;br /&gt;
   },&lt;br /&gt;
}&lt;br /&gt;
return mapinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In summary: maps folder with .smf.and .smt files and single mapinfo.lua file. You should be now able to test your map immediately (if files are placed to mapcontainer.sdd).&lt;br /&gt;
&lt;br /&gt;
[[Category:Tutorial]]&lt;br /&gt;
[[Category:Map making]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=12042</id>
		<title>Lua SyncedRead</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=12042"/>
		<updated>2016-05-25T02:33:54Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Lua_Scripting|Lua Scripting]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
== Game ==&lt;br /&gt;
&lt;br /&gt;
=== Special TeamID Variables ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot; style=&amp;quot;font-weight:600&amp;quot;&amp;gt;(those special TeamIDs are not supported by all functions)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ALL_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.MY_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ALLY_UNITS&#039;&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.ENEMY_UNITS&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGaiaTeamID&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number teamID&lt;br /&gt;
&lt;br /&gt;
=== GameStates ===&lt;br /&gt;
&#039;&#039;&#039;Spring.IsGodModeEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsCheatingEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsDevLuaEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsEditDefsEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.AreHelperAIsEnabled&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.FixedAllies&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.IsGameOver&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
=== RulesParams ===&lt;br /&gt;
&amp;lt;span class=note&amp;gt;Those functions allow to save data per Game,Team and Unit.&amp;lt;br&amp;gt;The advantage of it is that it can be read from anywhere (even from LuaUI and AIs!)&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span class=warning&amp;gt;string values are new since 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRulesInfoMap&#039;&#039;&#039; &amp;lt;span class=warning&amp;gt;REMOVED in 0.82!&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( ) -&amp;gt; { [key1] = string value1, [key2] = string value2, ... }&lt;br /&gt;
  ( string &amp;quot;key&amp;quot; ) -&amp;gt; string&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number ruleIndex | string ruleName ) -&amp;gt; nil | number value | string value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | { [ruleIndex1] = {[ruleName1] = number | string value1}, ... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number index | string ruleName ) -&amp;gt; nil | number value | string value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | { [ruleIndex1] = {[ruleName1] = number | string value1}, ... }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRulesParam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number index | string ruleName ) -&amp;gt; nil | number value | string value&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRulesParams&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [ruleIndex1] = {[ruleName1] = number | string value1}, ... }&lt;br /&gt;
&lt;br /&gt;
=== Mod-/Map-Options ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetModOptions&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; {} | { &amp;quot;keyName1&amp;quot; = string &amp;quot;value&amp;quot;, &amp;quot;keyName2&amp;quot; = string &amp;quot;value&amp;quot;, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetMapOptions&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; {} | { &amp;quot;keyName1&amp;quot; = string &amp;quot;value&amp;quot;, &amp;quot;keyName2&amp;quot; = string &amp;quot;value&amp;quot;, ... }&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
! bool values are not transfered from C to Lua correctly, so in IF theres needed to use this condition:&amp;lt;br&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;&amp;quot;if (tonumber(Spring.GetModOptions.exampleOption) == 1) then...end&amp;quot;&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
not only:&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;&amp;quot;if (Spring.GetModOptions.exampleOption) then...end&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Speed/Time ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameSpeed&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;As of 98.0 moved to [[Lua_UnsyncedRead]] due to desyncs in replays/demos&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( ) -&amp;gt; number userSpeedFactor, number speedFactor, boolean paused&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameFrame&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number frameNum%dayFrames, number frameNum/dayFrames&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGameSeconds&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number seconds&lt;br /&gt;
&lt;br /&gt;
=== Vectors ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetWind&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number dirX, number dirY, number dirZ, &lt;br /&gt;
         number strength,  number normDirX, number normDirY, number normDirZ&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetHeadingFromVector&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetVectorFromHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number heading ) -&amp;gt; number x, number z&lt;br /&gt;
&lt;br /&gt;
== Sides/Factions ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GetSideData&#039;&#039;&#039;&lt;br /&gt;
  ( string sideName ) -&amp;gt; nil | string startUnit, string caseSensitiveSideName&lt;br /&gt;
  ( number sideID ) -&amp;gt; nil | string sideName, string startUnit, string caseSensitiveSideName&lt;br /&gt;
  ( ) -&amp;gt; { [1] = { sideName=string,caseName=string,startUnit=string}, [2] = .., .. }&lt;br /&gt;
&lt;br /&gt;
== Teams ==&lt;br /&gt;
=== StartBoxes/StartPositions ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamStartBox&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID ) -&amp;gt; nil | number xmin, number zmin, number xmax, number zmax&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamStartPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
=== Player,Team,Ally Lists/Info ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerList&#039;&#039;&#039;&lt;br /&gt;
  ( [number teamID = -1 | boolean onlyActive = false] [, number teamID | boolean onlyActive])&lt;br /&gt;
  -&amp;gt; nil | { [1] = number playerID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamList&#039;&#039;&#039;&lt;br /&gt;
  ( [number allyTeamID = -1] ) -&amp;gt; nil | { [1] = number teamID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamList&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [1] = number allyTeamID, etc... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID ) -&amp;gt; &lt;br /&gt;
    nil | string  &amp;quot;name&amp;quot;,  &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;(PRE-83.0: in synced code this is &amp;quot;SYNCED_NONAME&amp;quot;!)&amp;lt;/span&amp;gt;&lt;br /&gt;
          boolean active,&lt;br /&gt;
          boolean spectator,&lt;br /&gt;
          number  teamId,&lt;br /&gt;
          number  allyTeamID,&lt;br /&gt;
          number  pingTime,&lt;br /&gt;
          number  cpuUsage,&lt;br /&gt;
          string  country,&lt;br /&gt;
          number  rank&lt;br /&gt;
          table   customPlayerKeys&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPlayerControlledUnit&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAIInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; &lt;br /&gt;
          number  skirmishAIID,&lt;br /&gt;
          string  name,&lt;br /&gt;
          number  hostingPlayerID,&lt;br /&gt;
          string  shortName, &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;(synced =&amp;gt; &amp;quot;SYNCED_NOSHORTNAME&amp;quot;; non-local =&amp;gt; &amp;quot;UNKNOWN&amp;quot;)&amp;lt;/span&amp;gt;&lt;br /&gt;
          string  version,   &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;(synced =&amp;gt; &amp;quot;SYNCED_NOVERSION&amp;quot;;   non-local =&amp;gt; &amp;quot;UNKNOWN&amp;quot;)&amp;lt;/span&amp;gt;&lt;br /&gt;
          table   options    &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;(synced &amp;amp; non-local =&amp;gt; empty-table)&amp;lt;/span&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Note: Before 0.82, the first argument was teamID, and then every other argument with a shifted position.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllyTeamInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number allyteamID ) -&amp;gt; nil | table   customTeamKeys&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt;&lt;br /&gt;
    nil | number  teamID,&lt;br /&gt;
          number  leader, &amp;lt;span class=note&amp;gt;(:= a player id)&amp;lt;/span&amp;gt;&lt;br /&gt;
          boolean isDead,&lt;br /&gt;
          boolean isAiTeam,&lt;br /&gt;
          string  &amp;quot;side&amp;quot;,&lt;br /&gt;
          number  allyTeam,&lt;br /&gt;
          table   customTeamKeys,&lt;br /&gt;
          number  incomeMultiplier&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamResources&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, string &amp;quot;metal&amp;quot; | &amp;quot;energy&amp;quot; ) -&amp;gt;&lt;br /&gt;
    nil | number currentLevel,&lt;br /&gt;
          number storage,&lt;br /&gt;
          number pull,&lt;br /&gt;
          number income,&lt;br /&gt;
          number expense,&lt;br /&gt;
          number share,&lt;br /&gt;
          number sent,&lt;br /&gt;
          number received&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitStats&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt;&lt;br /&gt;
    nil | number killed,&lt;br /&gt;
          number died,&lt;br /&gt;
          number capturedBy,&lt;br /&gt;
          number capturedFrom,&lt;br /&gt;
          number received,&lt;br /&gt;
          number sent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamResourceStats&#039;&#039;&#039; &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;0.82 and later&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number teamID,  string &amp;quot;metal&amp;quot; | &amp;quot;energy&amp;quot; ) -&amp;gt;&lt;br /&gt;
    nil | number used,&lt;br /&gt;
          number produced,&lt;br /&gt;
          number excessed,&lt;br /&gt;
          number received,&lt;br /&gt;
          number sent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamStatsHistory&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID [, number startIndex [, number endIndex = startIndex ]]) -&amp;gt;&lt;br /&gt;
    nil |&lt;br /&gt;
    number cur_max_index |&lt;br /&gt;
    {&lt;br /&gt;
      [1] = {&lt;br /&gt;
        &amp;quot;time&amp;quot;             = number,&lt;br /&gt;
        &amp;quot;frame&amp;quot;            = number,&lt;br /&gt;
        &amp;quot;metalUsed&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;metalProduced&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;metalExcess&amp;quot;      = number,&lt;br /&gt;
        &amp;quot;metalReceived&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;metalSent&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;energyUsed&amp;quot;       = number,&lt;br /&gt;
        &amp;quot;energyProduced&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;energyExcess&amp;quot;     = number,&lt;br /&gt;
        &amp;quot;energyReceived&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;energySent&amp;quot;       = number,&lt;br /&gt;
        &amp;quot;damageDealt&amp;quot;      = number,&lt;br /&gt;
        &amp;quot;damageReceived&amp;quot;   = number,&lt;br /&gt;
        &amp;quot;unitsProduced&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsDied&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;unitsReceived&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsSent&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;unitsCaptured&amp;quot;    = number,&lt;br /&gt;
        &amp;quot;unitsOutCaptured&amp;quot; = number,&lt;br /&gt;
        &amp;quot;unitsKilled&amp;quot;      = number&lt;br /&gt;
      }, ...&lt;br /&gt;
   }&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;if called with just teamID as argument it returns the current possible range for startIndex/endIndex :={1..cur_max_index}&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamLuaAI&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; string &amp;quot;luaAI&amp;quot;&lt;br /&gt;
&lt;br /&gt;
Returns string containing name of AI defined in file LuaAI.lua as name=&amp;quot;&amp;lt;AI name&amp;gt;&amp;quot;. Maybe it returns whole table with all values there, so maybe depends, but in my LuaAI.lua name is on first position...&lt;br /&gt;
&lt;br /&gt;
=== Teams/PlayersAllied ===&lt;br /&gt;
&#039;&#039;&#039;Spring.AreTeamsAllied&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID1, number teamID2 ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.ArePlayersAllied&#039;&#039;&#039;&lt;br /&gt;
  ( number playerID1, number playerID2 ) -&amp;gt; nil | boolean&lt;br /&gt;
&lt;br /&gt;
== Units ==&lt;br /&gt;
=== GetUnits ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllUnits&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | unitTable = { [1] = number unitID, ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnits&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsSorted&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil |&lt;br /&gt;
    unitDefTable = {&lt;br /&gt;
      [number unitDefID] = { [1] = [number unitID], etc... },&lt;br /&gt;
      etc...&lt;br /&gt;
    }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsCounts&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | countTable = { [number unitDefID] = count, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitsByDefs&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number unitDefID | { number unitDefID1, ... } )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitDefCount&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, number unitDefID ) -&amp;gt; nil | number count&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTeamUnitCount&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID ) -&amp;gt; nil | number count&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInRectangle&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number zmin, number xmax, number zmax [,number teamID] ) &lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInBox&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number ymin, number zmin,&lt;br /&gt;
    number xmax, number ymax, number zmax [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInSphere&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number radius [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInCylinder&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z, number radius [,number teamID] )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitsInPlanes&#039;&#039;&#039;&lt;br /&gt;
  ( planes = { [1] = { number nx, number ny, number nz, number d }, etc... } )&lt;br /&gt;
    -&amp;gt; nil | unitTable = { [1] = number unitID, etc... }&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;&lt;br /&gt;
  plane normals point towards accepted space,&lt;br /&gt;
  so the acceptance criteria for each plane is:&lt;br /&gt;
    radius     = unit radius&lt;br /&gt;
    px, py, pz = unit position&lt;br /&gt;
    [(nx * px) + (ny * py) + (nz * pz) + (d - radius)]  &amp;lt;=  0&lt;br /&gt;
&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNearestAlly&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number range ] ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNearestEnemy&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number range [, bool useLOS]] ) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;Post 95.0 this no longer returns neutral units&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Unit Informations ===&lt;br /&gt;
&#039;&#039;&#039;Spring.ValidUnitID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsDead&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;Returns false if unit exists and is alive, true for a brief period of time after unit dies, nil otherwise&amp;lt;br/&amp;gt;&lt;br /&gt;
keep this in mind when using (not Spring.GetUnitIsDead())&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTooltip&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | string tooltip&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDefID&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitDefID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number teamID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number allyID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLineage&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; Removed from version 0.83.x&amp;lt;/span&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number lineage | number lineage, boolean lineageIsRoot&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNeutral&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean neutral&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number health, number maxHealth, number paralyzeDamage,&lt;br /&gt;
                             number captureProgress, number buildProgress&lt;br /&gt;
build Progress is returned as floating Point between 0.0 and 1.0&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitArmored&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;armorMultiple new in version 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean armored, number armorMultiple&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsStunned&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean stunned_or_inbuild, boolean stunned, boolean inbuild&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitMaxRange&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number maxEngagementRange&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitResources&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number metalMake, number metalUse,&lt;br /&gt;
                             number energyMake, number energyUse&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHarvestStorage&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number metal&lt;br /&gt;
&amp;lt;span class = &amp;quot;note&amp;quot;&amp;gt;See also {{xtaglink|Gamedev:UnitDefs|harvestStorage}} UnitDef tag.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitMetalExtraction&#039;&#039;&#039; &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;0.82+ and later&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitExperience&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number experience&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitStates&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {&lt;br /&gt;
    &amp;quot;firestate&amp;quot; = number,&lt;br /&gt;
    &amp;quot;movestate&amp;quot; = number,&lt;br /&gt;
    &amp;quot;repeat&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;cloak&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;active&amp;quot; = boolean,&lt;br /&gt;
    &amp;quot;trajectory&amp;quot; = boolean,&lt;br /&gt;
    [&amp;quot;autoland&amp;quot; = boolean,]&lt;br /&gt;
    [&amp;quot;autorepairlevel&amp;quot; = number,]&lt;br /&gt;
    [&amp;quot;loopbackattack&amp;quot; = boolean]&lt;br /&gt;
  } &lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsActive&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsCloaked&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSelfDTime&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitStockpile&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number numStockpiled, number numStockpileQued,&lt;br /&gt;
                             number buildPercent&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBlocking&#039;&#039;&#039; {{new|85.0}}&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | boolean blocking, boolean crushable&lt;br /&gt;
{{new|95.0}} Now return values are: &lt;br /&gt;
  boolean isBlocking,&lt;br /&gt;
  boolean isSolidObjectCollidable,&lt;br /&gt;
  boolean isProjectileCollidable,&lt;br /&gt;
  boolean isRaySegmentCollidable,&lt;br /&gt;
  boolean crushable,&lt;br /&gt;
  boolean blockEnemyPushing,&lt;br /&gt;
  boolean blockHeightChanges&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, [, boolean midPos [, boolean aimPos ] ] ) -&amp;gt;&lt;br /&gt;
    nil |&lt;br /&gt;
    number bpx, number bpy, number bpz&lt;br /&gt;
    [, number mpx, number mpy, number mpz ]&lt;br /&gt;
    [, number apx, number apy, number apz ]&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;since 89.0, returns the base (default), middle or aim position of the unit.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBasePosition&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Deprecated in 89.0, use GetUnitPosition&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns the bottom of the unit.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number dx, number dy, number dz&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;returns the direction vector&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitHeading&#039;&#039;&#039; &lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number heading&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;returns heading directions used in COB scripts&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitRotation&#039;&#039;&#039; {{New|95.0}}&lt;br /&gt;
   (number unitID) --&amp;gt; nil | number pitch, number yaw, number roll &lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;Marked as (WIP) in changelog&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitVelocity&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;velw new in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number velx, number vely, number velz, number velLength&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitBuildFacing&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsBuilding&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns what unit a constructor/factory is currently building&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCurrentBuildPower&#039;&#039;&#039; {{new|92.0}}&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number buildPower&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitNanoPieces&#039;&#039;&#039; &lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [1] = number piece1, etc ... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTransporter&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitIsTransporting&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { [1] = number unitID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitShieldState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number weaponID = -1] ) -&amp;gt; nil | number isEnabled, number curPower&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitTravel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number travel, number travelPeriod&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitFuel&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitFlanking&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string &amp;quot;dir&amp;quot; ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
  ( number unitID, string &amp;quot;mode&amp;quot; | &amp;quot;moveFactor&amp;quot; | &amp;quot;minDamage&amp;quot; | &amp;quot;maxDamage&amp;quot; ) -&amp;gt; nil | number&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number mode, number modilityAdd,&lt;br /&gt;
    number minDamage, number maxDamage, number dirX, number dirY, number dirZ&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSensorRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, string type ) -&amp;gt; nil | number radius&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;possible types are:&amp;lt;br&amp;gt;los, airLos, radar, sonar, seismic, radarJammer &amp;amp; sonarJammer&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLosState&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;raw is only available in gadgets&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID [, number allyTeamID [, boolean raw] ] ) -&amp;gt; nil | number raw |&lt;br /&gt;
  { [&amp;quot;los&amp;quot; = true] [, &amp;quot;radar&amp;quot; = true] [, &amp;quot;typed&amp;quot; = true] }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitSeparation&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;surfaceDist new in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID1, number unitID2 [, boolean 2D] [, boolean surfaceDist] ) -&amp;gt; nil | number distance&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;returns the distance of 2 units, surfaceDist calculates the distance between the unitsphere surfaces instead of their midpos&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitDefDimensions&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID ) -&amp;gt; nil |&lt;br /&gt;
    {&lt;br /&gt;
      &amp;quot;height&amp;quot; = number,&lt;br /&gt;
      &amp;quot;radius&amp;quot; = number,&lt;br /&gt;
      &amp;quot;midx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;minx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxx&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;midy&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;miny&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxy&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;midz&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;minz&amp;quot;   = number,&lt;br /&gt;
      &amp;quot;maxz&amp;quot;   = number&lt;br /&gt;
    }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLastAttacker&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitLastAttackedPiece&#039;&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | string pieceName, number gameframe&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitMoveTypeData&#039;&#039;&#039; &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;new in version 0.80+&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | { movetype data }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCollisionVolumeData&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID )&lt;br /&gt;
  -&amp;gt; number scaleX, number scaleY, number scaleZ,&lt;br /&gt;
  number offsetX, number offsetY, number offsetZ,&lt;br /&gt;
  number volumeType, number testType, number primaryAxis, boolean disabled&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceCollisionVolumeData&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number pieceID )&lt;br /&gt;
  -&amp;gt; number scaleX, number scaleY, number scaleZ,&lt;br /&gt;
  number offsetX, number offsetY, number offsetZ,&lt;br /&gt;
  number volumeType, number testType, number primaryAxis, boolean disabled&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Unit Weapon Informations ====&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil |&lt;br /&gt;
    boolean angleGood, boolean loaded, number reloadFrame, number salvoLeft, number numStockpiled&lt;br /&gt;
  ( number unitID, number weaponNum, string tag ) -&amp;gt; nil | number&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;`tag` can be:&lt;br /&gt;
  &amp;quot;reloadState&amp;quot; == &amp;quot;reloadFrame&amp;quot;&lt;br /&gt;
  &amp;quot;reloadTime&amp;quot;&lt;br /&gt;
  &amp;quot;accuracy&amp;quot;&lt;br /&gt;
  &amp;quot;sprayAngle&amp;quot;&lt;br /&gt;
  &amp;quot;range&amp;quot;&lt;br /&gt;
  &amp;quot;projectileSpeed&amp;quot;&lt;br /&gt;
  &amp;quot;burst&amp;quot;&lt;br /&gt;
  &amp;quot;burstRate&amp;quot;&lt;br /&gt;
  &amp;quot;projectiles&amp;quot;&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponDamages&#039;&#039;&#039; {{new|101.0}}&lt;br /&gt;
  ( number unitID, number weaponNum | &amp;quot;selfDestruct&amp;quot; | &amp;quot;explode&amp;quot;, string tag ) -&amp;gt; nil | number&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;`tag` can be:&lt;br /&gt;
  &amp;quot;paralyzeDamageTime&amp;quot;&lt;br /&gt;
  &amp;quot;impulseFactor&amp;quot;&lt;br /&gt;
  &amp;quot;impulseBoost&amp;quot;&lt;br /&gt;
  &amp;quot;craterMult&amp;quot;&lt;br /&gt;
  &amp;quot;craterBoost&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageExp&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageMin&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageRange&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageInverted&amp;quot;&lt;br /&gt;
  &amp;quot;craterAreaOfEffect&amp;quot;&lt;br /&gt;
  &amp;quot;damageAreaOfEffect&amp;quot;&lt;br /&gt;
  &amp;quot;edgeEffectiveness&amp;quot;&lt;br /&gt;
  &amp;quot;explosionSpeed&amp;quot;&lt;br /&gt;
  - or -&lt;br /&gt;
  an armor type index to get the damage against it.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponVectors&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil | number posX, number posY, number posZ,&lt;br /&gt;
    number dirX, number dirY, number dirZ&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponTryTarget&#039;&#039;&#039; {{new|94.0}}&lt;br /&gt;
  ( number unitID, number weaponNum, &lt;br /&gt;
    number targetID | number posX, number posY, number posZ ) -&amp;gt; nil | boolean success&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponTestTarget&#039;&#039;&#039; {{new|94.0}}&lt;br /&gt;
  ( number unitID, number weaponNum, &lt;br /&gt;
    number targetID | number posX, number posY, number posZ ) -&amp;gt; nil | boolean success&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponTestRange&#039;&#039;&#039; {{new|94.0}}&lt;br /&gt;
  ( number unitID, number weaponNum, &lt;br /&gt;
    number targetID | number posX, number posY, number posZ ) -&amp;gt; nil | boolean success&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponHaveFreeLineOfFire&#039;&#039;&#039; {{new|94.0}}&lt;br /&gt;
  ( number unitID, number weaponNum, &lt;br /&gt;
    number targetID | number posX, number posY, number posZ ) -&amp;gt; nil | boolean success&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponCanFire&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil | boolean canFire&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitWeaponTarget&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  ( number unitID, number weaponNum ) -&amp;gt; nil |&lt;br /&gt;
  number 0 | number 1, bool isUserTarget, number unitID | &lt;br /&gt;
  number 2, bool isUserTarget, { number posX, number posY, number posZ } | &lt;br /&gt;
  number 3, bool isUserTarget, number ProjectileID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRadarErrorParams&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  (number allyTeamID) --&amp;gt; nil | &lt;br /&gt;
  number allyteamErrorSize, number baseErrorSize, number baseErrorMult&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPosErrorParams&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  (number unitID) --&amp;gt; nil |&lt;br /&gt;
       number posErrorVector.x, number posErrorVector.y, number posErrorVector.z,&lt;br /&gt;
       number posErrorDelta.x, number posErrorDelta.y, number posErrorDelta.z,&lt;br /&gt;
       number nextPosErrorUpdate&lt;br /&gt;
&lt;br /&gt;
=== Unit Pieces ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitVectors&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {frontX,frontY,frontZ}, {upX,upY,upZ}, {rightX,rightY,rightZ}&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPiecePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number posx, number posy, number posz&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Returns piece position in unit space. Also remember to multiply the x-axis value with -1 if you want  move a piece to another piece.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceDirection&#039;&#039;&#039; &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Fixed since 101. Now returns the same direction as Spring.GetUnitPiecePosDir&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number dirx, number diry, number dirz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceMatrix&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; { [1] = number, ... , [16] = number }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceList&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; { [1] = string &amp;quot;piecename&amp;quot;, ... , [pieceNumN] = string &amp;quot;piecename&amp;quot; }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceMap&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; { &amp;quot;piecename1&amp;quot; = pieceNum1, ... , &amp;quot;piecenameN&amp;quot; = pieceNumN }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; {&lt;br /&gt;
    &amp;quot;name&amp;quot;     = string &amp;quot;piecename&amp;quot;,&lt;br /&gt;
    &amp;quot;isEmpty&amp;quot;  = boolean,&lt;br /&gt;
    &amp;quot;children&amp;quot; = { [1] = string &amp;quot;piecename&amp;quot;, ... },&lt;br /&gt;
    &amp;quot;min&amp;quot;      = { [1] = number x, [2] = number y, [3] = number z },&lt;br /&gt;
    &amp;quot;max&amp;quot;      = { [1] = number x, [2] = number y, [3] = number z },&lt;br /&gt;
    &amp;quot;offset&amp;quot;   = { [1] = number x, [2] = number y, [3] = number z }, &lt;br /&gt;
    &amp;quot;parent&amp;quot; = string &amp;quot;parentpiecename&amp;quot;,   &lt;br /&gt;
  }&lt;br /&gt;
&amp;quot;parent&amp;quot; field {{New|95.0}}&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitScriptPiece&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number scriptPiece ] )&lt;br /&gt;
   -&amp;gt; nil | { scriptPieceNum = number modelPieceNum } | number modelPieceNum&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;This functions translate the COB ScriptPiece numbers into the ModelPiece numbers (the set of ScriptPieces is a subset of the ModelPieces, means #ScriptPieces &amp;lt;= #ModelPieces), which is used in all other functions (the &amp;quot;number piece&amp;quot; means always the modelpiece). So if you get via Cob2Lua a pieceID you have to translate it with this function. Btw the COB ScriptPiece number is equal with the piece position in the &amp;lt;i&amp;gt;piece&amp;lt;/i&amp;gt; definition in your cob/bos.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitScriptNames&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID )&lt;br /&gt;
   -&amp;gt; { &amp;quot;cobpiecename1&amp;quot; = ScriptPieceNum1, ... , &amp;quot;cobpiecenameN&amp;quot; = ScriptPieceNumN }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPiecePosDir&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number pieceNum ) -&amp;gt; nil | number posX, number posY, number posZ,&lt;br /&gt;
    number dirX, number dirZ, number dirY&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Returns piece position and direction in world space. The direction (dirX, dirY, dirZ) is not necessarily normalized. The position is defined as the position of the first vertex of the piece and it defines direction as the direction in which the line from the first vertex to the second vertex points.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== CommandQueues ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCommands&#039;&#039;&#039; &amp;lt;br/&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCommandQueue&#039;&#039;&#039; &amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;(Alias)&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID, number count = 0 ) -&amp;gt; nil | number commandQueueSize {{new|96}}&lt;br /&gt;
  ( number unitID [, number count = -1] ) &lt;br /&gt;
  -&amp;gt; nil | table commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean,&lt;br /&gt;
         &amp;quot;meta&amp;quot;    = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;This function can trigger an error if called too often without passing a second parameter. Refer to [https://github.com/spring/spring/blob/92c54d5b15775c39a8c67b203c28fe9b9db51cea/rts/Lua/LuaSyncedRead.cpp#L3983-L3996 LuaSyncedRead.cpp#L3983-L3996]&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFullBuildQueue&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt;&lt;br /&gt;
  nil | buildOrders = {&lt;br /&gt;
          [1] = { [number unitDefID] = number count },  etc...&lt;br /&gt;
        }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetRealBuildQueue&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;(cleans the buildqueue of things the unit can&#039;t build itself)&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitID ) -&amp;gt;&lt;br /&gt;
  nil | buildOrders = {&lt;br /&gt;
          [1] = { [number unitDefID] = number count },  etc...&lt;br /&gt;
        }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFactoryCommands&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number count = 0 ) -&amp;gt; nil | number commandQueueSize {{new|96}}&lt;br /&gt;
  ( number unitID [, number count = -1 ] ) &lt;br /&gt;
  -&amp;gt; nil | table commandQueueTable = {&lt;br /&gt;
     [1] = {&lt;br /&gt;
       &amp;quot;id&amp;quot;      = number,&lt;br /&gt;
       &amp;quot;params&amp;quot;  = { [1] = number, ...},&lt;br /&gt;
       &amp;quot;options&amp;quot; = {&lt;br /&gt;
         &amp;quot;coded&amp;quot;    = number,&lt;br /&gt;
         &amp;quot;alt&amp;quot;      = boolean,&lt;br /&gt;
         &amp;quot;ctrl&amp;quot;     = boolean,&lt;br /&gt;
         &amp;quot;shift&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;right&amp;quot;    = boolean,&lt;br /&gt;
         &amp;quot;internal&amp;quot; = boolean,&lt;br /&gt;
         &amp;quot;meta&amp;quot;    = boolean&lt;br /&gt;
       }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFactoryCounts&#039;&#039;&#039; (used to get the buildqueue of a factory, seems screwed o_O)&lt;br /&gt;
  ( number unitID [, number count [, boolean addCMDs ] ] ) -&amp;gt; nil | commandQueueTable = {&lt;br /&gt;
     [2] = { [number unitDefID | number -cmdID] = number count }, ...&lt;br /&gt;
   }&lt;br /&gt;
&lt;br /&gt;
=== Command Descriptions/Buttons ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitCmdDescs&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID [, number startIndex [, number endIndex ] ] ) -&amp;gt; nil | {&lt;br /&gt;
      [1] = {&lt;br /&gt;
        &amp;quot;id&amp;quot;          = number,&lt;br /&gt;
        &amp;quot;type&amp;quot;        = number,&lt;br /&gt;
        &amp;quot;name&amp;quot;        = string,&lt;br /&gt;
        &amp;quot;action&amp;quot;      = string,&lt;br /&gt;
        &amp;quot;tooltip&amp;quot;     = string,&lt;br /&gt;
        &amp;quot;texture&amp;quot;     = string,&lt;br /&gt;
        &amp;quot;cursor&amp;quot;      = string,&lt;br /&gt;
        &amp;quot;hidden&amp;quot;      = boolean,&lt;br /&gt;
        &amp;quot;disabled&amp;quot;    = boolean,&lt;br /&gt;
        &amp;quot;showUnique&amp;quot;  = boolean,&lt;br /&gt;
        &amp;quot;onlyTexture&amp;quot; = boolean,&lt;br /&gt;
&lt;br /&gt;
        &amp;quot;params&amp;quot;      = { [1] = string, ... }&lt;br /&gt;
     }, ...&lt;br /&gt;
   }&lt;br /&gt;
&#039;&#039;&#039;Spring.FindUnitCmdDesc&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number cmdID ) -&amp;gt; nil | number index&lt;br /&gt;
&lt;br /&gt;
== Features ==&lt;br /&gt;
=== GetFeatures ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturesInRectangle&#039;&#039;&#039;&lt;br /&gt;
  ( number xmin, number zmin, number xmax, number zmax )&lt;br /&gt;
    -&amp;gt; featureTable = { [1] = number featureID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturesInSphere&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number radius )&lt;br /&gt;
    -&amp;gt; featureTable = { [1] = number featureID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturesInCylinder&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z, number radius )&lt;br /&gt;
    -&amp;gt; featureTable = { [1] = number featureID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllFeatures&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; { [1] = number featureID, ... }&lt;br /&gt;
&lt;br /&gt;
=== Feature Informations ===&lt;br /&gt;
&#039;&#039;&#039;Spring.ValidFeatureID&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureDefID&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number featureDefID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number teamID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureAllyTeam&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number allyID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHealth&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number health, number maxHealth, number resurrectProgress&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureRadius&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeaturePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID, [, boolean midPos [, boolean aimPos ] ] ) -&amp;gt;&lt;br /&gt;
  nil |&lt;br /&gt;
  number bpx, number bpy, number bpz [,&lt;br /&gt;
  number mpx, number mpy, number mpz [,&lt;br /&gt;
  number apx, number apy, number apz ]]&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;since 89.0, returns the base (default), middle or aim position of the feature.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureVelocity&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  ( number featureID [, boolean norm] )&lt;br /&gt;
  -&amp;gt; nil | number velx, number vely, number velz, number velLength&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number dirx, number diry, number dirz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number heading&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureResources&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | number RemainingMetal, number maxMetal,&lt;br /&gt;
                                number RemainingEnergy, number maxEnergy, number reclaimLeft&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureNoSelect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | boolean noSelect&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureResurrect&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID ) -&amp;gt; nil | string UnitDefName, number buildFacing&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureCollisionVolumeData&#039;&#039;&#039;&lt;br /&gt;
  ( number featureID )&lt;br /&gt;
  -&amp;gt; number scaleX, number scaleY, number scaleZ,&lt;br /&gt;
  number offsetX, number offsetY, number offsetZ,&lt;br /&gt;
  number volumeType, number testType, number primaryAxis, boolean disabled&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetFeatureBlocking&#039;&#039;&#039;&lt;br /&gt;
  (number featureID) --&amp;gt; boolean collidable, boolean crushable, boolean blocking&lt;br /&gt;
{{new|95.0}} Now return values are: &lt;br /&gt;
  boolean isBlocking,&lt;br /&gt;
  boolean isSolidObjectCollidable,&lt;br /&gt;
  boolean isProjectileCollidable,&lt;br /&gt;
  boolean isRaySegmentCollidable,&lt;br /&gt;
  boolean crushable,&lt;br /&gt;
  boolean blockEnemyPushing,&lt;br /&gt;
  boolean blockHeightChanges&lt;br /&gt;
&lt;br /&gt;
== COB ==&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBUnitVar&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBTeamVar&#039;&#039;&#039;&lt;br /&gt;
  ( number teamID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBAllyTeamVar&#039;&#039;&#039;&lt;br /&gt;
  ( number allyID, integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&#039;&#039;&#039;Spring.GetCOBGlobalVar&#039;&#039;&#039;&lt;br /&gt;
  ( integer varID [, boolean unpack = false ] )&lt;br /&gt;
   -&amp;gt; nil | number value | number unpackedX, number unpackedY&lt;br /&gt;
&lt;br /&gt;
== Ground ==&lt;br /&gt;
=== Ground Informations ===&lt;br /&gt;
&amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;Elevation is y. Water level is always at y=0. Ground height can be changed during play (terraform or deformation).&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundOrigHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundNormal&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z [, smoothedNormal] ) -&amp;gt; number x, number y, number z, number slope &lt;br /&gt;
{{new|100.0}}&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;: smoothedNormal and slope&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundInfo&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; string &amp;quot;Type&amp;quot;, number metal, number hardness,&lt;br /&gt;
                            number tankSpeed, number kbotSpeed, number hoverSpeed,&lt;br /&gt;
                            number shipSpeed, boolean receiveTracks&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundBlocked&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z |&lt;br /&gt;
    number x1, number z1, number x2, number z2 )&lt;br /&gt;
    -&amp;gt; nil |  string &amp;quot;feature&amp;quot;, number featureID  |  string &amp;quot;unit&amp;quot;, number unitID&lt;br /&gt;
&#039;&#039;&#039;Spring.GetGroundExtremes&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | number minHeight, number maxHeight&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetSmoothMeshHeight&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number y&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetMetalMapSize&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; number sizeX, number sizeY&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetMetalAmount&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number metalAmount &lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;where x &amp;amp; z are in metal map coordinates (worldspace/16)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetMetalExtraction&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number z ) -&amp;gt; number extractionAmount &lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;where x &amp;amp; z are in metal map coordinates (worldspace/16)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetTerrainTypeData&#039;&#039;&#039; {{new|92.0}}&lt;br /&gt;
  ( number i )&lt;br /&gt;
    -&amp;gt; nil |  string &amp;quot;name&amp;quot;, number hardness,&lt;br /&gt;
              number tankSpeed, number kbotSpeed, number hoverSpeed, number shipSpeed,&lt;br /&gt;
              boolean receiveTracks&lt;br /&gt;
&lt;br /&gt;
=== Test Orders ===&lt;br /&gt;
&#039;&#039;&#039;Spring.TestMoveOrder&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z) -&amp;gt; boolean validMove&lt;br /&gt;
{{New|95.0}} parameters now are:&lt;br /&gt;
    number unitDefID,&lt;br /&gt;
    number pos.x, number pos.y, number pos.z&lt;br /&gt;
    [, number dir.x&lt;br /&gt;
    [, number dir.y&lt;br /&gt;
    [, number dir.z&lt;br /&gt;
    [, boolean testTerrain&lt;br /&gt;
    [, boolean testObjects&lt;br /&gt;
    [, boolean centerOnly ]]]]]]&lt;br /&gt;
    ) --&amp;gt; boolean &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.TestBuildOrder&#039;&#039;&#039;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z, number facing)&lt;br /&gt;
    -&amp;gt; number blocking [,number featureID]&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;blocking can be:&lt;br /&gt;
    0 - blocked&lt;br /&gt;
    1 - mobile unit in the way&lt;br /&gt;
    2 - free  (or if featureID is != nil then with a blocking feature that can be reclaimed)&lt;br /&gt;
  facing can be:&lt;br /&gt;
    0, &amp;quot;s&amp;quot;, &amp;quot;south&amp;quot;&lt;br /&gt;
    1, &amp;quot;e&amp;quot;, &amp;quot;east&amp;quot;&lt;br /&gt;
    2, &amp;quot;n&amp;quot;, &amp;quot;north&amp;quot;&lt;br /&gt;
    3, &amp;quot;w&amp;quot;, &amp;quot;west&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.Pos2BuildPos&#039;&#039;&#039; &amp;lt;font color=&amp;quot;#FF0000&amp;quot;&amp;gt;optional param &#039;&#039;facing&#039;&#039; supported in 0.83 and later&amp;lt;/font&amp;gt;&lt;br /&gt;
  ( number unitDefID, number x, number y, number z[, number facing] ) &lt;br /&gt;
    -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
=== PathFinding ===&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitEstimatedPath&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil | {&lt;br /&gt;
     [1] = { x,y,z }, ...&lt;br /&gt;
   },{&lt;br /&gt;
     [1] = startIdxOfDetailedPath,&lt;br /&gt;
     [2] = startIdxOfDetailedEstimatedPath1,&lt;br /&gt;
     [3] = startIdxOfDetailedEstimatedPath2,&lt;br /&gt;
   }&lt;br /&gt;
  &amp;lt;font color=&amp;quot;#55ee99&amp;quot;&amp;gt;GetUnitEstimatedPath() returns 2 tables:&lt;br /&gt;
    1 table the waypoints and 1 table with indices (in the waypoint table)&lt;br /&gt;
    when a new (more lazy) pathfinding algorithm  begins.&lt;br /&gt;
    So the waypoint table contains 3 different levels of details.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== LOS ===&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInLos&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInRadar&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.IsPosInAirLos&#039;&#039;&#039;&lt;br /&gt;
  ( number x, number y, number z, number allyID ) -&amp;gt; boolean&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPositionLosState&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;jammed new in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number x, number y, number z [, number allyID] )&lt;br /&gt;
    -&amp;gt; boolean LosOrRadar, boolean inLos, boolean inRadar, boolean jammed&lt;br /&gt;
&amp;lt;span class=&amp;quot;note&amp;quot;&amp;gt;jammed indicates if a position is actively being radar- or sonar-jammed by &#039;&#039;&#039;any&#039;&#039;&#039; allyteam&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetClosestValidPosition&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;//NOT FINISHED YET&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitDefID, number x, number z, number r ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Projectiles ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectilesInRectangle&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
 ( number xmin, number zmin, number xmax, number zmax&lt;br /&gt;
   [, boolean excludeWeaponProjectiles&lt;br /&gt;
   [, boolean excludePieceProjectiles] ] )&lt;br /&gt;
   -&amp;gt; nil | projectileTable = { [1] = number projectileID, etc... }&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileOwnerID&#039;&#039;&#039; {{new|99.0}}&lt;br /&gt;
   (number projectileID) -&amp;gt; nil | number unitID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileTeamID&#039;&#039;&#039; {{new|99.0}}&lt;br /&gt;
   (number projectileID) -&amp;gt; nil | number teamID&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileDefID&#039;&#039;&#039;&lt;br /&gt;
   (number projectileID) -&amp;gt; nil | number weaponDefID&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;using this to get a weaponDefID is HIGHLY preferred &amp;lt;br/&amp;gt; to indexing WeaponDefNames via GetProjectileName&amp;lt;span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileName&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | string name&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileType&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | boolean weapon, boolean piece&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileTarget&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID )&lt;br /&gt;
  &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Pre 95.0:&amp;lt;/span&amp;gt;  -&amp;gt; nil | number targetID, string &amp;lt;span class=note&amp;gt;targetTypeStr&amp;lt;/span&amp;gt;&lt;br /&gt;
  &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Post 95.0:&amp;lt;/span&amp;gt; -&amp;gt; nil | [number &amp;lt;span class=note&amp;gt;targetTypeInt&amp;lt;/span&amp;gt;, number targetID | table targetPos = {x, y, z}]&lt;br /&gt;
&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;targetTypeStr can be one of: &lt;br /&gt;
    &#039;u&#039; - unit&lt;br /&gt;
    &#039;f&#039; - feature&lt;br /&gt;
    &#039;p&#039; - projectile&lt;br /&gt;
  while targetTypeInt is one of:&lt;br /&gt;
    string.byte(&#039;g&#039;) := GROUND&lt;br /&gt;
    string.byte(&#039;u&#039;) := UNIT&lt;br /&gt;
    string.byte(&#039;f&#039;) := FEATURE&lt;br /&gt;
    string.byte(&#039;p&#039;) := PROJECTILE&lt;br /&gt;
  &amp;lt;/span&amp;gt;&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileIntercepted&#039;&#039;&#039; {{new|99.0}}&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | boolean isBeingIntercepted&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectilePosition&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number px, number py, number pz&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number vx, number vy, number vz&lt;br /&gt;
  {{new|95.0}}: returns (targetPos - startPos) for Beamlasers and similar weapons&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileGravity&#039;&#039;&#039;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number gravity&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetPieceProjectileParams&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil |  number explosionFlags, number spinAngle, &lt;br /&gt;
  number spinSpeed, number spinVector.x, number spinVector.y, number spinVector.z&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;Where explosionFlags use binary flags with the following integer equivalents: &lt;br /&gt;
   more info [http://springrts.com/wiki/Animation-CobConstants#explode here]&lt;br /&gt;
   SHATTER = 1,  EXPLODE = 2, EXPLODE_ON_HIT = 2, FALL = 4, SMOKE = 8, FIRE = 16&lt;br /&gt;
   NONE = 32, NO_CEG_TRAIL = 64, NO_HEATCLOUD = 128   &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileTimeToLive&#039;&#039;&#039; {{new|99.0}}&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number ttl&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileDirection&#039;&#039;&#039; {{new|95.0}}&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number dir.x, number dir.y, number dir.z&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileSpinAngle&#039;&#039;&#039;  &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Deprecated in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number angle&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileSpinSpeed&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Deprecated in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number spinSpeed&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileSpinVec&#039;&#039;&#039;  &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Deprecated in 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number projectileID ) -&amp;gt; nil | number x, number y, number z&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetProjectileDamages&#039;&#039;&#039; {{new|101.0}}&lt;br /&gt;
  ( number unitID, number weaponNum, string tag ) -&amp;gt; nil | number&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;`tag` can be:&lt;br /&gt;
  &amp;quot;paralyzeDamageTime&amp;quot;&lt;br /&gt;
  &amp;quot;impulseFactor&amp;quot;&lt;br /&gt;
  &amp;quot;impulseBoost&amp;quot;&lt;br /&gt;
  &amp;quot;craterMult&amp;quot;&lt;br /&gt;
  &amp;quot;craterBoost&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageExp&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageMin&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageRange&amp;quot;&lt;br /&gt;
  &amp;quot;dynDamageInverted&amp;quot;&lt;br /&gt;
  &amp;quot;craterAreaOfEffect&amp;quot;&lt;br /&gt;
  &amp;quot;damageAreaOfEffect&amp;quot;&lt;br /&gt;
  &amp;quot;edgeEffectiveness&amp;quot;&lt;br /&gt;
  &amp;quot;explosionSpeed&amp;quot;&lt;br /&gt;
  - or -&lt;br /&gt;
  an armor type index to get the damage against it.&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6448</id>
		<title>EvoGreenLitFAQ</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6448"/>
		<updated>2016-04-07T20:55:29Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Blanked the page&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Rapid_Tags&amp;diff=15647</id>
		<title>Rapid Tags</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Rapid_Tags&amp;diff=15647"/>
		<updated>2015-07-04T04:10:32Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable sortable&amp;quot; Width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Tag !! Name&lt;br /&gt;
|-&lt;br /&gt;
| ba-tronic:latest || Balanced Annihilation Tronic&lt;br /&gt;
|-&lt;br /&gt;
| ba:stable || Balanced Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| ba:test || Balanced Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| bac:stable || BA Chicken Defense&lt;br /&gt;
|-&lt;br /&gt;
| bac:test || BA Chicken Defense&lt;br /&gt;
|-&lt;br /&gt;
| bar:test || Balanced Annihilation Reloaded&lt;br /&gt;
|-&lt;br /&gt;
| brickcraft:epenis || BrickCraft epenis&lt;br /&gt;
|-&lt;br /&gt;
| brickcraft:latest || BrickCraft &lt;br /&gt;
|-&lt;br /&gt;
| btl:latest || BattleTech: Legacy&lt;br /&gt;
|-&lt;br /&gt;
| ct:stable || Conflict Terra&lt;br /&gt;
|-&lt;br /&gt;
| ct:test || Conflict Terra&lt;br /&gt;
|-&lt;br /&gt;
| ea:latest || Eternal Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| evo:stable || Evolution RTS&lt;br /&gt;
|-&lt;br /&gt;
| evo:test || Evolution RTS&lt;br /&gt;
|-&lt;br /&gt;
| ft:test || Frontier&lt;br /&gt;
|-&lt;br /&gt;
| jw:test || Journeywar&lt;br /&gt;
|-&lt;br /&gt;
| kp:latest || Kernel Panic&lt;br /&gt;
|-&lt;br /&gt;
| micromodules:latest || Micro Modules&lt;br /&gt;
|-&lt;br /&gt;
| mw:latest || Micronwars&lt;br /&gt;
|-&lt;br /&gt;
| nota:latest || NOTA&lt;br /&gt;
|-&lt;br /&gt;
| nota:stable || NOTA&lt;br /&gt;
|-&lt;br /&gt;
| operationx:latest || Special BA&lt;br /&gt;
|-&lt;br /&gt;
| pa:latest || Progressive Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| ra:latest || Research Annihilation Concept&lt;br /&gt;
|-&lt;br /&gt;
| s44-deployment:test || Spring: 1944&lt;br /&gt;
|-&lt;br /&gt;
| s44:latest || Spring: 1944&lt;br /&gt;
|-&lt;br /&gt;
| s44:stable || Spring: 1944&lt;br /&gt;
|-&lt;br /&gt;
| sa:latest || Supreme Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| spring-features:stable || Spring Features&lt;br /&gt;
|-&lt;br /&gt;
| specialba:latest || Special BA&lt;br /&gt;
|-&lt;br /&gt;
| springtanks:latest || Spring Tanks&lt;br /&gt;
|-&lt;br /&gt;
| staticfriction:stable || Static Friction&lt;br /&gt;
|-&lt;br /&gt;
| staticfriction:testing || Static Friction&lt;br /&gt;
|-&lt;br /&gt;
| ta_factions:latest || TA : Factions&lt;br /&gt;
|-&lt;br /&gt;
| thecursed:latest || The Cursed&lt;br /&gt;
|-&lt;br /&gt;
| thecursed:test || The Cursed&lt;br /&gt;
|-&lt;br /&gt;
| void:latest || Void&lt;br /&gt;
|-&lt;br /&gt;
| xta:fixed || XTA&lt;br /&gt;
|-&lt;br /&gt;
| xta:latest || XTA&lt;br /&gt;
|-&lt;br /&gt;
| xta:test || XTA&lt;br /&gt;
|-&lt;br /&gt;
| xtar:latest || XTAR&lt;br /&gt;
|-&lt;br /&gt;
| zk:stable || Zero-K&lt;br /&gt;
|-&lt;br /&gt;
| zk:test || Zero-K&lt;br /&gt;
|-&lt;br /&gt;
| zkc:latest || Zero-K&lt;br /&gt;
|-&lt;br /&gt;
| zkdota:stable || Zero-K DOTA&lt;br /&gt;
|-&lt;br /&gt;
| zkdota:test || Zero-K DOTA&lt;br /&gt;
|-&lt;br /&gt;
| zkr:alpha || Zero-K Raid&lt;br /&gt;
|-&lt;br /&gt;
| zkr:latest || Zero-K Raid&lt;br /&gt;
|-&lt;br /&gt;
| zkr:test || Zero-K Raid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Download Systems]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Rapid_Tags&amp;diff=15646</id>
		<title>Rapid Tags</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Rapid_Tags&amp;diff=15646"/>
		<updated>2015-07-04T04:10:06Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{| class=&amp;quot;wikitable sortable&amp;quot; Width=&amp;quot;100%&amp;quot;&lt;br /&gt;
|-&lt;br /&gt;
! Tag !! Name&lt;br /&gt;
|-&lt;br /&gt;
| ba-tronic:latest || Balanced Annihilation Tronic&lt;br /&gt;
|-&lt;br /&gt;
| ba:stable || Balanced Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| ba:test || Balanced Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| bac:stable || BA Chicken Defense&lt;br /&gt;
|-&lt;br /&gt;
| bac:test || BA Chicken Defense&lt;br /&gt;
|-&lt;br /&gt;
| bar:test || Balanced Annihilation Reloaded&lt;br /&gt;
|-&lt;br /&gt;
| brickcraft:epenis || BrickCraft epenis&lt;br /&gt;
|-&lt;br /&gt;
| brickcraft:latest || BrickCraft &lt;br /&gt;
|-&lt;br /&gt;
| btl:latest || BattleTech: Legacy&lt;br /&gt;
|-&lt;br /&gt;
| ct:stable || Conflict Terra&lt;br /&gt;
|-&lt;br /&gt;
| ct:test || Conflict Terra&lt;br /&gt;
|-&lt;br /&gt;
| ea:latest || Eternal Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| evo:stable || Evolution RTS&lt;br /&gt;
|-&lt;br /&gt;
| evo:test || Evolution RTS&lt;br /&gt;
|-&lt;br /&gt;
| ft:test || Frontier&lt;br /&gt;
|-&lt;br /&gt;
| jw:test || Journeywar&lt;br /&gt;
|-&lt;br /&gt;
| kp:latest || Kernel Panic&lt;br /&gt;
|-&lt;br /&gt;
| micromodules:latest || Micro Modules&lt;br /&gt;
|-&lt;br /&gt;
| mw:latest || Micronwars&lt;br /&gt;
|-&lt;br /&gt;
| nota:latest || NOTA&lt;br /&gt;
|-&lt;br /&gt;
| nota:stable || NOTA&lt;br /&gt;
|-&lt;br /&gt;
| operationx:latest || Special BA&lt;br /&gt;
|-&lt;br /&gt;
| pa:latest || Progressive Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| ra:latest || Research Annihilation Concept&lt;br /&gt;
|-&lt;br /&gt;
| s44-deployment:test || Spring: 1944&lt;br /&gt;
|-&lt;br /&gt;
| s44:latest || Spring: 1944&lt;br /&gt;
|-&lt;br /&gt;
| s44:stable || Spring: 1944&lt;br /&gt;
|-&lt;br /&gt;
| sa:latest || Supreme Annihilation&lt;br /&gt;
|-&lt;br /&gt;
| spring-features:stable || Spring Features 1.0&lt;br /&gt;
|-&lt;br /&gt;
| specialba:latest || Special BA&lt;br /&gt;
|-&lt;br /&gt;
| springtanks:latest || Spring Tanks&lt;br /&gt;
|-&lt;br /&gt;
| staticfriction:stable || Static Friction&lt;br /&gt;
|-&lt;br /&gt;
| staticfriction:testing || Static Friction&lt;br /&gt;
|-&lt;br /&gt;
| ta_factions:latest || TA : Factions&lt;br /&gt;
|-&lt;br /&gt;
| thecursed:latest || The Cursed&lt;br /&gt;
|-&lt;br /&gt;
| thecursed:test || The Cursed&lt;br /&gt;
|-&lt;br /&gt;
| void:latest || Void&lt;br /&gt;
|-&lt;br /&gt;
| xta:fixed || XTA&lt;br /&gt;
|-&lt;br /&gt;
| xta:latest || XTA&lt;br /&gt;
|-&lt;br /&gt;
| xta:test || XTA&lt;br /&gt;
|-&lt;br /&gt;
| xtar:latest || XTAR&lt;br /&gt;
|-&lt;br /&gt;
| zk:stable || Zero-K&lt;br /&gt;
|-&lt;br /&gt;
| zk:test || Zero-K&lt;br /&gt;
|-&lt;br /&gt;
| zkc:latest || Zero-K&lt;br /&gt;
|-&lt;br /&gt;
| zkdota:stable || Zero-K DOTA&lt;br /&gt;
|-&lt;br /&gt;
| zkdota:test || Zero-K DOTA&lt;br /&gt;
|-&lt;br /&gt;
| zkr:alpha || Zero-K Raid&lt;br /&gt;
|-&lt;br /&gt;
| zkr:latest || Zero-K Raid&lt;br /&gt;
|-&lt;br /&gt;
| zkr:test || Zero-K Raid&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
[[Category:Download Systems]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Associated_Development_Groups&amp;diff=2218</id>
		<title>Associated Development Groups</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Associated_Development_Groups&amp;diff=2218"/>
		<updated>2015-04-18T05:18:14Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
There are numerous people and groups involved in the Spring project, from development to content creation. This is meant as a cumulative list of associated groups to ease communication between them. &lt;br /&gt;
&lt;br /&gt;
= Websites =&lt;br /&gt;
== Games ==&lt;br /&gt;
=== Balanced Annhiliation ===&lt;br /&gt;
*[https://springrts.com/phpbb/viewforum.php?f=44 Balanced Annihilation] forum&lt;br /&gt;
&lt;br /&gt;
=== Evolution RTS ===&lt;br /&gt;
&lt;br /&gt;
*[http://www.evolutionrts.info/ www.evolutionrts.info] - Official Website &amp;amp; Forums&lt;br /&gt;
*[http://www.wiki.evolutionrts.info/ www.wiki.evolutionrts.info] - Evolution RTS Wiki (Game Manual/How to Play/Unit Guide/Etc)&lt;br /&gt;
*[https://plus.google.com/+EvolutionrtsInfo +EvolutionrtsInfo] - Evolution RTS Google+ Page (development updates, twitter style)&lt;br /&gt;
*[http://www.source.evolutionrts.info/ www.source.evolutionrts.info] - Evolution RTS Source Code SVN Repository (Google Code)&lt;br /&gt;
*[http://www.bugs.evolutionrts.info/ www.bugs.evolutionrts.info] - Evolution RTS Bug Tracker&lt;br /&gt;
*[http://www.desura.com/games/evolution-rts www.desura.com/games/evolution-rts] - Evolution RTS on Desura&lt;br /&gt;
&lt;br /&gt;
=== Imperial Winter ===&lt;br /&gt;
*[http://www.imperialwinter.com ImperialWinter.com] - Official Website &amp;amp; Forums&lt;br /&gt;
&lt;br /&gt;
=== Spring: 1944 ===&lt;br /&gt;
*[http://www.spring1944.net Spring1944.net] - Official Website &amp;amp; Forums&lt;br /&gt;
&lt;br /&gt;
=== Zero-K ===&lt;br /&gt;
*[http://www.zero-k.info Zero-K.info]  - Official Website &amp;amp; Forums&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
*[http://www.moddb.com/engines/spring/ Spring on moddb.com]&lt;br /&gt;
*[http://answers.springlobby.info/ Spring Q&amp;amp;A Forum]&lt;br /&gt;
*[http://springlobby.info/ SpringLobby&#039;s Redmine] - The SpringLobby group is the biggest collaborative lobby client work in the Spring community. This is their project&#039;s homepage, containing bug tracker and helpful information on their wiki.&lt;br /&gt;
*[http://www.smoth.net/phpBB3/ Smoth&#039;s Development Forum] - the forum for the games Gundam RTS, Expand and Exterminate, Kernel Panic.&lt;br /&gt;
*[http://www.irit.fr/ProgAndPlay/index_en.php Prog&amp;amp;Play] - AI programming game/class using Spring and [[Kernel_Panic|Kernel Panic]]&lt;br /&gt;
&lt;br /&gt;
= Lobby Channels =&lt;br /&gt;
&#039;&#039;&#039;#moddev&#039;&#039;&#039; - real game developers answer your questions&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;#lua&#039;&#039;&#039; - ask for help how to read tutorials&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;#sy&#039;&#039;&#039; - check back when the new enine will be released&lt;br /&gt;
&lt;br /&gt;
= YouTube Channels =&lt;br /&gt;
A unsorted list of youtube accounts that uploaded at least some spring contest.&lt;br /&gt;
&lt;br /&gt;
The amount, context and quality varies.&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/PROrANDY&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/SteveZissouSpring&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/xtaboi&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/ForbodingAngel&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/knorker&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/playlist?list=PL3C03292C49A62F81&amp;amp;feature=plcp (sabutai replay playlist )&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/omnianti0&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/rattle235/&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/jazcash&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Cuntipede&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Ruwetuin&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/xtaboi&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/kile4568&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Canonfudder&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/wagonrepairer&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/xenoargh&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/smoth7&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/OpenMachines&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/XHC#p/ur&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Pendrokar#p/u&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/XtaReplay&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Kleaut&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/kylelck&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/playlist?list=PLOj_JX39U3OMuthcAPhuT9XcbZWoQaswZ Enetheru&#039;s channel] - primarily blender related terrain and feature creation.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/user/gajop&lt;br /&gt;
&lt;br /&gt;
[[Category: Development]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Associated_Development_Groups&amp;diff=2217</id>
		<title>Associated Development Groups</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Associated_Development_Groups&amp;diff=2217"/>
		<updated>2015-04-18T05:17:54Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
There are numerous people and groups involved in the Spring project, from development to content creation. This is meant as a cumulative list of associated groups to ease communication between them. &lt;br /&gt;
&lt;br /&gt;
= Websites =&lt;br /&gt;
== Games ==&lt;br /&gt;
=== Balanced Annhiliation ===&lt;br /&gt;
*[https://springrts.com/phpbb/viewforum.php?f=44 Balanced Annihilation] forum&lt;br /&gt;
&lt;br /&gt;
=== Evolution RTS ===&lt;br /&gt;
&lt;br /&gt;
*[http://www.evolutionrts.info/ www.evolutionrts.info] - Official Website &amp;amp; Forums&lt;br /&gt;
*[http://www.wiki.evolutionrts.info/ www.wiki.evolutionrts.info] - Evolution RTS Wiki (Game Manual/How to Play/Unit Guide/Etc)&lt;br /&gt;
*[https://plus.google.com/+EvolutionrtsInfo https://plus.google.com/+EvolutionrtsInfo] - Evolution RTS Google+ Page (development updates, twitter style)&lt;br /&gt;
*[http://www.source.evolutionrts.info/ www.source.evolutionrts.info] - Evolution RTS Source Code SVN Repository (Google Code)&lt;br /&gt;
*[http://www.bugs.evolutionrts.info/ www.bugs.evolutionrts.info] - Evolution RTS Bug Tracker&lt;br /&gt;
*[http://www.desura.com/games/evolution-rts www.desura.com/games/evolution-rts] - Evolution RTS on Desura&lt;br /&gt;
&lt;br /&gt;
=== Imperial Winter ===&lt;br /&gt;
*[http://www.imperialwinter.com ImperialWinter.com] - Official Website &amp;amp; Forums&lt;br /&gt;
&lt;br /&gt;
=== Spring: 1944 ===&lt;br /&gt;
*[http://www.spring1944.net Spring1944.net] - Official Website &amp;amp; Forums&lt;br /&gt;
&lt;br /&gt;
=== Zero-K ===&lt;br /&gt;
*[http://www.zero-k.info Zero-K.info]  - Official Website &amp;amp; Forums&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Misc ==&lt;br /&gt;
*[http://www.moddb.com/engines/spring/ Spring on moddb.com]&lt;br /&gt;
*[http://answers.springlobby.info/ Spring Q&amp;amp;A Forum]&lt;br /&gt;
*[http://springlobby.info/ SpringLobby&#039;s Redmine] - The SpringLobby group is the biggest collaborative lobby client work in the Spring community. This is their project&#039;s homepage, containing bug tracker and helpful information on their wiki.&lt;br /&gt;
*[http://www.smoth.net/phpBB3/ Smoth&#039;s Development Forum] - the forum for the games Gundam RTS, Expand and Exterminate, Kernel Panic.&lt;br /&gt;
*[http://www.irit.fr/ProgAndPlay/index_en.php Prog&amp;amp;Play] - AI programming game/class using Spring and [[Kernel_Panic|Kernel Panic]]&lt;br /&gt;
&lt;br /&gt;
= Lobby Channels =&lt;br /&gt;
&#039;&#039;&#039;#moddev&#039;&#039;&#039; - real game developers answer your questions&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;#lua&#039;&#039;&#039; - ask for help how to read tutorials&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;#sy&#039;&#039;&#039; - check back when the new enine will be released&lt;br /&gt;
&lt;br /&gt;
= YouTube Channels =&lt;br /&gt;
A unsorted list of youtube accounts that uploaded at least some spring contest.&lt;br /&gt;
&lt;br /&gt;
The amount, context and quality varies.&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/PROrANDY&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/SteveZissouSpring&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/xtaboi&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/ForbodingAngel&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/knorker&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/playlist?list=PL3C03292C49A62F81&amp;amp;feature=plcp (sabutai replay playlist )&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/omnianti0&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/rattle235/&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/jazcash&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Cuntipede&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Ruwetuin&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/xtaboi&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/kile4568&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Canonfudder&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/wagonrepairer&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/xenoargh&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/smoth7&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/OpenMachines&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/XHC#p/ur&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Pendrokar#p/u&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/XtaReplay&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/Kleaut&lt;br /&gt;
&lt;br /&gt;
http://www.youtube.com/user/kylelck&lt;br /&gt;
&lt;br /&gt;
[http://www.youtube.com/playlist?list=PLOj_JX39U3OMuthcAPhuT9XcbZWoQaswZ Enetheru&#039;s channel] - primarily blender related terrain and feature creation.&lt;br /&gt;
&lt;br /&gt;
https://www.youtube.com/user/gajop&lt;br /&gt;
&lt;br /&gt;
[[Category: Development]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6444</id>
		<title>EvoGreenLitFAQ</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6444"/>
		<updated>2014-04-18T03:57:54Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EvolutionRTS emergency FAQ&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before you ask a question in chat, please see if it is already answered on this list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Playable at the moment?==&lt;br /&gt;
Looks like it!&lt;br /&gt;
&lt;br /&gt;
http://www.vemags.de/wp-content/uploads/2012/06/Status_LSA_gruen1.jpg&lt;br /&gt;
&lt;br /&gt;
There seem to be at least 1, often 2 and more team games running all the time.&lt;br /&gt;
&lt;br /&gt;
==Downloads fail (because windows user name has special characters)==&lt;br /&gt;
http://i.imgur.com/6qZTQOZ.png&lt;br /&gt;
&lt;br /&gt;
If the lobby states it is downloading the engine but nothing happens:&lt;br /&gt;
&lt;br /&gt;
Check if your windows account name contains any &amp;quot;funny&amp;quot; characters or umlauts like Ã¶Ã¼Ã¤Ã´Ã¡ etc.&lt;br /&gt;
&lt;br /&gt;
As a workaround use a windows account name without such characters. This is will be fixed of course.&lt;br /&gt;
&lt;br /&gt;
==Singleplayer?==&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039;  Create a multiplayer battleroom with the button at the bottom and make it private by giving it a password. The lobby will download the necessary files and once it&#039;s done, you can play. See below for adding bots.&lt;br /&gt;
&lt;br /&gt;
Or go to the Singleplayer tab and create a custom battle (&amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; launch game directly) with engine 96.0 and the latest version of Evolution RTS you can find in the list.&lt;br /&gt;
&lt;br /&gt;
==Cannot start command: Downloading Engine 96.0: assign: The parameter is incorrect==&lt;br /&gt;
&lt;br /&gt;
Are you on windows XP? Unfortunately the lobby does not work with Windows XP. You can use the Java Weblobby version by visiting http://www.weblobby.evolutionrts.info directly or you can try a different lobby: http://steamcommunity.com/app/291150/discussions/0/540738051772337468/&lt;br /&gt;
&lt;br /&gt;
==Engine download stuck at 100%==&lt;br /&gt;
&lt;br /&gt;
First of all, make sure that your automatic windows updates are enabled. If you disabled them, then most likely you don&#039;t have the KB2533623 update that is necessary. Either reenable windows update or install KB2533623 separately if you&#039;re a power user.&lt;br /&gt;
&lt;br /&gt;
http://support.microsoft.com/kb/2533623&lt;br /&gt;
&lt;br /&gt;
Close the lobby and start it again.&lt;br /&gt;
&lt;br /&gt;
Look for common\EvolutionRTS\evo_data in your steam folder. If evo_data is not empty, copy everything in it into Documents\My games\Spring\&lt;br /&gt;
&lt;br /&gt;
==Automatic download of game files does not work==&lt;br /&gt;
NOTE: the GAME file, not the engine.&lt;br /&gt;
&lt;br /&gt;
Best idea is to wait a bit, the lobby should eventually download it.&lt;br /&gt;
If it &amp;lt;b&amp;gt;really absolutely&amp;lt;/b&amp;gt; does not work:&lt;br /&gt;
1. Go to http://packages.springrts.com/builds/&lt;br /&gt;
2. download the .sdz with the latest evolutionRTS version. (Currently that is 7.37 but check vs what is played in lobby)&lt;br /&gt;
3. Put the .sdz file into: Documents/My Games/Spring/games&lt;br /&gt;
Do not unzip it, just move it there. When you&#039;re done, close and reopen the lobby.&lt;br /&gt;
&lt;br /&gt;
As said, that is only for advanced users and should not be necessary.&lt;br /&gt;
&lt;br /&gt;
==AI does not work!==&lt;br /&gt;
The evolutionRTS AI is the &amp;quot;Survial Spawner AI.&amp;quot;&lt;br /&gt;
It spawns random enemies for you to shot at.&lt;br /&gt;
&lt;br /&gt;
The NullAI bot can also be used: It does &#039;&#039;nothing&#039;&#039; which is nice to try out the game without enemies.&lt;br /&gt;
&lt;br /&gt;
==Sandbox mode? I want to try the game without being rushed!==&lt;br /&gt;
Start a singleplayer game against the NullAI bot.&lt;br /&gt;
&lt;br /&gt;
==Missions?==&lt;br /&gt;
Not there yet.&lt;br /&gt;
&lt;br /&gt;
==It crashed!==&lt;br /&gt;
There is a logfile: [[Infolog.txt]]&lt;br /&gt;
&lt;br /&gt;
The page also explains how to find and share it. You can post it in forum, on steam or in chat.&lt;br /&gt;
&lt;br /&gt;
==Which maps should I play?==&lt;br /&gt;
Eye of Horus is a good map that works for team games, free-for-all, 1v1 and with bots.&lt;br /&gt;
&lt;br /&gt;
==Why so many problems?==&lt;br /&gt;
Surprised by so many players.&lt;br /&gt;
&lt;br /&gt;
==Hooray, I am ingame! How to play?==&lt;br /&gt;
http://www.wiki.evolutionrts.info/doku.php/evolution_rts:quick_start_guide&lt;br /&gt;
&lt;br /&gt;
Or just try out things :)&lt;br /&gt;
&lt;br /&gt;
==How to chat ingame?==&lt;br /&gt;
Press the RETURN key and type your message.&lt;br /&gt;
&lt;br /&gt;
==Graphics problems! / the game runs very bad!==&lt;br /&gt;
Some problems can probally be solved by the general spring-engine FAQ: [[FAQ:trouble]]&lt;br /&gt;
&lt;br /&gt;
==Cursor is painfully slow!==&lt;br /&gt;
Click Settings (the wrench) &amp;gt; Interface &amp;gt; Mouse Cursor &amp;gt; enable Hardware Cursor&lt;br /&gt;
&lt;br /&gt;
==As a player, how can I help?==&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;If you have bugs to report&#039;&#039;&#039;: It is okay to do so in the steam forum: http://steamcommunity.com/app/291150&lt;br /&gt;
&lt;br /&gt;
(Or if you know how to use the google.code bugtracker: https://code.google.com/p/evolutionrts/issues/list )&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Give as much &#039;&#039;info&#039;&#039; as possible:&#039;&#039;&#039;&lt;br /&gt;
*Operation system&lt;br /&gt;
&lt;br /&gt;
*computer hardware (laptop or desktop, cpu, ram, graphics card,..)&lt;br /&gt;
&lt;br /&gt;
*This logfile: [[Infolog.txt]]&lt;br /&gt;
&lt;br /&gt;
*Lobby logfile: /Documents/My games/Spring/weblobby/&#039;&#039;&#039;weblobby.log&#039;&#039;&#039; , share via pastebin.com&lt;br /&gt;
&lt;br /&gt;
*Screenshots can be uploaded to imgur.com or similiar&lt;br /&gt;
&lt;br /&gt;
After a while check back on your post, devs might need more informations from you!&lt;br /&gt;
&lt;br /&gt;
Reporting bugs in chat is pretty much useless, there get overlooked there or forgotten.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;If you can play:&#039;&#039;&#039; help others players with their problems in chat.&lt;br /&gt;
&lt;br /&gt;
3. Be patient  :)&lt;br /&gt;
&lt;br /&gt;
==More Information About Common Bugs==&lt;br /&gt;
https://code.google.com/p/springweblobby/wiki/EvoSteamBugs&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6443</id>
		<title>EvoGreenLitFAQ</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6443"/>
		<updated>2014-04-17T03:26:02Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Why so many problems? */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EvolutionRTS emergency FAQ&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before you ask a question in chat, please see if it is already answered on this list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
==Playable at the moment?==&lt;br /&gt;
Looks like it!&lt;br /&gt;
&lt;br /&gt;
http://www.vemags.de/wp-content/uploads/2012/06/Status_LSA_gruen1.jpg&lt;br /&gt;
&lt;br /&gt;
There seem to be at least 1, often 2 and more team games running all the time.&lt;br /&gt;
&lt;br /&gt;
==Downloads fail (because windows user name has special characters)==&lt;br /&gt;
http://i.imgur.com/6qZTQOZ.png&lt;br /&gt;
&lt;br /&gt;
If the lobby states it is downloading the engine but nothing happens:&lt;br /&gt;
&lt;br /&gt;
Check if your windows account name contains any &amp;quot;funny&amp;quot; characters or umlauts like Ã¶Ã¼Ã¤Ã´Ã¡ etc.&lt;br /&gt;
&lt;br /&gt;
As a workaround use a windows account name without such characters. This is will be fixed of course.&lt;br /&gt;
&lt;br /&gt;
==Singleplayer?==&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039;  Create a multiplayer battleroom with the button at the bottom and make it private by giving it a password. The lobby will download the necessary files and once it&#039;s done, you can play. See below for adding bots.&lt;br /&gt;
&lt;br /&gt;
Or go to the Singleplayer tab and create a custom battle (&amp;lt;b&amp;gt;NOT&amp;lt;/b&amp;gt; launch game directly) with engine 96.0 and the latest version of Evolution RTS you can find in the list.&lt;br /&gt;
&lt;br /&gt;
==Cannot start command: Downloading Engine 96.0: assign: The parameter is incorrect==&lt;br /&gt;
&lt;br /&gt;
Are you on windows XP? Unfortunately the lobby does not work with Windows XP. You can use the Java Weblobby version by visiting http://www.weblobby.evolutionrts.info directly or you can try a different lobby: http://steamcommunity.com/app/291150/discussions/0/540738051772337468/&lt;br /&gt;
&lt;br /&gt;
==Engine download stuck at 100%==&lt;br /&gt;
&lt;br /&gt;
First of all, make sure that your automatic windows updates are enabled. If you disabled them, then most likely you don&#039;t have the KB2533623 update that is necessary. Either reenable windows update or install KB2533623 separately if you&#039;re a power user.&lt;br /&gt;
&lt;br /&gt;
Close the lobby and start it again.&lt;br /&gt;
&lt;br /&gt;
Look for common\EvolutionRTS\evo_data in your steam folder. If evo_data is not empty, copy everything in it into Documents\My games\Spring\&lt;br /&gt;
&lt;br /&gt;
==Automatic download of game files does not work==&lt;br /&gt;
NOTE: the GAME file, not the engine.&lt;br /&gt;
&lt;br /&gt;
Best idea is to wait a bit, the lobby should eventually download it.&lt;br /&gt;
If it &amp;lt;b&amp;gt;really absolutely&amp;lt;/b&amp;gt; does not work:&lt;br /&gt;
1. Go to http://packages.springrts.com/builds/&lt;br /&gt;
2. download the .sdz with the latest evolutionRTS version. (Currently that is 7.37 but check vs what is played in lobby)&lt;br /&gt;
3. Put the .sdz file into: Documents/My Games/Spring/games&lt;br /&gt;
Do not unzip it, just move it there. When you&#039;re done, close and reopen the lobby.&lt;br /&gt;
&lt;br /&gt;
As said, that is only for advanced users and should not be necessary.&lt;br /&gt;
&lt;br /&gt;
==AI does not work!==&lt;br /&gt;
The evolutionRTS AI is the &amp;quot;Survial Spawner AI.&amp;quot;&lt;br /&gt;
It spawns random enemies for you to shot at.&lt;br /&gt;
&lt;br /&gt;
The NullAI bot can also be used: It does &#039;&#039;nothing&#039;&#039; which is nice to try out the game without enemies.&lt;br /&gt;
&lt;br /&gt;
==Sandbox mode? I want to try the game without being rushed!==&lt;br /&gt;
Start a singleplayer game against the NullAI bot.&lt;br /&gt;
&lt;br /&gt;
==Missions?==&lt;br /&gt;
Not there yet.&lt;br /&gt;
&lt;br /&gt;
==It crashed!==&lt;br /&gt;
There is a logfile: [[Infolog.txt]]&lt;br /&gt;
&lt;br /&gt;
The page also explains how to find and share it. You can post it in forum, on steam or in chat.&lt;br /&gt;
&lt;br /&gt;
==Which maps should I play?==&lt;br /&gt;
Eye of Horus is a good map that works for team games, free-for-all, 1v1 and with bots.&lt;br /&gt;
&lt;br /&gt;
==Why so many problems?==&lt;br /&gt;
Surprised by so many players.&lt;br /&gt;
&lt;br /&gt;
==Hooray, I am ingame! How to play?==&lt;br /&gt;
http://www.wiki.evolutionrts.info/doku.php/evolution_rts:quick_start_guide&lt;br /&gt;
&lt;br /&gt;
Or just try out things :)&lt;br /&gt;
&lt;br /&gt;
==How to chat ingame?==&lt;br /&gt;
Press the RETURN key and type your message.&lt;br /&gt;
&lt;br /&gt;
==Graphics problems! / the game runs very bad!==&lt;br /&gt;
Some problems can probally be solved by the general spring-engine FAQ: [[FAQ:trouble]]&lt;br /&gt;
&lt;br /&gt;
==Cursor is painfully slow!==&lt;br /&gt;
Click Settings (the wrench) &amp;gt; Interface &amp;gt; Mouse Cursor &amp;gt; enable Hardware Cursor&lt;br /&gt;
&lt;br /&gt;
==As a player, how can I help?==&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;If you have bugs to report&#039;&#039;&#039;: It is okay to do so in the steam forum: http://steamcommunity.com/app/291150&lt;br /&gt;
&lt;br /&gt;
(Or if you know how to use the google.code bugtracker: https://code.google.com/p/evolutionrts/issues/list )&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Give as much &#039;&#039;info&#039;&#039; as possible:&#039;&#039;&#039;&lt;br /&gt;
*Operation system&lt;br /&gt;
&lt;br /&gt;
*computer hardware (laptop or desktop, cpu, ram, graphics card,..)&lt;br /&gt;
&lt;br /&gt;
*This logfile: [[Infolog.txt]]&lt;br /&gt;
&lt;br /&gt;
*Lobby logfile: /Documents/My games/Spring/weblobby/&#039;&#039;&#039;weblobby.log&#039;&#039;&#039; , share via pastebin.com&lt;br /&gt;
&lt;br /&gt;
*Screenshots can be uploaded to imgur.com or similiar&lt;br /&gt;
&lt;br /&gt;
After a while check back on your post, devs might need more informations from you!&lt;br /&gt;
&lt;br /&gt;
Reporting bugs in chat is pretty much useless, there get overlooked there or forgotten.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;If you can play:&#039;&#039;&#039; help others players with their problems in chat.&lt;br /&gt;
&lt;br /&gt;
3. Be patient  :)&lt;br /&gt;
&lt;br /&gt;
==More Information About Common Bugs==&lt;br /&gt;
https://code.google.com/p/springweblobby/wiki/EvoSteamBugs&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenlitList&amp;diff=6457</id>
		<title>EvoGreenlitList</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenlitList&amp;diff=6457"/>
		<updated>2014-04-16T20:15:38Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Soved */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of most urgent problems currently preventing players from playing evo.&lt;br /&gt;
&lt;br /&gt;
=Current=&lt;br /&gt;
&lt;br /&gt;
==engine detection==&lt;br /&gt;
&lt;br /&gt;
For &amp;lt;s&amp;gt;unknown reasons&amp;lt;/s&amp;gt; http://code.google.com/p/springweblobby/wiki/EvoSteamBugs &#039;&#039;&#039;often does not work.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;stops at 100%&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;quot;nothing happens&amp;quot;&lt;br /&gt;
&lt;br /&gt;
or errors like http://springrts.com/phpbb/viewtopic.php?f=64&amp;amp;p=556182#p556131&lt;br /&gt;
&lt;br /&gt;
=Addressed/Fixed=&lt;br /&gt;
&lt;br /&gt;
==Maps==&lt;br /&gt;
&lt;br /&gt;
===Solved===&lt;br /&gt;
&lt;br /&gt;
A limited maplist was introduced, unsynced players are auto-specced.&lt;br /&gt;
&lt;br /&gt;
The maps from maplist were added in the steam distribution in the operation dubbed &amp;quot;Preload&amp;quot;, as well as the engine and pool/packages with the game.&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
Too much random map changes. Too much downloading, too much unsync = no games start.&lt;br /&gt;
&lt;br /&gt;
Some commonly chosen maps are unplayable (space maps etc)&lt;br /&gt;
&lt;br /&gt;
Solve: &#039;&#039;&#039;Maplist&#039;&#039;&#039; on ALL hosts.&lt;br /&gt;
&lt;br /&gt;
Best only put ONE map so that players do not have to download much and can just play.&lt;br /&gt;
Map could be:&lt;br /&gt;
http://springfiles.com/spring/spring-maps/eye-horus-v2&lt;br /&gt;
&lt;br /&gt;
Progress:&lt;br /&gt;
unsynced players are specced and can not delay gamestart but does not seem to help so much&lt;br /&gt;
&lt;br /&gt;
==Singleplayer==&lt;br /&gt;
&lt;br /&gt;
===Solved===&lt;br /&gt;
&lt;br /&gt;
Preload.&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
Does not work with fresh install because there are no files.&lt;br /&gt;
&lt;br /&gt;
One must first join a MP to download engine,map,mod.&lt;br /&gt;
&lt;br /&gt;
Solve: &#039;&#039;&#039;Download files on login&#039;&#039;&#039; or something.&lt;br /&gt;
&lt;br /&gt;
==empty room, use !lock==&lt;br /&gt;
&lt;br /&gt;
===Solved===&lt;br /&gt;
&lt;br /&gt;
Springie seems to work correctly now.&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
The common solution to select an empty autohost and then lock the room does not work:&lt;br /&gt;
&lt;br /&gt;
Players need to be manually to use !lock command. The empty hosts are impossible to find because players randomly join&amp;amp;leave all the time. Even if you join an empty host, hardly does one have enough time to type !lock before another player joins.&lt;br /&gt;
&lt;br /&gt;
==Bots, AIs==&lt;br /&gt;
&lt;br /&gt;
===Solved===&lt;br /&gt;
&lt;br /&gt;
Bot filter specific to evo was created.&lt;br /&gt;
--&lt;br /&gt;
&lt;br /&gt;
Needs &#039;&#039;&#039;filter&#039;&#039;&#039; for add-bot menu. Only evo-compatible bots must be listed.&lt;br /&gt;
AAI is too often choosen because top of list but it does not work.&lt;br /&gt;
&lt;br /&gt;
Solve:&lt;br /&gt;
If nessecarly hard-coded hack in lobby might be needed?&lt;br /&gt;
(real solution like implenting validAI.lua probally no time)&lt;br /&gt;
&lt;br /&gt;
CarRepairer: Actually the REAL real solution is to remove AIs from the engine, which should have been done years ago like widgets. That would solve it for future versions only so a validAI list would be needed now of course.&lt;br /&gt;
&lt;br /&gt;
The evo-AIs reportedly &amp;quot;do nothing.&amp;quot;&amp;lt;br /&amp;gt;&lt;br /&gt;
Under investigation at: http://springrts.com/phpbb/viewtopic.php?p=556029#p556029 &amp;lt;br /&amp;gt;&lt;br /&gt;
Possible quick fix: play on metal maps (Trololo, Trench_Linked).&amp;lt;br /&amp;gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6429</id>
		<title>EvoGreenLitFAQ</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6429"/>
		<updated>2014-04-09T23:22:01Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Download stuck at 100% */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EvolutionRTS emergency FAQ&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before you ask a question in chat, please see if it is already answered on this list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Singleplayer?==&lt;br /&gt;
There is a singleplayer tab but with a fresh install it will not work.&lt;br /&gt;
(Game files and engine are missing)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Create a multiplayer battleroom with the button at the bottom and make it private by giving it a password.&lt;br /&gt;
&lt;br /&gt;
The lobby will download the necessary files. Afterwards you can select the evolutionRTS game in singleplayer menu, or stay in this battleroom and play. See below for adding bots.&lt;br /&gt;
&lt;br /&gt;
==Automatic download of game files does not work==&lt;br /&gt;
NOTE: the GAME file.&lt;br /&gt;
&lt;br /&gt;
Best idea is to wait a bit, the lobby should eventually download it.&lt;br /&gt;
If it really absolutely does not work:&lt;br /&gt;
1. Go to http://packages.springrts.com/builds/&lt;br /&gt;
2. download the .sdz with the latest evolutionRTS version. (Currently that is 7.37 but check vs what is played in lobby)&lt;br /&gt;
3. Put the .sdz file into: Documents/My Games/Spring/games&lt;br /&gt;
Do not unzip it, just move it there. When you&#039;re done, close and reopen the lobby.&lt;br /&gt;
&lt;br /&gt;
As said, that is only for advanced users and should not be necessary.&lt;br /&gt;
&lt;br /&gt;
===Cannot start command: Downloading Engine 96.0: assign: The parameter is incorrect===&lt;br /&gt;
&lt;br /&gt;
Are you on windows XP? Unfortunately the lobby does not work with Windows XP. You can use the Java Weblobby version by visiting http://www.weblobby.evolutionrts.info directly or you can try a different lobby: http://steamcommunity.com/app/291150/discussions/0/540738051772337468/&lt;br /&gt;
&lt;br /&gt;
===Download stuck at 100%===&lt;br /&gt;
Close the lobby and start it again.&lt;br /&gt;
&lt;br /&gt;
If that doesn&#039;t help, you can try this:&lt;br /&gt;
Download this file... http://springrts.com/dl/buildbot/default/master/96.0/win32/spring_96.0_minimal-portable.7z&lt;br /&gt;
&lt;br /&gt;
Unzip the files into: Documents\My Games\Spring\weblobby\engine\96.0 (if this path doesn&#039;t exist, you should create it)&lt;br /&gt;
&lt;br /&gt;
Start Lobby&lt;br /&gt;
&lt;br /&gt;
==AI does not work!==&lt;br /&gt;
The evolutionRTS AI is the &amp;quot;Survial Spawner AI.&amp;quot;&lt;br /&gt;
It spawns random enemies for you to shot at.&lt;br /&gt;
&lt;br /&gt;
The NullAI bot can also be used: It does &#039;&#039;nothing&#039;&#039; which is nice to try out the game without enemies.&lt;br /&gt;
&lt;br /&gt;
==Sandbox mode? I want to try the game without being rushed!==&lt;br /&gt;
Start a singleplayer game against the NullAI bot.&lt;br /&gt;
&lt;br /&gt;
==Missions?==&lt;br /&gt;
Not there yet.&lt;br /&gt;
&lt;br /&gt;
==It crashed!==&lt;br /&gt;
There is a logfile: [[Infolog.txt]]&lt;br /&gt;
&lt;br /&gt;
The page also explains how to find and share it. You can post it in forum, on steam or in chat.&lt;br /&gt;
&lt;br /&gt;
==Which maps should I play?==&lt;br /&gt;
Eye of Horus is a good map that works for team games, free-for-all, 1v1 and with bots.&lt;br /&gt;
&lt;br /&gt;
==Why so many problems?==&lt;br /&gt;
Surprised by too many players.&lt;br /&gt;
&lt;br /&gt;
==Hooray, I am ingame! How to play?==&lt;br /&gt;
http://www.wiki.evolutionrts.info/doku.php/evolution_rts:quick_start_guide&lt;br /&gt;
&lt;br /&gt;
Or just try out things :)&lt;br /&gt;
&lt;br /&gt;
==How to chat ingame?==&lt;br /&gt;
Press the RETURN key and type your message.&lt;br /&gt;
&lt;br /&gt;
==Graphics problems! / the game runs very bad!==&lt;br /&gt;
Some problems can probally be solved by the general spring-engine FAQ: [[FAQ:trouble]]&lt;br /&gt;
&lt;br /&gt;
==Cursor is painfully slow!==&lt;br /&gt;
Click Settings (the wrench) &amp;gt; Interface &amp;gt; Mouse Cursor &amp;gt; enable Hardware Cursor&lt;br /&gt;
&lt;br /&gt;
==As a player, how can I help?==&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;If you have bugs to report&#039;&#039;&#039;: It is okay to do so in the steam forum: http://steamcommunity.com/app/291150&lt;br /&gt;
&lt;br /&gt;
(Or if you know how to use the google.code bugtracker: https://code.google.com/p/evolutionrts/issues/list )&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Give as much &#039;&#039;info&#039;&#039; as possible:&#039;&#039;&#039;&lt;br /&gt;
*Operation system&lt;br /&gt;
*computer hardware (laptop or desktop, cpu, ram, graphics card,..)&lt;br /&gt;
*This logfile: [[Infolog.txt]]&lt;br /&gt;
*Screenshots can be uploaded to imgur.com or similiar&lt;br /&gt;
&lt;br /&gt;
After a while check back on your post, devs might need more informations from you!&lt;br /&gt;
&lt;br /&gt;
Reporting bugs in chat is pretty much useless, there get overlooked there or forgotten.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;If you can play:&#039;&#039;&#039; help others players with their problems in chat.&lt;br /&gt;
&lt;br /&gt;
3. Be patient  :)&lt;br /&gt;
&lt;br /&gt;
==More Information About Common Bugs==&lt;br /&gt;
https://code.google.com/p/springweblobby/wiki/EvoSteamBugs&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6425</id>
		<title>EvoGreenLitFAQ</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=EvoGreenLitFAQ&amp;diff=6425"/>
		<updated>2014-04-09T08:22:05Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;__NOTOC__&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;EvolutionRTS emergency FAQ&#039;&#039;&#039;&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Before you ask a question in chat, please see if it is already answered on this list.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Singleplayer?==&lt;br /&gt;
There is a singleplayer tab but with a fresh install it will not work.&lt;br /&gt;
(Game files and engine are missing)&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Solution:&#039;&#039;&#039; Join a multiplayer game. &lt;br /&gt;
&lt;br /&gt;
The lobby will download the nessecary files. Afterwards you can select the evolutionRTS game in singleplayer menu.&lt;br /&gt;
&lt;br /&gt;
==Automatic download of game files does not work==&lt;br /&gt;
NOTE: the GAME file.&lt;br /&gt;
&lt;br /&gt;
Best idea is to wait a bit, the lobby should eventually download it.&lt;br /&gt;
If it really absolutely does not work:&lt;br /&gt;
1. Go to http://packages.springrts.com/builds/&lt;br /&gt;
2. download the .sdz with the latest evolutionRTS version. (Currently that is 7.37 but check vs what is played in lobby)&lt;br /&gt;
3. Put the .sdz file into: Documents/My Games/Spring/games&lt;br /&gt;
Do not unzip it, just move it there. When you&#039;re done, close and reopen the lobby.&lt;br /&gt;
&lt;br /&gt;
As said, that is only for advanced users and should not be necessary.&lt;br /&gt;
&lt;br /&gt;
===Cannot start command: Downloading Engine 96.0: assign: The parameter is incorrect===&lt;br /&gt;
&lt;br /&gt;
Are you on windows XP? Unfortunately the lobby does not work with Windows XP. You can use the Java Weblobby version by visiting http://www.weblobby.evolutionrts.info directly or you can try a different lobby: http://steamcommunity.com/app/291150/discussions/0/540738051772337468/&lt;br /&gt;
&lt;br /&gt;
===Download stuck at 100%===&lt;br /&gt;
Close the lobby and start it again.&lt;br /&gt;
&lt;br /&gt;
==AI does not work!==&lt;br /&gt;
The evolutionRTS AI is the &amp;quot;Survial Spawner AI.&amp;quot;&lt;br /&gt;
It spawns random enemies for you to shot at.&lt;br /&gt;
&lt;br /&gt;
The NullAI bot can also be used: It does &#039;&#039;nothing&#039;&#039; which is nice to try out the game without enemies.&lt;br /&gt;
&lt;br /&gt;
ALL OTHER AI BOTS DO NOT WORK! (they are meant for different spring games)&lt;br /&gt;
&lt;br /&gt;
==Sandbox mode? I want to try the game without being rushed!==&lt;br /&gt;
Start a singleplayer game against the NullAI bot.&lt;br /&gt;
&lt;br /&gt;
==Missions?==&lt;br /&gt;
Not there yet.&lt;br /&gt;
&lt;br /&gt;
==It crashed!==&lt;br /&gt;
There is a logfile: [[Infolog.txt]]&lt;br /&gt;
&lt;br /&gt;
The page also explains how to find and share it. You can post it in forum, on steam or in chat.&lt;br /&gt;
&lt;br /&gt;
==Which maps should I play?==&lt;br /&gt;
Eye of Horus is a good map that works for team games, free-for-all, 1v1 and with bots.&lt;br /&gt;
&lt;br /&gt;
==Why so many problems?==&lt;br /&gt;
Surprised by too many players.&lt;br /&gt;
&lt;br /&gt;
==Hooray, I am ingame! How to play?==&lt;br /&gt;
http://www.wiki.evolutionrts.info/doku.php/evolution_rts:quick_start_guide&lt;br /&gt;
&lt;br /&gt;
Or just try out things :)&lt;br /&gt;
&lt;br /&gt;
==How to chat ingame?==&lt;br /&gt;
Press the RETURN key and type your message.&lt;br /&gt;
&lt;br /&gt;
==Graphics problems! / the game runs very bad!==&lt;br /&gt;
Some problems can probally be solved by the general spring-engine FAQ: [[FAQ:trouble]]&lt;br /&gt;
&lt;br /&gt;
==Cursor is painfully slow!==&lt;br /&gt;
Click Settings (the wrench) &amp;gt; Interface &amp;gt; Mouse Cursor &amp;gt; enable Hardware Cursor&lt;br /&gt;
&lt;br /&gt;
==As a player, how can I help?==&lt;br /&gt;
&lt;br /&gt;
1. &#039;&#039;&#039;If you have bugs to report&#039;&#039;&#039;: It is okay to do so in the steam forum: http://steamcommunity.com/app/291150&lt;br /&gt;
&lt;br /&gt;
(Or if you know how to use the google.code bugtracker: https://code.google.com/p/evolutionrts/issues/list )&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Give as much &#039;&#039;info&#039;&#039; as possible:&#039;&#039;&#039;&lt;br /&gt;
*Operation system&lt;br /&gt;
*computer hardware (laptop or desktop, cpu, ram, graphics card,..)&lt;br /&gt;
*This logfile: [[Infolog.txt]]&lt;br /&gt;
*Screenshots can be uploaded to imgur.com or similiar&lt;br /&gt;
&lt;br /&gt;
After a while check back on your post, devs might need more informations from you!&lt;br /&gt;
&lt;br /&gt;
Reporting bugs in chat is pretty much useless, there get overlooked there or forgotten.&lt;br /&gt;
&lt;br /&gt;
2. &#039;&#039;&#039;If you can play:&#039;&#039;&#039; help others players with their problems in chat.&lt;br /&gt;
&lt;br /&gt;
3. Be patient  :)&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18691</id>
		<title>Tutorial:MapDevWithBlueprint(Forb)</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18691"/>
		<updated>2014-02-24T21:52:06Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Texture Splatting using SSMF */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Getting Started (Tools) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blueprint:&amp;amp;nbsp;&#039;&#039;&#039;[https://github.com/jk3064/Map-Blueprint https://github.com/jk3064/Map-Blueprint]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The only other tool really needed is &amp;quot;Mapconv&amp;quot;. The other tools available are there simply to make your life easier. A list of common mapping tools are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConv|Mapconv]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConvNG|MapConvNG - For use with Linux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMFED &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grout &#039;&#039;&#039;(Deprecated, no longer useful unless texture was generated with L3dt utilizing tiles)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMD Creator &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Start Position Editor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Das Bruce&#039;s Mapconv frontend]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These tools have been compiled into a zip available here:&amp;amp;nbsp;[http://springfiles.com/spring/tools/mapping-tools http://springfiles.com/spring/tools/mapping-tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep in mind that mapconv is still being developed, so it may be necessary to update the included Mapconv to a later version, located here:&amp;amp;nbsp;[http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458 http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458]&lt;br /&gt;
&lt;br /&gt;
= The Components of a Map =&lt;br /&gt;
&lt;br /&gt;
== Texture Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps mus be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you understand how to make a texture map and it also assumes that you know how to use terrain generation software.&lt;br /&gt;
&lt;br /&gt;
Commonly used terrain generation programs are:&lt;br /&gt;
&lt;br /&gt;
Spring Map Edit (Does not work on 64bit machines)&lt;br /&gt;
&lt;br /&gt;
L3DT&lt;br /&gt;
&lt;br /&gt;
WorldMachine&lt;br /&gt;
&lt;br /&gt;
Bryce3D&lt;br /&gt;
&lt;br /&gt;
Carrara&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Texture Map (generated by Carrara):&lt;br /&gt;
&lt;br /&gt;
[[File:exampletexturemap.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heightmap ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Height Maps are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need a good image editing program to make heightmaps. Many of the aforementioned terrain generation programs will also generate heightmaps as well, but you can draw them by hand. They can be either 8bit or 16bit greyscale PNG. If you have photoshop or the gimp, you can use these programs to help you create your heightmap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example of a 16bit heightmap:&lt;br /&gt;
&lt;br /&gt;
[[File:Heightmapexample.png]]&lt;br /&gt;
&lt;br /&gt;
Heightmaps work upon the idea of height according to color values. Black is the lowest, white is the heighest. In spring mapping, the waterline is defined by a negative height value. In other words, you define the heights of the map, &amp;amp;nbsp;anything below 0 is under water. So on this heightmap, you might use -50 for the lowest value and 300 for the highest height value. The aforementioned tool &amp;quot;Mapconv Gui (a.k.a Das Bruce&#039;s MapConv Gui) has a waterline calculator that will help you calculate the correct waterline for your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metal Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Metal Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Spring, metal maps are used for the built in resourcing scheme (Metal/Energy). You do not have to use this scheme. In fact, there are several games for Spring who use their own resourcing systems added on using Lua. If you are creating this map for one of those games, a metal map is not strictly necessary (in other words you can just us a black image), 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metalmaps show metal areas on a map based upon the amount of red on the image (make sure red is the only color used!). On this map you can see that the &amp;quot;Patch Technique&amp;quot; is used, which is pretty common among spring maps, but you are not limited to using this scheme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;MaxMetal&amp;quot; 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&#039;t the point however. The fact is that if you can predict how much each spot will output (typically), using the &amp;quot;MaxMetal&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Metal Map:&lt;br /&gt;
&lt;br /&gt;
[[File:Examplemetal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Feature maps used to be quite complicated, but all that changed with the advent of Smoth&#039;s FeaturePlacer (short featuremap history below).&lt;br /&gt;
&lt;br /&gt;
Now featuremaps are use simply for the purpose of placing grass. Grass coverage is defined by blue pixels on the feature map. The more blue the pixel is (the closer to blue 255 it is), the thicker grass will be at that location. Grass is entirely optional, but can be customized via map parameters and adds a nice touch to your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Feature Map:&lt;br /&gt;
&lt;br /&gt;
[[File:examplefeature.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== A brief history of featuremaps ===&lt;br /&gt;
&lt;br /&gt;
Feature maps were (and still are) a single RGB image where features such as grass, geothermal vents and trees, as well as structures, etc were &amp;quot;placed&amp;quot; using pixels on the image. This method was extremely imprecise and involved recompiling the map many times in order to simply move a tree from one location to another.&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making|Map_making]]&lt;br /&gt;
&lt;br /&gt;
= Compiling a Map (MapConv) =&lt;br /&gt;
&lt;br /&gt;
== Texture Specifications ==&lt;br /&gt;
&lt;br /&gt;
Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps must be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Height Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metal Map dimensions are Texture Map size / 16 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 16 = 512x512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&lt;br /&gt;
&lt;br /&gt;
== Using MapConv ==&lt;br /&gt;
&lt;br /&gt;
[[MapConv]] is a command line program that is generally started via a batch file .&lt;br /&gt;
&lt;br /&gt;
Below is an example set of parameters given to mapconv:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;MapConv -i -l -c 0 -x 101 -n 100 -o EvoRTS-Craggy_Creek-v01.smf -t terrain.png -a height6.png -m metal.png -f feature.png -z &amp;quot;nvdxt.exe -dxt1a -nmips 4 -Sinc -quality_highest -file&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once compiled, you will get 2 new files: &amp;amp;lt;mapname.smt&amp;amp;gt; and &amp;amp;lt;mapname.smf&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Utilizing Blueprint =&lt;br /&gt;
&lt;br /&gt;
Unzip the blueprint archive into your Spring Maps folder.&lt;br /&gt;
&lt;br /&gt;
[[File:mapcontainer.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will notice a new folder called &amp;quot;mapcontainer.sdd&amp;quot;. The .sdd ending on the folder name is very important for testing as &amp;amp;lt;foldername&amp;amp;gt;.sdd tells spring to load map files from that folder. This way you can work on your maps without having to zip them up over and over again.&lt;br /&gt;
&lt;br /&gt;
== mapcontainer.sdd ==&lt;br /&gt;
&lt;br /&gt;
Inside the map container folder you have the following file/folder structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;LuaGaia&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapconfig&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maphelper&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maps&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapinfo.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapoptions.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Now, copy your compiled map files (the &amp;lt;code&amp;gt;.smt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.smf&amp;lt;/code&amp;gt; files) into the &amp;quot;maps&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
= Texture Splatting using SSMF =&lt;br /&gt;
&lt;br /&gt;
SSMF mapping is adding detail textures all over the map based upon specified distribution areas. This will make your map infinitely more detailed and beautiful.&lt;br /&gt;
&lt;br /&gt;
Adding SSMF to a map consists of the following steps:&lt;br /&gt;
&lt;br /&gt;
== Distribution Map ==&lt;br /&gt;
&lt;br /&gt;
The Distribution map is essentially an atlas telling spring where to spread your detail textures. Lets have a look at an example distribution map:&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplatdistribution.jpg&lt;br /&gt;
&lt;br /&gt;
Each channel corresponds to a different texture referenced in the detail texture map. These areas are set using the channels of the image and are generally saved using the Targa format ( .tga ), sized at 1024x1024.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplechannels.jpg&lt;br /&gt;
&lt;br /&gt;
Save your distribution map as splatdistribution.tga, and place it in the maps folder alongside the smf and smt files.&lt;br /&gt;
&lt;br /&gt;
Once you have your distribution map, you need to set up your detail textures&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Detail Textures ==&lt;br /&gt;
&lt;br /&gt;
Detail textures are made by adding a texture to each channel of an image.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplesplattex.jpg&lt;br /&gt;
&lt;br /&gt;
There are a total of 4 texture slots available. One for R, G, B, and one for the Alpha Channel. When you have your detail textures ready, save the file as splattex.tga (Targa - 1024x1024) and place it in the maps folder alongside splatdistribution.tga&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Specular Map ==&lt;br /&gt;
&lt;br /&gt;
A specular map controls brightness and &amp;quot;shinyness&amp;quot; of your map. The more light you add to a particular portion of your specular map, the brighter and more reflective that portion of the map will be. Specular maps should be 1024x1024 and saved as specularmap.bmp. Of course placed in the maps folder with the other ssmf maps.&lt;br /&gt;
&lt;br /&gt;
http://www.evolutionrts.info/random/examplespecularmap.jpg&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Grass Shading Map ==&lt;br /&gt;
By default spring&#039;s grass pulls the minimap to use for coloration of the grass patches. You can override this with &#039;&#039;grassShadingTex&#039;&#039;. Below is an example&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;table&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Grass map&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Grass map in game&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&lt;br /&gt;
&amp;lt;tr&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_example.jpegâ€Ž|120px|alt=grassmap example |grassmap]]&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;This is a section of grassmap image. This image applied to the entire map which determines the color of grass.&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;[[File:Grassmap_Map_ingame.jpgâ€Ž|300px|alt=grassmapp applied in game|in game]]&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;tr&amp;gt;&amp;lt;td colspan=&amp;quot;2&amp;quot;&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;td&amp;gt;Click image for larger picture&amp;lt;/td&amp;gt;&amp;lt;/tr&amp;gt;&amp;lt;/table&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Normal Map ==&lt;br /&gt;
&lt;br /&gt;
Normal maps (in this case) are used to add &amp;quot;fake&amp;quot; 3d detail to a flat 2d image. It is a technique of manipulating lighting to give the appearance of looking at a 3d object, when actually it is just 2D.&lt;br /&gt;
&lt;br /&gt;
This is what a normal map looks like:&lt;br /&gt;
[[File:examplenormalmap.jpg]]&lt;br /&gt;
&lt;br /&gt;
= Placing Features =&lt;br /&gt;
&lt;br /&gt;
As previously mentioned, features can now be placed via LUA based upon a coordinate system that looks similar to this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;local features = {&amp;amp;nbsp;&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		unitlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		buildinglist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		objectlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_4&#039;, x = 7760, z = 112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreea_3&#039;, x = 2520, z = 6904, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeblo_5&#039;, x = 7736, z = 536, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_1&#039;, x = 2504, z = 7112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;geovent&#039;, x = 177, z = 192, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;return features&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Of course, features can be placed by editing the set.lua file in a text editor, but that would take an extremely long time. Enter FeaturePlacer.&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Feature Placer ==&lt;br /&gt;
&lt;br /&gt;
* [[Map Making: Feature Placer|Feature Placer]]&lt;br /&gt;
&lt;br /&gt;
= Configuring Map Parameters (Mapinfo.lua) =&lt;br /&gt;
&lt;br /&gt;
Admittedly, the default values used in blueprint mapinfo are awful. It may be wise for you to download another map that has used blueprint and copy and paste it&#039;s mapinfo contents into yours. However, you are also free to use the default or use the provided example.&lt;br /&gt;
&lt;br /&gt;
In time, the mapinfo tags will be documented and this will like to that page. As it is the tags and values are pretty easy to figure out for the most part.&lt;br /&gt;
&lt;br /&gt;
== MapInfo.lua ==&lt;br /&gt;
* [[Map_Making:mapinfo.lua|MapInfo.lua]]&lt;br /&gt;
&lt;br /&gt;
= Skyboxes =&lt;br /&gt;
&lt;br /&gt;
*[[Skyboxcreation|Notes about skyboxes]] notes on a prerendered sky box or cube map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Mutators =&lt;br /&gt;
&lt;br /&gt;
Mutators are files that add new content to exiting game files. &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; is an example of a mutator.&lt;br /&gt;
&lt;br /&gt;
This section needs a proper description.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808 http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808]&lt;br /&gt;
&lt;br /&gt;
= Archiving a Map =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Spring reads two different archive formats, 7zip and zip. Both archives are named sd7 and sdz, respectively. 7zip files are made by The 7zip archive program, available at&amp;amp;nbsp;[http://www.7-zip.org/ http://www.7-zip.org/]&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Navigate to your mapcontainer.sdd folder and zip it&#039;s contents into either a .7z file or .zip (7zip format is &#039;&#039;&#039;HIGHLY RECOMMENDED&#039;&#039;&#039;!), usually naming schemes follow the actual mapname (&amp;amp;lt;mapname.sd7&amp;amp;gt;, such as&amp;amp;nbsp;EvoRTS-Craggy_Creek-v08.sd7&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Make sure that the archive is non-solid!&#039;&#039;&#039; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:examplearchivewith7zip.jpg]]&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Once completed, copy the sd7/sdz file to your maps folder. At this point, be sure to remove the .sdd ending from your mapcontainer.sdd folder (or change the map name/version contained withing), otherwise you might get sync errors because spring is reading from the wrong archive source.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
*[[Maps:SpringMapEdit|Frostregen&#039;s SpringMapEdit]]. 3D editing, Compiles and import SM2 directly. Beginner friendly but still powerful.&lt;br /&gt;
*[[MapConv]] Map converter program, compiles maps.&lt;br /&gt;
*[[MapConvNG]] Rewrite of MapConv that works on linux / 64 bit.&lt;br /&gt;
*[[Maps:Map Designer]]&amp;amp;nbsp;&#039;&#039;&#039;(Outdated, Deprecated)&#039;&#039;&#039; Hugh&#039;s 3D map designer. Splatting, heightmap editing, splat painting, SM3&lt;br /&gt;
*[http://www.springfiles.com/show_file.php?id=1679 Starting position creator]: Or you can always find out the hard way which x/y coordinates are good by starting spring and having a look at the mouse cursor coordinates.&lt;br /&gt;
*[http://code.google.com/p/conflictterra/source/browse/games/CT/luaui/widgets/tp_coordinate_help.lua Coordinate Helper widget] A small widget that helps you with finding coordinates ie for start positions. Every time you put down a marker it will log its position in [[Infolog.txt]] and also in MAPNAME_coordinates.txt Helpfull if you need to get lots of map coordinates and do not want to write them down by hand. (it writes SpawnResource in front of the coordinates but you can ignore or edit the widget)&lt;br /&gt;
&lt;br /&gt;
= Minimal barebones template with no extras =&lt;br /&gt;
If you want a completely barebones template with no extra configuration needed (useful for testing), Extract the  blueprint files, then delete everything except mapinfo.lua and everything in maps folder (except your .smf and .smt files). Next copy paste following to mapinfo.lua (not the most minimal but minimal enough):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local mapinfo = {&lt;br /&gt;
   name        = &amp;quot;MyMap&amp;quot;,&lt;br /&gt;
   shortname   = &amp;quot;&amp;quot;,&lt;br /&gt;
   description = &amp;quot;&amp;quot;,&lt;br /&gt;
   author      = &amp;quot;&amp;quot;,&lt;br /&gt;
   version     = &amp;quot;&amp;quot;,&lt;br /&gt;
   modtype     = 3, --// 3=map&lt;br /&gt;
&lt;br /&gt;
   teams = {&lt;br /&gt;
      [0] = {startPos = {x = 8, z = 8}},&lt;br /&gt;
      [1] = {startPos = {x = 16, z = 16}},   &lt;br /&gt;
   },&lt;br /&gt;
}&lt;br /&gt;
return mapinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In summary: maps folder with .smf.and .smt files and single mapinfo.lua file. You should be now able to test your map immediately (if files are placed to mapcontainer.sdd).&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18690</id>
		<title>Tutorial:MapDevWithBlueprint(Forb)</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Tutorial:MapDevWithBlueprint(Forb)&amp;diff=18690"/>
		<updated>2014-02-24T21:48:51Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* The Components of a Map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Getting Started (Tools) =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Blueprint:&amp;amp;nbsp;&#039;&#039;&#039;[https://github.com/jk3064/Map-Blueprint https://github.com/jk3064/Map-Blueprint]&amp;amp;nbsp;&lt;br /&gt;
&lt;br /&gt;
The only other tool really needed is &amp;quot;Mapconv&amp;quot;. The other tools available are there simply to make your life easier. A list of common mapping tools are as follows:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConv|Mapconv]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[MapConvNG|MapConvNG - For use with Linux]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMFED &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Grout &#039;&#039;&#039;(Deprecated, no longer useful unless texture was generated with L3dt utilizing tiles)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
SMD Creator &#039;&#039;&#039;(Deprecated, no longer useful)&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Start Position Editor]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[http://springfiles.com/spring/tools/mapping-tools Das Bruce&#039;s Mapconv frontend]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
These tools have been compiled into a zip available here:&amp;amp;nbsp;[http://springfiles.com/spring/tools/mapping-tools http://springfiles.com/spring/tools/mapping-tools]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Keep in mind that mapconv is still being developed, so it may be necessary to update the included Mapconv to a later version, located here:&amp;amp;nbsp;[http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458 http://springrts.com/phpbb/viewtopic.php?f=56&amp;amp;t=21458]&lt;br /&gt;
&lt;br /&gt;
= The Components of a Map =&lt;br /&gt;
&lt;br /&gt;
== Texture Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps mus be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This guide assumes that you understand how to make a texture map and it also assumes that you know how to use terrain generation software.&lt;br /&gt;
&lt;br /&gt;
Commonly used terrain generation programs are:&lt;br /&gt;
&lt;br /&gt;
Spring Map Edit (Does not work on 64bit machines)&lt;br /&gt;
&lt;br /&gt;
L3DT&lt;br /&gt;
&lt;br /&gt;
WorldMachine&lt;br /&gt;
&lt;br /&gt;
Bryce3D&lt;br /&gt;
&lt;br /&gt;
Carrara&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Texture Map (generated by Carrara):&lt;br /&gt;
&lt;br /&gt;
[[File:exampletexturemap.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Heightmap ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Height Maps are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
You will need a good image editing program to make heightmaps. Many of the aforementioned terrain generation programs will also generate heightmaps as well, but you can draw them by hand. They can be either 8bit or 16bit greyscale PNG. If you have photoshop or the gimp, you can use these programs to help you create your heightmap.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is an example of a 16bit heightmap:&lt;br /&gt;
&lt;br /&gt;
[[File:Heightmapexample.png]]&lt;br /&gt;
&lt;br /&gt;
Heightmaps work upon the idea of height according to color values. Black is the lowest, white is the heighest. In spring mapping, the waterline is defined by a negative height value. In other words, you define the heights of the map, &amp;amp;nbsp;anything below 0 is under water. So on this heightmap, you might use -50 for the lowest value and 300 for the highest height value. The aforementioned tool &amp;quot;Mapconv Gui (a.k.a Das Bruce&#039;s MapConv Gui) has a waterline calculator that will help you calculate the correct waterline for your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Metal Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Metal Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In Spring, metal maps are used for the built in resourcing scheme (Metal/Energy). You do not have to use this scheme. In fact, there are several games for Spring who use their own resourcing systems added on using Lua. If you are creating this map for one of those games, a metal map is not strictly necessary (in other words you can just us a black image), 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metalmaps show metal areas on a map based upon the amount of red on the image (make sure red is the only color used!). On this map you can see that the &amp;quot;Patch Technique&amp;quot; is used, which is pretty common among spring maps, but you are not limited to using this scheme.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
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 &amp;quot;MaxMetal&amp;quot; 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&#039;t the point however. The fact is that if you can predict how much each spot will output (typically), using the &amp;quot;MaxMetal&amp;quot; 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.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Metal Map:&lt;br /&gt;
&lt;br /&gt;
[[File:Examplemetal.jpg]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Feature Map ==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Feature maps used to be quite complicated, but all that changed with the advent of Smoth&#039;s FeaturePlacer (short featuremap history below).&lt;br /&gt;
&lt;br /&gt;
Now featuremaps are use simply for the purpose of placing grass. Grass coverage is defined by blue pixels on the feature map. The more blue the pixel is (the closer to blue 255 it is), the thicker grass will be at that location. Grass is entirely optional, but can be customized via map parameters and adds a nice touch to your map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Example Feature Map:&lt;br /&gt;
&lt;br /&gt;
[[File:examplefeature.jpg]]&lt;br /&gt;
&lt;br /&gt;
=== A brief history of featuremaps ===&lt;br /&gt;
&lt;br /&gt;
Feature maps were (and still are) a single RGB image where features such as grass, geothermal vents and trees, as well as structures, etc were &amp;quot;placed&amp;quot; using pixels on the image. This method was extremely imprecise and involved recompiling the map many times in order to simply move a tree from one location to another.&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making|Map_making]]&lt;br /&gt;
&lt;br /&gt;
= Compiling a Map (MapConv) =&lt;br /&gt;
&lt;br /&gt;
== Texture Specifications ==&lt;br /&gt;
&lt;br /&gt;
Texture map size is related in pixels and in spring map size. 2x2 MapSquares in spring are equal to 1024x1024 Pixels. Texture maps must be in multiples of 2. I.E. 2x2, 6x10, 12x16, 16x16, etc. No odd sizes are allowed (Example: 15x10).&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Height Map dimensions are Texture Map size / 8 + 1 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 + 1 = 1025x1025&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Metal Map dimensions are Texture Map size / 16 pixel. In other words, if your texture map is 8192x8192 (16x16), 8192 / 16 = 512x512&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Feature Map dimensions are Texture Map size / 8. In other words, if your texture map is 8192x8192 (16x16), 8192 / 8 = 1024x1024&lt;br /&gt;
&lt;br /&gt;
== Using MapConv ==&lt;br /&gt;
&lt;br /&gt;
[[MapConv]] is a command line program that is generally started via a batch file .&lt;br /&gt;
&lt;br /&gt;
Below is an example set of parameters given to mapconv:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&#039;&#039;&#039;MapConv -i -l -c 0 -x 101 -n 100 -o EvoRTS-Craggy_Creek-v01.smf -t terrain.png -a height6.png -m metal.png -f feature.png -z &amp;quot;nvdxt.exe -dxt1a -nmips 4 -Sinc -quality_highest -file&amp;quot;&#039;&#039;&#039;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Once compiled, you will get 2 new files: &amp;amp;lt;mapname.smt&amp;amp;gt; and &amp;amp;lt;mapname.smf&amp;amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Utilizing Blueprint =&lt;br /&gt;
&lt;br /&gt;
Unzip the blueprint archive into your Spring Maps folder.&lt;br /&gt;
&lt;br /&gt;
[[File:mapcontainer.jpg]]&lt;br /&gt;
&lt;br /&gt;
You will notice a new folder called &amp;quot;mapcontainer.sdd&amp;quot;. The .sdd ending on the folder name is very important for testing as &amp;amp;lt;foldername&amp;amp;gt;.sdd tells spring to load map files from that folder. This way you can work on your maps without having to zip them up over and over again.&lt;br /&gt;
&lt;br /&gt;
== mapcontainer.sdd ==&lt;br /&gt;
&lt;br /&gt;
Inside the map container folder you have the following file/folder structure.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;LuaGaia&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapconfig&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maphelper&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;maps&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapinfo.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&#039;&#039;&#039;&amp;lt;code&amp;gt;mapoptions.lua&amp;lt;/code&amp;gt;&#039;&#039;&#039;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
Now, copy your compiled map files (the &amp;lt;code&amp;gt;.smt&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;.smf&amp;lt;/code&amp;gt; files) into the &amp;quot;maps&amp;quot; folder.&lt;br /&gt;
&lt;br /&gt;
= Texture Splatting using SSMF =&lt;br /&gt;
&lt;br /&gt;
SSMF mapping is adding detail textures all over the map based upon specified distribution areas. This will make your map infinitely more detailed and beautiful.&lt;br /&gt;
&lt;br /&gt;
Adding SSMF to a map consists of the following steps:&lt;br /&gt;
&lt;br /&gt;
* [[SSMF:_Distribution_Map|Distribution Map]]&lt;br /&gt;
&lt;br /&gt;
* [[SSMF:_Detail_Textures|Detail Textures]]&lt;br /&gt;
&lt;br /&gt;
* [[SSMF:_Specular_Map|Specular Map]]&lt;br /&gt;
&lt;br /&gt;
* [[SSMF:_Grass_Shading_Map|Grass Shading Map]]&lt;br /&gt;
&lt;br /&gt;
* [[SSMF:_Normal_Map|Normal Map]]&lt;br /&gt;
&lt;br /&gt;
= Placing Features =&lt;br /&gt;
&lt;br /&gt;
As previously mentioned, features can now be placed via LUA based upon a coordinate system that looks similar to this:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;local features = {&amp;amp;nbsp;&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		unitlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		buildinglist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		objectlist = {&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_4&#039;, x = 7760, z = 112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreea_3&#039;, x = 2520, z = 6904, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeblo_5&#039;, x = 7736, z = 536, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;btreeclo_1&#039;, x = 2504, z = 7112, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;			{ name = &#039;geovent&#039;, x = 177, z = 192, rot = &amp;quot;0&amp;quot; },&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;		},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;},&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&amp;lt;div&amp;gt;&amp;lt;code&amp;gt;return features&amp;lt;/code&amp;gt;&amp;lt;/div&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Of course, features can be placed by editing the set.lua file in a text editor, but that would take an extremely long time. Enter FeaturePlacer.&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&lt;br /&gt;
== Feature Placer ==&lt;br /&gt;
&lt;br /&gt;
* [[Map Making: Feature Placer|Feature Placer]]&lt;br /&gt;
&lt;br /&gt;
= Configuring Map Parameters (Mapinfo.lua) =&lt;br /&gt;
&lt;br /&gt;
Admittedly, the default values used in blueprint mapinfo are awful. It may be wise for you to download another map that has used blueprint and copy and paste it&#039;s mapinfo contents into yours. However, you are also free to use the default or use the provided example.&lt;br /&gt;
&lt;br /&gt;
In time, the mapinfo tags will be documented and this will like to that page. As it is the tags and values are pretty easy to figure out for the most part.&lt;br /&gt;
&lt;br /&gt;
== MapInfo.lua ==&lt;br /&gt;
* [[Map_Making:mapinfo.lua|MapInfo.lua]]&lt;br /&gt;
&lt;br /&gt;
= Skyboxes =&lt;br /&gt;
&lt;br /&gt;
*[[Skyboxcreation|Notes about skyboxes]] notes on a prerendered sky box or cube map.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Mutators =&lt;br /&gt;
&lt;br /&gt;
Mutators are files that add new content to exiting game files. &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; is an example of a mutator.&lt;br /&gt;
&lt;br /&gt;
This section needs a proper description.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808 http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=21808]&lt;br /&gt;
&lt;br /&gt;
= Archiving a Map =&lt;br /&gt;
&lt;br /&gt;
&amp;lt;div&amp;gt;Spring reads two different archive formats, 7zip and zip. Both archives are named sd7 and sdz, respectively. 7zip files are made by The 7zip archive program, available at&amp;amp;nbsp;[http://www.7-zip.org/ http://www.7-zip.org/]&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Navigate to your mapcontainer.sdd folder and zip it&#039;s contents into either a .7z file or .zip (7zip format is &#039;&#039;&#039;HIGHLY RECOMMENDED&#039;&#039;&#039;!), usually naming schemes follow the actual mapname (&amp;amp;lt;mapname.sd7&amp;amp;gt;, such as&amp;amp;nbsp;EvoRTS-Craggy_Creek-v08.sd7&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:red&amp;quot;&amp;gt;&#039;&#039;&#039;Make sure that the archive is non-solid!&#039;&#039;&#039; &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[File:examplearchivewith7zip.jpg]]&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;&amp;lt;br/&amp;gt;&amp;lt;/div&amp;gt;&amp;lt;div&amp;gt;Once completed, copy the sd7/sdz file to your maps folder. At this point, be sure to remove the .sdd ending from your mapcontainer.sdd folder (or change the map name/version contained withing), otherwise you might get sync errors because spring is reading from the wrong archive source.&amp;lt;/div&amp;gt;&lt;br /&gt;
&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Tools =&lt;br /&gt;
&lt;br /&gt;
*[[Maps:SpringMapEdit|Frostregen&#039;s SpringMapEdit]]. 3D editing, Compiles and import SM2 directly. Beginner friendly but still powerful.&lt;br /&gt;
*[[MapConv]] Map converter program, compiles maps.&lt;br /&gt;
*[[MapConvNG]] Rewrite of MapConv that works on linux / 64 bit.&lt;br /&gt;
*[[Maps:Map Designer]]&amp;amp;nbsp;&#039;&#039;&#039;(Outdated, Deprecated)&#039;&#039;&#039; Hugh&#039;s 3D map designer. Splatting, heightmap editing, splat painting, SM3&lt;br /&gt;
*[http://www.springfiles.com/show_file.php?id=1679 Starting position creator]: Or you can always find out the hard way which x/y coordinates are good by starting spring and having a look at the mouse cursor coordinates.&lt;br /&gt;
*[http://code.google.com/p/conflictterra/source/browse/games/CT/luaui/widgets/tp_coordinate_help.lua Coordinate Helper widget] A small widget that helps you with finding coordinates ie for start positions. Every time you put down a marker it will log its position in [[Infolog.txt]] and also in MAPNAME_coordinates.txt Helpfull if you need to get lots of map coordinates and do not want to write them down by hand. (it writes SpawnResource in front of the coordinates but you can ignore or edit the widget)&lt;br /&gt;
&lt;br /&gt;
= Minimal barebones template with no extras =&lt;br /&gt;
If you want a completely barebones template with no extra configuration needed (useful for testing), Extract the  blueprint files, then delete everything except mapinfo.lua and everything in maps folder (except your .smf and .smt files). Next copy paste following to mapinfo.lua (not the most minimal but minimal enough):&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
local mapinfo = {&lt;br /&gt;
   name        = &amp;quot;MyMap&amp;quot;,&lt;br /&gt;
   shortname   = &amp;quot;&amp;quot;,&lt;br /&gt;
   description = &amp;quot;&amp;quot;,&lt;br /&gt;
   author      = &amp;quot;&amp;quot;,&lt;br /&gt;
   version     = &amp;quot;&amp;quot;,&lt;br /&gt;
   modtype     = 3, --// 3=map&lt;br /&gt;
&lt;br /&gt;
   teams = {&lt;br /&gt;
      [0] = {startPos = {x = 8, z = 8}},&lt;br /&gt;
      [1] = {startPos = {x = 16, z = 16}},   &lt;br /&gt;
   },&lt;br /&gt;
}&lt;br /&gt;
return mapinfo&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
In summary: maps folder with .smf.and .smt files and single mapinfo.lua file. You should be now able to test your map immediately (if files are placed to mapcontainer.sdd).&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Spring_Tanks&amp;diff=17319</id>
		<title>Spring Tanks</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Spring_Tanks&amp;diff=17319"/>
		<updated>2013-10-31T09:47:23Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Advice for Hosting */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= About =&lt;br /&gt;
&#039;&#039;&#039;Spring Tanks&#039;&#039;&#039; started as an experiment but is slowly evolving into a complete game. As it is still being worked on, it is a bit rough around the edges but playable.&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/media.php?tag=game%3A+Spring+Tanks Some screenshots] can seen be in the media section&lt;br /&gt;
&lt;br /&gt;
{{navimgx|xsize=200|ysize=140|image=Springtanks_TVicon.png|link=http://www.youtube.com/watch?v=xlgV64CEE7Q}}&lt;br /&gt;
[http://www.youtube.com/watch?v=xlgV64CEE7Q &#039;&#039;&#039;Click here for a video!&#039;&#039;&#039;]&lt;br /&gt;
&lt;br /&gt;
You can play it in both Single &amp;amp; Multiplayer. The Singleplayer is not so much fun because the AI is not very good.&lt;br /&gt;
&lt;br /&gt;
The lobbychannel is &#039;&#039;&#039;#springtanks&#039;&#039;&#039;  (type &#039;&#039;/join #springtanks&#039;&#039; into lobby chat)&lt;br /&gt;
&lt;br /&gt;
The forum is [http://springrts.com/phpbb/viewforum.php?f=68 here]&lt;br /&gt;
&lt;br /&gt;
= Gameplay Description =&lt;br /&gt;
Capture the Flag with Tanks. How cool is that?&lt;br /&gt;
[http://h-4.abload.de/img/springtanksctfcomic_jpgtbe.jpg  So cool that there is a comic about it.]&lt;br /&gt;
&lt;br /&gt;
Each player starts with a squad of tanks, a base and two flags.&lt;br /&gt;
&lt;br /&gt;
Outmanouver the enemy and pick up his flags by touching them with a unit and carry them to your base to score.&lt;br /&gt;
Defend your own flags.&lt;br /&gt;
&lt;br /&gt;
The player or team with the highest score after a set timelimit wins.&lt;br /&gt;
&lt;br /&gt;
One could say the gameplay is a strategy game mixed with elements from first person shooters and sports like football.&lt;br /&gt;
&lt;br /&gt;
== Squad System &amp;amp; Wave Respawn ==&lt;br /&gt;
Every 30 seconds all destroyed units are respawned.&lt;br /&gt;
&lt;br /&gt;
The respawn timer is shown as a countdown and progress bar in the top right corner.&lt;br /&gt;
You can not get more units than your initial squad.&lt;br /&gt;
&lt;br /&gt;
= The Units: =&lt;br /&gt;
[[Image:Knorke_Springtanks_startsquadwithnames.pngâ€Ž]]&lt;br /&gt;
&lt;br /&gt;
== Blitz - Car ==&lt;br /&gt;
The Blitz Car is unarmed and &#039;&#039;&#039;fragile&#039;&#039;&#039;.&lt;br /&gt;
With its high &#039;&#039;&#039;speed&#039;&#039;&#039; and good maneuverability it is perfect for sneaky flag capture runs and scouting.&lt;br /&gt;
&lt;br /&gt;
== TakTak - Medium Tank ==&lt;br /&gt;
This unit is the &#039;&#039;&#039;basis of your squad&#039;&#039;&#039;.&lt;br /&gt;
It is armed with an automatic dual cannon that offers a high rate of fire.&lt;br /&gt;
Armor and mobility are average.&lt;br /&gt;
&lt;br /&gt;
== Thulsa - Heavy Tank ==&lt;br /&gt;
A very cumbersome unit.&lt;br /&gt;
With the &#039;&#039;&#039;large cannon and heavy armor&#039;&#039;&#039; this tank dominates the battlefield.&lt;br /&gt;
Downside are the low speed and slow turret rotation.&lt;br /&gt;
One hit destroys a Blitz Car - if the Thulsa can catch it.&lt;br /&gt;
&lt;br /&gt;
== Flag ==&lt;br /&gt;
Drive near an enemy flag to &#039;&#039;&#039;pick it up&#039;&#039;&#039; then bring it to your Base to score a point.&lt;br /&gt;
If the flag carrier is destroyed, the flag falls to the ground. &lt;br /&gt;
There it can be picked up again or the flag owner can touch it to return it to his base.&lt;br /&gt;
Protect your flags!&lt;br /&gt;
Flags are indestructible.&lt;br /&gt;
&lt;br /&gt;
== Base ==&lt;br /&gt;
The base is a &#039;&#039;&#039;respawn point&#039;&#039;&#039; for destroyed units and flags.&lt;br /&gt;
You also have to bring enemy flags here to score a point.&lt;br /&gt;
The Base is indestructible.&lt;br /&gt;
&lt;br /&gt;
=The Maps=&lt;br /&gt;
Only the the listed maps are playable with Spring Tanks.&lt;br /&gt;
On other maps no units will be spawned at gamestart.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Desert Cliffs&#039;&#039;&#039; - 1v1&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/desertcliffsv1&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Aquatic Divide&#039;&#039;&#039; - 1v1&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/aquaticdividetnm05-v2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Eye_Of_Horus_v2&#039;&#039;&#039; - 1v1, 3ffa, 4ffa, 2v2&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/eye-horus-v2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Saltrock Colony&#039;&#039;&#039; - 1v1, 3ffa&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/saltrockcolonyv2&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Canyon Crossing&#039;&#039;&#039; - 1v1, 3ffa, 4ffa, 2v2&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/canyon-crossing&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Into Battle&#039;&#039;&#039; - 1v1&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/battle-v3&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Castles&#039;&#039;&#039; - 1v1, 3ffa, 4ffa, 2v2&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/castles&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mount Dustmore v3&#039;&#039;&#039; - 1v1, 3ffa, 4ffa, 2v2&amp;lt;br&amp;gt;&lt;br /&gt;
http://springfiles.com/spring/spring-maps/mountdustmorev3&lt;br /&gt;
&lt;br /&gt;
= Basic Gameplay Tips =&lt;br /&gt;
*Pay attention to the respawn timer:&lt;br /&gt;
If there are only few seconds left and you rush for the flag, chances are enemy units will respawn near you and destroy your flag carrier.&lt;br /&gt;
Sometimes it is better to wait until the enemy has left his respawn area and then go for an easy flag grab.&lt;br /&gt;
**Similiar, the timer can help you decide if you need to retreat to protect your flag or if the respawning reinforcements will clear the situation.&lt;br /&gt;
*When you play with the &amp;quot;place start position ingame&amp;quot; option, chose carefully.&lt;br /&gt;
**If your units respawn all the time in craters or in trees, you only got yourself to blame. So chose a spot with flat land, clear of obstacles.&lt;br /&gt;
**If a unit still gets stuck, you can selfdestruct it: select unit and press crtl+d to make it respawn in the next wave.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Battle Tactics =&lt;br /&gt;
*Thulsa Tanks have splash damage and kill a TakTak with 2 hits, only 1 hit is needed for a Blitz Car.&lt;br /&gt;
*A slowly retreating Thulsa Tank can kill a large number of TakTaks that attack in a line.&lt;br /&gt;
*If you need to kill a Thulsa with TakTaks, swarm it and do not get picked off one by one.&lt;br /&gt;
*Lure the enemy away from his base so that you can go for the flag with Blitz Cars from the flank or from the back.&lt;br /&gt;
*Pay attention to your attention: If a battle is lost and no advantage can be gained, do no bother with it.&lt;br /&gt;
Instead concentrate on the units that can make a difference.&lt;br /&gt;
&lt;br /&gt;
= Advice for Hosting =&lt;br /&gt;
*The modoption &amp;quot;gametimelimit&amp;quot; decides how long a game lasts. You can select from 1 to 90 minutes.&lt;br /&gt;
&lt;br /&gt;
*To spawn your own autohost, write this in private to a springie bot:&lt;br /&gt;
  !spawn mod=springtanks:stable,title=awesome game!,password=&lt;br /&gt;
&lt;br /&gt;
= Playing vs Single Player AI =&lt;br /&gt;
Spring Tanks has a build in Single Player menu.&amp;lt;br&amp;gt;&lt;br /&gt;
To open it:&amp;lt;br&amp;gt;&lt;br /&gt;
1) Start Spring.exe, select &lt;br /&gt;
*Mod: Spring Tanks &lt;br /&gt;
*Map: does not matter (smaller=loads faster but w/e)&lt;br /&gt;
&lt;br /&gt;
2) Click &amp;quot;Test the game&amp;quot;&lt;br /&gt;
&lt;br /&gt;
3) Now the Spring Tanks Single Player Menu should come up. &lt;br /&gt;
&lt;br /&gt;
4) Select one of the challenges and click &amp;quot;Start Game&amp;quot;&lt;br /&gt;
&lt;br /&gt;
5) Spring restarts and you can play!&lt;br /&gt;
&lt;br /&gt;
6) Can you find the easter egg after winning 3 challenges?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;=&amp;gt;&#039;&#039;&#039; You can go back to the menu by pressing ESC.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Single Player by hosting a battle in a lobby:&#039;&#039;&#039;&lt;br /&gt;
*Dont. Try the pre setup matchups first.&lt;br /&gt;
*The only AI that knows how to play Spring Tanks is the &amp;quot;Borked Advancer&amp;quot; AI.&lt;br /&gt;
*Pay attention to what [http://springrts.com/wiki/Spring_Tanks#The_Maps maps] work.&lt;br /&gt;
&lt;br /&gt;
= Get the game =&lt;br /&gt;
Easiest way is to to join the Spring Tanks autohost with your existing spring engine install and whatever lobby you chose to use. The lobby will then download the game file.&lt;br /&gt;
==Manual download==&lt;br /&gt;
First of, the [http://springrts.com/wiki/Download Spring engine] must already be installed.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Game file:&#039;&#039;&#039; http://packages.springrts.com/builds/springtanks-RC6.1.sdz&lt;br /&gt;
&lt;br /&gt;
If you know how to use [http://springrts.com/wiki/Dev:LobbyDownloadSystems#Rapid rapid], the rapid tag is: &#039;&#039;&#039;springtanks:stable&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Mappack:&#039;&#039;&#039; [http://knorke.darkstars.co.uk/springtanks/SpringTanks_mappack2_unzip_to_mapfolder.zip download]&lt;br /&gt;
&lt;br /&gt;
Absolutely needed for single player!&lt;br /&gt;
&lt;br /&gt;
= Hotkeys =&lt;br /&gt;
hotkeys specific to Spring Tanks:&lt;br /&gt;
  v		select units carrying a flag&lt;br /&gt;
  b		send unit to home base&lt;br /&gt;
  esc		single player only: open/close the Spring Tanks single player menu&lt;br /&gt;
Usefull default hotkeys, regular Spring players will not need to read this.&lt;br /&gt;
Most important are:&lt;br /&gt;
  return/enter	chat&lt;br /&gt;
  tab		toggle complete map view (zooms out to show complete map)&lt;br /&gt;
  s		stop. selected unit stops shoting and moving.&lt;br /&gt;
  shift+clicking	make waypoints&lt;br /&gt;
  f		fight: while traveling to destination, unit will engage all enemies on its path&lt;br /&gt;
  a		attack / shot ground&lt;br /&gt;
  crtl+d		blew up selected unit (ie if stuck)&lt;br /&gt;
  c		cockpit view: controll the unit in (buggy) first person mode&lt;br /&gt;
  ctrl+z		select all units of the same type as current selection&lt;br /&gt;
  p		patrol. set up waypoints for a patrol route that the unit will circle on&lt;br /&gt;
  shif+esc	bring up exit menu&lt;br /&gt;
  F6		sound on/off&lt;br /&gt;
  pause		pause the game. its the key next to print &amp;amp; scroll lock.&lt;br /&gt;
&lt;br /&gt;
= Trouble? =&lt;br /&gt;
Such a little troublemaker!&lt;br /&gt;
&lt;br /&gt;
low fps? lol. should not use more cpu/gpu than any other spring game.&lt;br /&gt;
&lt;br /&gt;
If there is a ~1 seconde stutter at game start, that is because of the texture being loaded. Cant do much about it.&lt;br /&gt;
&lt;br /&gt;
If the game game crashes when starting a new game in Single Player, make sure you have the map. (next version will have a check)&lt;br /&gt;
&lt;br /&gt;
Some usefull commands to be entered in chat:&lt;br /&gt;
  /advshading 0	no reflections on units. can give large fps boost&lt;br /&gt;
  /advshading 1	turn reflections on units on&lt;br /&gt;
  /shadows 0	no shadows&lt;br /&gt;
  /shadows 1	full shadows&lt;br /&gt;
  /shadows 2	only shadows from units, no terrain shadows&lt;br /&gt;
  /water 0	most basic water graphics&lt;br /&gt;
&lt;br /&gt;
==Can&#039;t Fix==&lt;br /&gt;
Starting new games with Single player menu does not work on Mac OS.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= TL;DR =&lt;br /&gt;
Tanks. Capture The Flag. Get the map pack. glhf.&lt;br /&gt;
&lt;br /&gt;
Single Player: Read &#039;&#039;Playing vs AI&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=Credits &amp;amp; Making Of=&lt;br /&gt;
Credits: http://www.pastebin.com/Wpub9wWw&lt;br /&gt;
&lt;br /&gt;
==Used tools==&lt;br /&gt;
Wings 3D, notepad++, [[Upspring]], Irfanview, MS Paint, Audiacity, Fraps, Windows Movie Maker, 7zip, DXTbmp, VirtualDub&lt;br /&gt;
&lt;br /&gt;
=Status=&lt;br /&gt;
playing: &amp;lt;del&amp;gt;completly playable on latest stable engine version: 0.82.7.1&amp;lt;/del&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
needs fixing to work with newest Spring release 84.0 (will eventually be done)&amp;lt;br&amp;gt;&lt;br /&gt;
development: {{forumlink|thread=26937|title=see forum:}}&lt;br /&gt;
paused due to other things being more interessting.&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Main_Page&amp;diff=12830</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Main_Page&amp;diff=12830"/>
		<updated>2013-10-29T21:55:42Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
{{Languages}}&lt;br /&gt;
--&amp;gt;{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot;  |&lt;br /&gt;
== Playing &amp;amp; General ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Read Me First]]&#039;&#039;&#039; Answers to questions often asked - Everyone should read this first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039; Has it been asked before?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Keyboard]]&#039;&#039;&#039; Default Keyboard Layout in the Engine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Games]]&#039;&#039;&#039; Games that use the Spring engine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Maps]]&#039;&#039;&#039; All about maps for the Spring engine and where to get them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Getting Spring Content and Links]]&#039;&#039;&#039; Lists sites related to spring, and sites from which you can download spring Games, Maps, and more&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[AI:Skirmish]]&#039;&#039;&#039; Skirmish AIs for Singleplayer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Lua Widgets]]&#039;&#039;&#039; All about installing and using LuaUI widgets...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Hosting Spring]]&#039;&#039;&#039; Autohosting and related topics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Spring_on_MacOSX |Mac OS]]&#039;&#039;&#039; Mac OSX information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[SetupGuide |Linux]]&#039;&#039;&#039; NetBSD / Solaris / Linux / Cross-platform information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Spring_Replays |Replays]]&#039;&#039;&#039; Watching recordings of previously played matches.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Statistics]]&#039;&#039;&#039; Some links/infos to statistics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Advertisement|Advertising Spring RTS]]&#039;&#039;&#039; Description of campaigns and available resources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[The Lighter Side Of Spring]]&#039;&#039;&#039; Humour, comics and quotations.&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
== Development == &lt;br /&gt;
&#039;&#039;&#039;[[Game_and_Unit_development#Mod_development|Game Development]]&#039;&#039;&#039; Lots of links to valuable Articles and forum threads regarding Game/Unit Development.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Mapdev:Main|Map Development]]&#039;&#039;&#039; Tutorials and other useful information for creating maps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Development:Getting_Started|Engine Development]]&#039;&#039;&#039; Starting point for engine development.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Lua Scripting]]&#039;&#039;&#039; Information regarding the use of the supplementary Lua scripting language for Widgets and beyond...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Map, Mod, And Unit Development Programs|Content Development Programs]]&#039;&#039;&#039; Links to all kind of useful programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[AI:Development|AI Development]]&#039;&#039;&#039; Lots of information about developing Skirmish, Unit and Group AIs for Spring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[General Resources]]&#039;&#039;&#039; Usable textures, sounds and code snippets by the community, for the community.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Chili|Chili UI framework]]&#039;&#039;&#039; Chili Ui framework designed by JK&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Associated Development Groups]]&#039;&#039;&#039; Teams, Forums and Groups associated with Spring content and code development.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{||&lt;br /&gt;
|&lt;br /&gt;
=This wiki needs your help!=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;quot;A wiki is a web application that allows users to add content, as on an Internet forum, but also allows anyone to edit the content.&amp;quot;&#039;&#039;&lt;br /&gt;
- [http://en.wikipedia.org/wiki/Wiki Wikipedia.org]&lt;br /&gt;
&lt;br /&gt;
The Spring project is very dependent on its community of users to help new players and developers. [[SpringWiki|Learn more here.]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| |&lt;br /&gt;
|&lt;br /&gt;
=Unable to log in?=&lt;br /&gt;
The login data for the wiki is the same as on the forum.&lt;br /&gt;
If you get the message &amp;quot;You have not specified a valid user name.&amp;quot; that is due a [http://springrts.com/mantis/view.php?id=1592 bug] with special characters in account names. &lt;br /&gt;
At the moment the only thing you can do, is create a new/second account that consists of letters only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 __NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
[[Category:Spring]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Main_Page&amp;diff=268</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Main_Page&amp;diff=268"/>
		<updated>2013-10-29T21:55:42Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&amp;lt;!--&lt;br /&gt;
{{Languages}}&lt;br /&gt;
--&amp;gt;{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot; cellspacing=&amp;quot;1&amp;quot;&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot;  |&lt;br /&gt;
== Playing &amp;amp; General ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Read Me First]]&#039;&#039;&#039; Answers to questions often asked - Everyone should read this first.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[FAQ]]&#039;&#039;&#039; Has it been asked before?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Keyboard]]&#039;&#039;&#039; Default Keyboard Layout in the Engine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Games]]&#039;&#039;&#039; Games that use the Spring engine.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Maps]]&#039;&#039;&#039; All about maps for the Spring engine and where to get them.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Getting Spring Content and Links]]&#039;&#039;&#039; Lists sites related to spring, and sites from which you can download spring Games, Maps, and more&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[AI:Skirmish]]&#039;&#039;&#039; Skirmish AIs for Singleplayer&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Lua Widgets]]&#039;&#039;&#039; All about installing and using LuaUI widgets...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Hosting Spring]]&#039;&#039;&#039; Autohosting and related topics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Spring_on_MacOSX |Mac OS]]&#039;&#039;&#039; Mac OSX information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[SetupGuide |Linux]]&#039;&#039;&#039; NetBSD / Solaris / Linux / Cross-platform information.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Spring_Replays |Replays]]&#039;&#039;&#039; Watching recordings of previously played matches.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Statistics]]&#039;&#039;&#039; Some links/infos to statistics.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Advertisement|Advertising Spring RTS]]&#039;&#039;&#039; Description of campaigns and available resources.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[The Lighter Side Of Spring]]&#039;&#039;&#039; Humour, comics and quotations.&lt;br /&gt;
| width=&amp;quot;50%&amp;quot; valign=&amp;quot;top&amp;quot; |&lt;br /&gt;
== Development == &lt;br /&gt;
&#039;&#039;&#039;[[Game_and_Unit_development#Mod_development|Game Development]]&#039;&#039;&#039; Lots of links to valuable Articles and forum threads regarding Game/Unit Development.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Mapdev:Main|Map Development]]&#039;&#039;&#039; Tutorials and other useful information for creating maps.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Development:Getting_Started|Engine Development]]&#039;&#039;&#039; Starting point for engine development.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Lua Scripting]]&#039;&#039;&#039; Information regarding the use of the supplementary Lua scripting language for Widgets and beyond...&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Map, Mod, And Unit Development Programs|Content Development Programs]]&#039;&#039;&#039; Links to all kind of useful programs.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[AI:Development|AI Development]]&#039;&#039;&#039; Lots of information about developing Skirmish, Unit and Group AIs for Spring.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[General Resources]]&#039;&#039;&#039; Usable textures, sounds and code snippets by the community, for the community.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Chili|Chili UI framework]]&#039;&#039;&#039; Chili Ui framework designed by JK&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[[Associated Development Groups]]&#039;&#039;&#039; Teams, Forums and Groups associated with Spring content and code development.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{||&lt;br /&gt;
|&lt;br /&gt;
=This wiki needs your help!=&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&amp;quot;A wiki is a web application that allows users to add content, as on an Internet forum, but also allows anyone to edit the content.&amp;quot;&#039;&#039;&lt;br /&gt;
- [http://en.wikipedia.org/wiki/Wiki Wikipedia.org]&lt;br /&gt;
&lt;br /&gt;
The Spring project is very dependent on its community of users to help new players and developers. [[SpringWiki|Learn more here.]]&lt;br /&gt;
&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
{| |&lt;br /&gt;
|&lt;br /&gt;
=Unable to log in?=&lt;br /&gt;
The login data for the wiki is the same as on the forum.&lt;br /&gt;
If you get the message &amp;quot;You have not specified a valid user name.&amp;quot; that is due a [http://springrts.com/mantis/view.php?id=1592 bug] with special characters in account names. &lt;br /&gt;
At the moment the only thing you can do, is create a new/second account that consists of letters only.&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
 __NOTOC__&lt;br /&gt;
__NOEDITSECTION__&lt;br /&gt;
[[Category:Spring]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13095</id>
		<title>Map Making: Feature Placer</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13095"/>
		<updated>2013-05-08T13:10:17Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Feature Placer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FIXME}} needs updating to use the information in [http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=29559 thread] about seperation of feature placer&lt;br /&gt;
= Feature Placer =&lt;br /&gt;
&lt;br /&gt;
At this point, it is very strongly recommended that you grab Spring Features. Spring features is an archive that contains all the map features ever made for spring mapping. The total number is somewhere around 500 features, so it will give you quite a bit of power when it comes time to spice up your map.&lt;br /&gt;
&lt;br /&gt;
Spring Features is available via the rapid tag: spring-features:stable&lt;br /&gt;
&lt;br /&gt;
Feature placer is available for use via the rapid tag: feature-placer:test&lt;br /&gt;
&lt;br /&gt;
You can use pr-downloader to get the latest version, either by using pr-downlaoder in the command line, or using Forboding Angel&#039;s pr-downloader menu ( http://goo.gl/kGJBx - Extract to spring folder, next to pr-downloader.exe (Windows only) ).&lt;br /&gt;
&lt;br /&gt;
= Using Feature Placer =&lt;br /&gt;
&lt;br /&gt;
When the spring starts up you will be presented with a tree that is sparkling green. Select it and you will have the option to build an entire host of features. There are also placement options on the menu such as &amp;quot;Jitter&amp;quot; and &amp;quot;Clustering&amp;quot;, etc. Set these as desired.&lt;br /&gt;
&lt;br /&gt;
== Exporting the Feature List ==&lt;br /&gt;
&lt;br /&gt;
Simple click the &amp;quot;export set.lua&amp;quot; button. Then, look in your spring folder, under maps, and look for the file &amp;lt;yourmapname.lua&amp;gt;. Once you have verified that the file was written, you may go ahead and close the game.&lt;br /&gt;
&lt;br /&gt;
= Adding the Feature List to your map =&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;yourmapname.lua&amp;gt; in a text editor and copy the entire contents. Then navigate to&lt;br /&gt;
&lt;br /&gt;
mapcontainer.sdd/mapconfig/featureplacer/set.lua&lt;br /&gt;
&lt;br /&gt;
Open up set.lua in a text editor, and paste the contents of &amp;lt;yourmapname.lua&amp;gt;t into it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making|Map_making]] &amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13094</id>
		<title>Map Making: Feature Placer</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13094"/>
		<updated>2013-05-08T13:09:08Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Adding the Feature List to your map */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FIXME}} needs updating to use the information in [http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=29559 thread] about seperation of feature placer&lt;br /&gt;
= Feature Placer =&lt;br /&gt;
&lt;br /&gt;
At this point, it is very strongly recommended that you go download &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; (&amp;amp;nbsp;[http://springfiles.com/spring/tools/spring-features http://springfiles.com/spring/tools/spring-features]&amp;amp;nbsp;)&amp;amp;nbsp;and place it in your games folder. Spring features is an archive that contains all the map features ever made for spring mapping. The total number is somewhere around 500 features, so it will give you quite a bit of power when it comes time to spice up your map.&lt;br /&gt;
&lt;br /&gt;
Spring Features is also available via the rapid tag: spring-features:stable&lt;br /&gt;
&lt;br /&gt;
Feature placer is available for use via the rapid tag: feature-placer:test&lt;br /&gt;
&lt;br /&gt;
You can use pr-downloader to get the latest version, either by using pr-downlaoder in the command line, or using Forboding Angel&#039;s pr-downloader menu ( http://goo.gl/kGJBx - Extract to spring folder, next to pr-downloader.exe (Windows only) ).&lt;br /&gt;
&lt;br /&gt;
= Using Feature Placer =&lt;br /&gt;
&lt;br /&gt;
When the spring starts up you will be presented with a tree that is sparkling green. Select it and you will have the option to build an entire host of features. There are also placement options on the menu such as &amp;quot;Jitter&amp;quot; and &amp;quot;Clustering&amp;quot;, etc. Set these as desired.&lt;br /&gt;
&lt;br /&gt;
== Exporting the Feature List ==&lt;br /&gt;
&lt;br /&gt;
Simple click the &amp;quot;export set.lua&amp;quot; button. Then, look in your spring folder, under maps, and look for the file &amp;lt;yourmapname.lua&amp;gt;. Once you have verified that the file was written, you may go ahead and close the game.&lt;br /&gt;
&lt;br /&gt;
= Adding the Feature List to your map =&lt;br /&gt;
&lt;br /&gt;
Open &amp;lt;yourmapname.lua&amp;gt; in a text editor and copy the entire contents. Then navigate to&lt;br /&gt;
&lt;br /&gt;
mapcontainer.sdd/mapconfig/featureplacer/set.lua&lt;br /&gt;
&lt;br /&gt;
Open up set.lua in a text editor, and paste the contents of &amp;lt;yourmapname.lua&amp;gt;t into it. &lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making|Map_making]] &amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13093</id>
		<title>Map Making: Feature Placer</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13093"/>
		<updated>2013-05-08T13:08:24Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Using Feature Placer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FIXME}} needs updating to use the information in [http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=29559 thread] about seperation of feature placer&lt;br /&gt;
= Feature Placer =&lt;br /&gt;
&lt;br /&gt;
At this point, it is very strongly recommended that you go download &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; (&amp;amp;nbsp;[http://springfiles.com/spring/tools/spring-features http://springfiles.com/spring/tools/spring-features]&amp;amp;nbsp;)&amp;amp;nbsp;and place it in your games folder. Spring features is an archive that contains all the map features ever made for spring mapping. The total number is somewhere around 500 features, so it will give you quite a bit of power when it comes time to spice up your map.&lt;br /&gt;
&lt;br /&gt;
Spring Features is also available via the rapid tag: spring-features:stable&lt;br /&gt;
&lt;br /&gt;
Feature placer is available for use via the rapid tag: feature-placer:test&lt;br /&gt;
&lt;br /&gt;
You can use pr-downloader to get the latest version, either by using pr-downlaoder in the command line, or using Forboding Angel&#039;s pr-downloader menu ( http://goo.gl/kGJBx - Extract to spring folder, next to pr-downloader.exe (Windows only) ).&lt;br /&gt;
&lt;br /&gt;
= Using Feature Placer =&lt;br /&gt;
&lt;br /&gt;
When the spring starts up you will be presented with a tree that is sparkling green. Select it and you will have the option to build an entire host of features. There are also placement options on the menu such as &amp;quot;Jitter&amp;quot; and &amp;quot;Clustering&amp;quot;, etc. Set these as desired.&lt;br /&gt;
&lt;br /&gt;
== Exporting the Feature List ==&lt;br /&gt;
&lt;br /&gt;
Simple click the &amp;quot;export set.lua&amp;quot; button. Then, look in your spring folder, under maps, and look for the file &amp;lt;yourmapname.lua&amp;gt;. Once you have verified that the file was written, you may go ahead and close the game.&lt;br /&gt;
&lt;br /&gt;
= Adding the Feature List to your map =&lt;br /&gt;
&lt;br /&gt;
Open dumpedunitsfeatures.txt in a text editor and copy the entire contents. Then navigate to&lt;br /&gt;
&lt;br /&gt;
mapcontainer.sdd/mapconfig/featureplacer/set.lua&lt;br /&gt;
&lt;br /&gt;
Open up set.lua in a text editor, and paste the contents of dumpedunitsfeatures.txt into it. Be sure to remove any entries in the unitlist or buildinglist sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making|Map_making]] &amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13092</id>
		<title>Map Making: Feature Placer</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Map_Making:_Feature_Placer&amp;diff=13092"/>
		<updated>2013-05-08T13:06:17Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: /* Feature Placer */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;{{FIXME}} needs updating to use the information in [http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=29559 thread] about seperation of feature placer&lt;br /&gt;
= Feature Placer =&lt;br /&gt;
&lt;br /&gt;
At this point, it is very strongly recommended that you go download &amp;quot;[http://springfiles.com/spring/tools/spring-features Spring Features]&amp;quot; (&amp;amp;nbsp;[http://springfiles.com/spring/tools/spring-features http://springfiles.com/spring/tools/spring-features]&amp;amp;nbsp;)&amp;amp;nbsp;and place it in your games folder. Spring features is an archive that contains all the map features ever made for spring mapping. The total number is somewhere around 500 features, so it will give you quite a bit of power when it comes time to spice up your map.&lt;br /&gt;
&lt;br /&gt;
Spring Features is also available via the rapid tag: spring-features:stable&lt;br /&gt;
&lt;br /&gt;
Feature placer is available for use via the rapid tag: feature-placer:test&lt;br /&gt;
&lt;br /&gt;
You can use pr-downloader to get the latest version, either by using pr-downlaoder in the command line, or using Forboding Angel&#039;s pr-downloader menu ( http://goo.gl/kGJBx - Extract to spring folder, next to pr-downloader.exe (Windows only) ).&lt;br /&gt;
&lt;br /&gt;
= Using Feature Placer =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;If you use Evolution RTS for feature placer, once ingame be sure to disable the &amp;quot;Integral Menu&amp;quot; widget (f11 - Widget Menu), as the menu does not support paging.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;You will need to go into the multiplayer lobby (one that supports modoptions and hosing your own games). Create a new game (not using a relay slave). In the modoptions set the game type to &amp;quot;Featureplacer&amp;quot; and add a NullAI.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
When the game starts up you will be presented with a tree that is sparkling green. Select it and you will have the option to build an entire host of features. There are also placement options on the menu such as &amp;quot;Jitter&amp;quot; and &amp;quot;Clustering&amp;quot;, etc. Set these as desired.&lt;br /&gt;
&lt;br /&gt;
== Exporting the Feature List ==&lt;br /&gt;
&lt;br /&gt;
Once you have placed all the features on your map and are ready to export the placement, press F11 to bring up the widget menu, and select &amp;quot;Dump All Units Features&amp;quot;. Click it 3 times. At this point, before exiting the game, alt+tab out to your spring install folder and look for a file called dumpedunitsfeatures.txt to make sure that the file was written properly. Once you have verified this, you may go ahead and close the game.&lt;br /&gt;
&lt;br /&gt;
= Adding the Feature List to your map =&lt;br /&gt;
&lt;br /&gt;
Open dumpedunitsfeatures.txt in a text editor and copy the entire contents. Then navigate to&lt;br /&gt;
&lt;br /&gt;
mapcontainer.sdd/mapconfig/featureplacer/set.lua&lt;br /&gt;
&lt;br /&gt;
Open up set.lua in a text editor, and paste the contents of dumpedunitsfeatures.txt into it. Be sure to remove any entries in the unitlist or buildinglist sections.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;br/&amp;gt;&amp;lt;br/&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Map making|Map_making]] &amp;lt;br/&amp;gt;&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringSettings&amp;diff=17150</id>
		<title>SpringSettings</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=SpringSettings&amp;diff=17150"/>
		<updated>2013-05-07T22:37:05Z</updated>

		<summary type="html">&lt;p&gt;Forboding angel: Redirected page to Springsettings.cfg&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;#REDIRECT [[Springsettings.cfg]]&lt;/div&gt;</summary>
		<author><name>Forboding angel</name></author>
	</entry>
</feed>