<?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=Jools</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=Jools"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Jools"/>
	<updated>2026-11-08T18:34:49Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10765</id>
		<title>Lua:Callins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10765"/>
		<updated>2016-02-11T14:44:16Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Unsynced Only */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Lua Callins =&lt;br /&gt;
This page is future looking to unified widget/gadget (aka &amp;quot;addon&amp;quot;) handler, which may yet be some way off, c.f. the [https://github.com/spring/spring/blob/ebb704e008f6ea645947d07be1cfcc272af0428f/doc/changelog.txt#L71 changelog].&lt;br /&gt;
&lt;br /&gt;
For now, to use these addons in a widget, replace addon with widget and, for a gadget, replace addon with gadget. For example,&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    function widget:UnitCreated(unitID, unitDefID, unitTeam, builderID)&lt;br /&gt;
        ...  &lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some functions may differ between (synced) gadget and widgets; those are in the [[#Synced_-_Unsynced_Shared]] section. Essentially the reason is that all information should be available to synced (game logic controlling) gadgets, but restricted to unsynced gadget/widget (e.g. information about an enemy unit only detected via radar and not yet in LOS). In such cases the full (synced) param list is documented.&lt;br /&gt;
&lt;br /&gt;
== Common ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Initialize&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the addon is (re)loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Shutdown&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the addon or the game is shutdown.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Unsynced Only ==&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DefaultCommand&lt;br /&gt;
|params = type, id&lt;br /&gt;
|return = number cmdID&lt;br /&gt;
|description = Used to set the default command when a unit is selected. First parameter is the type of the object pointed at (either &amp;quot;unit or &amp;quot;feature&amp;quot;) and the second is its unitID or featureID respectively. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandNotify&lt;br /&gt;
|params = cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = bool removeCmd&lt;br /&gt;
|description = Called when a command is issued. Returning &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; deletes the command and does not send it through the network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandsChanged&lt;br /&gt;
|params = None&lt;br /&gt;
|return = ?&lt;br /&gt;
|description = Called when the command descriptions changed, e.g. when selecting or deselecting a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = WorldTooltip&lt;br /&gt;
|params = ttType, data1, data2, data3&lt;br /&gt;
|return = string newTooltip&lt;br /&gt;
|description = The parameters can be &amp;lt;code&amp;gt;&amp;quot;unit&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;unitID&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;&amp;quot;feature&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;featureID&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;&amp;quot;ground&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posY&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posZ&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;selection&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnsyncedHeightMapUpdate&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the unsynced copy of the height-map is altered.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameProgress&lt;br /&gt;
|params = serverFrameNum&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called every 60 frames, calculating delta between GameFrame and GameProgress. Can give an ETA about catching up with simulation for mid-game join players.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameSetup&lt;br /&gt;
|params =  state, ready, playerStates&lt;br /&gt;
|return = bool success, bool newReady&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = SunChanged&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AddConsoleLine&lt;br /&gt;
|params = msg, priority&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when text is entered into the console (e.g. Spring.Echo).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvSkirmishAIMessage&lt;br /&gt;
|params = aiTeam, dataStr&lt;br /&gt;
|return = ???&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvFromSynced&lt;br /&gt;
|params = ...&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Receives data sent via [[Lua_System#Synced|SendToUnsynced]] callout.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Save&lt;br /&gt;
|params = zip&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a chat command &#039;/save&#039; or &#039;/savegame&#039; is received. The single argument is a userdatum representing the savegame zip file. See [[Lua_SaveLoad#Save_.28_zip_.29_-.3E_nil|Lua_SaveLoad]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = LoadProgress&lt;br /&gt;
|params = message, replaceLastLine&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Only available to LuaIntro.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GroupChanged&lt;br /&gt;
|params = groupID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is added to or removed from a control group. Currently implemented for widgets only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ConfigureLayout&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = ???&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Input ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = IsAbove&lt;br /&gt;
|params = x, y&lt;br /&gt;
|return = bool isAbove&lt;br /&gt;
|description = Called every Update. Must return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;Mouse*&amp;lt;/code&amp;gt; events and &amp;lt;code&amp;gt;GetToolTip&amp;lt;/code&amp;gt; to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GetTooltip&lt;br /&gt;
|params = x, y&lt;br /&gt;
|return = string tooltip&lt;br /&gt;
|description = Called when &amp;lt;code&amp;gt;IsAbove&amp;lt;/code&amp;gt; returns true.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyPress&lt;br /&gt;
|params = key, mods, isRepeat&lt;br /&gt;
|return = bool becomeOwner&lt;br /&gt;
|description = Called repeatedly when a key is pressed down. If you want an action to occur only once check for &amp;lt;code&amp;gt;isRepeat == false&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;mods&amp;lt;/code&amp;gt; parameter is a table, with keys &amp;lt;code&amp;gt;alt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ctrl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shift&amp;lt;/code&amp;gt; each having a boolean value. Return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; if you don&#039;t want other callins or the engine to also receive this keypress.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyRelease&lt;br /&gt;
|params = key&lt;br /&gt;
|return = bool&lt;br /&gt;
|description = Called when the key is released.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TextInput&lt;br /&gt;
|params = utf8char&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a key press results in text input. Introduced in 97.0.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = JoystickEvent&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MousePress&lt;br /&gt;
|params = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|description = Called when a mouse button is pressed. The &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; parameter supports up to 7 buttons. Must return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;MouseRelease&amp;lt;/code&amp;gt; and other functions to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseRelease&lt;br /&gt;
|params = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|description = Called when a mouse button is released. Please note that in order to have Spring call &amp;lt;code&amp;gt;MouseRelease&amp;lt;/code&amp;gt;, you need to have a &amp;lt;code&amp;gt;MousePress&amp;lt;/code&amp;gt; call-in in the same addon that returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseWheel&lt;br /&gt;
|params = up, value&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the mouse wheel is moved. The parameters indicate the direction and amount of travel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseMove&lt;br /&gt;
|params = x, y, dx, dy, button&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the mouse is moved. The &amp;lt;code&amp;gt;dx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;dy&amp;lt;/code&amp;gt; parameters indicate the distance travelled, whereas the first two indicate the final position.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Players ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerChanged&lt;br /&gt;
|params = playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a player&#039;s status changes e.g. becoming a spectator.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerAdded&lt;br /&gt;
|params = playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a new player joins the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerRemoved&lt;br /&gt;
|params = playerID, reason&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a player is removed from the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Drawing ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ViewResize&lt;br /&gt;
|params = viewSizeX, viewSizeY&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever the window is resized.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Update&lt;br /&gt;
|params = dt&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called for every draw frame. The parameter is the time since the last update. Perform calculations in here and only drawing in Draw* callins.}}&lt;br /&gt;
&lt;br /&gt;
Inside the Draw* functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawGenesis&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Doesn&#039;t render to screen! Use this callin to update textures, shaders, etc.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldPreUnit&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorld&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldShadow&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldReflection&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldRefraction&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreen&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreenEffects&lt;br /&gt;
|params = vsx, vsy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;vsx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;vsy&amp;lt;/code&amp;gt; are screen coordinates.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawLoadScreen&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = {{new|95.0}} Only available to LuaIntro, draws custom load screens.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawInMinimap&lt;br /&gt;
|params = sx, sy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;sx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sy&amp;lt;/code&amp;gt; are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawInMinimapBackground&lt;br /&gt;
|params = sx, sy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;sx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sy&amp;lt;/code&amp;gt; are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Custom Object Rendering ===&lt;br /&gt;
For the following calls &amp;lt;code&amp;gt;drawMode&amp;lt;/code&amp;gt; can be one of the following, &amp;lt;code&amp;gt;notDrawing = 0&amp;lt;/code&amp;gt;,	&amp;lt;code&amp;gt;normalDraw = 1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shadowDraw = 2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reflectionDraw = 3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;refractionDraw = 4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawUnit&lt;br /&gt;
|params = unitID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of units, [[Lua_UnitRendering#Lua.27s_DrawXYZ-Callin|enabled here]].	&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawFeature&lt;br /&gt;
|params = unitID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of features, [[Lua_UnitRendering#Lua.27s_DrawXYZ-Callin|enabled here]].	&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawShield&lt;br /&gt;
|params = unitID, weaponID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of [[Gamedev:WeaponDefs#Shield_(WeaponType)|shields]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawProjectile&lt;br /&gt;
|params = projectileID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of weapon (&amp;amp; other) projectiles.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Synced - Unsynced Shared ==&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GotChatMsg&lt;br /&gt;
|params = msg, player&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a player issues a UI command e.g. types &amp;lt;code&amp;gt;/foo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/luarules foo&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Game ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameID&lt;br /&gt;
|params = gameID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called once to deliver the gameID.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePaused&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the game is paused.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameOver&lt;br /&gt;
|params = winningAllyTeams&lt;br /&gt;
|return = none&lt;br /&gt;
|description = The parameter is a list of winning allyTeams, if empty the game result was undecided (like when dropping from an host).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameFrame&lt;br /&gt;
|params = frame&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called for every game simulation frame (30 per second).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePreload&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called before the 0 gameframe.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameStart&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called upon the start of the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Teams ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamChanged&lt;br /&gt;
|params = teamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamDied&lt;br /&gt;
|params = teamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a team dies (see [[Lua_SyncedCtrl#Game_End|Spring.KillTeam]]).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Units ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCreated&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, builderID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called at the moment the unit is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFinished&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called at the moment the unit is completed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFromFactory&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, factID, factDefID, userOrders&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a factory finishes construction of a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitGiven&lt;br /&gt;
|params = unitID, unitDefID, newTeam, oldTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is transferred between teams.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitTaken&lt;br /&gt;
|params = unitID, unitDefID, oldTeam, newTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is transferred between teams.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDamaged&lt;br /&gt;
|params =  unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is damaged (after &amp;lt;code&amp;gt;UnitPreDamaged&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDestroyed&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitStunned&lt;br /&gt;
|params =  unitID, unitDefID, unitTeam, stunned&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit changes its stun status. {{new|99.0}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnitCollision&lt;br /&gt;
|params = colliderID, collideeID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when two units collide. Both units must be registered with [[Lua_System#Synced|Script.SetWatchUnit]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFeatureCollision&lt;br /&gt;
|params = colliderID, collideeID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit collides with a feature. The unit must be registered with [[Lua_System#Synced|Script.SetWatchUnit]] and the feature registered with [[Lua_System#Synced|Script.SetWatchFeature]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCommand&lt;br /&gt;
|params = unitID, unitDefID, teamID, cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called after when a unit accepts a command, after &amp;lt;code&amp;gt;AllowCommand&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCmdDone&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdTag, cmdParams, cmdOpts&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit completes a command.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLoaded&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is loaded by a transport.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnloaded&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is unloaded by a transport.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitExperience&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, experience, oldExperience&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit gains experience greater or equal to the minimum limit set by calling [[Lua_SyncedCtrl#Other|Spring.SetExperienceGrade]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitIdle&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is idle (empty command queue).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCloaked&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit cloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDecloaked&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit decloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoved&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoveFailed&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = StockpileChanged&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a units stockpile of weapons increases or decreases. See {{xtaglink|Gamedev:WeaponDefs|stockpile}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredLos&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit enters LOS of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftLos&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit leaves LOS of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredRadar&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit enters radar of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftRadar&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit leaves radar of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredAir&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftAir&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredWater&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftWater&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitSeismicPing&lt;br /&gt;
|params = x, y, z, strength, allyTeam, unitID, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit emits a seismic ping. See {{xtaglink|Gamedev:UnitDefs|seismicSignature}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureCreated&lt;br /&gt;
|params = featureID, allyTeamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDamaged&lt;br /&gt;
|params =  featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is damaged.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDestroyed&lt;br /&gt;
|params = featureID, allyTeamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureMoved&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Projectiles ===&lt;br /&gt;
The following Callins are only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]].&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileCreated&lt;br /&gt;
|params = proID, proOwnerID, weaponDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the projectile is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileDestroyed&lt;br /&gt;
|params = proID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the projectile is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Synced Only ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandFallback&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&lt;br /&gt;
|return = bool used, bool finished&lt;br /&gt;
|description = Called when the unit reaches an unknown command in its queue (i.e. one not handled by the engine). If no addon returns &amp;lt;code&amp;gt;used&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the command is dropped, if an addon returns &amp;lt;code&amp;gt;true, true&amp;lt;/code&amp;gt; the command is removed because it&#039;s done, with &amp;lt;code&amp;gt;true, false&amp;lt;/code&amp;gt; it&#039;s kept in the queue and &amp;lt;code&amp;gt;CommandFallback&amp;lt;/code&amp;gt; gets called again on the next slowupdate.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowCommand&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called when the command is given, before the unit&#039;s queue is altered. The return value is whether it should be let into the queue. The queue remains untouched when a command is blocked, whether it would be queued or replace the queue.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitCreation&lt;br /&gt;
|params = unitDefID, builderID, builderTeam, x, y, z, facing&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitTransfer&lt;br /&gt;
|params = unitID, unitDefID, oldTeam, newTeam, capture&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitBuildStep&lt;br /&gt;
|params = builderID, builderTeam, unitID, unitDefID, part&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a unit progresses its build percentage, the boolean return value determines whether or not the build makes progress.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowFeatureCreation&lt;br /&gt;
|params = featureDefID, teamID, x, y, z&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before feature is created, the boolean return value determines whether or not the creation is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowFeatureBuildStep&lt;br /&gt;
|params = builderID, builderTeam, featureID, featureDefID, part&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a feature progresses its build percentage, the boolean return value determines whether or not the progress change is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowResourceLevel&lt;br /&gt;
|params = teamID, res, level&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called when a team sets the sharing level of a resource, the boolean return value determines whether or not the sharing level is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowResourceTransfer&lt;br /&gt;
|params = oldTeamID, newTeamID, res, amount&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before resources are transferred between players, the boolean return value determines whether or not the transfer is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowStartPosition&lt;br /&gt;
|params =  clampedX, clampedY, clampedZ, playerID, readyState, rawX, rawY, rawZ&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = &amp;lt;code&amp;gt;clamped&amp;lt;/code&amp;gt; are the coordinates clamped into start-boxes, &amp;lt;code&amp;gt;raw&amp;lt;/code&amp;gt; is where player tried to place their marker. The &amp;lt;code&amp;gt;readyState&amp;lt;/code&amp;gt; can be any one of &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - player picked a position, &lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - player clicked ready, &lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - player pressed ready OR  the game was force-started (player did not click ready, but is now forcibly readied) or &lt;br /&gt;
* &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; - the player failed to load. &lt;br /&gt;
* {{new|95.0}} the default &#039;failed to choose&#039; start-position is the north-west point of their startbox, or &amp;lt;code&amp;gt;(0,0,0)&amp;lt;/code&amp;gt; if they do not have a startbox. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowDirectUnitControl&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, playerID&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Determines if this unit can be controlled directly in FPS view.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTargetCheck&lt;br /&gt;
|params = attackerID, attackerWeaponNum, attackerWeaponDefID&lt;br /&gt;
|return = bool allowCheck, bool ignoreCheck&lt;br /&gt;
|description = Determines if this weapon can automatically generate targets itself. See also {{xtaglink|Gamedev:WeaponDefs|commandFire}} weaponDef tag. The &amp;lt;code&amp;gt;ignoreCheck&amp;lt;/code&amp;gt; return value was added in 99.0 to allow ignoring the callin i.e. running normal engine check for this weapon.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTarget&lt;br /&gt;
|params = attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defPriority&lt;br /&gt;
|return = bool allowed, number newPriority&lt;br /&gt;
|description = Controls blocking of a specific target from being considered during a weapon&#039;s periodic auto-targeting sweep. The second return value is the new priority for this target (if you don&#039;t want to change it, return defPriority). Lower priority targets are targeted first.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponInterceptTarget&lt;br /&gt;
|params = interceptorUnitID, interceptorWeaponID, targetProjectileID&lt;br /&gt;
|return = bool allowed&lt;br /&gt;
|description = Controls blocking of a specific intercept target from being considered during an {{xtaglink|Gamedev:WeaponDefs|interceptor}} weapon&#039;s periodic auto-targeting sweep. Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowBuilderHoldFire&lt;br /&gt;
|params = unitID, unitDefID, action&lt;br /&gt;
|return = bool actionAllowed&lt;br /&gt;
|description = {{new|98.0}} {{Sourcelinkhash|5a82d750b89e72024bb0bb62cf05ea257737e0ac}}   Called when a construction unit wants to &amp;quot;use his nano beams&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; is one of following:&lt;br /&gt;
* &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; Build&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.REPAIR&amp;lt;/code&amp;gt; Repair&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RECLAIM&amp;lt;/code&amp;gt; Reclaim&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RESTORE&amp;lt;/code&amp;gt; Restore&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RESURRECT&amp;lt;/code&amp;gt; Resurrect&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.CAPTURE&amp;lt;/code&amp;gt; Capture&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Explosion&lt;br /&gt;
|params = weaponDefID, px, py, pz, AttackerID&lt;br /&gt;
|return = bool noGfx&lt;br /&gt;
|description = Called when an explosion occurs. If it returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then no graphical effects are drawn by the engine for this explosion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TerraformComplete&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&lt;br /&gt;
|return = bool stop&lt;br /&gt;
|description = Called when pre-building terrain levelling terraforms are completed (c.f. {{xtaglink|Gamedev:UnitDefs|levelGround}}). If the return value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the current build order is terminated.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MoveCtrlNotify&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, data&lt;br /&gt;
|return = bool moveCtrlComplete&lt;br /&gt;
|description = Enable both [[Lua_MoveCtrl#Options|Spring.MoveCtrl.SetCollideStop]] and [[Lua_MoveCtrl#Options|Spring.MoveCtrl.SetTrackGround]] to enable this call-in, data was supposed to indicate the type of notification but currently never has a value other than &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (&amp;quot;unit hit the ground&amp;quot;). The return value determines whether or not the unit should remain script-controlled (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;) or return to engine controlled movement (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvLuaMsg&lt;br /&gt;
|params = msg, playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Receives messages from unsynced sent via [[Lua_UnsyncedCtrl#SendLuaMessage|Spring.SendLuaRulesMsg]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Load&lt;br /&gt;
|params = zip&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called after &amp;lt;code&amp;gt;GamePreload&amp;lt;/code&amp;gt; and before &amp;lt;code&amp;gt;GameStart&amp;lt;/code&amp;gt;. See [[Lua_SaveLoad#Load_.28_zip_.29_-.3E_nil|Lua_SaveLoad]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Damage Controllers ===&lt;br /&gt;
For the following callins, in addition to being a regular weapon, &amp;lt;code&amp;gt;weaponDefID&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - debris collision, also default of [[Lua_SyncedCtrl#Unit_Control|Spring.AddUnitDamage]]&lt;br /&gt;
* &amp;lt;code&amp;gt;-2&amp;lt;/code&amp;gt; - ground collision&lt;br /&gt;
* &amp;lt;code&amp;gt;-3&amp;lt;/code&amp;gt; - object collision&lt;br /&gt;
* &amp;lt;code&amp;gt;-4&amp;lt;/code&amp;gt; - fire damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-5&amp;lt;/code&amp;gt; - water damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; - kill damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-7&amp;lt;/code&amp;gt; - crush damage&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitPreDamaged&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = number newDamage, number impulseMult&lt;br /&gt;
|description = Called before damage is applied to the unit, allows fine control over how much damage and [http://en.wikipedia.org/wiki/Impulse_(physics) impulse] is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ShieldPreDamaged&lt;br /&gt;
|params = proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&lt;br /&gt;
|return = bool handleCollision&lt;br /&gt;
|description = Called before any engine shield-vs-projectile logic executes. If the return value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the gadget handles the collision event and the engine does not remove the projectile.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeaturePreDamaged&lt;br /&gt;
|params = featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = number newDamage, number impulseMult&lt;br /&gt;
|description = Called before damage is applied to the feature, allows fine control over how much damage and [http://en.wikipedia.org/wiki/Impulse_(physics) impulse] is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19806</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19806"/>
		<updated>2015-08-01T00:15:07Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Mapslists */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost - for beginners&lt;br /&gt;
[durian]Autohost - for fleabowl&lt;br /&gt;
[elderberry]Autohost - for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt;&amp;lt;/code&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mapslists===&lt;br /&gt;
&lt;br /&gt;
Maplists act like filters: when you (for example) set the !maplist 1v1 command, all subsequent listing of maps will be only from the 1v1 map list. So this will allow you to only use a subset of all maps. There are now these defined maplists, but more can be requested:&lt;br /&gt;
&amp;lt;code&amp;gt;!maplist 1v1 | 2v2 | 3v3 | 4v4 | 5v5 | 6v6 | teams | bigteams | 3ffa | 4ffa | 5ffa | fleas | good&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To return to all maps, use this command:&lt;br /&gt;
&amp;lt;code&amp;gt;!maplist all&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show list of maplists: &amp;lt;code&amp;gt;!printmaplist&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show list of maps in a specific list: &amp;lt;code&amp;gt;!printmaplist &amp;lt;listname&amp;gt;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;!printmaplist 1v1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add current map to a list: &amp;lt;code&amp;gt;!addmap &amp;lt;listname&amp;gt;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;!addmap 1v1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19805</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19805"/>
		<updated>2015-08-01T00:14:31Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Mapslists */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost - for beginners&lt;br /&gt;
[durian]Autohost - for fleabowl&lt;br /&gt;
[elderberry]Autohost - for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt;&amp;lt;/code&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mapslists===&lt;br /&gt;
&lt;br /&gt;
Maplists act like filters: when you (for example) set the !maplist 1v1 command, all subsequent listing of maps will be only from the 1v1 map list. So this will allow you to only use a subset of all maps. There are now these defined maplists, but more can be requested:&lt;br /&gt;
&amp;lt;code&amp;gt;!maplist 1v1 | 2v2 | 3v3 | 4v4 | 5v5 | 6v6 | teams | bigteams | 3ffa | 4ffa | 5ffa | fleas | good&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To return to all maps, use this command:&lt;br /&gt;
&amp;lt;code&amp;gt;!maplist all&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;More commands:&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Show list of maplists: &amp;lt;code&amp;gt;!printmaplist&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Show list of maps in a specific list: &amp;lt;code&amp;gt;!printmaplist &amp;lt;listname&amp;gt;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;!printmaplist 1v1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Add current map to a list: &amp;lt;code&amp;gt;!addmap &amp;lt;listname&amp;gt;&amp;lt;/code&amp;gt;, for example &amp;lt;code&amp;gt;!addmap 1v1&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19804</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19804"/>
		<updated>2015-07-31T23:48:47Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Maps */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost - for beginners&lt;br /&gt;
[durian]Autohost - for fleabowl&lt;br /&gt;
[elderberry]Autohost - for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt;&amp;lt;/code&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Mapslists===&lt;br /&gt;
&lt;br /&gt;
Maplists act like filters: when you (for example) set the !maplist 1v1 command, all subsequent listing of maps will be only from the 1v1 map list. So this will allow you to only use a subset of all maps. There are now these defined maplists, but more can be requested:&lt;br /&gt;
 &amp;lt;small&amp;gt;Maplists: 1v1 (30), 2v2 (7), 3v3 (5), 4v4 (6), 5v5 (4), 6v6 (0), teams (7), bigteams (1), 3ffa (11), 4ffa (3), 5ffa (4), fleas (0), good (9)&amp;lt;/small&amp;gt;&lt;br /&gt;
(the number in brackets indicates the number of maps as of July 31st, 2015).&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19801</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19801"/>
		<updated>2015-03-10T23:24:10Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Important Autohost Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost - for beginners&lt;br /&gt;
[durian]Autohost - for fleabowl&lt;br /&gt;
[elderberry]Autohost - for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt;&amp;lt;/code&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19800</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19800"/>
		<updated>2015-03-10T23:22:21Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Managing the autohosts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost -- for beginners&lt;br /&gt;
[durian]Autohost -- for fleabowl&lt;br /&gt;
[elderberry]Autohost -- for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt;&amp;lt;/code&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19799</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19799"/>
		<updated>2015-03-10T23:19:47Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Managing the autohosts */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost -- for beginners&lt;br /&gt;
[durian]Autohost -- for fleabowl&lt;br /&gt;
[elderberry]Autohost -- for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt;&amp;lt;/code&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19798</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19798"/>
		<updated>2015-03-10T23:18:47Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Important Autohost Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost -- for beginners&lt;br /&gt;
[durian]Autohost -- for fleabowl&lt;br /&gt;
[elderberry]Autohost -- for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts ==&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
Pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Download a map: &amp;lt;code&amp;gt;!dlmap &amp;lt;mapname or url&amp;gt;&amp;lt;/code&amp;gt; After this wait 30 seconds or issue the command &amp;lt;code&amp;gt;!reloadarchives&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19797</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19797"/>
		<updated>2015-03-10T23:17:05Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Important Autohost Commands */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
The easiest way to download latest XTA is via the the automatic download system of your favorite multiplayer lobby.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost - for all&lt;br /&gt;
[loganberry]Autohost -- for beginners&lt;br /&gt;
[durian]Autohost -- for fleabowl&lt;br /&gt;
[elderberry]Autohost -- for testing new xta versions&lt;br /&gt;
&amp;lt;/pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Of course you can also use either of these hosts for other purposes.&lt;br /&gt;
&lt;br /&gt;
== Managing the autohosts&lt;br /&gt;
&lt;br /&gt;
To start up one of these hosts, if it is not running but another host is running, you can use the command:&lt;br /&gt;
&amp;lt;code&amp;gt;!spawn &amp;lt;autohost&amp;gt;&amp;lt;/code&amp;gt; - where &amp;lt;autohost&amp;gt; is one of semprini, logan, elder or durian.&lt;br /&gt;
&lt;br /&gt;
In elderberry autohost you can also set another spring engine with the command:&lt;br /&gt;
&amp;lt;code&amp;gt;!setengine &amp;lt;engine name or latest&amp;gt; - for example !setengine 98.0 to set engine to Spring 98.0&lt;br /&gt;
&lt;br /&gt;
To get a long, complete list type of commands: &amp;lt;code&amp;gt;!help&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Below are some often used commands for quicker looking:&lt;br /&gt;
===Maps===&lt;br /&gt;
pick a random &amp;quot;good&amp;quot; map: &amp;lt;code&amp;gt;!map&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===King of the Hill===&lt;br /&gt;
Add an one more startbox than they are teams.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 1&amp;lt;/code&amp;gt; - enable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!koth 0&amp;lt;/code&amp;gt; - disable King of the Hill mode.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!hilltime X&amp;lt;/code&amp;gt; - team has to control hill for X minutes to win.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!gracetime Z&amp;lt;/code&amp;gt; - at game start hill stays neutral for Z minutes.&lt;br /&gt;
&lt;br /&gt;
===Game options===&lt;br /&gt;
&amp;lt;code&amp;gt;!mode killall&amp;lt;/code&amp;gt; - destroy all enemy units to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!mode comends&amp;lt;/code&amp;gt; - destroy enemy Commanders to win&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;!spidertortoise 0&amp;lt;/code&amp;gt; - Turn spiders &amp;amp; turtle units off.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!--&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Links&amp;diff=10415</id>
		<title>Links</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Links&amp;diff=10415"/>
		<updated>2014-11-30T18:20:42Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* AutoHosts (dedicated servers) */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
= Community Links =&lt;br /&gt;
*[[Associated_Development_Groups|Associated Development Groups]] - various forums etc&lt;br /&gt;
*[http://springfiles.com/ SpringFiles] - download page for maps &amp;amp; games&lt;br /&gt;
*[http://weblobby.springrts.com WebLobby]&lt;br /&gt;
*[http://ladder.springrts.com/ Ladder]&lt;br /&gt;
*[[mumble|mumble server]]&lt;br /&gt;
*[http://feeds.feedburner.com/SpringCommunityHeadlines SpringInfo Community News]&lt;br /&gt;
*[http://replays.springrts.com/ Spring Replays]&lt;br /&gt;
&lt;br /&gt;
= Development Links&amp;lt;br/&amp;gt; =&lt;br /&gt;
&lt;br /&gt;
*[http://stacktranslate.springrts.com Stacktrace Translator]&lt;br /&gt;
*[http://answers.springlobby.info/questions/ Developer Q&amp;amp;A]&lt;br /&gt;
*[http://springrts.com/mantis/ Mantis] - place to report engine bugs, problems &amp;amp; (minor) feature requests&lt;br /&gt;
*[http://buildbot.springrts.com/waterfall?reload=30 buildbot waterfall]&lt;br /&gt;
*[http://springrts.com/dl/buildbot/default/ spring engine development builds]&lt;br /&gt;
*[http://spring.osocial.se/hierarchy.html Spring Doxygen]&lt;br /&gt;
*[http://spring.osocial.se/db/de7/unitsync__api_8h.html unitsync API]&lt;br /&gt;
*[[Rapid]] - the games download api&lt;br /&gt;
*[[Development:Minutes | Meeting Minutes]] - Archived chatlogs of engine developer meetings&lt;br /&gt;
*[http://springrts.com/dl/buildbot/default/master/{{StableEngineVersion}}/manpages/spring.6.html Spring&#039;s manpage]&lt;br /&gt;
&lt;br /&gt;
= Repo. Links =&lt;br /&gt;
== Engine &amp;amp; Content ==&lt;br /&gt;
*[https://github.com/spring Spring github repo]&lt;br /&gt;
*[[Gamedev:PublicRepos | Game Repos]] - Publicly readable game repos&lt;br /&gt;
=== [https://github.com/jk3064/ jK&#039;s lua repos] ===&lt;br /&gt;
*[https://github.com/jk3064/Map-Blueprint Map Blueprint] - basic container to create new maps ([[MakingMapsWithBluePrintAndMapConv |see]])&lt;br /&gt;
*[https://github.com/jk3064/chiliui Chili] - a lua based gui framework&lt;br /&gt;
*[https://github.com/jk3064/chili_loadscreen Chili Loadscreen] - a chili based loadscreen&lt;br /&gt;
*[https://github.com/jk3064/Custom-Unit-Shader-Framework CustomUnitShaders] - a lua based per-unit shader framework (includes normalmap support)&lt;br /&gt;
&lt;br /&gt;
== Lobby Server &amp;amp; Clients ==&lt;br /&gt;
*[[uberserver]] - the lobby server&lt;br /&gt;
*[http://code.google.com/p/zero-k/ ZKLobby&#039;s google code page] - a .net lobby&lt;br /&gt;
*[[SpringLobby]] - a wxWidgets lobby&lt;br /&gt;
*[https://github.com/cleanrock/flobby flobby] - a FLTK based lobby (linux only)&lt;br /&gt;
&lt;br /&gt;
== AutoHosts (dedicated servers) ==&lt;br /&gt;
*[[SPADS]]&lt;br /&gt;
*[[Springie]] - mainly used by ZK&lt;br /&gt;
&lt;br /&gt;
== Content Downloaders == &lt;br /&gt;
*[[pr-downloader]] - an unified download app &amp;amp; lib (can dl from plasma, rapid, ...)&lt;br /&gt;
*[https://github.com/spring/RapidTools rapid server tools] - tools to create a rapid repository&lt;br /&gt;
*[[Plasma]] - a torrent based download system (mostly for maps, games should use rapid)&lt;br /&gt;
&lt;br /&gt;
== Tools ==&lt;br /&gt;
*[[Upspring]]&lt;br /&gt;
*[[MapConv]]&lt;br /&gt;
*[[MapConvNG]]&lt;br /&gt;
&lt;br /&gt;
= SpringFiles API =&lt;br /&gt;
*[http://api.springfiles.com human readable]&lt;br /&gt;
*[http://api.springfiles.com/xmlrpc.php xmlrpc]&lt;br /&gt;
*[https://github.com/springfiles/upq/blob/master/doc/exampleclient.py example client]&lt;br /&gt;
&lt;br /&gt;
= Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
*[http://packages.springrts.com Rapid Upload Interface] - Mappers &amp;amp; GameDevs can upload their files via it&lt;br /&gt;
*[http://planet-wars.eu/ModelBase/Models.aspx Model Database]&lt;br /&gt;
&lt;br /&gt;
= Statistics =&lt;br /&gt;
&lt;br /&gt;
*[http://www.ohloh.net/p/springrts ohloh springrts]&lt;br /&gt;
*[http://zero-k.info/stats/ lobby stats]&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10754</id>
		<title>Lua:Callins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10754"/>
		<updated>2014-11-07T21:17:45Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Lua Callins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Lua Callins =&lt;br /&gt;
This page is future looking to unified widget/gadget (aka &amp;quot;addon&amp;quot;) handler, which may yet be some way off, c.f. the [https://github.com/spring/spring/blob/ebb704e008f6ea645947d07be1cfcc272af0428f/doc/changelog.txt#L71 changelog].&lt;br /&gt;
&lt;br /&gt;
Some functions may differ between (synced) gadget and widgets; those are in the [[#Synced_-_Unsynced_Shared]] section. Essentially the reason is that all information should be available to synced (game logic controlling) gadgets, but restricted to unsynced gadget/widget (e.g. information about an enemy unit only detected via radar and not yet in LOS). In such cases the full (synced) param list is documented.&lt;br /&gt;
&lt;br /&gt;
== Common ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Initialize&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the addon is (re)loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Shutdown&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the addon or the game is shutdown.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Unsynced Only ==&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DefaultCommand&lt;br /&gt;
|params = type, id&lt;br /&gt;
|return = number cmdID&lt;br /&gt;
|description = Used to set the default command when a unit is selected.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandNotify&lt;br /&gt;
|params = cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = bool removeCmd&lt;br /&gt;
|description = Called when a command is issued. Returning &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; deletes the command and does not send it through the network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = WorldTooltip&lt;br /&gt;
|params = ttType, data1, data2, data3&lt;br /&gt;
|return = string newTooltip&lt;br /&gt;
|description = The parameters can be &amp;lt;code&amp;gt;&amp;quot;unit&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;unitID&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;&amp;quot;feature&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;featureID&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;&amp;quot;ground&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posY&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posZ&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;selection&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnsyncedHeightMapUpdate&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the unsynced copy of the height-map is altered.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameProgress&lt;br /&gt;
|params = serverFrameNum&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called every 60 frames, calculating delta between GameFrame and GameProgress. Can give an ETA about catching up with simulation for mid-game join players.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameSetup&lt;br /&gt;
|params =  state, ready, playerStates&lt;br /&gt;
|return = bool success, bool newReady&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = SunChanged&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AddConsoleLine&lt;br /&gt;
|params = msg, priority&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when text is entered into the console (e.g. Spring.Echo).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvSkirmishAIMessage&lt;br /&gt;
|params = aiTeam, dataStr&lt;br /&gt;
|return = ???&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvFromSynced&lt;br /&gt;
|params = ...&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Receives data sent via [[Lua_System#Synced|SendToUnsynced]] callout.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Save&lt;br /&gt;
|params = zip&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a chat command &#039;/save&#039; or &#039;/savegame&#039; is received. The single argument is a userdatum representing the savegame zip file. See [[Lua_SaveLoad#Save_.28_zip_.29_-.3E_nil|Lua_SaveLoad]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = LoadProgress&lt;br /&gt;
|params = message, replaceLastLine&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Only available to LuaIntro.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GroupChanged&lt;br /&gt;
|params = groupID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is added to or removed from a control group. Currently implemented for widgets only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ConfigureLayout&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = ???&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Input ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = IsAbove&lt;br /&gt;
|params = x, y&lt;br /&gt;
|return = bool isAbove&lt;br /&gt;
|description = Called every Update. Must return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;Mouse*&amp;lt;/code&amp;gt; events and &amp;lt;code&amp;gt;GetToolTip&amp;lt;/code&amp;gt; to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GetTooltip&lt;br /&gt;
|params = x, y&lt;br /&gt;
|return = string tooltip&lt;br /&gt;
|description = Called when &amp;lt;code&amp;gt;IsAbove&amp;lt;/code&amp;gt; returns true.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyPress&lt;br /&gt;
|params = key, mods, isRepeat&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called repeatedly when a key is pressed down. If you want an action to occur only once check for &amp;lt;code&amp;gt;isRepeat == false&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;mods&amp;lt;/code&amp;gt; parameter is a table, with keys &amp;lt;code&amp;gt;alt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ctrl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shift&amp;lt;/code&amp;gt; each having a boolean value. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyRelease&lt;br /&gt;
|params = key&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the key is released.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TextInput&lt;br /&gt;
|params = utf8char&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a key press results in text input. Introduced in 97.0.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = JoystickEvent&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MousePress&lt;br /&gt;
|params = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|description = Called when a mouse button is pressed. The &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; parameter supports up to 7 buttons. Must return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;MouseRelease&amp;lt;/code&amp;gt; and other functions to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseRelease&lt;br /&gt;
|params = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|description = Called when a mouse button is released. Please note that in order to have Spring call &amp;lt;code&amp;gt;MouseRelease&amp;lt;/code&amp;gt;, you need to have a &amp;lt;code&amp;gt;MousePress&amp;lt;/code&amp;gt; call-in in the same addon that returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseWheel&lt;br /&gt;
|params = up, value&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the mouse wheel is moved. The parameters indicate the direction and amount of travel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseMove&lt;br /&gt;
|params = x, y, dx, dy, button&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the mouse is moved. The &amp;lt;code&amp;gt;dx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;dy&amp;lt;/code&amp;gt; parameters indicate the distance travelled, whereas the first two indicate the final position.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Players ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerChanged&lt;br /&gt;
|params = playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a player&#039;s status changes e.g. becoming a spectator.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerAdded&lt;br /&gt;
|params = playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a new player joins the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerRemoved&lt;br /&gt;
|params = playerID, reason&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a player is removed from the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Drawing ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ViewResize&lt;br /&gt;
|params = viewSizeX, viewSizeY&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever the window is resized.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Update&lt;br /&gt;
|params = none&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called for every draw frame. The parameter is the time since the last update. Perform calculations in here and only drawing in Draw* callins.}}&lt;br /&gt;
&lt;br /&gt;
Inside the Draw* functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawGenesis&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Doesn&#039;t render to screen! Use this callin to update textures, shaders, etc.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldPreUnit&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorld&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldShadow&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldReflection&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldRefraction&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreen&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreenEffects&lt;br /&gt;
|params = vsx, vsy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;vsx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;vsy&amp;lt;/code&amp;gt; are screen coords.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawLoadScreen&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = {{new|95.0}} Only available to LuaIntro, draws custom load screens.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawInMinimap&lt;br /&gt;
|params = sx, sy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;sx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sy&amp;lt;/code&amp;gt; are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawInMinimapBackground&lt;br /&gt;
|params = sx, sy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;sx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sy&amp;lt;/code&amp;gt; are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Custom Object Rendering ===&lt;br /&gt;
For the following calls &amp;lt;code&amp;gt;drawMode&amp;lt;/code&amp;gt; can be one of the following, &amp;lt;code&amp;gt;notDrawing = 0&amp;lt;/code&amp;gt;,	&amp;lt;code&amp;gt;normalDraw = 1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shadowDraw = 2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reflectionDraw = 3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;refractionDraw = 4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawUnit&lt;br /&gt;
|params = unitID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of units, [[Lua_UnitRendering#Lua.27s_DrawXYZ-Callin|enabled here]].	&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawFeature&lt;br /&gt;
|params = unitID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of features, [[Lua_UnitRendering#Lua.27s_DrawXYZ-Callin|enabled here]].	&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawShield&lt;br /&gt;
|params = unitID, weaponID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of [[Gamedev:WeaponDefs#Shield_(WeaponType)|shields]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawProjectile&lt;br /&gt;
|params = projectileID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of weapon (&amp;amp; other) projectiles.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Synced - Unsynced Shared ==&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GotChatMsg&lt;br /&gt;
|params = msg, player&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a player issues a UI command e.g. types &amp;lt;code&amp;gt;/foo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/luarules foo&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Game ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameID&lt;br /&gt;
|params = gameID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called once to deliver the gameID.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePaused&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the game is paused.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameOver&lt;br /&gt;
|params = winningAllyTeams&lt;br /&gt;
|return = none&lt;br /&gt;
|description = The parameter is a list of winning allyTeams, if empty the game result was undecided (like when dropping from an host).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameFrame&lt;br /&gt;
|params = frame&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called for every game simulation frame (30 per second).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePreload&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called before the 0 gameframe.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameStart&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called upon the start of the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Teams ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamChanged&lt;br /&gt;
|params = teamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamDied&lt;br /&gt;
|params = teamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a team dies (see [[Lua_SyncedCtrl#Game_End|Spring.KillTeam]]).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Units ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCreated&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, builderID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called at the moment the unit is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFinished&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called at the moment the unit is completed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFromFactory&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, factID, factDefID, userOrders&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a factory finishes construction of a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitGiven&lt;br /&gt;
|params = unitID, unitDefID, newTeam, oldTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is transferred between teams.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitTaken&lt;br /&gt;
|params = unitID, unitDefID, oldTeam, newTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is transferred between teams.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDamaged&lt;br /&gt;
|params =  unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is damaged (after &amp;lt;code&amp;gt;UnitPreDamaged&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDestroyed&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnitCollision&lt;br /&gt;
|params = colliderID, collideeID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when two units collide. Both units must be registered with [[Lua_System#Synced|Script.SetWatchUnit]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFeatureCollision&lt;br /&gt;
|params = colliderID, collideeID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit collides with a feature. The unit must be registered with [[Lua_System#Synced|Script.SetWatchUnit]] and the feature registered with [[Lua_System#Synced|Script.SetWatchFeature]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCommand&lt;br /&gt;
|params = unitID, unitDefID, teamID, cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called after when a unit accepts a command, after &amp;lt;code&amp;gt;AllowCommand&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCmdDone&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdTag, cmdParams, cmdOpts&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit completes a command.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLoaded&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is loaded by a transport.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnloaded&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is unloaded by a transport.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitExperience&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, experience, oldExperience&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit gains experience greater or equal to the minimum limit set by calling [[Lua_SyncedCtrl#Other|Spring.SetExperienceGrade]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitIdle&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is idle (empty command queue).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCloaked&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit cloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDecloaked&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit decloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoved&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoveFailed&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = StockpileChanged&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a units stockpile of weapons increases or decreases. See {{xtaglink|Gamedev:WeaponDefs|stockpile}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredLos&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit enters LOS of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftLos&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit leaves LOS of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredRadar&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit enters radar of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftRadar&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit leaves radar of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredAir&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftAir&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredWater&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftWater&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitSeismicPing&lt;br /&gt;
|params = x, y, z, strength, allyTeam, unitID, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit emits a seismic ping. See {{xtaglink|Gamedev:UnitDefs|seismicSignature}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureCreated&lt;br /&gt;
|params = featureID, allyTeamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDamaged&lt;br /&gt;
|params =  featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is damaged.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDestroyed&lt;br /&gt;
|params = featureID, allyTeamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureMoved&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Projectiles ===&lt;br /&gt;
The following Callins are only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]].&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileCreated&lt;br /&gt;
|params = proID, proOwnerID, weaponDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the projectile is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileDestroyed&lt;br /&gt;
|params = proID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the projectile is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Synced Only ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandFallback&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&lt;br /&gt;
|return = bool used, bool finished&lt;br /&gt;
|description = Called when the unit reaches an unknown command in its queue (i.e. one not handled by the engine). If no addon returns &amp;lt;code&amp;gt;used&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the command is dropped, if an addon returns &amp;lt;code&amp;gt;true, true&amp;lt;/code&amp;gt; the command is removed because it&#039;s done, with &amp;lt;code&amp;gt;true, false&amp;lt;/code&amp;gt; it&#039;s kept in the queue and &amp;lt;code&amp;gt;CommandFallback&amp;lt;/code&amp;gt; gets called again on the next slowupdate.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowCommand&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called when the command is given, before the unit&#039;s queue is altered. The return value is whether it should be let into the queue. The queue remains untouched when a command is blocked, whether it would be queued or replace the queue.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitCreation&lt;br /&gt;
|params = unitDefID, builderID, builderTeam, x, y, z, facing&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitTransfer&lt;br /&gt;
|params = unitID, unitDefID, oldTeam, newTeam, capture&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitBuildStep&lt;br /&gt;
|params = builderID, builderTeam, unitID, unitDefID, part&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a unit progresses its build percentage, the boolean return value determines whether or not the build makes progress.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowFeatureCreation&lt;br /&gt;
|params = featureDefID, teamID, x, y, z&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before feature is created, the boolean return value determines whether or not the creation is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowFeatureBuildStep&lt;br /&gt;
|params = builderID, builderTeam, featureID, featureDefID, part&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a feature progresses its build percentage, the boolean return value determines whether or not the progress change is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowResourceLevel&lt;br /&gt;
|params = teamID, res, level&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called when a team sets the sharing level of a resource, the boolean return value determines whether or not the sharing level is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowResourceTransfer&lt;br /&gt;
|params = oldTeamID, newTeamID, res, amount&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before resources are transferred between players, the boolean return value determines whether or not the transfer is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowStartPosition&lt;br /&gt;
|params =  clampedX, clampedY, clampedZ, playerID, readyState, rawX, rawY, rawZ&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = &amp;lt;code&amp;gt;clamped&amp;lt;/code&amp;gt; are the coordinates clamped into start-boxes, &amp;lt;code&amp;gt;raw&amp;lt;/code&amp;gt; is where player tried to place their marker. The &amp;lt;code&amp;gt;readyState&amp;lt;/code&amp;gt; can be any one of &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - player picked a position, &lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - player clicked ready, &lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - player pressed ready OR  the game was force-started (player did not click ready, but is now forcibly readied) or &lt;br /&gt;
* &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; - the player failed to load. &lt;br /&gt;
* {{new|95.0}} the default &#039;failed to choose&#039; start-position is the north-west point of their startbox, or &amp;lt;code&amp;gt;(0,0,0)&amp;lt;/code&amp;gt; if they do not have a startbox. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowDirectUnitControl&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, playerID&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Determines if this unit can be controlled directly in FPS view.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTargetCheck&lt;br /&gt;
|params = attackerID, attackerWeaponNum, attackerWeaponDefID&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Determines if this weapon can automatically generate targets itself. See also {{xtaglink|Gamedev:WeaponDefs|commandFire}} weaponDef tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTarget&lt;br /&gt;
|params = attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defPriority&lt;br /&gt;
|return = bool allowed, number priority&lt;br /&gt;
|description = Controls blocking of a specific target from being considered during a weapon&#039;s periodic auto-targeting sweep. The second return value controls the priority of the target (maximum of &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponInterceptTarget&lt;br /&gt;
|params = interceptorUnitID, interceptorWeaponID, targetProjectileID&lt;br /&gt;
|return = bool allowed&lt;br /&gt;
|description = Controls blocking of a specific intercept target from being considered during an {{xtaglink|Gamedev:WeaponDefs|interceptor}} weapon&#039;s periodic auto-targeting sweep. Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowBuilderHoldFire&lt;br /&gt;
|params = unitID, unitDefID, action&lt;br /&gt;
|return = bool actionAllowed&lt;br /&gt;
|description = {{new|98.0}} {{Sourcelinkhash|5a82d750b89e72024bb0bb62cf05ea257737e0ac}}   Called when a construction unit wants to &amp;quot;use his nano beams&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; is one of following:&lt;br /&gt;
* &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; Build&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.REPAIR&amp;lt;/code&amp;gt; Repair&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RECLAIM&amp;lt;/code&amp;gt; Reclaim&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RESTORE&amp;lt;/code&amp;gt; Restore&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RESURRECT&amp;lt;/code&amp;gt; Resurrect&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.CAPTURE&amp;lt;/code&amp;gt; Capture&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Explosion&lt;br /&gt;
|params = weaponDefID, px, py, pz, ownerTeamID&lt;br /&gt;
|return = bool noGfx&lt;br /&gt;
|description = Called when an explosion occurs. If it returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then no graphical effects are drawn by the engine for this explosion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TerraformComplete&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&lt;br /&gt;
|return = bool stop&lt;br /&gt;
|description = Called when pre-building terrain levelling terraforms are completed (c.f. {{xtaglink|Gamedev:UnitDefs|levelGround}}). If the return value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the current build order is terminated.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MoveCtrlNotify&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, data&lt;br /&gt;
|return = bool moveCtrlComplete&lt;br /&gt;
|description = Enable both [[Lua_MoveCtrl#Options|Spring.MoveCtrl.SetCollideStop]] and [[Lua_MoveCtrl#Options|Spring.MoveCtrl.SetTrackGround]] to enable this call-in, data was supposed to indicate the type of notification but currently never has a value other than &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (&amp;quot;unit hit the ground&amp;quot;). The return value determines whether or not the unit should remain script-controlled (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;) or return to engine controlled movement (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvLuaMsg&lt;br /&gt;
|params = msg, playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Receives messages from unsynced sent via [[Lua_UnsyncedCtrl#SendLuaMessage|Spring.SendLuaRulesMsg]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Load&lt;br /&gt;
|params = zip&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called after &amp;lt;code&amp;gt;GamePreload&amp;lt;/code&amp;gt; and before &amp;lt;code&amp;gt;GameStart&amp;lt;/code&amp;gt;. See [[Lua_SaveLoad#Load_.28_zip_.29_-.3E_nil|Lua_SaveLoad]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Damage Controllers ===&lt;br /&gt;
For the following callins, in addition to being a regular weapon, &amp;lt;code&amp;gt;weaponDefID&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - debris collision, also default of [[Lua_SyncedCtrl#Unit_Control|Spring.AddUnitDamage]]&lt;br /&gt;
* &amp;lt;code&amp;gt;-2&amp;lt;/code&amp;gt; - ground collision&lt;br /&gt;
* &amp;lt;code&amp;gt;-3&amp;lt;/code&amp;gt; - object collision&lt;br /&gt;
* &amp;lt;code&amp;gt;-4&amp;lt;/code&amp;gt; - fire damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-5&amp;lt;/code&amp;gt; - water damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; - kill damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-7&amp;lt;/code&amp;gt; - crush damage&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitPreDamaged&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = number newDamage, number impulseMult&lt;br /&gt;
|description = Called before damage is applied to the unit, allows fine control over how much damage and [http://en.wikipedia.org/wiki/Impulse_(physics) impulse] is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ShieldPreDamaged&lt;br /&gt;
|params = proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&lt;br /&gt;
|return = bool handleCollision&lt;br /&gt;
|description = Called before any engine shield-vs-projectile logic executes. If the return value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the gadget handles the collision event and the engine does not remove the projectile.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeaturePreDamaged&lt;br /&gt;
|params = featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = number newDamage, number impulseMult&lt;br /&gt;
|description = Called before damage is applied to the feature, allows fine control over how much damage and [http://en.wikipedia.org/wiki/Impulse_(physics) impulse] is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10753</id>
		<title>Lua:Callins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10753"/>
		<updated>2014-11-07T20:05:20Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Lua Callins */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Lua Callins =&lt;br /&gt;
This page is future looking to unified widget/gadget (aka &amp;quot;addon&amp;quot;) handler, which may yet be some way off, c.f. the [https://github.com/spring/spring/blob/ebb704e008f6ea645947d07be1cfcc272af0428f/doc/changelog.txt#L71 changelog].&lt;br /&gt;
&lt;br /&gt;
Some functions may differ between (synced) gadget and widgets; those are in the [[#Synced_-_Unsynced_Shared]] section. Essentially the reason is that all information should be available to synced (game logic controlling) gadgets, but restricted to unsynced gadget/widget (e.g. information about an enemy unit only detected via radar and not yet in LOS). In such cases the full (synced) param list is documented.&lt;br /&gt;
&amp;lt;a href=&amp;quot;http://imgur.com/Gr5qnAx&amp;quot;&amp;gt;&amp;lt;img src=&amp;quot;http://i.imgur.com/Gr5qnAx.png&amp;quot; title=&amp;quot;source: imgur.com&amp;quot; /&amp;gt;&amp;lt;/a&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Common ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Initialize&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the addon is (re)loaded.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Shutdown&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the addon or the game is shutdown.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Unsynced Only ==&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DefaultCommand&lt;br /&gt;
|params = type, id&lt;br /&gt;
|return = number cmdID&lt;br /&gt;
|description = Used to set the default command when a unit is selected.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandNotify&lt;br /&gt;
|params = cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = bool removeCmd&lt;br /&gt;
|description = Called when a command is issued. Returning &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; deletes the command and does not send it through the network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = WorldTooltip&lt;br /&gt;
|params = ttType, data1, data2, data3&lt;br /&gt;
|return = string newTooltip&lt;br /&gt;
|description = The parameters can be &amp;lt;code&amp;gt;&amp;quot;unit&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;unitID&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;&amp;quot;feature&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;featureID&amp;lt;/code&amp;gt;; &amp;lt;code&amp;gt;&amp;quot;ground&amp;quot;&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posX&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posY&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;posZ&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;&amp;quot;selection&amp;quot;&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnsyncedHeightMapUpdate&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the unsynced copy of the height-map is altered.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameProgress&lt;br /&gt;
|params = serverFrameNum&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called every 60 frames, calculating delta between GameFrame and GameProgress. Can give an ETA about catching up with simulation for mid-game join players.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameSetup&lt;br /&gt;
|params =  state, ready, playerStates&lt;br /&gt;
|return = bool success, bool newReady&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = SunChanged&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AddConsoleLine&lt;br /&gt;
|params = msg, priority&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when text is entered into the console (e.g. Spring.Echo).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvSkirmishAIMessage&lt;br /&gt;
|params = aiTeam, dataStr&lt;br /&gt;
|return = ???&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvFromSynced&lt;br /&gt;
|params = ...&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Receives data sent via [[Lua_System#Synced|SendToUnsynced]] callout.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Save&lt;br /&gt;
|params = zip&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a chat command &#039;/save&#039; or &#039;/savegame&#039; is received. The single argument is a userdatum representing the savegame zip file. See [[Lua_SaveLoad#Save_.28_zip_.29_-.3E_nil|Lua_SaveLoad]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = LoadProgress&lt;br /&gt;
|params = message, replaceLastLine&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Only available to LuaIntro.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GroupChanged&lt;br /&gt;
|params = groupID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is added to or removed from a control group. Currently implemented for widgets only.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ConfigureLayout&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = ???&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Input ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = IsAbove&lt;br /&gt;
|params = x, y&lt;br /&gt;
|return = bool isAbove&lt;br /&gt;
|description = Called every Update. Must return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;Mouse*&amp;lt;/code&amp;gt; events and &amp;lt;code&amp;gt;GetToolTip&amp;lt;/code&amp;gt; to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GetTooltip&lt;br /&gt;
|params = x, y&lt;br /&gt;
|return = string tooltip&lt;br /&gt;
|description = Called when &amp;lt;code&amp;gt;IsAbove&amp;lt;/code&amp;gt; returns true.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyPress&lt;br /&gt;
|params = key, mods, isRepeat&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called repeatedly when a key is pressed down. If you want an action to occur only once check for &amp;lt;code&amp;gt;isRepeat == false&amp;lt;/code&amp;gt;. The &amp;lt;code&amp;gt;mods&amp;lt;/code&amp;gt; parameter is a table, with keys &amp;lt;code&amp;gt;alt&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;ctrl&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;meta&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;shift&amp;lt;/code&amp;gt; each having a boolean value. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyRelease&lt;br /&gt;
|params = key&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the key is released.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TextInput&lt;br /&gt;
|params = utf8char&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a key press results in text input. Introduced in 97.0.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = JoystickEvent&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MousePress&lt;br /&gt;
|params = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|description = Called when a mouse button is pressed. The &amp;lt;code&amp;gt;button&amp;lt;/code&amp;gt; parameter supports up to 7 buttons. Must return &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; for &amp;lt;code&amp;gt;MouseRelease&amp;lt;/code&amp;gt; and other functions to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseRelease&lt;br /&gt;
|params = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|description = Called when a mouse button is released. Please note that in order to have Spring call &amp;lt;code&amp;gt;MouseRelease&amp;lt;/code&amp;gt;, you need to have a &amp;lt;code&amp;gt;MousePress&amp;lt;/code&amp;gt; call-in in the same addon that returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseWheel&lt;br /&gt;
|params = up, value&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the mouse wheel is moved. The parameters indicate the direction and amount of travel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseMove&lt;br /&gt;
|params = x, y, dx, dy, button&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the mouse is moved. The &amp;lt;code&amp;gt;dx&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;dy&amp;lt;/code&amp;gt; parameters indicate the distance travelled, whereas the first two indicate the final position.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Players ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerChanged&lt;br /&gt;
|params = playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a player&#039;s status changes e.g. becoming a spectator.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerAdded&lt;br /&gt;
|params = playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a new player joins the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = PlayerRemoved&lt;br /&gt;
|params = playerID, reason&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever a player is removed from the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Drawing ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ViewResize&lt;br /&gt;
|params = viewSizeX, viewSizeY&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called whenever the window is resized.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Update&lt;br /&gt;
|params = none&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called for every draw frame. The parameter is the time since the last update. Perform calculations in here and only drawing in Draw* callins.}}&lt;br /&gt;
&lt;br /&gt;
Inside the Draw* functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawGenesis&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Doesn&#039;t render to screen! Use this callin to update textures, shaders, etc.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldPreUnit&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorld&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldShadow&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldReflection&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldRefraction&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreen&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreenEffects&lt;br /&gt;
|params = vsx, vsy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;vsx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;vsy&amp;lt;/code&amp;gt; are screen coords.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawLoadScreen&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = {{new|95.0}} Only available to LuaIntro, draws custom load screens.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawInMinimap&lt;br /&gt;
|params = sx, sy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;sx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sy&amp;lt;/code&amp;gt; are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawInMinimapBackground&lt;br /&gt;
|params = sx, sy&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Where &amp;lt;code&amp;gt;sx&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;sy&amp;lt;/code&amp;gt; are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Custom Object Rendering ===&lt;br /&gt;
For the following calls &amp;lt;code&amp;gt;drawMode&amp;lt;/code&amp;gt; can be one of the following, &amp;lt;code&amp;gt;notDrawing = 0&amp;lt;/code&amp;gt;,	&amp;lt;code&amp;gt;normalDraw = 1&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;shadowDraw = 2&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;reflectionDraw = 3&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;refractionDraw = 4&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawUnit&lt;br /&gt;
|params = unitID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of units, [[Lua_UnitRendering#Lua.27s_DrawXYZ-Callin|enabled here]].	&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawFeature&lt;br /&gt;
|params = unitID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of features, [[Lua_UnitRendering#Lua.27s_DrawXYZ-Callin|enabled here]].	&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawShield&lt;br /&gt;
|params = unitID, weaponID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of [[Gamedev:WeaponDefs#Shield_(WeaponType)|shields]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawProjectile&lt;br /&gt;
|params = projectileID, drawMode&lt;br /&gt;
|return = bool suppressEngineDraw&lt;br /&gt;
|description = For custom rendering of weapon (&amp;amp; other) projectiles.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Synced - Unsynced Shared ==&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GotChatMsg&lt;br /&gt;
|params = msg, player&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a player issues a UI command e.g. types &amp;lt;code&amp;gt;/foo&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;/luarules foo&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Game ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameID&lt;br /&gt;
|params = gameID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called once to deliver the gameID.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePaused&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the game is paused.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameOver&lt;br /&gt;
|params = winningAllyTeams&lt;br /&gt;
|return = none&lt;br /&gt;
|description = The parameter is a list of winning allyTeams, if empty the game result was undecided (like when dropping from an host).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameFrame&lt;br /&gt;
|params = frame&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called for every game simulation frame (30 per second).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePreload&lt;br /&gt;
|params = &lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called before the 0 gameframe.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameStart&lt;br /&gt;
|params =&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called upon the start of the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Teams ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamChanged&lt;br /&gt;
|params = teamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamDied&lt;br /&gt;
|params = teamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a team dies (see [[Lua_SyncedCtrl#Game_End|Spring.KillTeam]]).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Units ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCreated&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, builderID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called at the moment the unit is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFinished&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called at the moment the unit is completed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFromFactory&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, factID, factDefID, userOrders&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a factory finishes construction of a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitGiven&lt;br /&gt;
|params = unitID, unitDefID, newTeam, oldTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is transferred between teams.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitTaken&lt;br /&gt;
|params = unitID, unitDefID, oldTeam, newTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is transferred between teams.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDamaged&lt;br /&gt;
|params =  unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is damaged (after &amp;lt;code&amp;gt;UnitPreDamaged&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDestroyed&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnitCollision&lt;br /&gt;
|params = colliderID, collideeID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when two units collide. Both units must be registered with [[Lua_System#Synced|Script.SetWatchUnit]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitFeatureCollision&lt;br /&gt;
|params = colliderID, collideeID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit collides with a feature. The unit must be registered with [[Lua_System#Synced|Script.SetWatchUnit]] and the feature registered with [[Lua_System#Synced|Script.SetWatchFeature]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCommand&lt;br /&gt;
|params = unitID, unitDefID, teamID, cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called after when a unit accepts a command, after &amp;lt;code&amp;gt;AllowCommand&amp;lt;/code&amp;gt; returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCmdDone&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdTag, cmdParams, cmdOpts&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit completes a command.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLoaded&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is loaded by a transport.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnloaded&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is unloaded by a transport.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitExperience&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, experience, oldExperience&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit gains experience greater or equal to the minimum limit set by calling [[Lua_SyncedCtrl#Other|Spring.SetExperienceGrade]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitIdle&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit is idle (empty command queue).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCloaked&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit cloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDecloaked&lt;br /&gt;
|params = unitID, unitDefID, unitTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit decloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoved&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoveFailed&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = StockpileChanged&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a units stockpile of weapons increases or decreases. See {{xtaglink|Gamedev:WeaponDefs|stockpile}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredLos&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit enters LOS of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftLos&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit leaves LOS of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredRadar&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit enters radar of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftRadar&lt;br /&gt;
|params = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit leaves radar of an allyteam.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredAir&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftAir&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredWater&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftWater&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitSeismicPing&lt;br /&gt;
|params = x, y, z, strength, allyTeam, unitID, unitDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a unit emits a seismic ping. See {{xtaglink|Gamedev:UnitDefs|seismicSignature}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Features ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureCreated&lt;br /&gt;
|params = featureID, allyTeamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDamaged&lt;br /&gt;
|params =  featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is damaged.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDestroyed&lt;br /&gt;
|params = featureID, allyTeamID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when a feature is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureMoved&lt;br /&gt;
|params = ???&lt;br /&gt;
|return = none&lt;br /&gt;
|description = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Projectiles ===&lt;br /&gt;
The following Callins are only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]].&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileCreated&lt;br /&gt;
|params = proID, proOwnerID, weaponDefID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the projectile is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileDestroyed&lt;br /&gt;
|params = proID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called when the projectile is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Synced Only ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandFallback&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&lt;br /&gt;
|return = bool used, bool finished&lt;br /&gt;
|description = Called when the unit reaches an unknown command in its queue (i.e. one not handled by the engine). If no addon returns &amp;lt;code&amp;gt;used&amp;lt;/code&amp;gt; as &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the command is dropped, if an addon returns &amp;lt;code&amp;gt;true, true&amp;lt;/code&amp;gt; the command is removed because it&#039;s done, with &amp;lt;code&amp;gt;true, false&amp;lt;/code&amp;gt; it&#039;s kept in the queue and &amp;lt;code&amp;gt;CommandFallback&amp;lt;/code&amp;gt; gets called again on the next slowupdate.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowCommand&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called when the command is given, before the unit&#039;s queue is altered. The return value is whether it should be let into the queue. The queue remains untouched when a command is blocked, whether it would be queued or replace the queue.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitCreation&lt;br /&gt;
|params = unitDefID, builderID, builderTeam, x, y, z, facing&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before unit is created, the boolean return value determines whether or not the creation is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitTransfer&lt;br /&gt;
|params = unitID, unitDefID, oldTeam, newTeam, capture&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a unit is transferred to a different team, the boolean return value determines whether or not the transfer is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowUnitBuildStep&lt;br /&gt;
|params = builderID, builderTeam, unitID, unitDefID, part&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a unit progresses its build percentage, the boolean return value determines whether or not the build makes progress.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowFeatureCreation&lt;br /&gt;
|params = featureDefID, teamID, x, y, z&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before feature is created, the boolean return value determines whether or not the creation is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowFeatureBuildStep&lt;br /&gt;
|params = builderID, builderTeam, featureID, featureDefID, part&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before a feature progresses its build percentage, the boolean return value determines whether or not the progress change is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowResourceLevel&lt;br /&gt;
|params = teamID, res, level&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called when a team sets the sharing level of a resource, the boolean return value determines whether or not the sharing level is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowResourceTransfer&lt;br /&gt;
|params = oldTeamID, newTeamID, res, amount&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Called just before resources are transferred between players, the boolean return value determines whether or not the transfer is permitted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowStartPosition&lt;br /&gt;
|params =  clampedX, clampedY, clampedZ, playerID, readyState, rawX, rawY, rawZ&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = &amp;lt;code&amp;gt;clamped&amp;lt;/code&amp;gt; are the coordinates clamped into start-boxes, &amp;lt;code&amp;gt;raw&amp;lt;/code&amp;gt; is where player tried to place their marker. The &amp;lt;code&amp;gt;readyState&amp;lt;/code&amp;gt; can be any one of &lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - player picked a position, &lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - player clicked ready, &lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - player pressed ready OR  the game was force-started (player did not click ready, but is now forcibly readied) or &lt;br /&gt;
* &amp;lt;code&amp;gt;3&amp;lt;/code&amp;gt; - the player failed to load. &lt;br /&gt;
* {{new|95.0}} the default &#039;failed to choose&#039; start-position is the north-west point of their startbox, or &amp;lt;code&amp;gt;(0,0,0)&amp;lt;/code&amp;gt; if they do not have a startbox. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowDirectUnitControl&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, playerID&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Determines if this unit can be controlled directly in FPS view.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTargetCheck&lt;br /&gt;
|params = attackerID, attackerWeaponNum, attackerWeaponDefID&lt;br /&gt;
|return = bool allow&lt;br /&gt;
|description = Determines if this weapon can automatically generate targets itself. See also {{xtaglink|Gamedev:WeaponDefs|commandFire}} weaponDef tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTarget&lt;br /&gt;
|params = attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defPriority&lt;br /&gt;
|return = bool allowed, number priority&lt;br /&gt;
|description = Controls blocking of a specific target from being considered during a weapon&#039;s periodic auto-targeting sweep. The second return value controls the priority of the target (maximum of &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponInterceptTarget&lt;br /&gt;
|params = interceptorUnitID, interceptorWeaponID, targetProjectileID&lt;br /&gt;
|return = bool allowed&lt;br /&gt;
|description = Controls blocking of a specific intercept target from being considered during an {{xtaglink|Gamedev:WeaponDefs|interceptor}} weapon&#039;s periodic auto-targeting sweep. Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowBuilderHoldFire&lt;br /&gt;
|params = unitID, unitDefID, action&lt;br /&gt;
|return = bool actionAllowed&lt;br /&gt;
|description = {{new|98.0}} {{Sourcelinkhash|5a82d750b89e72024bb0bb62cf05ea257737e0ac}}   Called when a construction unit wants to &amp;quot;use his nano beams&amp;quot;.&amp;lt;br&amp;gt;&amp;lt;code&amp;gt;action&amp;lt;/code&amp;gt; is one of following:&lt;br /&gt;
* &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; Build&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.REPAIR&amp;lt;/code&amp;gt; Repair&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RECLAIM&amp;lt;/code&amp;gt; Reclaim&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RESTORE&amp;lt;/code&amp;gt; Restore&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.RESURRECT&amp;lt;/code&amp;gt; Resurrect&lt;br /&gt;
* &amp;lt;code&amp;gt;CMD.CAPTURE&amp;lt;/code&amp;gt; Capture&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Explosion&lt;br /&gt;
|params = weaponDefID, px, py, pz, ownerTeamID&lt;br /&gt;
|return = bool noGfx&lt;br /&gt;
|description = Called when an explosion occurs. If it returns &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; then no graphical effects are drawn by the engine for this explosion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TerraformComplete&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&lt;br /&gt;
|return = bool stop&lt;br /&gt;
|description = Called when pre-building terrain levelling terraforms are completed (c.f. {{xtaglink|Gamedev:UnitDefs|levelGround}}). If the return value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the current build order is terminated.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MoveCtrlNotify&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, data&lt;br /&gt;
|return = bool moveCtrlComplete&lt;br /&gt;
|description = Enable both [[Lua_MoveCtrl#Options|Spring.MoveCtrl.SetCollideStop]] and [[Lua_MoveCtrl#Options|Spring.MoveCtrl.SetTrackGround]] to enable this call-in, data was supposed to indicate the type of notification but currently never has a value other than &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; (&amp;quot;unit hit the ground&amp;quot;). The return value determines whether or not the unit should remain script-controlled (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;) or return to engine controlled movement (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvLuaMsg&lt;br /&gt;
|params = msg, playerID&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Receives messages from unsynced sent via [[Lua_UnsyncedCtrl#SendLuaMessage|Spring.SendLuaRulesMsg]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Load&lt;br /&gt;
|params = zip&lt;br /&gt;
|return = none&lt;br /&gt;
|description = Called after &amp;lt;code&amp;gt;GamePreload&amp;lt;/code&amp;gt; and before &amp;lt;code&amp;gt;GameStart&amp;lt;/code&amp;gt;. See [[Lua_SaveLoad#Load_.28_zip_.29_-.3E_nil|Lua_SaveLoad]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Damage Controllers ===&lt;br /&gt;
For the following callins, in addition to being a regular weapon, &amp;lt;code&amp;gt;weaponDefID&amp;lt;/code&amp;gt; may be one of the following:&lt;br /&gt;
* &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - debris collision, also default of [[Lua_SyncedCtrl#Unit_Control|Spring.AddUnitDamage]]&lt;br /&gt;
* &amp;lt;code&amp;gt;-2&amp;lt;/code&amp;gt; - ground collision&lt;br /&gt;
* &amp;lt;code&amp;gt;-3&amp;lt;/code&amp;gt; - object collision&lt;br /&gt;
* &amp;lt;code&amp;gt;-4&amp;lt;/code&amp;gt; - fire damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-5&amp;lt;/code&amp;gt; - water damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-6&amp;lt;/code&amp;gt; - kill damage&lt;br /&gt;
* &amp;lt;code&amp;gt;-7&amp;lt;/code&amp;gt; - crush damage&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitPreDamaged&lt;br /&gt;
|params = unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = number newDamage, number impulseMult&lt;br /&gt;
|description = Called before damage is applied to the unit, allows fine control over how much damage and [http://en.wikipedia.org/wiki/Impulse_(physics) impulse] is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ShieldPreDamaged&lt;br /&gt;
|params = proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&lt;br /&gt;
|return = bool handleCollision&lt;br /&gt;
|description = Called before any engine shield-vs-projectile logic executes. If the return value is &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the gadget handles the collision event and the engine does not remove the projectile.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeaturePreDamaged&lt;br /&gt;
|params = featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = number newDamage, number impulseMult&lt;br /&gt;
|description = Called before damage is applied to the feature, allows fine control over how much damage and [http://en.wikipedia.org/wiki/Impulse_(physics) impulse] is applied.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_SyncedRead&amp;diff=12020</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=12020"/>
		<updated>2014-11-06T17:33:36Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* CommandQueues */&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;A of 98.0 moved to [[Lua_UnsyncedRead]] due to desyncs&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.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;airLos, radar, sonar, seismic, radarJammer &amp;amp; sonarJammer&amp;lt;/font&amp;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.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&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.GetUnitPieceDirection&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number piece ) -&amp;gt; number dirx, number diry, number dirz&lt;br /&gt;
&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;Consider this broken. It returns reverse direction in piece space (i.e. vertex(0)-vertex(1)) for pieces with &amp;gt;= 2 vertices and (1,1,1) for pieces with &amp;lt; 2 vertices)&amp;lt;/font&amp;gt;&lt;br /&gt;
&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;
&#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, more information can be obtained by IM me)&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; nil | 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; nil | 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; nil | featureTable = { [1] = number featureID, etc... }&lt;br /&gt;
&#039;&#039;&#039;Spring.GetAllFeatures&#039;&#039;&#039;&lt;br /&gt;
  ( ) -&amp;gt; nil | { [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 ) -&amp;gt; number x, number y, number z&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.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;
&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.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;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:PublicRepos&amp;diff=8347</id>
		<title>Gamedev:PublicRepos</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:PublicRepos&amp;diff=8347"/>
		<updated>2014-10-02T17:04:16Z</updated>

		<summary type="html">&lt;p&gt;Jools: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==What Is This?==&lt;br /&gt;
This is a small collection of publicly known and readable code repositories for established Spring games. The intention being to provide a wealth of examples to all game developers from noob to pro.&lt;br /&gt;
&lt;br /&gt;
== Known Repos ==&lt;br /&gt;
[https://code.google.com/p/air-raid-spring/ Air Raid]&lt;br /&gt;
&lt;br /&gt;
[http://imolarpg.dyndns.org/trac/balatest/browser/trunk/ Balanced Annihilation]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/basically-ota/ BOTA]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/conflictterra/source/browse/#svn%2Fgames%2FCT Conflict Terra]&lt;br /&gt;
&lt;br /&gt;
[http://www.petro.darkstars.co.uk/damned/ Damned]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/evolutionrts/source/browse/#svn%2Ftrunk%2Fevolutiondev.sdd Evolution RTS]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/imperialwinter/swiw.sdd Imperial Winter]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/journeywar/ Journeywar]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/jk3064?tab=repositories jK]&lt;br /&gt;
* [[Chili]]&lt;br /&gt;
* [[LUPS]]&lt;br /&gt;
* Custom-Unit-Shader-Framework&lt;br /&gt;
* [[Mapdev:Main#Blueprint | Map-Blueprint]]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/David-Becker/mods KDR_11k] &lt;br /&gt;
* Cuberors&#039; Finest&lt;br /&gt;
* CvC&lt;br /&gt;
* Doserz&lt;br /&gt;
* Fibre&lt;br /&gt;
* GINTA&lt;br /&gt;
* Gun Wings Test&lt;br /&gt;
* Light Side of Spring&lt;br /&gt;
* MicroModules&lt;br /&gt;
* Pong&lt;br /&gt;
&lt;br /&gt;
[https://sourceforge.net/p/mwspring/code/ MechCommander: Legacy]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring1944/spring1944 Spring: 1944]&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/springtanks/source/browse/#svn%2Ftrunk Spring Tanks]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/#svn%2Ftrunk%2FSpringTutorialGame.sdd Spring Tutorial Game]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/KingRaptor/THIS THIS]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/xta-springrts/ XTA]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/zero-k/source/browse/trunk#trunk%2Fmods%2Fzk Zero-K]&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Dev]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8780</id>
		<title>Gamedev:WeaponDefs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8780"/>
		<updated>2014-04-03T08:47:06Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Cannon */&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;
WeaponDef files are .lua files stored in the &amp;lt;code&amp;gt;Weapons/&amp;lt;/code&amp;gt; directory of a Spring Game. Alternatively they can be integrated into [[Gamedev:UnitDefs|UnitDefs]].&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
WeaponDef files have one purpose; to define the properties of weapons. They are the main description file for what attributes your weapon 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/Weapons/WeaponDef.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
Tags may be one of the following data types:&lt;br /&gt;
* &amp;lt;code&amp;gt;int&amp;lt;/code&amp;gt; - An integer number&lt;br /&gt;
* &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; - A number with decimals.&lt;br /&gt;
* &amp;lt;code&amp;gt;bool&amp;lt;/code&amp;gt; - A value which can be &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; or &amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;.&lt;br /&gt;
* &amp;lt;code&amp;gt;string&amp;lt;/code&amp;gt; - Text, or more precisely a string of alphanumeric characters.&lt;br /&gt;
* &amp;lt;code&amp;gt;float[3]&amp;lt;/code&amp;gt; - A vector, with three &amp;lt;code&amp;gt;float&amp;lt;/code&amp;gt; components, representing x, y and z axes (y is &#039;up&#039;).&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 WeaponDef table the internal &amp;lt;code&amp;gt;weaponName&amp;lt;/code&amp;gt; desired for the weapon.&lt;br /&gt;
&lt;br /&gt;
===Common===&lt;br /&gt;
The following tags are common to all or at least a majority of &#039;&#039;&#039;WeaponTypes&#039;&#039;&#039;, depending on the tag.&lt;br /&gt;
&lt;br /&gt;
====General====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = weaponType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;Cannon&amp;quot;&lt;br /&gt;
|description = Spring has 14 &#039;&#039;&#039;WeaponTypes&#039;&#039;&#039; which provide game developers with basic behaviours which they can customise to an extent with the &#039;&#039;&#039;WeaponDef&#039;&#039;&#039; tags. Some tags are specific to certain &#039;&#039;&#039;WeaponTypes&#039;&#039;&#039; and not implemented for others, [https://docs.google.com/spreadsheet/ccc?key=0Am5BbZxm93S9dEZXc1Q4dXR4TFRYTFM4NlR4OFJFdWc#gid=0 this two-way table] indicates which tags work for which types.}} The possible values are:&lt;br /&gt;
* [[#AircraftBomb|AircraftBomb]]&lt;br /&gt;
* [[#BeamLaser|BeamLaser]]&lt;br /&gt;
* [[#Cannon|Cannon]]&lt;br /&gt;
* [[#DGun|Dgun]]&lt;br /&gt;
* [[#EmgCannon|EmgCannon]]&lt;br /&gt;
* [[#Flame|Flame]]&lt;br /&gt;
* [[#LaserCannon|LaserCannon]]&lt;br /&gt;
* [[#LightningCannon|LightningCanon]]&lt;br /&gt;
* [[#Melee|Melee]]&lt;br /&gt;
* [[#MissileLauncher|MissileLauncher]]&lt;br /&gt;
* [[#Rifle|Rifle]]&lt;br /&gt;
* [[#Shield (WeaponType)|Shield]]&lt;br /&gt;
* [[#StarburstLauncher|StarburstLauncher]]&lt;br /&gt;
* [[#TorpedoLauncher|TorpedoLauncher]]&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = name&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;Weapon&amp;quot;&lt;br /&gt;
|description = The descriptive name of the weapon as listed in FPS mode.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = turret&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the unit aim within an arc (up-to and including full 360Â° turret traverse) or always aim along the owner&#039;s heading?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noSelfDamage&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the weapon&#039;s explosion damage the unit which fires it? Useful for preventing bombers with high-yield weapons destroying themselves.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = impactOnly&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon only deal damage through direct hits and not &#039;splash&#039; damage through {{taglink|areaOfEffect}}?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noExplode&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon explode on impact with a target or continue through? Note that these weapons will do damage every single frame they are inside the [[Gamedev:CollisionVolumes|collision volume]] of an object, underground or under water, massively multiplying their damage.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = burnblow&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon explode when it reaches its maximum range or continue on its path? The name is an [[OTAism]].}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = range&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 10.0&lt;br /&gt;
|description = The maximum range in [[elmo]]s that the weapon can fire at.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = weaponVelocity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The velocity in [[elmo]]s per second of the weapon projectile.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reloadTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The time in seconds between shots fired.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metalPerShot&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Metal used per shot. If the specified amount is not available, the weapon cannot be fired. Can also be used to specify how much a {{taglink|stockpile}} weapon will cost to build.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energyPerShot&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Energy used per shot. If the specified amount is not available, the weapon cannot be fired. Can also be used to specify how much a {{taglink|stockpile}} weapon will cost to build.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = myGravity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Overrides the map gravity for ballistic weapons. The default of &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; disables the tag in favour of map gravity.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireStarter&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The percentage chance (&amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; to &amp;lt;code&amp;gt;100.0&amp;lt;/code&amp;gt;) of the weapon setting fire to static map features on impact.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cameraShake&lt;br /&gt;
|type = float&lt;br /&gt;
|default = damage (0.0 for paralyzers)&lt;br /&gt;
|description = Passed to the [[LuaCallinReturn#Game_Events:|ShockFront() callin]] as the first argument. Intended as a means to make the camera shake if in range of detonation.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = stockpile&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does each round of the weapon have to be built and stockpiled by the player? Will only correctly function for the first of each stockpiled weapons a unit has.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = stockpileTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = reloadTime&lt;br /&gt;
|description = The time in seconds taken to stockpile one round of the weapon.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = interceptedByShieldType&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0 (See description)&lt;br /&gt;
|description = [http://en.wikipedia.org/wiki/Mask_(computing) Bitmask] representing the types of shields that can intercept this weapon. Each digit of binary that is set to one means that a shield with the corresponding digit in its {{taglink|interceptType}} will intercept this weapon. The defaults are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - [[#Cannon]] and [[#EmgCannon]]&lt;br /&gt;
* &amp;lt;code&amp;gt;2&amp;lt;/code&amp;gt; - [[#LaserCannon]] and [[#BeamLaser]]&lt;br /&gt;
* &amp;lt;code&amp;gt;4&amp;lt;/code&amp;gt; - [[#MissileLauncher]] and [[#StarburstLauncher]]&lt;br /&gt;
* &amp;lt;code&amp;gt;8&amp;lt;/code&amp;gt; - [[#AircraftBomb]]&lt;br /&gt;
* &amp;lt;code&amp;gt;16&amp;lt;/code&amp;gt; - [[#Flame]]&lt;br /&gt;
* &amp;lt;code&amp;gt;32&amp;lt;/code&amp;gt; - [[#TorpedoLauncher]]&lt;br /&gt;
* &amp;lt;code&amp;gt;64&amp;lt;/code&amp;gt; - [[#LightningCannon]]&lt;br /&gt;
* &amp;lt;code&amp;gt;128&amp;lt;/code&amp;gt; - [[#Rifle]]&lt;br /&gt;
* &amp;lt;code&amp;gt;256&amp;lt;/code&amp;gt; - [[#Melee]]&lt;br /&gt;
(See [[Shield Interception Tag Use]]).}}&lt;br /&gt;
&lt;br /&gt;
====Collision &amp;amp; Avoidance====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = avoidGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Should the weapon avoid firing if terrain blocks the line of fire?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = avoidFriendly&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Should the weapon avoid firing if a friendly unit is in the line of fire?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = avoidFeature&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Should the weapon avoid firing if a static map feature is in the line of fire?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = avoidNeutral&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Should the weapon avoid firing if a neutral unit is in the line of fire?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collideEnemy&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the weapon projectile collide with enemy units or pass through?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collideFriendly&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the weapon projectile collide with friendly units or pass through?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collideFeature&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the weapon projectile collide with static map features or pass through?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collideNeutral&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the weapon projectile collide with neutral units or pass through?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collideGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does the weapon projectile collide with terrain or pass through?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = collisionSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.05 (0.5 for [[#Flame]] and [[#LaserCannon]], 10.0 for [[#Dgun]])&lt;br /&gt;
|description = The radius used in collision calculations. For non-instant-hit weapons which do not use a 3D {{taglink|model}}.}}&lt;br /&gt;
&lt;br /&gt;
====Targeting &amp;amp; Accuracy====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = commandFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Determines if the weapon will automatically fire on enemy units in range or only when manually ordered to attack.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = canAttackGround&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Determines if the weapon can be force-fired on ground positions or only fire on targeted units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = waterWeapon&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Determines if the weapon can pass through water and target underwater units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fireSubmersed&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = waterWeapon&lt;br /&gt;
|description = Determines if the weapon can fire whilst underwater.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = targetBorder&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0 (1.0 for [[#Melee]])&lt;br /&gt;
|description = Controls whether the weapon aims for the centre or the edge of its target&#039;s [[Gamedev:CollisionVolumes|collision volume]]. Clamped between &amp;lt;code&amp;gt;-1.0&amp;lt;/code&amp;gt; - target the far border, and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; - target the near border.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cylinderTargeting&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0 (1.0 for [[#Melee]])&lt;br /&gt;
|description = Controls whether the weapon range is calculated in a sphere or a cylinder. The height of the cylinder is determined by the value of this tag multiplied by the {{taglink|range}}. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;128.0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tolerance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 3000.0&lt;br /&gt;
|description = The amount to which the weapon&#039;s &amp;quot;real&amp;quot; aim can be off while the weapon will still be able to fire accurately at the target. For {{taglink|turret|false}} or {{taglink|fixedlauncher|true}} weapons this determines in what arc the unit will fire.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = targetMoveError&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The degree to which a weapon&#039;s aiming will fail to keep up with its target&#039;s movement. If set very low or not set at all, a weapon will lead its target and almost always hit.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = leadLimit&lt;br /&gt;
|type = float&lt;br /&gt;
|default = -1.0&lt;br /&gt;
|description = Limits the maximum distance a unit will lead a target. The default of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; allows an infinite distance.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = leadBonus&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Controls how experience boosts the weapon&#039;s target leading. Is multiplied with the unit&#039;s experience and added to the {{taglink|leadLimit}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = predictBoost&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0 (0.5 for {{taglink|burnblow|true}} weapons)&lt;br /&gt;
|description = Controls how well the weapon predicts unit speeds. Works in a similar way to  {{taglink|targetMoveError}} except that it is 1-dimensional. This tag spreads the shots in a line based on the direction of the target whereas {{taglink|targetMoveError}} spreads the shots all around based on the movement.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heightMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.2 (0.8 for [[#Cannon]], 1.0 for [[#BeamLaser]] and [[#LightningCannon]])&lt;br /&gt;
|description = Changes the spherical weapon range into an ellipsoid. Values above &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; mean the weapon cannot target as high as it can far, values below &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; mean it can target higher than it can far. For example &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt; would allow the weapon to target twice as high as far.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = proximityPriority&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Acts as a multiplier for the distance to the target in the priority calculation. Note that negative values make weapons prefer distant targets.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = accuracy&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How accurate the weapon is. Lower values are more accurate. Accuracy is relative to the distance to the target; for instance, if the target is very close, even a very high value will probably still hit. If a target is very far away, even a very low value will likely cause the weapon to miss.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = movingAccuracy&lt;br /&gt;
|type = float&lt;br /&gt;
|default = accuracy&lt;br /&gt;
|description = A weapon&#039;s {{taglink|accuracy}} whilst the owning unit is moving.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sprayAngle&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How wide the the angle of a burst from a [[#Bursts|burst weapon]] can be. Very similar to {{taglink|accuracy}}, except that this tag affects each projectile in a burst, whilst the former does not.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ownerExpAccWeight&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0 (See description)&lt;br /&gt;
|description = A multiplier to {{taglink|accuracy}} and {{taglink|sprayAngle}} that reduces inaccuracy as a units experience increases. Defaults are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;0.9&amp;lt;/code&amp;gt; - [[#Cannon]], [[#Rifle]]&lt;br /&gt;
* &amp;lt;code&amp;gt;0.7&amp;lt;/code&amp;gt; - [[#LaserCannon]], [[#BeamLaser]], [[#StarburstLauncher]]&lt;br /&gt;
* &amp;lt;code&amp;gt;0.5&amp;lt;/code&amp;gt; - [[#MissileLauncher]], [[#LightningCannon]], [[#EmgCannon]], [[#DGun]]&lt;br /&gt;
* &amp;lt;code&amp;gt;0.2&amp;lt;/code&amp;gt; - [[#Flame]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = targetable&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|special = {{new|92.0}} Previously only for [[#StarburstLauncher]]&lt;br /&gt;
|description = [http://en.wikipedia.org/wiki/Mask_(computing) Bitmask] representing the types of weapon that can intercept this weapon. Each digit of binary that is set to one means that a weapon with the corresponding digit in its {{taglink|interceptor}} tag will intercept this weapon. Instant-hitting weapons such as [[#BeamLaser]], [[#LightningCannon]] and [[#Rifle]] cannot be targeted.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = interceptor&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|special = {{new|92.0}} Previously only for [[#StarburstLauncher]]&lt;br /&gt;
|description = [http://en.wikipedia.org/wiki/Mask_(computing) Bitmask] representing the types of weapons that this weapon can intercept. Each digit of binary that is set to one means that a weapon with the corresponding digit in its {{taglink|targetable}} tag will be intercepted by this weapon.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = interceptSolo&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|special = {{new|92.0}} &lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; no other interceptors may target the same projectile.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = coverage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|special = {{new|92.0}} Previously only for [[#StarburstLauncher]]&lt;br /&gt;
|description = The radius in [[elmo]]s within which an {{taglink|interceptor}} weapon will fire on {{taglink|targetable}} weapons.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Bouncing====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = waterBounce&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon bounce on water impacts?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = groundBounce&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon bounce on ground impacts?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceSlip&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The decimal-percentage amount of horizontal velocity a projectile keeps when it bounces.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceRebound&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = The decimal-percentage amount of vertical velocity a projectile keeps when it bounces.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = numBounce&lt;br /&gt;
|type = int&lt;br /&gt;
|default = -1&lt;br /&gt;
|description = The number of times the weapon will bounce on impact before exploding. The default value of &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; allows infinite bounces (at least until velocity reaches 0).}}&lt;br /&gt;
&lt;br /&gt;
====Area Of Effect, Impulse &amp;amp; Cratering====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = areaOfEffect&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 8.0 * 0.5&lt;br /&gt;
|description = The &#039;&#039;diameter&#039;&#039; in [[elmo]]s in which the weapons explosion will cause damage.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = craterAreaOfEffect&lt;br /&gt;
|type = float&lt;br /&gt;
|default = areaOfEffect * 0.5&lt;br /&gt;
|description = The &#039;&#039;radius&#039;&#039; in [[elmo]]s in which the weapons explosion will cause terrain cratering.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = edgeEffectiveness&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Determines what percent of a weapon&#039;s maximum damage value will be applied to units within the weapon&#039;s {{taglink|areaOfEffect}}. Falls off from the epicentre according to the formula &amp;lt;code&amp;gt;damageApplied = damage * [(areaOfEffect - distToUnit) / (areaOfEffect - (distToUnit * edgeEffectiveness))]&amp;lt;/code&amp;gt;, a graph of the function for various values is available [[Media:EdgeEffectiveness.png|here]].}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = See description&lt;br /&gt;
|description = The speed at which the weapon&#039;s explosion propagates from the epicentre. The default is calculated by this complex formula: &amp;lt;code&amp;gt;defExpSpeed = {8.0 + [max(30.0, default_damage / 20.0) * 2.5]} / {9.0f + [sqrt(max(30.0, default_damage / 20.0f)) * 0.7]} * 0.5&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = impulseFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = A multiplier to the impulse given to units within the explosion {{taglink|areaOfEffect}}, which is otherwise equal to the damage dealt after {{taglink|edgeEffectiveness}} is taken into account. For [[#Melee]] weapons this is instead multiplied by the owning unit&#039;s mass (See [[Gamedev:UnitDefs#Tag:mass|Gamedev:UnitDefs]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = impulseBoost&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = A constant amount added to the weapon&#039;s impulse, regardless of distance from the epicentre or the damage potential of the explosion, prior to the application of {{taglink|impulseFactor}}}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = craterMult&lt;br /&gt;
|type = float&lt;br /&gt;
|default = impulseFactor&lt;br /&gt;
|description = A multiplier to depth of terrain crater the weapon&#039;s explosion will create, which is otherwise based on the damage potential.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = craterBoost&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = A constant amount, added to the weapon&#039;s cratering depth before the application of {{taglink|craterMult}}.}}&lt;br /&gt;
&lt;br /&gt;
====Bursts====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = burst&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|special = lua: salvoSize&lt;br /&gt;
|description = How many shots to fire per burst.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = burstRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|special = lua: salvoDelay&lt;br /&gt;
|description = The time in seconds between shots in a burst. Note that {{taglink|reloadTime}} starts to count down from the &#039;&#039;first&#039;&#039; round fired, not the last so if &amp;lt;code&amp;gt;reloadTime &amp;lt; burst * burstRate&amp;lt;/code&amp;gt; the weapon will fire continuously.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = projectiles&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How many projectiles released per shot (shotgun style). e.g. a weapon with {{taglink|burst|5}}, {{taglink|burstRate|0.5}} and {{taglink|projectiles|2}} will shoot 5 lots of 2 for 10 projectiles total, with gaps of 0.5 seconds, before waiting for {{taglink|reloadTime}}. Best used in conjunction with {{taglink|sprayAngle}} or changing the firing piece using [[Animation-LuaCallins#Weapons|ShotX]] as otherwise they&#039;ll all be clumped in one shot.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Paralyzing====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = paralyzer&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the weapon a paralyzer? If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the weapon only stuns enemy units and does not cause damage in the form of lost hit-points.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = paralyzeTime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 10&lt;br /&gt;
|description = Determines the maximum length of time in seconds that the target will be paralyzed. The timer is restarted every time the target is hit by the weapon. Cannot be less than &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Dynamic Damage====&lt;br /&gt;
The following set of tags allow for a weapon&#039;s damage potential to vary with the distance to its target.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dynDamageExp&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Exponent of the range-dependent damage formula, the default of &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; disables dynamic damage, &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; means linear scaling, &amp;lt;code&amp;gt;2.0&amp;lt;/code&amp;gt; quadratic and so on.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dynDamageMin&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum floor value that range-dependent damage can drop to.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dynDamageRange&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = If set to non-zero values the weapon will use this value in the range-dependant damage formula instead of the actual {{taglink|range}}. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dynDamageInverted&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; the damage curve is inverted i.e. the weapon does more damage at greater ranges as opposed to less.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Sounds====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundTrigger&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false (true for [[#Melee]], [[#Rifle]] and non-beamBurst [[#BeamLaser]])&lt;br /&gt;
|description = Does the weapon play {{taglink|soundStart}} for every round in a burst (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or only once for each salvo (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;)?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundStart&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitDry&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with solid ground. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitWet&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with water. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
====Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cegTag&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name, without prefixes, of a [[CEG]] to be emitted by the projectile each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = intensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9 (0.2 for [[#Cannon]])&lt;br /&gt;
|description = Alpha transparency for non-3D model projectiles. Lower values are more opaque, but &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will cause the projectile to disappear entirely.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = model&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of a 3D model to use when rendering the projectile. Note that only the root piece of a projectile model is rendered. Currently only for [[#Cannon]], [[#LaserCannon]], [[#MissileLauncher]], [[#StarburstLauncher]] and [[#TorpedoLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionScar&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon&#039;s explosion leave a scar decal on the ground? For all types except [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisible&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; the weapon is always rendered regardless of whether or not it is in LOS range of a player&#039;s units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.0, 0.0} (See Description)&lt;br /&gt;
|description = The primary colour for sprite rendering weapons. Additional defaults are as follows:&lt;br /&gt;
* [[#Cannon]] - &amp;lt;code&amp;gt;{1.0, 0.5, 0.0}&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[#EmgCannon]] - &amp;lt;code&amp;gt;{0.9, 0.9, 0.2}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn as the weapon&#039;s explosion. Does not currently work for [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceExplosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = For weapons which can use {{taglink|groundBounce|true}}, the name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn when weapon the bounces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture1&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The projectile texture for [[#AircraftBomb]], [[#Cannon]], [[#EmgCannon]], [[#Flame]]; beam texture for [[#LaserCannon]], [[#BeamLaser]], [[#LightningCannon]]; flare texture for [[#MissileLauncher]], [[#StarburstLauncher]] and dome texture for the [[#Shield]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture2&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The end-of-beam texture for [[#LaserCannon]], [[#BeamLaser]] and {{taglink|smoketrail}} texture for [[#MissileLauncher]], [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture3&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]], or muzzle texture if {{taglink|largeBeamLaser|true}}. Also used as the flame texture for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture4&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]] with {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===AircraftBomb===&lt;br /&gt;
Drops a ballistic projectile at the same movement vector as the unit itself. Intended only for aircraft. Visually drawn as a billboarded sprite as used by the [[#Cannon]], but more commonly used with a 3D model.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====AircraftBomb Visuals====&lt;br /&gt;
&lt;br /&gt;
When not using a {{taglink|model}}, the AircraftBomb is the same as [[#Cannon Visuals]].&lt;br /&gt;
&lt;br /&gt;
===BeamLaser===&lt;br /&gt;
An instant-hit weapon which spawns a beam and does a portion of its total damage each frame. Cannot be [[Animation-LuaCallouts#Effects|script emitted]] if it has a {{taglink|beamTime}} longer than one frame. Visually drawn as a [http://en.wikipedia.org/wiki/Star_Trek Star Trek] Phaser-style laser weapon. The {{taglink|largeBeamLaser}} tag allows changing the visual effect of the laser, such as using a tileable, scrolling texture without changing the behaviour.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minIntensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum percentage the weapon&#039;s damage can fall-off to over its range. Setting to &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will disable fall off entirely. Unrelated to the visual-only {{taglink|intensity}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How long in seconds to fire the laser before waiting for {{taglink|reloadTime}} to start. Damage is distributed over the duration of the {{taglink|beamTime}}, and the weapon will aim to hit the target when the beam is in the middle of its {{taglink|beamTime}} (i.e. using prediction).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamBurst&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser fire a burst of beams that are all aimed towards the target (instead of aimed with the piece). A [[#BeamLaser]] can do its full damage with every shot if {{taglink|beamBurst}} is enabled. Disables {{taglink|beamTime}} in favour of the [[#Bursts|burst tags]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sweepFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser continue firing while it aims for a new target, &#039;sweeping&#039; across the terrain. Reimplemented in 95.0, still has no script interaction so use with care. Respects {{taglink|reloadTime}} constraint but not much else.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====BeamLaser Visuals====&lt;br /&gt;
&lt;br /&gt;
See also {{taglink|thickness}} and {{taglink|coreThickness}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTTL&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in frames for which the laser beam remains visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the beam fades out. Each frame the {{taglink|intensity}} is multiplied by this value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = laserFlareSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 15.0&lt;br /&gt;
|description = Determines the size of the firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = largeBeamLaser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Changes the visual effect allowing tiling and scrolling of the texture and a pulsating firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tileLength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 200.0&lt;br /&gt;
|description = Defines the length before the texture used is repeated (tiled). Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scrollSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = Controls how fast the texture scrolls. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pulseSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how fast the pulsating effect at the start of the beam is. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Cannon===&lt;br /&gt;
The default &#039;&#039;&#039;WeaponType&#039;&#039;&#039;. Fires a ballistic projectile, for the best result (without under/overshooting) the {{taglink|weaponVelocity}} should be set so as to give an elevation of 45Â° when firing at the maximum {{taglink|range}}. Substituting the angle into the [http://en.wikipedia.org/wiki/Trajectory#Range_and_height trajectory equation], which applies in vacuum, and rearranging, we get: &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;weaponVelocity = âˆš(range * g)&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt; &lt;br /&gt;
where &amp;lt;code&amp;gt;g&amp;lt;/code&amp;gt; is the map gravity, usually around &amp;lt;code&amp;gt;120&amp;lt;/code&amp;gt; for most Spring maps (You can use the {{taglink|myGravity}} tag if you want to be exact). Visually drawn as a billboarded sprite or 3D model. &lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = highTrajectory&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 2&lt;br /&gt;
|description = Can this weapon be fired in a high trajectory (&amp;gt;45Â° angle). 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; - enables a high/low toggle button on the unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heightBoostFactor&lt;br /&gt;
|type = float&lt;br /&gt;
|default = -1.0&lt;br /&gt;
|description = Controls the boost given to {{taglink|range}} by high terrain. Values &amp;gt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; result in increased range, &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; means the cannon has fixed range regardless of height difference to target. Any value &amp;lt; &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; (i.e. the default value) result in an automatically calculated value based on {{taglink|range}} and theoretical maximum range.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====Cannon Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 2.0 + min(default_damage * 0.0025, {{taglink|areaOfEffect}} * 0.1)&lt;br /&gt;
|description = The drawing radius of the billboarded sprite. Also for [[#AircraftBomb Visuals]], [[#EmgCannon Visuals]] (default: &amp;lt;code&amp;gt;3.0&amp;lt;/code&amp;gt;) and [[#Flame Visuals]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = colorMap&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = A set of RGB colours to transition between over the projectile&#039;s lifetime. Can be given as a string of RGB digits or an image filename (See [[CColorMap]]). Also for [[#Flame Visuals]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How quickly each particle of the Cannon shot decays in size.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alphaDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How quickly each particle of the Cannon shot fades out.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = separation&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The distance between each particle of the Cannon shot.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noGap&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Switch between the distance between particles being proportional to the size of the two particles (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or proportional to the size of the first particle (&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 = stages&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 5&lt;br /&gt;
|description = The number of particles in each Cannon shot.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===DGun===&lt;br /&gt;
Fires a line-of-sight or ballistic projectile (selected via the {{taglink|gravityAffected}} tag). Visually represented by a fireball effect that cannot be customised, however it can be replaced by a 3D model. The name and visual effect are [[OTAism]]s.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = gravityAffected&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the fireball projectile lose height due to map gravity?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===EmgCannon===&lt;br /&gt;
A line-of-sight weapon. Visually drawn as a billboarded sprite very similar to that of the [[#Cannon]], however not as customisable, or a 3D model. The name is another [[OTAism]].&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Flame===&lt;br /&gt;
A line-of-sight weapon intended for use as a flamethrower or similar. Visually drawn as a stream of textured particles, the colour of which can be controlled very precisely using the {{taglink|colorMap}} tag (see [[CColorMap]]).&lt;br /&gt;
&lt;br /&gt;
====Flame Visuals====&lt;br /&gt;
See also {{taglink|colorMap}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = How much the draw radius of the flame projectile increases each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flameGFXTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.2&lt;br /&gt;
|description = Makes the flamethrower projectile stay alive as a visual-only effect (i.e. does not deal any damage) after it has reached maximum {{taglink|range}}. It is a percentage multiplier, e.g. &amp;lt;code&amp;gt;1.2&amp;lt;/code&amp;gt; makes the projectile stay alive until it reaches 20% beyond {{taglink|range}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===LaserCannon===&lt;br /&gt;
A particularly versatile line-of-sight weapon. Visually drawn like a [http://en.wikipedia.org/wiki/Star_Wars Star Wars] Blaster-style laser weapon, or a 3D model.&lt;br /&gt;
&lt;br /&gt;
====LaserCannon Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = duration&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.05&lt;br /&gt;
|description = Multiplied against {{taglink|weaponVelocity}} to determine the visual length of the beam projectile.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = hardStop&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the laser projectile stop dead or fade out?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fallOffRate&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = Rate at which the beam fades out after it goes past its maximum {{taglink|range}} if {{taglink|hardStop|false}}. A value of &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; is never fade out, &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; is finish fading out exactly at maximum {{taglink|range}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = lodDistance&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1000&lt;br /&gt;
|description = Minimum camera distance at which the default LaserCannon projectile is simplified to a single rectangle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = thickness&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 2.0&lt;br /&gt;
|description = The thickness (width) of the LaserCannon projectile. Also for [[#BeamLaser Visuals]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = coreThickness&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 2.0&lt;br /&gt;
|description = The thickness (width) of the LaserCannon projectile&#039;s core. Also for [[#BeamLaser Visuals]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor2&lt;br /&gt;
|type = float&lt;br /&gt;
|default = {1.0, 1.0, 1.0}&lt;br /&gt;
|description = The colour of the LaserCannon projectile&#039;s core. Also for [[#BeamLaser Visuals]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===LightningCannon===&lt;br /&gt;
An instant-hit weapon similar to the [[#BeamLaser]], but which does all its damage at once. Visually drawn like [http://en.wikipedia.org/wiki/Star_Wars Star Wars] &#039;Force Lightning&#039; or [http://en.wikipedia.org/wiki/Command_%26_Conquer:_Red_Alert CnC: Red Alert] [http://en.wikipedia.org/wiki/Tesla_coil Tesla Coil] weapons, the effect is not very customisable.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Melee===&lt;br /&gt;
A weapon that always damages the target, no ifs or buts; unsurprisingly intended for use as a close quarters [http://en.wikipedia.org/wiki/Melee#Use_in_gaming &#039;melee&#039;] weapon. It does not fire a projectile and does not care about the line of fire.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===MissileLauncher===&lt;br /&gt;
A versatile weapon which can optionally track targets and accelerate from a low initial velocity.  It can also use {{taglink|trajectoryHeight}} to have the shot arc similar to a ballistic  projectile. Visually represented by a 3D model, with an optional {{taglink|smokeTrail}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = startVelocity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial velocity of the weapon projectile. Also for [[#StarburstLauncher]] and [[#TorpedoLauncher]].&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.0&lt;br /&gt;
|description = The initial acceleration of the weapon projectile. Also for [[#StarburstLauncher]] and [[#TorpedoLauncher]]. Note that if it is &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; the weapon can never increase from its {{taglink|startVelocity}} and will not reach its maximum {{taglink|weaponVelocity}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tracks&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the weapon projectile track a moving target? Also for [[#StarburstLauncher]] and [[#TorpedoLauncher]].}}&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 = The rate (in [[Elmo#Angular|cau]]) at which {{taglink|tracks|true}} weapons turn towards their target. This is relative to a projectile&#039;s current velocity; a weapon with a higher velocity will need a higher value in order to be able to hit targets that turn suddenly.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flightTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The time in seconds before a missile projectile&#039;s fuel runs out; it ceases to obey {{taglink|tracks}}, loses velocity and falls to the ground. Also for [[#StarburstLauncher]]. Large values may cause over/undershoot problems.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = fixedLauncher&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the projectile spawn with the orientation of the shooting piece instead of their normal orientation. Also for [[#StarburstLauncher]] and [[#TorpedoLauncher]]. Weapons may not correctly obey [[#Collision &amp;amp; Avoidance|avoidance settings]] when using this tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = wobble&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Adds a random vector to the direction of travel every 16 frames, multiplied by the value of the tag. The effect is reduced as the firing unit gains experience. As this missiles direction is changed, wobbling swarm of missiles will diverge.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Adds a random vector to the position of a missile projectile every 8 frames, multiplied by the value of the tag. As the projectile is not rotated, a dancing swarm of missiles will remain relatively coherent.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = trajectoryHeight&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Determines the height of the arc the missile will reach as it moves towards its target. A value of &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will result in a flat trajectory, &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will launch at 45&amp;amp;deg;. Can be any value &amp;gt;= &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt;; extreme values may require the {{taglink|tracks}} tag to be able to hit a target.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====MissileLauncher Visuals====&lt;br /&gt;
A note about the missile exhaust flare: the size of the flare is determined by the model radius. The emit position of the flare is at (0,0,-radius) so the model may need careful adjustment to get the flare looking right.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = smokeTrail&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the missile projectile emit a smoke trail as it travels? Also for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Rifle===&lt;br /&gt;
An instant hit weapon which does all its damage at once. Visually represented by a hardcoded tracer, firing and hitting effects. Rarely used.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
===Shield (WeaponType)===&lt;br /&gt;
As the name suggests, not a weapon but a defensive shield. Can absorb or deflect ({{taglink|repulsor|true}}) projectiles. Individual weapons can be set to be intercepted or not by the shield using a [http://en.wikipedia.org/wiki/Mask_(computing) bitmask] (see [[Shield Interception Tag Use]]). Visually represented as a translucent sphere, with control over colour and texture; by default the shield is invisible ({{taglink|visible|false}}).&lt;br /&gt;
&lt;br /&gt;
See the [[#shield]] sub-table section for other tags specific to this type.&lt;br /&gt;
&lt;br /&gt;
===StarburstLauncher===&lt;br /&gt;
Fires a projectile that rises vertically for {{taglink|weaponTimer}} seconds, then turns towards its target. It can optionally track targets and accelerate from a low initial velocity. Before spring 92.0 was the only weapon that can be {{taglink|targetable}} and act as an {{taglink|interceptor}}. Visually represented by a 3D model, with an optional {{taglink|smokeTrail}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = weaponTimer&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The time in seconds during which the missile ascends vertically before turning towards its target.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===TorpedoLauncher===&lt;br /&gt;
Fires a projectile that will behave ballistically out of water and like a missile in water. Usually used with {{taglink|waterWeapon|true}} so they can fire underwater and target underwater units. An aircraft carrying a [[#TorpedoLauncher]] is a special case, the weapon turns into an [[#AircraftBomb]] projectile that will spawn a torpedo projectile on impact with water. Visually represented by a pointed black cuboid, usually the default object is replaced by a 3D model. &lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = subMissile&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the torpedo leave the water and target units and positions on land?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===NoWeapon===&lt;br /&gt;
Not actually a &#039;&#039;&#039;WeaponType&#039;&#039;&#039;, but an individual weapon requested by Spring to &#039;fill in the gaps&#039; if a unit claims to have a weapon which isn&#039;t actually defined. There needs to be only one of these weapons and it is created by setting {{taglink|weaponName|&amp;quot;NOWEAPON&amp;quot;}} rather than by the {{taglink|weaponType}} tag.&lt;br /&gt;
&lt;br /&gt;
==Sub Tables==&lt;br /&gt;
&lt;br /&gt;
===damage===&lt;br /&gt;
The damage subtable lists how many hit points the weapon depletes against each armor class (See [[Armordefs.lua]]). It is a key-value map of armor class names and damage values. The special &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; entry is as the name suggests the default damage applied to any unit which does not belong to a listed armor class, or to shields.&lt;br /&gt;
&lt;br /&gt;
For example a weapon which deals 100 damage by default but only 50 to units in the &#039;tank&#039; armor class:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;damage = {&lt;br /&gt;
    default = 100,&lt;br /&gt;
    tank = 50,&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===shield===&lt;br /&gt;
The preferred way to create a shield or repulser is to use the shield subtable rather than the old shield tags. &lt;br /&gt;
&lt;br /&gt;
The following tags are repulser specific:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = repulser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the shield [http://dictionary.reference.com/browse/repulse?s=t repulse] (deflect) projectiles or absorb them? Btw its [http://springrts.com/mantis/view.php?id=4206 not repulsOr, but repulsEr]!}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = force&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The force applied by the repulser to the weapon - higher values will deflect weapons away at higher velocities.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The maximum speed the repulser will impart to deflected projectiles.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = visibleRepulse&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the (hard-coded) repulse effect rendered or not?}}&lt;br /&gt;
&lt;br /&gt;
The following tags are general behaviour for all shields:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = interceptType&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = [http://en.wikipedia.org/wiki/Mask_(computing) Bitmask] representing the types of weapons that this shield can intercept. Each digit of binary that is set to one means that a weapon with the corresponding digit in its {{taglink|interceptedByShieldType}} will be intercepted by this shield (See [[Shield Interception Tag Use]]).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = smart&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Determines whether or not projectiles fired by allied units can pass through the shield (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or are intercepted as enemy weapons are (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = exterior&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Determines whether or not projectiles fired within the shield&#039;s radius can pass through the shield (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or are intercepted (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;).}}&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;
|description = The amount of the energy resource consumed by the shield to absorb or repulse weapons, continually drained by a repulser as long as the projectile is in range.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = radius&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The radius of the circular area the shield covers.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = power&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Essentially the maximum allowed hit-points of the shield - reduced by the &amp;lt;code&amp;gt;damage&amp;lt;/code&amp;gt; of a weapon upon impact.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = startingPower&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How many hit-points the shield starts with - otherwise the shield must regenerate from &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; until it reaches maximum {{taglink|power}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = powerRegen&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How many hit-points the shield regenerates each second.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = powerRegenEnergy&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much energy resource is consumed to regenerate each hit-point.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rechargeDelay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The delay in seconds before a shield begins to regenerate after it is hit.}}&lt;br /&gt;
&lt;br /&gt;
The following tags control the visual aspects of the shield:&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = visible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Is the shield visible or not?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = visibleHitFrames&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The number of frames a shield becomes visible for when hit.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = badColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.5, 0.5} (Red)&lt;br /&gt;
|description = The RGB colour the shield transitions to as its hit-points are reduced towards &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = goodColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.5, 0.5, 1.0} (Blue)&lt;br /&gt;
|description = The RGB colour the shield transitions to as its hit-points are regenerated towards its maximum {{taglink|power}}.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alpha&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.2&lt;br /&gt;
|description = The alpha transparency of the shield whilst it is visible.}}&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 WeaponDef allows the game designer to give their weapons 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;
[http://imolarpg.dyndns.org/trac/balatest/browser/trunk/weapons &#039;Balanced Annihilation&#039; WeaponDefs]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/conflictterra/source/browse/#svn%2Fgames%2FCT%2Fweapons &#039;Conflict Terra&#039; WeaponDefs] (Most are integrated into their [[Gamedev:UnitDefs#Examples|UnitDefs]])&lt;br /&gt;
&lt;br /&gt;
[https://code.google.com/p/evolutionrts/source/browse/#svn%2Ftrunk%2Fevolutiondev.sdd%2FWeapons &#039;Evolution RTS&#039; WeaponDefs] (Most are integrated into their [[Gamedev:UnitDefs#Examples|UnitDefs]])&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring1944/spring1944/tree/master/weapons &#039;Spring: 1944&#039; WeaponDefs] (Implements an [http://en.wikipedia.org/wiki/Object-oriented_programming OOP] paradigm with [http://en.wikipedia.org/wiki/Inheritance_(computer_science) inheritance])&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/#svn%2Ftrunk%2FSpringTutorialGame.sdd%2FWeapons &#039;Spring Tutorial Game&#039; WeaponDefs]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Dev]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_MoveCtrl&amp;diff=11386</id>
		<title>Lua MoveCtrl</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_MoveCtrl&amp;diff=11386"/>
		<updated>2014-03-20T21:06:02Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* MoveType-Controlling */&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;
= ScriptMoveType =&lt;br /&gt;
== Enable/Disable ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.Enable&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.Disable&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetTag&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number tag ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.GetTag&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetProgressState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number state | &amp;quot;done&amp;quot; | &amp;quot;active&amp;quot; | &amp;quot;failed&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Physics ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGravity&#039;&#039;&#039; &lt;br /&gt;
  ( number unitID, number gravity ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;span class=note&amp;gt;N.B. gravity here is a multiplier to Game.gravity&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetDrag&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number drag ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGroundOffset&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number offset ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetWindFactor&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number windFactor ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetPhysics&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number posX, number posY, number posZ,&lt;br /&gt;
    number velX, number velY, number velZ,&lt;br /&gt;
    number rotX, number rotY, number rotZ ) -&amp;gt; nil &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number posX, number posY, number posZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number velX, number velY, number velZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRelativeVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number relvelX, number relvelY, number relvelZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRotation&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number rotX, number rotY, number rotZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRotationVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number rotVelX, number rotVelY, number rotVelZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRotationOffset&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number rotOffX, number rotOffY, number rotOffZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number heading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetNoBlocking&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean noblock ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetLimits&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number minX, number minY, number minZ,&lt;br /&gt;
    number maxX, number maxY, number maxZ ) -&amp;gt; nil &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetTrackSlope&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean trackslope ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetTrackGround&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean noblock ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetExtrapolate&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean on ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetShotStop&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Currently a no-op&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID, boolean shotstop ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetSlopeStop&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Currently a no-op&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID, boolean slopestop ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetCollideStop&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean collidestop ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;span class=note&amp;gt;Enable both SetCollideStop and SetTrackGround to enable MoveCtrlNotify(unitID, unitDefID, unitTeam, data) call-in, data was supposed to indicate the type of notification but currently never has a value other than 1 (where 1 means &amp;quot;unit hit the ground&amp;quot;)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= MoveType-Controlling =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetMoveDef&#039;&#039;&#039; &lt;br /&gt;
  ( number unitID, number moveDefID | string moveDefName ) -&amp;gt; boolean success&lt;br /&gt;
&amp;lt;span style=&amp;quot;color:yellow&amp;quot;&amp;gt;&lt;br /&gt;
Note: string moveDefName needs to be in &#039;&#039;&#039;lowercase&#039;&#039;&#039;, notwithstanding the fact that it may be in another case in the movedef table.&lt;br /&gt;
&amp;lt;/span&amp;gt;&lt;br /&gt;
 &amp;lt;span class=note&amp;gt;NOTE: all Set*MoveTypeData functions support the following number keys:&lt;br /&gt;
 maxSpeed&lt;br /&gt;
 maxWantedSpeed&lt;br /&gt;
 repairBelowHealth&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetAirMoveTypeData&#039;&#039;&#039; {{new|0.81}}&lt;br /&gt;
  ( number unitID, string key, value  ) -&amp;gt; nil&lt;br /&gt;
  ( number unitID, table values ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;supported keys:&lt;br /&gt;
  numbers:&lt;br /&gt;
    wantedHeight&lt;br /&gt;
    myGravity&lt;br /&gt;
    maxBank&lt;br /&gt;
    maxPitch&lt;br /&gt;
    turnRadius&lt;br /&gt;
    maxAcc&lt;br /&gt;
    maxAileron&lt;br /&gt;
    maxElevator&lt;br /&gt;
    maxRudder&lt;br /&gt;
  booleans:&lt;br /&gt;
    collide&lt;br /&gt;
    useSmoothMesh&lt;br /&gt;
  NOTE: not all keys and not all values may work correctly.&lt;br /&gt;
  [[SetMoveTypeDataExample|Example usage]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGroundMoveTypeData&#039;&#039;&#039; {{new|0.81}}&lt;br /&gt;
  ( number unitID, string key, value  ) -&amp;gt; nil&lt;br /&gt;
  ( number unitID, table values ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;supported keys:&lt;br /&gt;
  numbers:&lt;br /&gt;
    baseTurnRate&lt;br /&gt;
    turnRate&lt;br /&gt;
    accRate&lt;br /&gt;
    decRate&lt;br /&gt;
    maxSpeed&lt;br /&gt;
    maxReverseSpeed&lt;br /&gt;
    requestedSpeed&lt;br /&gt;
    requestedTurnRate&lt;br /&gt;
  booleans:&lt;br /&gt;
    floatOnWater&lt;br /&gt;
  NOTE: not all keys and not all values may work correctly.&lt;br /&gt;
  [[SetMoveTypeDataExample|Example usage]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGunshipMoveTypeData&#039;&#039;&#039; {{new|0.81}}&lt;br /&gt;
  ( number unitID, string key, value  ) -&amp;gt; nil&lt;br /&gt;
  ( number unitID, table values ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;supported keys:&lt;br /&gt;
  numbers:&lt;br /&gt;
    wantedHeight&lt;br /&gt;
    turnRate&lt;br /&gt;
    accRate&lt;br /&gt;
    decRate&lt;br /&gt;
    altitudeRate&lt;br /&gt;
    currentBank&lt;br /&gt;
    currentPitch&lt;br /&gt;
  booleans:&lt;br /&gt;
    collide&lt;br /&gt;
    useSmoothMesh&lt;br /&gt;
    bankingAllowed&lt;br /&gt;
    dontLand&lt;br /&gt;
    airStrafe&lt;br /&gt;
  NOTE: not all keys and not all values may work correctly.&lt;br /&gt;
  [[SetMoveTypeDataExample|Example usage]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_MoveCtrl&amp;diff=11385</id>
		<title>Lua MoveCtrl</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_MoveCtrl&amp;diff=11385"/>
		<updated>2014-03-20T20:57:09Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* MoveType-Controlling */&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;
= ScriptMoveType =&lt;br /&gt;
== Enable/Disable ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.Enable&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.Disable&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Tags ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetTag&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number tag ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.GetTag&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetProgressState&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number state | &amp;quot;done&amp;quot; | &amp;quot;active&amp;quot; | &amp;quot;failed&amp;quot; ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Physics ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGravity&#039;&#039;&#039; &lt;br /&gt;
  ( number unitID, number gravity ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;span class=note&amp;gt;N.B. gravity here is a multiplier to Game.gravity&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetDrag&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number drag ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGroundOffset&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number offset ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetWindFactor&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number windFactor ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetPhysics&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number posX, number posY, number posZ,&lt;br /&gt;
    number velX, number velY, number velZ,&lt;br /&gt;
    number rotX, number rotY, number rotZ ) -&amp;gt; nil &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetPosition&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number posX, number posY, number posZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number velX, number velY, number velZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRelativeVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number relvelX, number relvelY, number relvelZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRotation&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number rotX, number rotY, number rotZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRotationVelocity&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number rotVelX, number rotVelY, number rotVelZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetRotationOffset&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number rotOffX, number rotOffY, number rotOffZ ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetHeading&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, number heading ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
== Options ==&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetNoBlocking&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean noblock ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetLimits&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID,&lt;br /&gt;
    number minX, number minY, number minZ,&lt;br /&gt;
    number maxX, number maxY, number maxZ ) -&amp;gt; nil &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetTrackSlope&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean trackslope ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetTrackGround&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean noblock ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetExtrapolate&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean on ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetShotStop&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Currently a no-op&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID, boolean shotstop ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetSlopeStop&#039;&#039;&#039; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Currently a no-op&amp;lt;/span&amp;gt;&lt;br /&gt;
  ( number unitID, boolean slopestop ) -&amp;gt; nil&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetCollideStop&#039;&#039;&#039;&lt;br /&gt;
  ( number unitID, boolean collidestop ) -&amp;gt; nil&lt;br /&gt;
&amp;lt;span class=note&amp;gt;Enable both SetCollideStop and SetTrackGround to enable MoveCtrlNotify(unitID, unitDefID, unitTeam, data) call-in, data was supposed to indicate the type of notification but currently never has a value other than 1 (where 1 means &amp;quot;unit hit the ground&amp;quot;)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= MoveType-Controlling =&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetMoveDef&#039;&#039;&#039; &lt;br /&gt;
  ( number unitID, number moveDefID | string moveDefName ) -&amp;gt; boolean success&lt;br /&gt;
Note: string moveDefName needs to be in &#039;&#039;&#039;lowercase&#039;&#039;&#039;, notwithstanding the fact that it may be in another case in the movedef table.&lt;br /&gt;
 &amp;lt;span class=note&amp;gt;NOTE: all Set*MoveTypeData functions support the following number keys:&lt;br /&gt;
 maxSpeed&lt;br /&gt;
 maxWantedSpeed&lt;br /&gt;
 repairBelowHealth&lt;br /&gt;
 &amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetAirMoveTypeData&#039;&#039;&#039; {{new|0.81}}&lt;br /&gt;
  ( number unitID, string key, value  ) -&amp;gt; nil&lt;br /&gt;
  ( number unitID, table values ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;supported keys:&lt;br /&gt;
  numbers:&lt;br /&gt;
    wantedHeight&lt;br /&gt;
    myGravity&lt;br /&gt;
    maxBank&lt;br /&gt;
    maxPitch&lt;br /&gt;
    turnRadius&lt;br /&gt;
    maxAcc&lt;br /&gt;
    maxAileron&lt;br /&gt;
    maxElevator&lt;br /&gt;
    maxRudder&lt;br /&gt;
  booleans:&lt;br /&gt;
    collide&lt;br /&gt;
    useSmoothMesh&lt;br /&gt;
  NOTE: not all keys and not all values may work correctly.&lt;br /&gt;
  [[SetMoveTypeDataExample|Example usage]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGroundMoveTypeData&#039;&#039;&#039; {{new|0.81}}&lt;br /&gt;
  ( number unitID, string key, value  ) -&amp;gt; nil&lt;br /&gt;
  ( number unitID, table values ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;supported keys:&lt;br /&gt;
  numbers:&lt;br /&gt;
    baseTurnRate&lt;br /&gt;
    turnRate&lt;br /&gt;
    accRate&lt;br /&gt;
    decRate&lt;br /&gt;
    maxSpeed&lt;br /&gt;
    maxReverseSpeed&lt;br /&gt;
    requestedSpeed&lt;br /&gt;
    requestedTurnRate&lt;br /&gt;
  booleans:&lt;br /&gt;
    floatOnWater&lt;br /&gt;
  NOTE: not all keys and not all values may work correctly.&lt;br /&gt;
  [[SetMoveTypeDataExample|Example usage]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Spring.MoveCtrl.SetGunshipMoveTypeData&#039;&#039;&#039; {{new|0.81}}&lt;br /&gt;
  ( number unitID, string key, value  ) -&amp;gt; nil&lt;br /&gt;
  ( number unitID, table values ) -&amp;gt; nil&lt;br /&gt;
  &amp;lt;span class=note&amp;gt;supported keys:&lt;br /&gt;
  numbers:&lt;br /&gt;
    wantedHeight&lt;br /&gt;
    turnRate&lt;br /&gt;
    accRate&lt;br /&gt;
    decRate&lt;br /&gt;
    altitudeRate&lt;br /&gt;
    currentBank&lt;br /&gt;
    currentPitch&lt;br /&gt;
  booleans:&lt;br /&gt;
    collide&lt;br /&gt;
    useSmoothMesh&lt;br /&gt;
    bankingAllowed&lt;br /&gt;
    dontLand&lt;br /&gt;
    airStrafe&lt;br /&gt;
  NOTE: not all keys and not all values may work correctly.&lt;br /&gt;
  [[SetMoveTypeDataExample|Example usage]]&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-CobCallins&amp;diff=1916</id>
		<title>Animation-CobCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-CobCallins&amp;diff=1916"/>
		<updated>2014-03-14T05:14:35Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Movement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source==&lt;br /&gt;
&lt;br /&gt;
Some (but not all) are listed near the end of this file: {{sourcelink|file=rts/Sim/Units/Scripts/CobInstance.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
Callins have two purposes:&lt;br /&gt;
&lt;br /&gt;
First, they allow a script to be notified when an event happens, such as the unit being created or destroyed.&lt;br /&gt;
&lt;br /&gt;
Second, they allow the engine to get information from the script. Sometimes this is accomplished through a return value, but usually this is done by setting one of the arguments to a function to the requested value.&lt;br /&gt;
&lt;br /&gt;
==Callins==&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
*Create(): Called when the unit is created. &amp;quot;Created&amp;quot; means when the unit&#039;s nanoframe is created; if you want to wait until the unit is actually finished, you&#039;ll have to use something like &lt;br /&gt;
&lt;br /&gt;
 while(GET BUILD_PERCENT_LEFT) sleep 250; &lt;br /&gt;
&lt;br /&gt;
*Activate()/Deactivate(): Called when the unit is turned on/off.&lt;br /&gt;
*Killed(severity, corpsetype): Called when the unit is killed. Severity indicates how many percent of the unit&#039;s hit points were dealt by the final blow. Corpsetype basically indicates the number of times the unit and its corpses are destroyed; for example, corpsetype = 3 acts as if the unit is destroyed, the corpse is destroyed, and the corpse&#039;s corpse is destroyed. If it runs out of corpses nothing is left behind. Set corpsetype to the desired value.&lt;br /&gt;
&lt;br /&gt;
===Movement===&lt;br /&gt;
&lt;br /&gt;
*StartMoving()/StopMoving(): Called when the unit starts/stops moving. This includes rotation, so don&#039;t be surprised if StartMoving() sometimes gets called when a unit starts aiming at a target.&lt;br /&gt;
*SetSFXOccupy(terraintype): Supposedly called when the unit changes terrain type, although it didn&#039;t work last time I tried it? Maybe I was using it wrong. terraintype: 0 = transported, 1 = sea, 2 = deep sea (greater than 5 water depth and unit is upright), 4 = land.&lt;br /&gt;
*MoveRate[0...3](): Appears to be the aircraft equivalent of SetSFXOccupy. MoveRate3 doesn&#039;t appear to actually be used. MoveRate1 is called when the aircraft takes off or lands. If the aircraft is not taking off or landing, MoveRate0 is called when the aircraft drops below 1/3 maximum speed, MoveRate2 is called when the aircraft exceeds 2/3 maximum speed, and MoveRate1 is called when the aircraft enters within 1/3-2/3 maximum speed. I don&#039;t know if this actually works.&lt;br /&gt;
*SetDirection(heading): Used only for wind generators. Gives the direction of the wind.&lt;br /&gt;
*SetSpeed(speed): Used for wind generators, tidals, and mexes. Basically more resources = higher speed.&lt;br /&gt;
&lt;br /&gt;
Comments:&lt;br /&gt;
* MoveRate0 ... Moverate3 only work with gunship type of aircraft: &lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=26890&amp;amp;hilit=Moverate0 Forum thread]&lt;br /&gt;
* SetSFXOccupy(terraintype) for aircraft: terraintype = 4 when flying over land and 1 when flying over water. (I used &amp;quot;get IN_WATER&amp;quot; to find out when unit is submerged).&lt;br /&gt;
&lt;br /&gt;
===Weapons===&lt;br /&gt;
&lt;br /&gt;
For weapons, X means either the number of the weapon, or &amp;quot;Primary&amp;quot;, &amp;quot;Secondary&amp;quot;, or &amp;quot;Tertiary&amp;quot; (don&#039;t put &amp;quot;Weapon&amp;quot; for these). I recommend using numbers, since it&#039;s cleaner and you can use more than three weapons that way.&lt;br /&gt;
&lt;br /&gt;
*AimWeaponX(heading, pitch): Called every ~0.5s when the unit is aiming the weapon at a target. This is used to turn a unit&#039;s turrets toward the target. Return 1 when the weapon is ready to fire. Alternately, return 0 if you don&#039;t want the weapon to fire (you can use this to disable weapons).&lt;br /&gt;
*AimFromWeaponX(piecenum): You should set piecenum to a piece of the model; LOS is traced from the here to the target to see if the weapon can fire.&lt;br /&gt;
*FireWeaponX(): Called whenever the trigger is pulled on a weapon. This occurs before the &#039;&#039;first&#039;&#039; shot in a burst/projectile salvo (only).&lt;br /&gt;
*ShotX(zero): Called before every shot a weapon fires. This includes burst and projectile tags. This happens after FireWeaponX(), even for the first shot. There&#039;s one input argument which is 0, because of a typo in the source.&lt;br /&gt;
*QueryWeaponX(piecenum): You should set piecenum to a piece of the model. The shot starts from this piece of the model; this is called for this purpose after FireWeaponX() and ShotX(). LOS is also traced from here to the target to see if a weapon can fire. Make sure this is a piece on the weapon&#039;s turret. Not doing this right can cause headaches; example: http://trac.caspring.org/wiki/GunsJammingOnShips&lt;br /&gt;
*EndBurstX(): Called after the last shot in a burst.&lt;br /&gt;
*BlockShotX(in unitID, out block, in usertarget)&lt;br /&gt;
*TargetWeightX(unitID, weightMod)&lt;br /&gt;
*RockUnit(anglex, anglez): Called when the unit fires. Use it to rock the unit on firing, although there are other ways to do this.&lt;br /&gt;
*HitByWeaponID(damage, weaponid?, unitid?): Called when the unit is hit by a weapon.&lt;br /&gt;
*SetMaxReloadTime(time): Called on unit creation. time is the time in ms that it takes the slowest-firing weapon to reload.&lt;br /&gt;
&lt;br /&gt;
===Construction===&lt;br /&gt;
&lt;br /&gt;
*StartBuilding(): Called when the unit starts building.&lt;br /&gt;
*StopBuilding(): Called when the unit stops building.&lt;br /&gt;
*QueryNanoPiece(piecenum): You should set piecenum to the piece you want the nanospray to come from.&lt;br /&gt;
*QueryBuildInfo(piecenum): For factories. You should set piecenum to the piece you want the unit to be built on.&lt;br /&gt;
&lt;br /&gt;
===Transportation===&lt;br /&gt;
*Falling(): Used for airdropping units?&lt;br /&gt;
*Landed(): Used for airdropping units?&lt;br /&gt;
*QueryTransport(piecenum): You should set piecenum to the piece you want the transported unit to be attached to.&lt;br /&gt;
*BeginTransport(): Called when an air transport picks up a unit.&lt;br /&gt;
*EndTransport(): Called when an air transport becomes empty.&lt;br /&gt;
*TransportPickup(): Called when a land transport picks up a unit.&lt;br /&gt;
*TransportDrop(): Called when a land transport becomes empty.&lt;br /&gt;
*StartUnload(): Called when the transport starts the unloading process.&lt;br /&gt;
&lt;br /&gt;
===Landing Pads===&lt;br /&gt;
*QueryLandingPadCount(count): You should set count to the number of landing pads. However, it doesn&#039;t seem to be actually necessary to do this unless you want more than 16 pads.&lt;br /&gt;
*QueryLandingPad(piecenum1, piecenum2, piecenum3...): Set each piecenum to a different landing pad piece.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-CobCallins&amp;diff=1915</id>
		<title>Animation-CobCallins</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-CobCallins&amp;diff=1915"/>
		<updated>2014-03-13T01:23:46Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Movement */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Source==&lt;br /&gt;
&lt;br /&gt;
Some (but not all) are listed near the end of this file: {{sourcelink|file=rts/Sim/Units/Scripts/CobInstance.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
Callins have two purposes:&lt;br /&gt;
&lt;br /&gt;
First, they allow a script to be notified when an event happens, such as the unit being created or destroyed.&lt;br /&gt;
&lt;br /&gt;
Second, they allow the engine to get information from the script. Sometimes this is accomplished through a return value, but usually this is done by setting one of the arguments to a function to the requested value.&lt;br /&gt;
&lt;br /&gt;
==Callins==&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
&lt;br /&gt;
*Create(): Called when the unit is created. &amp;quot;Created&amp;quot; means when the unit&#039;s nanoframe is created; if you want to wait until the unit is actually finished, you&#039;ll have to use something like &lt;br /&gt;
&lt;br /&gt;
 while(GET BUILD_PERCENT_LEFT) sleep 250; &lt;br /&gt;
&lt;br /&gt;
*Activate()/Deactivate(): Called when the unit is turned on/off.&lt;br /&gt;
*Killed(severity, corpsetype): Called when the unit is killed. Severity indicates how many percent of the unit&#039;s hit points were dealt by the final blow. Corpsetype basically indicates the number of times the unit and its corpses are destroyed; for example, corpsetype = 3 acts as if the unit is destroyed, the corpse is destroyed, and the corpse&#039;s corpse is destroyed. If it runs out of corpses nothing is left behind. Set corpsetype to the desired value.&lt;br /&gt;
&lt;br /&gt;
===Movement===&lt;br /&gt;
&lt;br /&gt;
*StartMoving()/StopMoving(): Called when the unit starts/stops moving. This includes rotation, so don&#039;t be surprised if StartMoving() sometimes gets called when a unit starts aiming at a target.&lt;br /&gt;
*SetSFXOccupy(terraintype): Supposedly called when the unit changes terrain type, although it didn&#039;t work last time I tried it? Maybe I was using it wrong. terraintype: 0 = transported, 1 = sea, 2 = deep sea (greater than 5 water depth and unit is upright), 4 = land.&lt;br /&gt;
*MoveRate[0...3](): Appears to be the aircraft equivalent of SetSFXOccupy. MoveRate3 doesn&#039;t appear to actually be used. MoveRate1 is called when the aircraft takes off or lands. If the aircraft is not taking off or landing, MoveRate0 is called when the aircraft drops below 1/3 maximum speed, MoveRate2 is called when the aircraft exceeds 2/3 maximum speed, and MoveRate1 is called when the aircraft enters within 1/3-2/3 maximum speed. I don&#039;t know if this actually works.&lt;br /&gt;
*SetDirection(heading): Used only for wind generators. Gives the direction of the wind.&lt;br /&gt;
*SetSpeed(speed): Used for wind generators, tidals, and mexes. Basically more resources = higher speed.&lt;br /&gt;
&lt;br /&gt;
MoveRate0 ... Moverate3 only work with gunship type of aircraft: &lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=26890&amp;amp;hilit=Moverate0 Forum thread]&lt;br /&gt;
--[[User:Jools|Jools]] ([[User talk:Jools|talk]]) 02:23, 13 March 2014 (CET)&lt;br /&gt;
&lt;br /&gt;
===Weapons===&lt;br /&gt;
&lt;br /&gt;
For weapons, X means either the number of the weapon, or &amp;quot;Primary&amp;quot;, &amp;quot;Secondary&amp;quot;, or &amp;quot;Tertiary&amp;quot; (don&#039;t put &amp;quot;Weapon&amp;quot; for these). I recommend using numbers, since it&#039;s cleaner and you can use more than three weapons that way.&lt;br /&gt;
&lt;br /&gt;
*AimWeaponX(heading, pitch): Called every ~0.5s when the unit is aiming the weapon at a target. This is used to turn a unit&#039;s turrets toward the target. Return 1 when the weapon is ready to fire. Alternately, return 0 if you don&#039;t want the weapon to fire (you can use this to disable weapons).&lt;br /&gt;
*AimFromWeaponX(piecenum): You should set piecenum to a piece of the model; LOS is traced from the here to the target to see if the weapon can fire.&lt;br /&gt;
*FireWeaponX(): Called whenever the trigger is pulled on a weapon. This occurs before the &#039;&#039;first&#039;&#039; shot in a burst/projectile salvo (only).&lt;br /&gt;
*ShotX(zero): Called before every shot a weapon fires. This includes burst and projectile tags. This happens after FireWeaponX(), even for the first shot. There&#039;s one input argument which is 0, because of a typo in the source.&lt;br /&gt;
*QueryWeaponX(piecenum): You should set piecenum to a piece of the model. The shot starts from this piece of the model; this is called for this purpose after FireWeaponX() and ShotX(). LOS is also traced from here to the target to see if a weapon can fire. Make sure this is a piece on the weapon&#039;s turret. Not doing this right can cause headaches; example: http://trac.caspring.org/wiki/GunsJammingOnShips&lt;br /&gt;
*EndBurstX(): Called after the last shot in a burst.&lt;br /&gt;
*BlockShotX(in unitID, out block, in usertarget)&lt;br /&gt;
*TargetWeightX(unitID, weightMod)&lt;br /&gt;
*RockUnit(anglex, anglez): Called when the unit fires. Use it to rock the unit on firing, although there are other ways to do this.&lt;br /&gt;
*HitByWeaponID(damage, weaponid?, unitid?): Called when the unit is hit by a weapon.&lt;br /&gt;
*SetMaxReloadTime(time): Called on unit creation. time is the time in ms that it takes the slowest-firing weapon to reload.&lt;br /&gt;
&lt;br /&gt;
===Construction===&lt;br /&gt;
&lt;br /&gt;
*StartBuilding(): Called when the unit starts building.&lt;br /&gt;
*StopBuilding(): Called when the unit stops building.&lt;br /&gt;
*QueryNanoPiece(piecenum): You should set piecenum to the piece you want the nanospray to come from.&lt;br /&gt;
*QueryBuildInfo(piecenum): For factories. You should set piecenum to the piece you want the unit to be built on.&lt;br /&gt;
&lt;br /&gt;
===Transportation===&lt;br /&gt;
*Falling(): Used for airdropping units?&lt;br /&gt;
*Landed(): Used for airdropping units?&lt;br /&gt;
*QueryTransport(piecenum): You should set piecenum to the piece you want the transported unit to be attached to.&lt;br /&gt;
*BeginTransport(): Called when an air transport picks up a unit.&lt;br /&gt;
*EndTransport(): Called when an air transport becomes empty.&lt;br /&gt;
*TransportPickup(): Called when a land transport picks up a unit.&lt;br /&gt;
*TransportDrop(): Called when a land transport becomes empty.&lt;br /&gt;
*StartUnload(): Called when the transport starts the unloading process.&lt;br /&gt;
&lt;br /&gt;
===Landing Pads===&lt;br /&gt;
*QueryLandingPadCount(count): You should set count to the number of landing pads. However, it doesn&#039;t seem to be actually necessary to do this unless you want more than 16 pads.&lt;br /&gt;
*QueryLandingPad(piecenum1, piecenum2, piecenum3...): Set each piecenum to a different landing pad piece.&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19793</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19793"/>
		<updated>2014-02-22T14:09:48Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Download */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[category:Xta]]&lt;br /&gt;
&#039;&#039;&#039;[[Games|&amp;lt;--Back to Games]]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
                       [[Image:Xta_logo_white.jpg]]&lt;br /&gt;
&lt;br /&gt;
== What is XTA? ==&lt;br /&gt;
&lt;br /&gt;
XTA is one of the original games for Spring, and the one many players feel is &amp;quot;more OTA than OTA itself&amp;quot; due to the authentic feel combined with the Spring Engine&#039;s capabilities. &lt;br /&gt;
&lt;br /&gt;
XTA tests a player&#039;s tactical, teamwork and micro abilities whilst also fostering diverse playstyles giving many ways in which one action can change the outcome of battle.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;But the best reciew for any player is to experience it for themselves.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
== Download ==&lt;br /&gt;
&lt;br /&gt;
The latest XTA can be found from http://packages.springrts.com/builds or from springfiles: search for XTA (at the time of writing this page, the current version is http://springfiles.com/spring/games/xta-35). &lt;br /&gt;
&lt;br /&gt;
The XTA section on the official forum usually also contains the latest release: http://springrts.com/phpbb/viewforum.php?f=48&lt;br /&gt;
&lt;br /&gt;
You can also download it by using [http://springrts.com/wiki/Download_Systems rapid system].&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
Here are just some of the many good aspects XTA has to offer.&lt;br /&gt;
&lt;br /&gt;
*Perhaps XTA&#039;s greatest strength is that players must keep the balance of keeping their own units alive through repairing and avoiding projectiles, while still doing maximum damage to the enemy. Amongst this they also have to keep their economy on track and try guess their opponent&#039;s next move. Sound easy? Give it to a go!&lt;br /&gt;
&lt;br /&gt;
*XTA is more micro than macro, although the latter is a vital feature. Units have more health than other games enabling players to keep units alive. Spamming is done less as units are more expensive and too many units means you will lose your units to the a few well microed enemies. It&#039;s not how many you build but how you use them.&lt;br /&gt;
&lt;br /&gt;
*At the advanced levels of the tech tree, both factions really come into their own. Whereas Core may get the power of flame, Arm get the power of lightning, offering the quick and light to the strong and slow. Will you go for brute force and economical superiority or hit and run stealth tactics?&lt;br /&gt;
&lt;br /&gt;
*XTA prides itself on being a mod of team play allowing teams to play strategically and work together to achieve goals as a simple macro victory is rare. The small community makes players able to have a greater understanding of each other giving the game a more rewarding victory.&lt;br /&gt;
&lt;br /&gt;
*One of XTA&#039;s best selling points is the &#039;&#039;&#039;Commander&#039;&#039;&#039;. The versatility of this unit allows it to be used for aggressive, tactical, defensive and economical purposes as well as having the ability to Morph to be stronger.&lt;br /&gt;
&lt;br /&gt;
*Very much similar to Spring itself, XTA has a friendly community and although it being relatively small, balance discussions are often held within the group. However, this also allows all players to know each other making games more between friends than foes. It also has one of the most active clan systems.&lt;br /&gt;
&lt;br /&gt;
*XTA has a tough learning curve, however an intelligent player will quickly learn when to build and what, may it be lab or unit. This makes XTA a mod constantly keeping the player entertained and challenged. With different tactics being discovered all the time users have many ideas to choose from of how to start their game. XTA is renowned for players making comebacks by rebuilding their base.&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== So where can I find out more? ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;XTA is proud to be a community-run development program.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
The XTA community is always willing to listen to suggestions. The current forum can be found [http://springrts.com/phpbb/viewforum.php?f=48 here]. From there you will be able to read on the latest plans of XTA here, read the change log, and contribute your own ideas on the mod itself. &lt;br /&gt;
&lt;br /&gt;
Something not to your liking about the current XTA? Talk about, maybe have it changed! Many balance issues are discussed from the introduction of new units to the changing of a single unit&#039;s DP&lt;br /&gt;
&lt;br /&gt;
You can join the &#039;&#039;&#039;#xta channel&#039;&#039;&#039; to find other XTA players and see if anyone wishes for a game. There is nearly always a game of the most uptodate XTA being hosted.&lt;br /&gt;
&lt;br /&gt;
Newer versions will continue to be released to incorporate more detailed visual effects/or models as the Spring Engine develops.&lt;br /&gt;
&lt;br /&gt;
If you wish to learn the basics of XTA, you can read guides such as:&lt;br /&gt;
&lt;br /&gt;
*[http://springrts.com/wiki/New_to_xta XTA Basics]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_units XTA unit guide]&lt;br /&gt;
*[http://springrts.com/wiki/Xta_commander XTA Commander guide]&lt;br /&gt;
&lt;br /&gt;
For some commented XTA games please feel free to visit [http://www.youtube.com/user/xtareplay here] to get a feel of the game.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
==History==&lt;br /&gt;
&lt;br /&gt;
XTA was a balance mod for TA, developed by the [[SY]] clan.&lt;br /&gt;
&lt;br /&gt;
For Spring, it was the first mod available to the public for online play, the first that was ported and for a long time came bundled with the installation of the Spring engine, ready to play.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The mod has gone through many developers, starting with the [SY] clan with the most ancient and famous to the oldest of players, SJ; and then moving onto other users. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
One of the most notable players has been Noize, a founder of BA. Noize started XTA&#039;s modern look, with updated graphics and flash explosions (XTA Pimped Edition), which would later be seen as unnecessary and extremely laggy. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
A short time afterwards the [KnoX] clan, the leading XTA clan ran by &#039;&#039;&#039;Myg&#039;&#039;&#039; and Gizmo starting to develop the mod. For a brief time a major debate became visible that XTA was KnoX&#039;s mod now, this would be shortly dismissed. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After [KnoX] disbanded due to them feeling the time was right for the members to go their separate ways, they still maintained XTA until Noruas began upkeep of the mod. With XTA 7.1 being seen as a watershed moment due to the peak of XTA&#039;s player base due to the decline of AA and rise of BA, so too can XTA 8.1. With some debate to whether the current XTA is the best, the two main contenders would be 7.1 and 8.1. With 8.1 came updated graphics and what many players remember as &amp;quot;The golden days&amp;quot; whereas 7.1 can be called the heyday of XTA itself.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas has introduced more units than any other developer of XTA, improved graphics and dragged XTA through the new Spring versions. With the community split about where they stand on many of his somewhat radical ideas, Noruas has certainly added to XTA. &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Noruas maintained XTA for some time. Players contribute and offer help on a multitude of scales. The current XTA balance offers something new and dynamic whilst still maintaining the roots of OTA and the older XTA versions giving a blend of classic and modern.&lt;br /&gt;
&lt;br /&gt;
Recently Deadnight Warrior has taken over development, fixing bugs, optimizing scripts and tweaking balance. [http://code.google.com/p/xta-springrts/ A SVN with bugtracker] was also set up.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
----&lt;br /&gt;
&lt;br /&gt;
== Eye Candy ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
XTA is arguably the best-looking mod in terms of graphics.  With new unit models and new explosion/smoke effects being released with every update, the XTA mod keeps up to date with the Spring Engine and what it has to offer. &lt;br /&gt;
&lt;br /&gt;
Here are some pictures of what XTA has to offer:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[image:Screen508.jpg|800px|Core Commander]]&lt;br /&gt;
[[image:Screen511.jpg|800px|Arm Commander]]&lt;br /&gt;
[[image:Screen620.jpg|800px|A Land boat]]&lt;br /&gt;
&lt;br /&gt;
Alternatively, you can view some clips of XTA in action as well as commentaries of XTA replays [http://www.youtube.com//XtaReplay here] or [http://www.youtube.com/xtaboi here].&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Important Autohost Commands ==&lt;br /&gt;
=== For Helium===&lt;br /&gt;
Game end mode:&lt;br /&gt;
  !setoptions  mode=comends&lt;br /&gt;
or&lt;br /&gt;
  !setoptions  mode=killall&lt;br /&gt;
&lt;br /&gt;
Make teams:&lt;br /&gt;
  !balance 2&lt;br /&gt;
  !balance 3&lt;br /&gt;
  ...&lt;br /&gt;
  !balance 10&lt;br /&gt;
&lt;br /&gt;
Turn XTAaids units on/off:&lt;br /&gt;
  !setoptions xtaidunits=1&lt;br /&gt;
  !setoptions xtaidunits=0&lt;br /&gt;
&lt;br /&gt;
Back to [[Games]]&lt;br /&gt;
&lt;br /&gt;
[[Category:Games]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=11039</id>
		<title>LuaCallinReturn</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=11039"/>
		<updated>2014-01-17T11:55:31Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Unit-Specific: */&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;
==Engine Source==&lt;br /&gt;
If you can understand Lua code well and wish to get the most up to date info, you can refer to:&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/actions.lua}}, &lt;br /&gt;
{{sourcelink|file=cont/LuaUI/widgets.lua}} and &amp;lt;br&amp;gt;&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/gadgets.lua}} &amp;lt;br&amp;gt;&lt;br /&gt;
to see how widget/gadget call-ins are distributed, find call-in and widgetHandler function definitions, see how they are processed and what values should be returned from some call ins&lt;br /&gt;
(are these the only files?)&lt;br /&gt;
&lt;br /&gt;
==What is a callin anyway?==&lt;br /&gt;
Call-ins are calls from the engine, into the gadget or widget script. In other words, these functions are called when a particular â€œeventâ€ happens.&lt;br /&gt;
Some call-in functions can return values to the engine.&lt;br /&gt;
===Blocking events with return values===&lt;br /&gt;
The call-in functions named &#039;&#039;&#039;&#039;&#039;Allow&#039;&#039;&#039;&#039;&#039;XXX can block their event by returning &#039;&#039;false&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
For example &#039;&#039;AllowUnitTransfer()&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return true&amp;lt;/code&amp;gt; = allow transfer &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return false&amp;lt;/code&amp;gt; = deny transfer&lt;br /&gt;
&lt;br /&gt;
==Commands, general-purpose:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Initialize()&amp;lt;/font&amp;gt; --&amp;gt; none.&amp;lt;br&amp;gt;&lt;br /&gt;
called when widget/gadget gets (re-)loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Shutdown()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerChanged&amp;lt;/font&amp;gt; --&amp;gt; (playerID).&lt;br /&gt;
gadget/widget: Use this to check whether a player has become spectator for instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;LayoutButtons()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ConfigureLayout()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;command&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandNotify()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;id, params, options&amp;quot;, where id = the CommandID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyPress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key, mods, isRepeat&amp;quot;, where key = keymap, mods = SHIFT, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseMove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, dx, dy, button&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MousePress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;button parameter values: left - 1, middle - 2, right - 3&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Please note that in order to have Spring call MouseRelease, you need to have a MousePress call-in in the same widget that returns true.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseWheel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;up, value&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;IsAbove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GetTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.  Returns WorldTooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AddConsoleLine()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;msg, priority&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MapDrawCmd()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, cmdType, px, py, pz, labeltext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandFallback()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandsChanged()&amp;lt;/font&amp;gt; --&amp;gt; unknown (none?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitDefID, builderID, builderTeam, x, y, z, facing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, oldTeam, newTeam, capture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;builderID, builderTeam, unitID, unitDefID, part&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureDefID, teamID, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceLevel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Update()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;dt&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;called every screenframe. dt is the time since the last screenframe&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DefaultCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;type,id&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;can return an [[Lua_CMDs|CMD]] to change cursor and command. {{forumlink|topic=26438|title=example usage}}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowDirectUnitControl(unitID, unitDefID, unitTeam, playerID)   &amp;lt;/font&amp;gt; -&amp;gt; allowFpsControl&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;return true&#039;&#039; allows fps mode, &#039;&#039;return false&#039;&#039; blocks it.&lt;br /&gt;
&lt;br /&gt;
==Unit-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(prior to 94.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 94.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Can overwrite the taken damage by returning a new number value.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
As of 88.0 for both UnitDamaged and UnitPreDamaged:&lt;br /&gt;
     weaponDefID -1 --&amp;gt; debris collision&lt;br /&gt;
     weaponDefID -2 --&amp;gt; ground collision&lt;br /&gt;
     weaponDefID -3 --&amp;gt; object collision&lt;br /&gt;
     weaponDefID -4 --&amp;gt; fire damage&lt;br /&gt;
     weaponDefID -5 --&amp;gt; water damage&lt;br /&gt;
     weaponDefID -6 --&amp;gt; kill damage&lt;br /&gt;
     weaponDefID -7 --&amp;gt; crush damage&lt;br /&gt;
&lt;br /&gt;
As of 96.0 {Unit,Feature}{Pre}Damaged events receive the &#039;attacker&#039; ID when object is crushed&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitExperience()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, experience, oldExperience&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Spring.SetExperienceGrade must be called first to determine how often it is called&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, builderID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFinished()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFromFactory()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, factID, factDefID, userOrders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitTaken()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, newTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitGiven()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, oldTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitIdle()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams, cmdTag&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;cmdTag only available from version 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitSeismicPing()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, z, strength&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLoaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, transportID, transportTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnloaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, transportID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCloaked()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDecloaked)&amp;lt;/font&amp;gt;--&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitMoveFailed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for unitDefIDs registered via [[Lua_System#Synced|Script.SetWatchUnit]] since 85.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;StockpileChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShieldPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnitCollision(colliderID, collideeID)&amp;lt;/font&amp;gt; -- needs SetWatchUnit enabled for both parties&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTargetCheck(attackerID, attackerWeaponNum, attackerWeaponDefID)&amp;lt;/font&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]] since 92.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTarget(attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defaultPriority)&amp;lt;/font&amp;gt; &lt;br /&gt;
 --&amp;gt; &amp;lt;code&amp;gt;return &amp;quot;targetAllowed, targetPriority&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;, defaultPriority new in 89.0&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]] since 92.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(number unitID, number weaponID)&amp;lt;/font&amp;gt; --&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;true&#039;&#039; (&amp;lt;-?) skips Spring&#039;s own drawing of shield &amp;lt;weaponID&amp;gt; owned by unit &amp;lt;unitID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring/spring/commit/7bbfd9464d4f74c12163ea0740c8c60d1ba978f1 maybe new in 86.0+]&lt;br /&gt;
&lt;br /&gt;
==Feature-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TerraformComplete()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCmdDone()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdTag, cmdParams, cmdOptions&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;cmdParams and cmdOptions are only available from version 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFeatureCollision(colliderID, collideeID, crushKilled)&amp;lt;/font&amp;gt; -- needs SetWatchUnit for first and SetWatchFeature for second party&lt;br /&gt;
&lt;br /&gt;
{{new|95.0}} &amp;lt;font color=#55ee99&amp;gt;FeatureDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
{{new|95.0}} &amp;lt;font color=#55ee99&amp;gt;FeaturePreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;--&amp;gt; return newDamage, impulseMult (=0)&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Drawing:==&lt;br /&gt;
Inside these functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawGenesis()&amp;lt;/font&amp;gt; --&amp;gt; none.  Don&#039;t render here.&lt;br /&gt;
&lt;br /&gt;
 Spring draws the sky, the map, some water types, and unit selection.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorldPreUnit()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorld()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
&lt;br /&gt;
Each unit might also have a DrawUnit call, [[Lua_UnitRendering|enabled here.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawUnit(unitID,DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With enum DrawMode {&amp;lt;br&amp;gt;&lt;br /&gt;
	notDrawing     = 0,&amp;lt;br&amp;gt;&lt;br /&gt;
	normalDraw     = 1,&amp;lt;br&amp;gt;&lt;br /&gt;
	shadowDraw     = 2,&amp;lt;br&amp;gt;&lt;br /&gt;
	reflectionDraw = 3,&amp;lt;br&amp;gt;&lt;br /&gt;
	refractionDraw = 4&amp;lt;br&amp;gt;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawFeature(featureID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(unitID, weaponID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawProjectile(projectileID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreenEffects()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;vsx, vsy&amp;quot; where vsx, vsy are screen coords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreen()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawInMiniMap()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;sx, sy&amp;quot; where sx,sy are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldShadow()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldReflection()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldRefraction()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawLoadScreen()&amp;lt;/font&amp;gt; --&amp;gt; none. {{new|95.0}}&lt;br /&gt;
&lt;br /&gt;
Only available to LuaIntro, draws custom load screens.&lt;br /&gt;
&lt;br /&gt;
==Game Events:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameID()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;gameID&amp;quot; {{new|89.0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Explosion()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;weaponID, px, py, pz, ownerID&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;return true to hide the weapon&#039;s CEG&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShockFront()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;power, dx, dy, dz&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Not yet implemented!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameFrame()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;frameNum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CobCallback()&amp;lt;/font&amp;gt; --&amp;gt; unknown, marked FIXME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GroupChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;groupID&amp;quot; where groupID is the value of Group whose table value changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;WorldTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;ttType, data1, data2, data3&amp;quot; special, should be documented in detail. &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Not yet implemented!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePreload()&amp;lt;/font&amp;gt;  --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameStart()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameProgress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;serverFrameNum&amp;quot; ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; Not yet implemented!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameOver()&amp;lt;/font&amp;gt; --&amp;gt;  &amp;quot;[ [1] = allyTeamID1, [2] = allyTeamID2, ... ]&amp;quot;,  a list of winning allyteams, if empty the game result was undecided ( like when dropping from an host )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;   Will return nil in pre 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TeamDied()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;TeamID&amp;quot; where TeamID = the team that has been eliminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowStartPosition()&amp;lt;/font&amp;gt; --&amp;gt; &lt;br /&gt;
   number clampedPos.x, number clampedPos.y, number clampedPos.z,&lt;br /&gt;
   number playerID,&lt;br /&gt;
   number readyState,&lt;br /&gt;
   number rawPickPos.x, number rawPickPos.y, number rawPickPos.z&lt;br /&gt;
&lt;br /&gt;
clampedPos = coordinates clamped into startbox, rawPickPos = where player tried to start&lt;br /&gt;
&lt;br /&gt;
{{New|95.0}} the default &#039;failed to choose&#039; start-position is now just (0,0,0), not (0,-500,0) &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
readyState can be any one of:&lt;br /&gt;
    PLAYER_RDYSTATE_UPDATED = 0 -- player picked a position&lt;br /&gt;
    PLAYER_RDYSTATE_READIED = 1 -- player clicked ready&lt;br /&gt;
    PLAYER_RDYSTATE_FORCED = 2 -- game was force-started (player did not click ready)&lt;br /&gt;
    PLAYER_RDYSTATE_FAILED = 3&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameSetup()&amp;lt;/font&amp;gt; --&amp;gt; string &amp;quot;state&amp;quot;, boolean &amp;quot;ready&amp;quot;, table &amp;quot;playerStates&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;return success, newReady&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePaused()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, paused&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerAdded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerRemoved()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, reason&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Projectiles:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, weaponDefID&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponInterceptTarget&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;number interceptorUnitID, number interceptorWeaponID, number targetProjectileID&amp;quot;&lt;br /&gt;
returns boolean&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Bugs&amp;diff=3018</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Bugs&amp;diff=3018"/>
		<updated>2013-12-05T14:04:54Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* As a developer who found a bug */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== See if the bug and a solution are already known ==&lt;br /&gt;
You can do so in the [[FAQ]]&lt;br /&gt;
&lt;br /&gt;
You can also have a look at recent and stickied threads in the [http://springrts.com/phpbb/viewforum.php?f=11 Help &amp;amp; Bugs Forum]&lt;br /&gt;
&lt;br /&gt;
== How to report bugs==&lt;br /&gt;
To report a bug, please give a description, what is going wrong and &#039;&#039;&#039;how it can be reproduced&#039;&#039;&#039;. what steps are required to reproduce it? If required to reproduce the bug add a script or/and a link to the Game/Map.&lt;br /&gt;
&lt;br /&gt;
==Logfiles, screenshots, replays==&lt;br /&gt;
* Always attach [[infolog.txt]], as it contains system/driver/version info and if spring crashed. Click the link to see what it is and how to share it.&lt;br /&gt;
&lt;br /&gt;
* Attach a replay: often Bugs can&#039;t be reproduced, its often better to see something than to only read about that.&lt;br /&gt;
&lt;br /&gt;
* Screenshots are taken with the F12 key and saved in the \screenshots\ folder. You can attach them to postings or upload on site such as: [http://www.imgur.com imgur.com] , [http://www.abload.de abload.de] &lt;br /&gt;
&lt;br /&gt;
* If a dev asks you for more information, please answer his questions.&lt;br /&gt;
&lt;br /&gt;
* Try to avoid endless discussions why a bug was introduced, be polite!&lt;br /&gt;
&lt;br /&gt;
* If you want more tips for a good bug-report, please read &amp;quot;[http://www.chiark.greenend.org.uk/~sgtatham/bugs.html How to Report Bugs Effectively]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The better the bug-report, the better the chances, that it will be fixed!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where to report bugs==&lt;br /&gt;
===As a player who needs help===&lt;br /&gt;
Do not be afraid to ask for help [http://springrts.com/phpbb/viewforum.php?f=11 in the forum.] Read the guidelines above so people can help you as good as possible.&lt;br /&gt;
&lt;br /&gt;
===As a developer who found a bug===&lt;br /&gt;
If you found a bug in the Spring Engine, please report it to the [http://springrts.com/mantis bug tracker]. However, reporters are advised that this official bug report site has become increasingly unfriendly. Therefore, people are discouraged from reporting an excessive amount of issues there. A good cap on reports is about one monthly issue, unless you have questions that can be answered with yes/no, in which case engine developers can bear up to 5 (five) monthly issues. If you have issues which developers may consider stupid, it is better to refrain from reporting these in any official way.&lt;br /&gt;
&lt;br /&gt;
Before [http://springrts.com/mantis/bug_report_page.php filling a bug], please look if someone else [http://springrts.com/mantis/view_all_bug_page.php already has reported] this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Engine Dev]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Bugs&amp;diff=3017</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Bugs&amp;diff=3017"/>
		<updated>2013-12-05T14:03:49Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* As a developer who found a bug */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== See if the bug and a solution are already known ==&lt;br /&gt;
You can do so in the [[FAQ]]&lt;br /&gt;
&lt;br /&gt;
You can also have a look at recent and stickied threads in the [http://springrts.com/phpbb/viewforum.php?f=11 Help &amp;amp; Bugs Forum]&lt;br /&gt;
&lt;br /&gt;
== How to report bugs==&lt;br /&gt;
To report a bug, please give a description, what is going wrong and &#039;&#039;&#039;how it can be reproduced&#039;&#039;&#039;. what steps are required to reproduce it? If required to reproduce the bug add a script or/and a link to the Game/Map.&lt;br /&gt;
&lt;br /&gt;
==Logfiles, screenshots, replays==&lt;br /&gt;
* Always attach [[infolog.txt]], as it contains system/driver/version info and if spring crashed. Click the link to see what it is and how to share it.&lt;br /&gt;
&lt;br /&gt;
* Attach a replay: often Bugs can&#039;t be reproduced, its often better to see something than to only read about that.&lt;br /&gt;
&lt;br /&gt;
* Screenshots are taken with the F12 key and saved in the \screenshots\ folder. You can attach them to postings or upload on site such as: [http://www.imgur.com imgur.com] , [http://www.abload.de abload.de] &lt;br /&gt;
&lt;br /&gt;
* If a dev asks you for more information, please answer his questions.&lt;br /&gt;
&lt;br /&gt;
* Try to avoid endless discussions why a bug was introduced, be polite!&lt;br /&gt;
&lt;br /&gt;
* If you want more tips for a good bug-report, please read &amp;quot;[http://www.chiark.greenend.org.uk/~sgtatham/bugs.html How to Report Bugs Effectively]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The better the bug-report, the better the chances, that it will be fixed!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where to report bugs==&lt;br /&gt;
===As a player who needs help===&lt;br /&gt;
Do not be afraid to ask for help [http://springrts.com/phpbb/viewforum.php?f=11 in the forum.] Read the guidelines above so people can help you as good as possible.&lt;br /&gt;
&lt;br /&gt;
===As a developer who found a bug===&lt;br /&gt;
If you found a bug in the Spring Engine, please report it to the [http://springrts.com/mantis bug tracker]. However, reporters are advised that this official bug report site has become increasingly unfriendly. Therefore, people are discouraged from reporting an excessive amount of issues there. A good cap on reports is about one monthly issue, unless you have questions that can be answered with yes/no, in which case engine developers can bear up to 5 (five) monthly issues.&lt;br /&gt;
&lt;br /&gt;
Before [http://springrts.com/mantis/bug_report_page.php filling a bug], please look if someone else [http://springrts.com/mantis/view_all_bug_page.php already has reported] this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Engine Dev]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Bugs&amp;diff=3016</id>
		<title>Bugs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Bugs&amp;diff=3016"/>
		<updated>2013-12-05T14:03:11Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* As a developer who found a bug */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== See if the bug and a solution are already known ==&lt;br /&gt;
You can do so in the [[FAQ]]&lt;br /&gt;
&lt;br /&gt;
You can also have a look at recent and stickied threads in the [http://springrts.com/phpbb/viewforum.php?f=11 Help &amp;amp; Bugs Forum]&lt;br /&gt;
&lt;br /&gt;
== How to report bugs==&lt;br /&gt;
To report a bug, please give a description, what is going wrong and &#039;&#039;&#039;how it can be reproduced&#039;&#039;&#039;. what steps are required to reproduce it? If required to reproduce the bug add a script or/and a link to the Game/Map.&lt;br /&gt;
&lt;br /&gt;
==Logfiles, screenshots, replays==&lt;br /&gt;
* Always attach [[infolog.txt]], as it contains system/driver/version info and if spring crashed. Click the link to see what it is and how to share it.&lt;br /&gt;
&lt;br /&gt;
* Attach a replay: often Bugs can&#039;t be reproduced, its often better to see something than to only read about that.&lt;br /&gt;
&lt;br /&gt;
* Screenshots are taken with the F12 key and saved in the \screenshots\ folder. You can attach them to postings or upload on site such as: [http://www.imgur.com imgur.com] , [http://www.abload.de abload.de] &lt;br /&gt;
&lt;br /&gt;
* If a dev asks you for more information, please answer his questions.&lt;br /&gt;
&lt;br /&gt;
* Try to avoid endless discussions why a bug was introduced, be polite!&lt;br /&gt;
&lt;br /&gt;
* If you want more tips for a good bug-report, please read &amp;quot;[http://www.chiark.greenend.org.uk/~sgtatham/bugs.html How to Report Bugs Effectively]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The better the bug-report, the better the chances, that it will be fixed!&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Where to report bugs==&lt;br /&gt;
===As a player who needs help===&lt;br /&gt;
Do not be afraid to ask for help [http://springrts.com/phpbb/viewforum.php?f=11 in the forum.] Read the guidelines above so people can help you as good as possible.&lt;br /&gt;
&lt;br /&gt;
===As a developer who found a bug===&lt;br /&gt;
If you found a bug in the Spring Engine, please report it to the [http://springrts.com/mantis bug tracker]. However, reporters are advised that this official bug report site has become increasingly unfriendly. Therefore, people are discouraged from report an excessive amount of issues there. A good cap on reports are about one monthly issue, unless you have questions that can be answered with yes/no, in which case engine developers can bear up to 5 (five) monthly issues.&lt;br /&gt;
&lt;br /&gt;
Before [http://springrts.com/mantis/bug_report_page.php filling a bug], please look if someone else [http://springrts.com/mantis/view_all_bug_page.php already has reported] this issue.&lt;br /&gt;
&lt;br /&gt;
[[Category:Engine Dev]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=11032</id>
		<title>LuaCallinReturn</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=11032"/>
		<updated>2013-11-14T21:34:31Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Unit-Specific: */&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;
==Engine Source==&lt;br /&gt;
If you can understand Lua code well and wish to get the most up to date info, you can refer to:&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/actions.lua}}, &lt;br /&gt;
{{sourcelink|file=cont/LuaUI/widgets.lua}} and &amp;lt;br&amp;gt;&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/gadgets.lua}} &amp;lt;br&amp;gt;&lt;br /&gt;
to see how widget/gadget call-ins are distributed, find call-in and widgetHandler function definitions, see how they are processed and what values should be returned from some call ins&lt;br /&gt;
(are these the only files?)&lt;br /&gt;
&lt;br /&gt;
==What is a callin anyway?==&lt;br /&gt;
Call-ins are calls from the engine, into the gadget or widget script. In other words, these functions are called when a particular â€œeventâ€ happens.&lt;br /&gt;
Some call-in functions can return values to the engine.&lt;br /&gt;
===Blocking events with return values===&lt;br /&gt;
The call-in functions named &#039;&#039;&#039;&#039;&#039;Allow&#039;&#039;&#039;&#039;&#039;XXX can block their event by returning &#039;&#039;false&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
For example &#039;&#039;AllowUnitTransfer()&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return true&amp;lt;/code&amp;gt; = allow transfer &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return false&amp;lt;/code&amp;gt; = deny transfer&lt;br /&gt;
&lt;br /&gt;
==Commands, general-purpose:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Initialize()&amp;lt;/font&amp;gt; --&amp;gt; none.&amp;lt;br&amp;gt;&lt;br /&gt;
called when widget/gadget gets (re-)loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Shutdown()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerChanged&amp;lt;/font&amp;gt; --&amp;gt; (playerID).&lt;br /&gt;
gadget/widget: Use this to check whether a player has become spectator for instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;LayoutButtons()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ConfigureLayout()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;command&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandNotify()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;id, params, options&amp;quot;, where id = the CommandID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyPress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key, mods, isRepeat&amp;quot;, where key = keymap, mods = SHIFT, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseMove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, dx, dy, button&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MousePress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;button parameter values: left - 1, middle - 2, right - 3&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Please note that in order to have Spring call MouseRelease, you need to have a MousePress call-in in the same widget that returns true.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseWheel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;up, value&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;IsAbove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GetTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.  Returns WorldTooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AddConsoleLine()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;msg, priority&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MapDrawCmd()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, cmdType, px, py, pz, labeltext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandFallback()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandsChanged()&amp;lt;/font&amp;gt; --&amp;gt; unknown (none?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitDefID, builderID, builderTeam, x, y, z, facing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, oldTeam, newTeam, capture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;builderID, builderTeam, unitID, unitDefID, part&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureDefID, teamID, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceLevel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Update()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;dt&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;called every screenframe. dt is the time since the last screenframe&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DefaultCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;type,id&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;can return an [[Lua_CMDs|CMD]] to change cursor and command. {{forumlink|topic=26438|title=example usage}}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowDirectUnitControl(unitID, unitDefID, unitTeam, playerID)   &amp;lt;/font&amp;gt; -&amp;gt; allowFpsControl&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;return true&#039;&#039; allows fps mode, &#039;&#039;return false&#039;&#039; blocks it.&lt;br /&gt;
&lt;br /&gt;
==Unit-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(prior to 94.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 94.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt; &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Can overwrite the taken damage by returning a new number value.&amp;lt;br&amp;gt; &lt;br /&gt;
&lt;br /&gt;
As of 88.0 for both UnitDamaged and UnitPreDamaged:&lt;br /&gt;
     weaponDefID -1 --&amp;gt; debris collision&lt;br /&gt;
     weaponDefID -2 --&amp;gt; ground collision&lt;br /&gt;
     weaponDefID -3 --&amp;gt; object collision&lt;br /&gt;
     weaponDefID -4 --&amp;gt; fire damage&lt;br /&gt;
     weaponDefID -5 --&amp;gt; water damage&lt;br /&gt;
     weaponDefID -6 --&amp;gt; kill damage&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitExperience()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, experience, oldExperience&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Spring.SetExperienceGrade must be called first to determine how often it is called&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, builderID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFinished()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFromFactory()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, factID, factDefID, userOrders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitTaken()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, newTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitGiven()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, oldTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitIdle()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams, cmdTag&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;cmdTag only available from version 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitSeismicPing()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, z, strength&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLoaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, transportID, transportTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnloaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, transportID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCloaked()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDecloaked)&amp;lt;/font&amp;gt;--&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitMoveFailed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for unitDefIDs registered via [[Lua_System#Synced|Script.SetWatchUnit]] since 85.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;StockpileChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 95.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShieldPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnitCollision(colliderID, collideeID)&amp;lt;/font&amp;gt; -- needs SetWatchUnit enabled for both parties&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTargetCheck(attackerID, attackerWeaponNum, attackerWeaponDefID)&amp;lt;/font&amp;gt; &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]] since 92.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTarget(attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defaultPriority)&amp;lt;/font&amp;gt; &lt;br /&gt;
 --&amp;gt; &amp;lt;code&amp;gt;return &amp;quot;targetAllowed, targetPriority&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;, defaultPriority new in 89.0&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]] since 92.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(number unitID, number weaponID)&amp;lt;/font&amp;gt; --&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;true&#039;&#039; (&amp;lt;-?) skips Spring&#039;s own drawing of shield &amp;lt;weaponID&amp;gt; owned by unit &amp;lt;unitID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring/spring/commit/7bbfd9464d4f74c12163ea0740c8c60d1ba978f1 maybe new in 86.0+]&lt;br /&gt;
&lt;br /&gt;
==Feature-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TerraformComplete()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCmdDone()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdTag, cmdParams, cmdOptions&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;cmdParams and cmdOptions are only available from version 95.0&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFeatureCollision(colliderID, collideeID, crushKilled)&amp;lt;/font&amp;gt; -- needs SetWatchUnit for first and SetWatchFeature for second party&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;95+&amp;lt;/span&amp;gt;&amp;lt;font color=#55ee99&amp;gt;FeatureDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, featureDefID, featureTeam, damage [, weaponDefID, projectileID [, attackerID, attackerDefID, attackerTeam ]]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;95+&amp;lt;/span&amp;gt;&amp;lt;font color=#55ee99&amp;gt;FeaturePreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, featureDefID, featureTeam, damage [, weaponDefID, projectileID [, attackerID, attackerDefID, attackerTeam ]]&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Drawing:==&lt;br /&gt;
Inside these functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawGenesis()&amp;lt;/font&amp;gt; --&amp;gt; none.  Don&#039;t render here.&lt;br /&gt;
&lt;br /&gt;
 Spring draws the sky, the map, some water types, and unit selection.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorldPreUnit()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorld()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
&lt;br /&gt;
Each unit might also have a DrawUnit call, [[Lua_UnitRendering|enabled here.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawUnit(unitID,DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With enum DrawMode {&amp;lt;br&amp;gt;&lt;br /&gt;
	notDrawing     = 0,&amp;lt;br&amp;gt;&lt;br /&gt;
	normalDraw     = 1,&amp;lt;br&amp;gt;&lt;br /&gt;
	shadowDraw     = 2,&amp;lt;br&amp;gt;&lt;br /&gt;
	reflectionDraw = 3,&amp;lt;br&amp;gt;&lt;br /&gt;
	refractionDraw = 4&amp;lt;br&amp;gt;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawFeature(featureID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(unitID, weaponID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawProjectile(projectileID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreenEffects()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;vsx, vsy&amp;quot; where vsx, vsy are screen coords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreen()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawInMiniMap()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;sx, sy&amp;quot; where sx,sy are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldShadow()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldReflection()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldRefraction()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
==Game Events:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameID()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;gameID&amp;quot; {{new|89.0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Explosion()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;weaponID, px, py, pz, ownerID&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&amp;lt;br&amp;gt;return true to hide the weapon&#039;s CEG&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShockFront()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;power, dx, dy, dz&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Not yet implemented!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameFrame()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;frameNum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CobCallback()&amp;lt;/font&amp;gt; --&amp;gt; unknown, marked FIXME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GroupChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;groupID&amp;quot; where groupID is the value of Group whose table value changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;WorldTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;ttType, data1, data2, data3&amp;quot; special, should be documented in detail. &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;Not yet implemented!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePreload()&amp;lt;/font&amp;gt;  --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameStart()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameProgress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;serverFrameNum&amp;quot; ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; Not yet implemented!&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameOver()&amp;lt;/font&amp;gt; --&amp;gt;  &amp;quot;[ [1] = allyTeamID1, [2] = allyTeamID2, ... ]&amp;quot;,  a list of winning allyteams, if empty the game result was undecided ( like when dropping from an host )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;   Will return nil in pre 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TeamDied()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;TeamID&amp;quot; where TeamID = the team that has been eliminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowStartPosition()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;cx, cy, cz, playerID, readyState, rx, ry, rz&amp;quot;, where rx,ry,rz are the position the player picked and cx,cy,cz are that position clamped to the startbox. readyState can be any one of &amp;lt;br&amp;gt; 0 -- player picked a position, &amp;lt;br&amp;gt; 1 -- player clicked ready,  &amp;lt;br&amp;gt; 2 -- game was force-started (player did not click ready)&lt;br /&gt;
&amp;lt;br&amp;gt;return true/false to allow/deny placing startposition marker&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameSetup()&amp;lt;/font&amp;gt; --&amp;gt; string &amp;quot;state&amp;quot;, boolean &amp;quot;ready&amp;quot;, table &amp;quot;playerStates&amp;quot; &lt;br /&gt;
&amp;lt;br&amp;gt;return success, newReady&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePaused()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, paused&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerAdded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID&amp;quot; &lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerRemoved()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, reason&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Projectiles:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, weaponDefID&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID&amp;quot;&lt;br /&gt;
&amp;lt;br&amp;gt;&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via Script.SetWatchWeapon&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponInterceptTarget&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;number interceptorUnitID, number interceptorWeaponID, number targetProjectileID&amp;quot;&lt;br /&gt;
returns boolean&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=11015</id>
		<title>LuaCallinReturn</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=11015"/>
		<updated>2013-06-15T00:39:07Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Commands, general-purpose: */&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;
==Engine Source==&lt;br /&gt;
If you can understand Lua code well and wish to get the most up to date info, you can refer to:&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/actions.lua}}, &lt;br /&gt;
{{sourcelink|file=cont/LuaUI/widgets.lua}} and &amp;lt;br&amp;gt;&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/gadgets.lua}} &amp;lt;br&amp;gt;&lt;br /&gt;
to see how widget/gadget call-ins are distributed, find call-in and widgetHandler function definitions, see how they are processed and what values should be returned from some call ins&lt;br /&gt;
(are these the only files?)&lt;br /&gt;
&lt;br /&gt;
==What is a callin anyway?==&lt;br /&gt;
Call-ins are calls from the engine, into the gadget or widget script. In other words, these functions are called when a particular â€œeventâ€ happens.&lt;br /&gt;
Some call-in functions can return values to the engine.&lt;br /&gt;
===Blocking events with return values===&lt;br /&gt;
The call-in functions named &#039;&#039;&#039;&#039;&#039;Allow&#039;&#039;&#039;&#039;&#039;XXX can block their event by returning &#039;&#039;false&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
For example &#039;&#039;AllowUnitTransfer()&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return true&amp;lt;/code&amp;gt; = allow transfer &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return false&amp;lt;/code&amp;gt; = deny transfer&lt;br /&gt;
&lt;br /&gt;
==Commands, general-purpose:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Initialize()&amp;lt;/font&amp;gt; --&amp;gt; none.&amp;lt;/br&amp;gt;&lt;br /&gt;
called when widget/gadget gets (re-)loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Shutdown()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerChanged&amp;lt;/font&amp;gt; --&amp;gt; (playerID).&lt;br /&gt;
gadget/widget: Use this to check whether a player has become spectator for instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;LayoutButtons()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ConfigureLayout()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;command&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandNotify()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;id, params, options&amp;quot;, where id = the CommandID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyPress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key, mods, isRepeat&amp;quot;, where key = keymap, mods = SHIFT, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseMove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, dx, dy, button&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MousePress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;button parameter values: left - 1, middle - 2, right - 3&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Please note that in order to have Spring call MouseRelease, you need to have a MousePress call-in in the same widget that returns true.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseWheel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;up, value&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;IsAbove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GetTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.  Returns WorldTooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AddConsoleLine()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;msg, priority&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MapDrawCmd()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, cmdType, px, py, pz, labeltext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandFallback()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandsChanged()&amp;lt;/font&amp;gt; --&amp;gt; unknown (none?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitDefID, builderID, builderTeam, x, y, z, facing&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, oldTeam, newTeam, capture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;builderID, builderTeam, unitID, unitDefID, part&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureDefID, teamID, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceLevel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Update()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;dt&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;gets called very often, even if the game is paused. dt is the time since the function was last called (???)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DefaultCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;type,id&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;can return an [[Lua_CMDs|CMD]] to change cursor and command. {{forumlink|topic=26438|title=example usage}}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowDirectUnitControl(unitID, unitDefID, unitTeam, playerID)   &amp;lt;/font&amp;gt; -&amp;gt; allowFpsControl&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;return true&#039;&#039; allows fps mode, &#039;&#039;return false&#039;&#039; blocks it.&lt;br /&gt;
&lt;br /&gt;
==Unit-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(prior to 94.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&amp;quot; &amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;(as of 94.0)&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, attackerID, attackerDefID, attackerTeam&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Can overwrite the taken damage by returning a new number value.&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
As of 88.0 for both UnitDamaged and UnitPreDamaged:&lt;br /&gt;
     weaponDefID -1 --&amp;gt; debris collision&lt;br /&gt;
     weaponDefID -2 --&amp;gt; ground collision&lt;br /&gt;
     weaponDefID -3 --&amp;gt; object collision&lt;br /&gt;
     weaponDefID -4 --&amp;gt; fire damage&lt;br /&gt;
     weaponDefID -5 --&amp;gt; water damage&lt;br /&gt;
     weaponDefID -6 --&amp;gt; kill damage&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitExperience()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, experience, oldExperience&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Spring.SetExperienceGrade must be called first to determine how often it is called&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, builderID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFinished()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFromFactory()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, factID, factDefID, userOrders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitTaken()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, newTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitGiven()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, oldTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitIdle()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitSeismicPing()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, z, strength&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLoaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, transportID, transportTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnloaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, transportID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCloaked()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDecloaked)&amp;lt;/font&amp;gt;--&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitMoveFailed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for unitDefIDs registered via [[Lua_System#Synced|Script.SetWatchUnit]] since 85.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;StockpileChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShieldPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnitCollision(colliderID, collideeID)&amp;lt;/font&amp;gt; -- needs SetWatchUnit enabled for both parties&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTargetCheck(attackerID, attackerWeaponNum, attackerWeaponDefID)&amp;lt;/font&amp;gt; &lt;br /&gt;
{{new|83.0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]] since 92.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTarget(attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defaultPriority)&amp;lt;/font&amp;gt; &lt;br /&gt;
 --&amp;gt; &amp;lt;code&amp;gt;return &amp;quot;targetAllowed, targetPriority&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
{{new|83.0}}&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;, defaultPriority new in 89.0&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for weaponDefIDs registered via [[Lua_System#Synced|Script.SetWatchWeapon]] since 92.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(number unitID, number weaponID)&amp;lt;/font&amp;gt; --&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;true&#039;&#039; (&amp;lt;-?) skips Spring&#039;s own drawing of shield &amp;lt;weaponID&amp;gt; owned by unit &amp;lt;unitID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring/spring/commit/7bbfd9464d4f74c12163ea0740c8c60d1ba978f1 maybe new in 86.0+]&lt;br /&gt;
&lt;br /&gt;
==Feature-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TerraformComplete()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCmdDone()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFeatureCollision(colliderID, collideeID, crushKilled)&amp;lt;/font&amp;gt; -- needs SetWatchUnit for first and SetWatchFeature for second party&lt;br /&gt;
&lt;br /&gt;
==Drawing:==&lt;br /&gt;
Inside these functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawGenesis()&amp;lt;/font&amp;gt; --&amp;gt; none.  Don&#039;t render here.&lt;br /&gt;
&lt;br /&gt;
 Spring draws the sky, the map, some water types, and unit selection.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorldPreUnit()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorld()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
&lt;br /&gt;
Each unit might also have a DrawUnit call, [[Lua_UnitRendering|enabled here.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawUnit(unitID,DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With enum DrawMode {&amp;lt;br&amp;gt;&lt;br /&gt;
	notDrawing     = 0,&amp;lt;br&amp;gt;&lt;br /&gt;
	normalDraw     = 1,&amp;lt;br&amp;gt;&lt;br /&gt;
	shadowDraw     = 2,&amp;lt;br&amp;gt;&lt;br /&gt;
	reflectionDraw = 3,&amp;lt;br&amp;gt;&lt;br /&gt;
	refractionDraw = 4&amp;lt;br&amp;gt;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawFeature(featureID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(unitID, weaponID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawProjectile(projectileID, DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreenEffects()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;vsx, vsy&amp;quot; where vsx, vsy are screen coords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreen()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawInMiniMap()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;sx, sy&amp;quot; where sx,sy are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldShadow()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldReflection()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldRefraction()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
==Game Events:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameID()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;gameID&amp;quot; {{new|89.0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Explosion()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;weaponID, px, py, pz, ownerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShockFront()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;power, dx, dy, dz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameFrame()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;frameNum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CobCallback()&amp;lt;/font&amp;gt; --&amp;gt; unknown, marked FIXME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GroupChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;groupID&amp;quot; where groupID is the value of Group whose table value changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;WorldTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;ttType, data1, data2, data3&amp;quot; special, should be documented in detail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePreload()&amp;lt;/font&amp;gt;  --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameStart()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameProgress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;serverFrameNum&amp;quot; ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; New in 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameOver()&amp;lt;/font&amp;gt; --&amp;gt;  &amp;quot;[ [1] = allyTeamID1, [2] = allyTeamID2, ... ]&amp;quot;,  a list of winning allyteams, if empty the game result was undecided ( like when dropping from an host )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;   Will return nil in pre 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TeamDied()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;TeamID&amp;quot; where TeamID = the team that has been eliminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowStartPosition()&amp;lt;/font&amp;gt; --&amp;gt; x,y,z, playerID&lt;br /&gt;
&lt;br /&gt;
return true/false to allow/deny placing startposition marker&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameSetup()&lt;br /&gt;
&amp;lt;/font&amp;gt; --&amp;gt; string &amp;quot;state&amp;quot;, boolean &amp;quot;ready&amp;quot;, table &amp;quot;playerStates&amp;quot;&lt;br /&gt;
&lt;br /&gt;
return success, newReady&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePaused()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, paused&amp;quot; {{new|83.0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerAdded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID&amp;quot; {{new|83.0}}&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerRemoved()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, reason&amp;quot; {{new|83.0}}&lt;br /&gt;
&lt;br /&gt;
==Projectiles:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, weaponDefID&amp;quot;&lt;br /&gt;
Only called for weapons with SetWatchWeapon enabled&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID&amp;quot;&lt;br /&gt;
Only called for weapons with SetWatchWeapon enabled&lt;br /&gt;
&lt;br /&gt;
[[Category:Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=10998</id>
		<title>LuaCallinReturn</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=10998"/>
		<updated>2012-03-15T21:54:55Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Game Events: */&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;
==Engine Source==&lt;br /&gt;
If you can understand Lua code well and wish to get the most up to date info, you can refer to:&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/actions.lua}}, &lt;br /&gt;
{{sourcelink|file=cont/LuaUI/widgets.lua}} and &amp;lt;br&amp;gt;&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/gadgets.lua}} &amp;lt;br&amp;gt;&lt;br /&gt;
to see how widget/gadget call-ins are distributed, find call-in and widgetHandler function definitions, see how they are processed and what values should be returned from some call ins&lt;br /&gt;
(are these the only files?)&lt;br /&gt;
&lt;br /&gt;
==What is a callin anyway?==&lt;br /&gt;
Call-ins are calls from the engine, into the gadget or widget script. In other words, these functions are called when a particular â€œeventâ€ happens.&lt;br /&gt;
Some call-in functions can return values to the engine.&lt;br /&gt;
===Blocking events with return values===&lt;br /&gt;
The call-in functions named &#039;&#039;&#039;&#039;&#039;Allow&#039;&#039;&#039;&#039;&#039;XXX can block their event by returning &#039;&#039;false&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
For example &#039;&#039;AllowUnitTransfer()&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return true&amp;lt;/code&amp;gt; = allow transfer &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return false&amp;lt;/code&amp;gt; = deny transfer&lt;br /&gt;
&lt;br /&gt;
==Commands, general-purpose:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Initialize()&amp;lt;/font&amp;gt; --&amp;gt; none.&amp;lt;/br&amp;gt;&lt;br /&gt;
called when widget/gadget gets (re-)loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Shutdown()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerChanged&amp;lt;/font&amp;gt; --&amp;gt; (playerID).&lt;br /&gt;
gadget/widget: Use this to check whether a player has become spectator for instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;LayoutButtons()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ConfigureLayout()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;command&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandNotify()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;id, params, options&amp;quot;, where id = the CommandID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyPress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key, mods, isRepeat&amp;quot;, where key = keymap, mods = SHIFT, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseMove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, dx, dy, button&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MousePress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;button parameter values: left - 1, middle - 2, right - 3&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Please note that in order to have Spring call MouseRelease, you need to have a MousePress call-in in the same widget that returns true.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseWheel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;up, value&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;IsAbove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GetTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.  Returns WorldTooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AddConsoleLine()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;msg, priority&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MapDrawCmd()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, cmdType, px, py, pz, labeltext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandFallback()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandsChanged()&amp;lt;/font&amp;gt; --&amp;gt; unknown (none?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitDefID, builderID, builderTeam, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, oldTeam, newTeam, capture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;builderID, builderTeam, unitID, unitDefID, part&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureDefID, teamID, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceLevel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Update()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;dt&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;gets called very often, even if the game is paused. dt is the time since the function was last called (???)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DefaultCommand()&amp;lt;/font&amp;gt; --&amp;gt; nothing (???)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;can return an [[Lua_CMDs|CMD]] to change cursor and command. {{forumlink|topic=26438|title=example usage}}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowDirectUnitControl(unitID, unitDefID, unitTeam, playerID)   &amp;lt;/font&amp;gt; -&amp;gt; allowFpsControl&amp;lt;br&amp;gt;&lt;br /&gt;
&#039;&#039;return true&#039;&#039; allows fps mode, &#039;&#039;return false&#039;&#039; blocks it.&lt;br /&gt;
&lt;br /&gt;
==Unit-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
can overwrite the taken damage by returning a new number value.&amp;lt;br&amp;gt;&lt;br /&gt;
[https://github.com/spring/spring/commit/a75743e42806f94d73c6e98420e30165998873a4 weaponID&amp;lt;0 indicates damage taken by non-weapon ways] (85.0+)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, builderID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFinished()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFromFactory()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, factID, factDefID, userOrders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, attackerID, attackerDefID, attackerTeamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitTaken()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, newTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitGiven()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, oldTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitIdle()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitSeismicPing()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, z, strength&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLoaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, transportID, transportTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnloaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, transportID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCloaked()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDecloaked)&amp;lt;/font&amp;gt;--&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitMoveFailed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Only called for unitDefIDs registered via [[Lua_System#Synced|Script.SetWatchUnit]] since 85.0&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;StockpileChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShieldPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnitCollision(colliderID, collideeID)&amp;lt;/font&amp;gt; -- needs SetWatchUnit enabled for both parties&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTargetCheck(attackerID, attackerWeaponNum, attackerWeaponDefID)&amp;lt;/font&amp;gt;&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; New in 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowWeaponTarget(attackerID, targetID, attackerWeaponNum, attackerWeaponDefID)&amp;lt;/font&amp;gt;&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; New in 0.83.x&amp;lt;/span&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
 --&amp;gt; &amp;lt;code&amp;gt;return &amp;quot;targetAllowed, targetPriority&amp;quot;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawShield(number unitID, number weaponID)&amp;lt;/font&amp;gt; --&amp;gt; boolean&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;true&#039;&#039; (&amp;lt;-?) skips Spring&#039;s own drawing of shield &amp;lt;weaponID&amp;gt; owned by unit &amp;lt;unitID&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring/spring/commit/7bbfd9464d4f74c12163ea0740c8c60d1ba978f1 maybe new in 86.0+]&lt;br /&gt;
&lt;br /&gt;
==Feature-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TerraformComplete()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCmdDone()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFeatureCollision(colliderID, collideeID, crushKilled)&amp;lt;/font&amp;gt; -- needs SetWatchUnit for first and SetWatchFeature for second party&lt;br /&gt;
&lt;br /&gt;
==Drawing:==&lt;br /&gt;
Inside these functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawGenesis()&amp;lt;/font&amp;gt; --&amp;gt; none.  Don&#039;t render here.&lt;br /&gt;
&lt;br /&gt;
 Spring draws the sky, the map, some water types, and unit selection.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorldPreUnit()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorld()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
&lt;br /&gt;
Each unit might also have a DrawUnit call, [[Lua_UnitRendering|enabled here.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawUnit(unitID,DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With enum DrawMode {&amp;lt;br&amp;gt;&lt;br /&gt;
	notDrawing     = 0,&amp;lt;br&amp;gt;&lt;br /&gt;
	normalDraw     = 1,&amp;lt;br&amp;gt;&lt;br /&gt;
	shadowDraw     = 2,&amp;lt;br&amp;gt;&lt;br /&gt;
	reflectionDraw = 3,&amp;lt;br&amp;gt;&lt;br /&gt;
	refractionDraw = 4&amp;lt;br&amp;gt;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreenEffects()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;vsx, vsy&amp;quot; where vsx, vsy are screen coords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreen()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawInMiniMap()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;sx, sy&amp;quot; where sx,sy are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldShadow()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldReflection()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldRefraction()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
==Game Events:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Explosion()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;weaponID, px, py, pz, ownerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShockFront()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;power, dx, dy, dz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameFrame()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;frameNum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CobCallback()&amp;lt;/font&amp;gt; --&amp;gt; unknown, marked FIXME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GroupChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;groupID&amp;quot; where groupID is the value of Group whose table value changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;WorldTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;ttType, data1, data2, data3&amp;quot; special, should be documented in detail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePreload()&amp;lt;/font&amp;gt;  --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameStart()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameProgress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;serverFrameNum&amp;quot; ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; New in 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameOver()&amp;lt;/font&amp;gt; --&amp;gt;  &amp;quot;[ [1] = allyTeamID1, [2] = allyTeamID2, ... ]&amp;quot;,  a list of winning allyteams, if empty the game result was undecided ( like when dropping from an host )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;   Will return nil in pre 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TeamDied()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;TeamID&amp;quot; where TeamID = the team that has been eliminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowStartPosition()&amp;lt;/font&amp;gt; --&amp;gt; playerID, x,y,z&lt;br /&gt;
&lt;br /&gt;
return true/false to allow/deny placing startposition marker&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameSetup()&lt;br /&gt;
&amp;lt;/font&amp;gt; --&amp;gt; string &amp;quot;state&amp;quot;, boolean &amp;quot;ready&amp;quot;, table &amp;quot;playerStates&amp;quot;&lt;br /&gt;
&lt;br /&gt;
return success, newReady&lt;br /&gt;
&lt;br /&gt;
==Projectiles:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Details needed!==&lt;br /&gt;
from https://github.com/spring/spring/blob/84.0/doc/changelog.txt&lt;br /&gt;
&lt;br /&gt;
 - added widget call-in GamePaused  -&amp;gt;parameters: none?&lt;br /&gt;
 - added widget call-in PlayerAdded  -&amp;gt;parameters: probally playerID, teamID?&lt;br /&gt;
 - added widget call-in PlayerRemoved  -&amp;gt;parameters: probally playerID, teamID?&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=10974</id>
		<title>LuaCallinReturn</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=10974"/>
		<updated>2011-08-10T21:07:53Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Commands, general-purpose: */&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;
==Engine Source==&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/actions.lua}} (is that the only file????)&lt;br /&gt;
&lt;br /&gt;
==What is a callin anyway?==&lt;br /&gt;
Call-ins are calls from the engine, into the gadget or widget script. In other words, these functions are called when a particular â€œeventâ€ happens.&lt;br /&gt;
Some call-in functions can return values to the engine.&lt;br /&gt;
===Blocking events with return values===&lt;br /&gt;
The call-in functions named &#039;&#039;&#039;&#039;&#039;Allow&#039;&#039;&#039;&#039;&#039;XXX can block their event by returning &#039;&#039;false&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
For example &#039;&#039;AllowUnitTransfer()&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return true&amp;lt;/code&amp;gt; = allow transfer &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return false&amp;lt;/code&amp;gt; = deny transfer&lt;br /&gt;
&lt;br /&gt;
==Commands, general-purpose:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Initialize()&amp;lt;/font&amp;gt; --&amp;gt; none.&amp;lt;/br&amp;gt;&lt;br /&gt;
called when widget/gadget gets (re-)loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Shutdown()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;PlayerChanged&amp;lt;/font&amp;gt; --&amp;gt; (playerID).&lt;br /&gt;
gadget/widget: Use this to check whether a player has become spectator for instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;LayoutButtons()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ConfigureLayout()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;command&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandNotify()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;id, params, options&amp;quot;, where id = the CommandID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyPress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key, mods, isRepeat&amp;quot;, where key = keymap, mods = SHIFT, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseMove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, dx, dy, button&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MousePress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;button parameter values: left - 1, middle - 2, right - 3&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Please note that in order to have Spring call MouseRelease, you need to have a MousePress call-in in the same widget that returns true.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseWheel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;up, value&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;IsAbove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GetTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.  Returns WorldTooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AddConsoleLine()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;msg, priority&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MapDrawCmd()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, cmdType, px, py, pz, labeltext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandFallback()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandsChanged()&amp;lt;/font&amp;gt; --&amp;gt; unknown (none?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitDefID, builderID, builderTeam, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, oldTeam, newTeam, capture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;builderID, builderTeam, unitID, unitDefID, part&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureDefID, teamID, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceLevel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Update()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;dt&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;gets called very often, even if the game is paused. dt is the time since the function was last called (???)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DefaultCommand()&amp;lt;/font&amp;gt; --&amp;gt; nothing (???)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;can return an [[Lua_CMDs|CMD]] to change cursor and command. {{forumlink|topic=26438|title=example usage}}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Unit-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
can overwrite the taken damage by returning a new number value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, builderID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFinished()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFromFactory()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, factID, factDefID, userOrders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, attackerID?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitTaken()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, newTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitGiven()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, oldTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitIdle()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitSeismicPing()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, z, strength&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLoaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, transportID, transportTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnloaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, transportID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCloaked()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDecloaked)&amp;lt;/font&amp;gt;--&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitMoveFailed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;StockpileChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShieldPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Feature-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TerraformComplete()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCmdDone()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Drawing:==&lt;br /&gt;
Inside these functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawGenesis()&amp;lt;/font&amp;gt; --&amp;gt; none.  Don&#039;t render here.&lt;br /&gt;
&lt;br /&gt;
 Spring draws the sky, the map, some water types, and unit selection.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorldPreUnit()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorld()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
&lt;br /&gt;
Each unit might also have a DrawUnit call, [[Lua_UnitRendering|enabled here.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawUnit(unitID,DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With enum DrawMode {&amp;lt;br&amp;gt;&lt;br /&gt;
	notDrawing     = 0,&amp;lt;br&amp;gt;&lt;br /&gt;
	normalDraw     = 1,&amp;lt;br&amp;gt;&lt;br /&gt;
	shadowDraw     = 2,&amp;lt;br&amp;gt;&lt;br /&gt;
	reflectionDraw = 3,&amp;lt;br&amp;gt;&lt;br /&gt;
	refractionDraw = 4&amp;lt;br&amp;gt;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreenEffects()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;vsx, vsy&amp;quot; where vsx, vsy are screen coords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreen()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawInMiniMap()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;sx, sy&amp;quot; where sx,sy are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldShadow()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldReflection()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldRefraction()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
==Game Events:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Explosion()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;weaponID, px, py, pz, ownerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShockFront()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;power, dx, dy, dz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameFrame()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;frameNum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CobCallback()&amp;lt;/font&amp;gt; --&amp;gt; unknown, marked FIXME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GroupChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;groupID&amp;quot; where groupID is the value of Group whose table value changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;WorldTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;ttType, data1, data2, data3&amp;quot; special, should be documented in detail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePreload()&amp;lt;/font&amp;gt;  --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameStart()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameProgress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;serverFrameNum&amp;quot; ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; New in 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameOver()&amp;lt;/font&amp;gt; --&amp;gt;  &amp;quot;[ [1] = allyTeamID1, [2] = allyTeamID2, ... ]&amp;quot;,  a list of winning allyteams, if empty the game result was undecided ( like when dropping from an host )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;   Will return nil in pre 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TeamDied()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;TeamID&amp;quot; where TeamID = the team that has been eliminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowStartPosition()&amp;lt;/font&amp;gt; --&amp;gt; nobody cares&amp;lt;br&amp;gt;&lt;br /&gt;
returns nobody cares&lt;br /&gt;
&lt;br /&gt;
==Projectiles:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=10973</id>
		<title>LuaCallinReturn</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=LuaCallinReturn&amp;diff=10973"/>
		<updated>2011-08-10T21:07:00Z</updated>

		<summary type="html">&lt;p&gt;Jools: /* Commands, general-purpose: */&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;
==Engine Source==&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/LuaGadgets/actions.lua}} (is that the only file????)&lt;br /&gt;
&lt;br /&gt;
==What is a callin anyway?==&lt;br /&gt;
Call-ins are calls from the engine, into the gadget or widget script. In other words, these functions are called when a particular â€œeventâ€ happens.&lt;br /&gt;
Some call-in functions can return values to the engine.&lt;br /&gt;
===Blocking events with return values===&lt;br /&gt;
The call-in functions named &#039;&#039;&#039;&#039;&#039;Allow&#039;&#039;&#039;&#039;&#039;XXX can block their event by returning &#039;&#039;false&#039;&#039;.&amp;lt;br&amp;gt;&lt;br /&gt;
For example &#039;&#039;AllowUnitTransfer()&#039;&#039;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return true&amp;lt;/code&amp;gt; = allow transfer &amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;code&amp;gt;return false&amp;lt;/code&amp;gt; = deny transfer&lt;br /&gt;
&lt;br /&gt;
==Commands, general-purpose:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Initialize()&amp;lt;/font&amp;gt; --&amp;gt; none.&amp;lt;/br&amp;gt;&lt;br /&gt;
called when widget/gadget gets (re-)loaded.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Shutdown()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;gadget/widget:PlayerChanged&amp;lt;/font&amp;gt; --&amp;gt; (playerID).&lt;br /&gt;
&lt;br /&gt;
Use this to check whether a player has become spectator for instance.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;LayoutButtons()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ConfigureLayout()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;command&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandNotify()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;id, params, options&amp;quot;, where id = the CommandID&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyPress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key, mods, isRepeat&amp;quot;, where key = keymap, mods = SHIFT, etc.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;KeyRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;key&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseMove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, dx, dy, button&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MousePress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;button parameter values: left - 1, middle - 2, right - 3&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseRelease()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, button&amp;quot;&amp;lt;br/&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;Please note that in order to have Spring call MouseRelease, you need to have a MousePress call-in in the same widget that returns true.&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MouseWheel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;up, value&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;IsAbove()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GetTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y&amp;quot; where x,y = screen coordinates.  Returns WorldTooltip.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AddConsoleLine()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;msg, priority&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;MapDrawCmd()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;playerID, cmdType, px, py, pz, labeltext&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandFallback()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CommandsChanged()&amp;lt;/font&amp;gt; --&amp;gt; unknown (none?)&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitDefID, builderID, builderTeam, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, oldTeam, newTeam, capture&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowUnitBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;builderID, builderTeam, unitID, unitDefID, part&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureCreation()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureDefID, teamID, x, y, z&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowFeatureBuildStep()&amp;lt;/font&amp;gt; --&amp;gt; unknown, please document.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceLevel()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowResourceTransfer()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;teamID, res, level&amp;quot;&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Update()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;dt&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;gets called very often, even if the game is paused. dt is the time since the function was last called (???)&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DefaultCommand()&amp;lt;/font&amp;gt; --&amp;gt; nothing (???)&amp;lt;br&amp;gt;&lt;br /&gt;
&amp;lt;font color=#dd9944&amp;gt;can return an [[Lua_CMDs|CMD]] to change cursor and command. {{forumlink|topic=26438|title=example usage}}&amp;lt;/font&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==Unit-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, damage, paralyzer, weaponID, attackerID, attackerDefID, attackerTeam&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
can overwrite the taken damage by returning a new number value&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, builderID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFinished()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitFromFactory()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, factID, factDefID, userOrders&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, attackerID?&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitTaken()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, newTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitGiven()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, oldTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitIdle()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCommand()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdOpts, cmdParams&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitSeismicPing()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;x, y, z, strength&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftRadar()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftLos()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLoaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, transportID, transportTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitUnloaded()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID, transportID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCloaked()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitDecloaked)&amp;lt;/font&amp;gt;--&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitMoveFailed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;StockpileChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitEnteredAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftWater()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitLeftAir()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, teamID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShieldPreDamaged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile&amp;quot;&lt;br /&gt;
&lt;br /&gt;
==Feature-Specific:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;FeatureDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;featureID, allyTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TerraformComplete()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;UnitCmdDone()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;unitID, unitDefID, unitTeam, cmdID, cmdTag&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Drawing:==&lt;br /&gt;
Inside these functions, you can use the [[Lua_OpenGL_Api | Lua OpenGL Api]] to draw graphics.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawGenesis()&amp;lt;/font&amp;gt; --&amp;gt; none.  Don&#039;t render here.&lt;br /&gt;
&lt;br /&gt;
 Spring draws the sky, the map, some water types, and unit selection.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorldPreUnit()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws units, features, some water types, cloaked units, and the sun.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;font color=#55ee99&amp;gt;DrawWorld()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
 Spring draws command queues, &#039;map stuff&#039;, and map marks.&lt;br /&gt;
&lt;br /&gt;
Each unit might also have a DrawUnit call, [[Lua_UnitRendering|enabled here.]]&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawUnit(unitID,DrawMode)&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;&lt;br /&gt;
With enum DrawMode {&amp;lt;br&amp;gt;&lt;br /&gt;
	notDrawing     = 0,&amp;lt;br&amp;gt;&lt;br /&gt;
	normalDraw     = 1,&amp;lt;br&amp;gt;&lt;br /&gt;
	shadowDraw     = 2,&amp;lt;br&amp;gt;&lt;br /&gt;
	reflectionDraw = 3,&amp;lt;br&amp;gt;&lt;br /&gt;
	refractionDraw = 4&amp;lt;br&amp;gt;&lt;br /&gt;
	};&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreenEffects()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;vsx, vsy&amp;quot; where vsx, vsy are screen coords.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawScreen()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
   &lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawInMiniMap()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;sx, sy&amp;quot; where sx,sy are values relative to the minimap&#039;s position and scale.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldShadow()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldReflection()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;DrawWorldRefraction()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
==Game Events:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;Explosion()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;weaponID, px, py, pz, ownerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ShockFront()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;power, dx, dy, dz&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameFrame()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;frameNum&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;CobCallback()&amp;lt;/font&amp;gt; --&amp;gt; unknown, marked FIXME.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GroupChanged()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;groupID&amp;quot; where groupID is the value of Group whose table value changed.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;WorldTooltip()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;ttType, data1, data2, data3&amp;quot; special, should be documented in detail.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GamePreload()&amp;lt;/font&amp;gt;  --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameStart()&amp;lt;/font&amp;gt; --&amp;gt; none.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameProgress()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;serverFrameNum&amp;quot; ( called every 60 frames, calculating delta between GameFrame and GameProgress can give an ETA about catching up with simulation )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt; New in 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;GameOver()&amp;lt;/font&amp;gt; --&amp;gt;  &amp;quot;[ [1] = allyTeamID1, [2] = allyTeamID2, ... ]&amp;quot;,  a list of winning allyteams, if empty the game result was undecided ( like when dropping from an host )&amp;lt;span class=&amp;quot;warning&amp;quot;&amp;gt;   Will return nil in pre 0.83.x&amp;lt;/span&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;TeamDied()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;TeamID&amp;quot; where TeamID = the team that has been eliminated.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;AllowStartPosition()&amp;lt;/font&amp;gt; --&amp;gt; nobody cares&amp;lt;br&amp;gt;&lt;br /&gt;
returns nobody cares&lt;br /&gt;
&lt;br /&gt;
==Projectiles:==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileCreated()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID, proOwnerID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&amp;lt;font color=#55ee99&amp;gt;ProjectileDestroyed()&amp;lt;/font&amp;gt; --&amp;gt; &amp;quot;proID&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Ota2xta&amp;diff=15236</id>
		<title>Ota2xta</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Ota2xta&amp;diff=15236"/>
		<updated>2010-03-01T18:41:45Z</updated>

		<summary type="html">&lt;p&gt;Jools: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a reference for OTA players that play XTA mod for the first time.&lt;br /&gt;
&lt;br /&gt;
But does work as well for new and regulars from other mods.&lt;br /&gt;
&lt;br /&gt;
= The Energy build tree =&lt;br /&gt;
&lt;br /&gt;
[[Image:ArmenergyBpath.jpg|thumb|300px|*&amp;lt;span style=&amp;quot;background:black; color:white; padding: 0em 1em;&amp;quot;&amp;gt; Arm energy buildtree &amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Coreenergybpath.jpg|thumb|300px|*&amp;lt;span style=&amp;quot;background:black; color:white; padding: 0em 1em;&amp;quot;&amp;gt; Core energy buildtree &amp;lt;/span&amp;gt;]]&lt;br /&gt;
In few words, for OTA players, &#039;&#039;&#039;do not build the Fusion Power Plant&#039;&#039;&#039;, use the &#039;&#039;Mini Fusions&#039;&#039; -&amp;gt; &#039;&#039;Cloakable Fusions&#039;&#039; building path instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Energy tree for XTA, differs from OTA in several aspects.&lt;br /&gt;
&lt;br /&gt;
In short, several buildings and Mobile units have been added &amp;quot;in between&amp;quot; the basic Energy sources like Solar Collectors/Wind Generators, and the more advanced Fusion power plant.&lt;br /&gt;
&lt;br /&gt;
== Energy producing buildings and Mobile units ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The basic Energy structures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Are the same, windmill, and solar collector.&lt;br /&gt;
&lt;br /&gt;
However there are some differences:&lt;br /&gt;
&lt;br /&gt;
==== The solar collector ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Main changes from OTA:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- DOES NOT REQUIRE ENERGY to be built.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Is heavily armoured.&lt;br /&gt;
&lt;br /&gt;
- Produces a continuous Energy output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Downside:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Its rather expensive in Metal compared to Wind Generators.&lt;br /&gt;
&lt;br /&gt;
- Blocks fire from light laser tower.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Offers a quick solution for Energy stall at mid Metal cost (145 Metal).&lt;br /&gt;
&lt;br /&gt;
- Acts as a barricade/defence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Energy storage ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cost has been increased, but the storage capacity is now around 32k.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This makes for a better Energy and Metal resource management, without the hassle of having to build lots and lots of storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Combine with windmill farms in windy maps for better results.&lt;br /&gt;
&lt;br /&gt;
- In early game, if you are using Metal makers, it generates non continuous Metal output, so do not build one if you are using Metal maker economy. &#039;&#039;&#039;Unless you have some sort of Metal maker ai.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those are the main changes for the level one energy structures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced Energy structures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At Level Two, XTA introduces the major changes and advantages compared to OTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start with, there is a &amp;quot;midway&amp;quot; Fusion Energy plant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Mini Fusions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each side has its own. This units cover the gap between basic Energy sources and the more advanced ones, having around 38%-44% of the Energy output of the next step in the Energy build tree, and offering 19x-22x times the output of a single solar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Core Mini Fusion ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Produces +300 Energy and are built by Level Two builders.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
- Is built by any Level Two construction unit.&lt;br /&gt;
&lt;br /&gt;
- Produces 300 Energy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Downside:&lt;br /&gt;
&lt;br /&gt;
- It uses more space, for less Energy output compared to bigger Fusions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips&lt;br /&gt;
&lt;br /&gt;
- You can calculate 1 Mini Fusion per MohoMetalExtractor.&lt;br /&gt;
&lt;br /&gt;
- Huge explosion on self destruct, can be used as a bomb to kill incoming attacking force.&lt;br /&gt;
&lt;br /&gt;
==== Arm Mobile Fusion ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Arm-ones are built in the Level Two tank lab, and produce 260 Energy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Quite less overall cost&lt;br /&gt;
&lt;br /&gt;
- It&#039;s built very fast due to the strong nanolathing from the Level Two Vehicle Factory.&lt;br /&gt;
&lt;br /&gt;
- It is Mobile! This means you can avoid attacks to it by hiding somewhere else.&lt;br /&gt;
&lt;br /&gt;
- Less efficient in space/Energy output than Core Mini Fusion&lt;br /&gt;
&lt;br /&gt;
- In times of peril can be used as bomb by Self Destructing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Downside:&lt;br /&gt;
&lt;br /&gt;
- Forces the Arm player to build Level Two tank lab to have access to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips&lt;br /&gt;
&lt;br /&gt;
- You can calculate one Mobile Fusion per Moho Metal Extractor.&lt;br /&gt;
&lt;br /&gt;
- It has a huge explosion on self destroy, and is used often as a last resort defence, (as a Mobile bomb), with great results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a [http://modinfo.adune.nl/index.php?act=editmultiple&amp;amp;from=find&amp;amp;MOD=XTApev955&amp;amp;units=Arm_Mobile_Fusion+Core_light_Fusion_power_plant reference for stats delta] between Arm and Core Minis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Cloakable Fusions ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The big Fusions have changed as well.&lt;br /&gt;
&lt;br /&gt;
Now the Cloakable Fusion, is what the normal OTA Fusion used to be, that is, it produces 800 Energy and has a small penalty in its cost compared to Mini Fusions, and to big Fusions, but it almost completely stealth once its cloaked and within radar jammer range.&lt;br /&gt;
&lt;br /&gt;
==== Big Fusions ====&lt;br /&gt;
&lt;br /&gt;
The BIG Fusion makes 3500 Energy, and has a &#039;&#039;&#039;very high cost&#039;&#039;&#039; (in Energy Metal and Build Time), although its somehow more efficient than Cloakable Fusion, this unit is &#039;&#039;&#039;2 TIMES AS EXPENSIVE&#039;&#039;&#039; as what the original Fusion used to be, so &#039;&#039;&#039;DO NOT BUILD IT RIGHT AWAY&#039;&#039;&#039;. This big Fusion is intended for late game, when you will need huge Armies or mass nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a [http://modinfo.adune.nl/index.php?act=editmultiple&amp;amp;from=find&amp;amp;MOD=XTApev955&amp;amp;units=Arm_Cloakable_Fusion_reactor+Arm_Fusion_reactor comparative view of the Cloakable and Big Fusions.]&lt;br /&gt;
&lt;br /&gt;
==== Note ====&lt;br /&gt;
&lt;br /&gt;
This is an attempt to explain:&lt;br /&gt;
&lt;br /&gt;
1 You must &#039;&#039;&#039;NOT build a BIG (non Cloakable) Fusion power plant in XTA&#039;&#039;&#039;, like you used in OTA.&lt;br /&gt;
&lt;br /&gt;
Use a &#039;&#039;&#039;Cloakable Fusion&#039;&#039;&#039; for that purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2 There are several new power sources that fill the gap between 20 and 1000 e output OTA had.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3 The Moho Metal Extractors take 300 Energy to work (extract Metal) so do not build them if you do not have the Energy, or will stall your entire production.&lt;br /&gt;
&lt;br /&gt;
= Power consumption/costs =&lt;br /&gt;
&lt;br /&gt;
The first thing you need to know, is, Moho Metal Extractors use 300 of Energy to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can be justified, because of Metal is a quantitative scarce resource, and a Moho Metal Extractor, effectively quintuples the extraction rate, such marvel must come at a cost. In this case the cost, a part of the unit and tech Level itself, is the need of much more power to function.&lt;br /&gt;
&lt;br /&gt;
The increase in the Energy slightly higher than x^5, with x = Energy drain of Level One Metal Extractor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Basic XTA description for OTA players =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All Level One units are worth building:&lt;br /&gt;
*Stumpies and Hammers are decent anti-Missile Tower choices.&lt;br /&gt;
*Jeffies are very dangerous, but they do cost nearly 200 Metal.&lt;br /&gt;
*There is a Level One Gunship now.&lt;br /&gt;
*Freedom Fighters and Avengers have been given their sorely needed boost.&lt;br /&gt;
&lt;br /&gt;
All Level Two units are worth building:&lt;br /&gt;
*Sumos have tons of Armour, huge range, rapid fire rate and move at medium speed.&lt;br /&gt;
*Their 2.1k Metal cost is well worth the unit you get in exchange.&lt;br /&gt;
*Goliaths have a great deal of health, a medium ranged Plasma main turret and a second laser turret.&lt;br /&gt;
*Mavericks build much faster.&lt;br /&gt;
*Flakkers fire at ground targets, and their Anti Air potential has been improved.&lt;br /&gt;
*Warlords and Leviathans were massively boosted in terms of Armour and firepower.&lt;br /&gt;
*Krogoths have 105,000 health and a lot of firepower, as well as a hefty price tag.&lt;br /&gt;
&lt;br /&gt;
Nearly all defences were revamped:&lt;br /&gt;
*MTs are nearly unchanged, except they are smaller so that you can fit more of them into the same space.&lt;br /&gt;
*LLTs have the range and power to be worth building.&lt;br /&gt;
*HLTs are a bit costly, but they can reach further than missiles.&lt;br /&gt;
*An excellent early creep weapon.&lt;br /&gt;
*Ambusher/Toaster are now buildable by Level One Construction units and fulfil the same role as Guardian/Punisher in OTA.&lt;br /&gt;
*Guardian/Punisher are Level Two structures with much longer range, firepower and Armour.&lt;br /&gt;
*Annihilators and Doomsday Machines have far higher range, more Armour, and they do not blow up half your base when they die.&lt;br /&gt;
*With all the Armour available in Level Two units, you will need them.&lt;br /&gt;
*Big Bertha has lost some accuracy, Intimidator lost some range. Both lost firepower but gained Armour and area of effect.&lt;br /&gt;
*Stunner/Neutron silos are short ranged, very fast building budget nukes.&lt;br /&gt;
*Anti Nuke silos build their missiles faster to accommodate for STUNNER/Neutron change.&lt;br /&gt;
&lt;br /&gt;
Resource structures have changed less than other parts of the mod but the game play impact is very big:&lt;br /&gt;
*Metal Extractors self destruct instantly and without damaging anything around them.&lt;br /&gt;
*This makes upgrading to Moho Extractors less tedious.&lt;br /&gt;
*ARM has a Mobile Fusion, Core has a stationary Light Fusion.&lt;br /&gt;
*Both cost 1500 Metal and make about 300 Energy: ideal to fuel your Moho economy.&lt;br /&gt;
*Moho Extractors are quite cheap (750 Metal) and make lots of Metal, but they drain 300 Energy.&lt;br /&gt;
*You want to have at least a Geo or Mobile/Light Fusion before you build a Moho.&lt;br /&gt;
&#039;&#039;&#039;Cloakable Fusions have taken the place of OTA&#039;s regular ones.&#039;&#039;&#039;&lt;br /&gt;
*Regular Fusions now cost 12k Metal. Their Armour and Energy production have been increased appropriately.&lt;br /&gt;
*Mine layers have several types of mines that are worth building and move faster. Mines are also not visible on radar as in OTA, which makes them useful.&lt;br /&gt;
*Energy and Metal Storage stores a lot more.&lt;br /&gt;
*Missile frigates have got firepower and health suitable for their cost.&lt;br /&gt;
*Mobile artillery and lugers are not inaccurate.&lt;br /&gt;
*Decoy commanders build as fast as real commanders.&lt;br /&gt;
*The build range on all Construction units has been increased.&lt;br /&gt;
&lt;br /&gt;
[[Category:xta]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Ota2xta&amp;diff=15235</id>
		<title>Ota2xta</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Ota2xta&amp;diff=15235"/>
		<updated>2010-03-01T18:41:06Z</updated>

		<summary type="html">&lt;p&gt;Jools: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a reference for OTA players that play XTA mod for the first time.&lt;br /&gt;
&lt;br /&gt;
But does work as well for new and regulars from other mods.&lt;br /&gt;
&lt;br /&gt;
= The Energy build tree =&lt;br /&gt;
&lt;br /&gt;
[[Image:ArmenergyBpath.jpg|thumb|300px|*&amp;lt;span style=&amp;quot;background:black; color:white; padding: 0em 1em;&amp;quot;&amp;gt; Arm energy buildtree &amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Coreenergybpath.jpg|thumb|300px|*&amp;lt;span style=&amp;quot;background:black; color:white; padding: 0em 1em;&amp;quot;&amp;gt; Core energy buildtree &amp;lt;/span&amp;gt;]]&lt;br /&gt;
In few words, for OTA players, &#039;&#039;&#039;do not build the Fusion Power Plant&#039;&#039;&#039;, use the &#039;&#039;Mini Fusions&#039;&#039; -&amp;gt; &#039;&#039;Cloakable Fusions&#039;&#039; building path instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Energy tree for XTA, differs from OTA in several aspects.&lt;br /&gt;
&lt;br /&gt;
In short, several buildings and Mobile units have been added &amp;quot;in between&amp;quot; the basic Energy sources like Solar Collectors/Wind Generators, and the more advanced Fusion power plant.&lt;br /&gt;
&lt;br /&gt;
== Energy producing buildings and Mobile units ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The basic Energy structures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Are the same, windmill, and solar collector.&lt;br /&gt;
&lt;br /&gt;
However there are some differences:&lt;br /&gt;
&lt;br /&gt;
==== The solar collector ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Main changes from OTA:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- DOES NOT REQUIRE ENERGY to be built.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Is heavily armoured.&lt;br /&gt;
&lt;br /&gt;
- Produces a continuous Energy output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Downside:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Its rather expensive in Metal compared to Wind Generators.&lt;br /&gt;
&lt;br /&gt;
- Blocks fire from light laser tower.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Offers a quick solution for Energy stall at mid Metal cost (145 Metal).&lt;br /&gt;
&lt;br /&gt;
- Acts as a barricade/defence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Energy storage ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cost has been increased, but the storage capacity is now around 32k.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This makes for a better Energy and Metal resource management, without the hassle of having to build lots and lots of storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Combine with windmill farms in windy maps for better results.&lt;br /&gt;
&lt;br /&gt;
- In early game, if you are using Metal makers, it generates non continuous Metal output, so do not build one if you are using Metal maker economy. &#039;&#039;&#039;Unless you have some sort of Metal maker ai.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those are the main changes for the level one energy structures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced Energy structures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At Level Two, XTA introduces the major changes and advantages compared to OTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start with, there is a &amp;quot;midway&amp;quot; Fusion Energy plant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Mini Fusions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each side has its own. This units cover the gap between basic Energy sources and the more advanced ones, having around 38%-44% of the Energy output of the next step in the Energy build tree, and offering 19x-22x times the output of a single solar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Core Mini Fusion ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Produces +300 Energy and are built by Level Two builders.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
- Is built by any Level Two construction unit.&lt;br /&gt;
&lt;br /&gt;
- Produces 300 Energy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Downside:&lt;br /&gt;
&lt;br /&gt;
- It uses more space, for less Energy output compared to bigger Fusions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips&lt;br /&gt;
&lt;br /&gt;
- You can calculate 1 Mini Fusion per MohoMetalExtractor.&lt;br /&gt;
&lt;br /&gt;
- Huge explosion on self destruct, can be used as a bomb to kill incoming attacking force.&lt;br /&gt;
&lt;br /&gt;
==== Arm Mobile Fusion ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Arm-ones are built in the Level Two tank lab, and produce 260 Energy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Quite less overall cost&lt;br /&gt;
&lt;br /&gt;
- It&#039;s built very fast due to the strong nanolathing from the Level Two Vehicle Factory.&lt;br /&gt;
&lt;br /&gt;
- It is Mobile! This means you can avoid attacks to it by hiding somewhere else.&lt;br /&gt;
&lt;br /&gt;
- Less efficient in space/Energy output than Core Mini Fusion&lt;br /&gt;
&lt;br /&gt;
- In times of peril can be used as bomb by Self Destructing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Downside:&lt;br /&gt;
&lt;br /&gt;
- Forces the Arm player to build Level Two tank lab to have access to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips&lt;br /&gt;
&lt;br /&gt;
- You can calculate one Mobile Fusion per Moho Metal Extractor.&lt;br /&gt;
&lt;br /&gt;
- It has a huge explosion on self destroy, and is used often as a last resort defence, (as a Mobile bomb), with great results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a [http://modinfo.adune.nl/index.php?act=editmultiple&amp;amp;from=find&amp;amp;MOD=XTApev955&amp;amp;units=Arm_Mobile_Fusion+Core_light_Fusion_power_plant reference for stats delta] between Arm and Core Minis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Cloakable Fusions ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The big Fusions have changed as well.&lt;br /&gt;
&lt;br /&gt;
Now the Cloakable Fusion, is what the normal OTA Fusion used to be, that is, it produces 800 Energy and has a small penalty in its cost compared to Mini Fusions, and to big Fusions, but it almost completely stealth once its cloaked and within radar jammer range.&lt;br /&gt;
&lt;br /&gt;
==== Big Fusions ====&lt;br /&gt;
&lt;br /&gt;
The BIG Fusion makes 3500 Energy, and has a &#039;&#039;&#039;very high cost&#039;&#039;&#039; (in Energy Metal and Build Time), although its somehow more efficient than Cloakable Fusion, this unit is &#039;&#039;&#039;2 TIMES AS EXPENSIVE&#039;&#039;&#039; as what the original Fusion used to be, so &#039;&#039;&#039;DO NOT BUILD IT RIGHT AWAY&#039;&#039;&#039;. This big Fusion is intended for late game, when you will need huge Armies or mass nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a [http://modinfo.adune.nl/index.php?act=editmultiple&amp;amp;from=find&amp;amp;MOD=XTApev955&amp;amp;units=Arm_Cloakable_Fusion_reactor+Arm_Fusion_reactor comparative view of the Cloakable and Big Fusions.]&lt;br /&gt;
&lt;br /&gt;
==== Note ====&lt;br /&gt;
&lt;br /&gt;
This is an attempt to explain:&lt;br /&gt;
&lt;br /&gt;
1 You must &#039;&#039;&#039;NOT build a BIG (non Cloakable) Fusion power plant in XTA&#039;&#039;&#039;, like you used in OTA.&lt;br /&gt;
&lt;br /&gt;
Use a &#039;&#039;&#039;Cloakable Fusion&#039;&#039;&#039; for that purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2 There are several new power sources that fill the gap between 20 and 1000 e output OTA had.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3 The Moho Metal Extractors take 300 Energy to work (extract Metal) so do not build them if you do not have the Energy, or will stall your entire production.&lt;br /&gt;
&lt;br /&gt;
= Power consumption/costs =&lt;br /&gt;
&lt;br /&gt;
The first thing you need to know, is, Moho Metal Extractors use 300 of Energy to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can be justified, because of Metal is a quantitative scarce resource, and a Moho Metal Extractor, effectively quintuples the extraction rate, such marvel must come at a cost. In this case the cost, a part of the unit and tech Level itself, is the need of much more power to function.&lt;br /&gt;
&lt;br /&gt;
The increase in the Energy slightly higher than x^5, with x = Energy drain of Level One Metal Extractor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Basic XTA description for OTA players =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All Level One units are worth building:&lt;br /&gt;
*Stumpies and Hammers are decent anti-Missile Tower choices.&lt;br /&gt;
*Jeffies are very dangerous, but they do cost nearly 200 Metal.&lt;br /&gt;
*There is a Level One Gunship now.&lt;br /&gt;
*Freedom Fighters and Avengers have been given their sorely needed boost.&lt;br /&gt;
&lt;br /&gt;
All Level Two units are worth building:&lt;br /&gt;
*Sumos have tons of Armour, huge range, rapid fire rate and move at medium speed.&lt;br /&gt;
*Their 2.1k Metal cost is well worth the unit you get in exchange.&lt;br /&gt;
*Goliaths have a great deal of health, a medium ranged Plasma main turret and a second laser turret.&lt;br /&gt;
*Mavericks build much faster.&lt;br /&gt;
*Flakkers fire at ground targets, and their Anti Air potential has been improved.&lt;br /&gt;
*Warlords and Leviathans were massively boosted in terms of Armour and firepower.&lt;br /&gt;
*Krogoths have 105,000 health and a lot of firepower, as well as a hefty price tag.&lt;br /&gt;
&lt;br /&gt;
Nearly all defences were revamped:&lt;br /&gt;
*MTs are nearly unchanged, except they are smaller so that you can fit more of them into the same space.&lt;br /&gt;
*LLTs have the range and power to be worth building.&lt;br /&gt;
*HLTs are a bit costly, but they can reach further than missiles.&lt;br /&gt;
*An excellent early creep weapon.&lt;br /&gt;
*Ambusher/Toaster are now buildable by Level One Construction units and fulfil the same role as Guardian/Punisher in OTA.&lt;br /&gt;
*Guardian/Punisher are Level Two structures with much longer range, firepower and Armour.&lt;br /&gt;
*Annihilators and Doomsday Machines have far higher range, more Armour, and they do not blow up half your base when they die.&lt;br /&gt;
*With all the Armour available in Level Two units, you will need them.&lt;br /&gt;
*Big Bertha has lost some accuracy, Intimidator lost some range. Both lost firepower but gained Armour and area of effect.&lt;br /&gt;
*Stunner/Neutron silos are short ranged, very fast building budget nukes.&lt;br /&gt;
*Anti Nuke silos build their missiles faster to accommodate for STUNNER/Neutron change.&lt;br /&gt;
&lt;br /&gt;
Resource structures have changed less than other parts of the mod but the game play impact is very big:&lt;br /&gt;
*Metal Extractors self destruct instantly and without damaging anything around them.&lt;br /&gt;
*This makes upgrading to Moho Extractors less tedious.&lt;br /&gt;
*ARM has a Mobile Fusion, Core has a stationary Light Fusion.&lt;br /&gt;
*Both cost 1500 Metal and make about 300 Energy: ideal to fuel your Moho economy.&lt;br /&gt;
*Moho Extractors are quite cheap (750 Metal) and make lots of Metal, but they drain 300 Energy.&lt;br /&gt;
*You want to have at least a Geo or Mobile/Light Fusion before you build a Moho.&lt;br /&gt;
&#039;&#039;&#039;Cloakable Fusions have taken the place of OTA&#039;s regular ones.&#039;&#039;&#039;&lt;br /&gt;
*Regular Fusions now cost 12k Metal. Their Armour and Energy production have been increased appropriately.&lt;br /&gt;
&lt;br /&gt;
*Mine layers have several types of mines that are worth building and move faster. Mines are also not visible on radar as in OTA, which makes them useful.&lt;br /&gt;
*Energy and Metal Storage stores a lot more.&lt;br /&gt;
*Missile frigates have got firepower and health suitable for their cost.&lt;br /&gt;
*Mobile artillery and lugers are not inaccurate.&lt;br /&gt;
*Decoy commanders build as fast as real commanders.&lt;br /&gt;
*The build range on all Construction units has been increased.&lt;br /&gt;
&lt;br /&gt;
[[Category:xta]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Ota2xta&amp;diff=15233</id>
		<title>Ota2xta</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Ota2xta&amp;diff=15233"/>
		<updated>2010-03-01T18:29:57Z</updated>

		<summary type="html">&lt;p&gt;Jools: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This is a reference for OTA players that play XTA mod for the first time.&lt;br /&gt;
&lt;br /&gt;
But does work as well for new and regulars from other mods.&lt;br /&gt;
&lt;br /&gt;
= The Energy build tree =&lt;br /&gt;
&lt;br /&gt;
[[Image:ArmenergyBpath.jpg|thumb|300px|*&amp;lt;span style=&amp;quot;background:black; color:white; padding: 0em 1em;&amp;quot;&amp;gt; Arm energy buildtree &amp;lt;/span&amp;gt;]]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Image:Coreenergybpath.jpg|thumb|300px|*&amp;lt;span style=&amp;quot;background:black; color:white; padding: 0em 1em;&amp;quot;&amp;gt; Core energy buildtree &amp;lt;/span&amp;gt;]]&lt;br /&gt;
In few words, for OTA players, &#039;&#039;&#039;do not build the Fusion Power Plant&#039;&#039;&#039;, use the &#039;&#039;Mini Fusions&#039;&#039; -&amp;gt; &#039;&#039;Cloakable Fusions&#039;&#039; building path instead.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The Energy tree for XTA, differs from OTA in several aspects.&lt;br /&gt;
&lt;br /&gt;
In short, several buildings and Mobile units have been added &amp;quot;in between&amp;quot; the basic Energy sources like Solar Collectors/Wind Generators, and the more advanced Fusion power plant.&lt;br /&gt;
&lt;br /&gt;
== Energy producing buildings and Mobile units ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== The basic Energy structures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Are the same, windmill, and solar collector.&lt;br /&gt;
&lt;br /&gt;
However there are some differences:&lt;br /&gt;
&lt;br /&gt;
==== The solar collector ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Main changes from OTA:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- DOES NOT COST ENERGY to build it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Advantages:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Is heavily armoured.&lt;br /&gt;
&lt;br /&gt;
- Produces a continuous Energy output.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Downside:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Its rather expensive in Metal compared to Wind Generators.&lt;br /&gt;
&lt;br /&gt;
- Blocks light laser tower fire.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Offers a quick solution for Energy stall at mid Metal cost (145 Metal).&lt;br /&gt;
&lt;br /&gt;
- Acts as a barricade/defence.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Energy storage ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The cost has been increased, but the storage capacity is now around 32k.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This makes for a better Energy and Metal resource management, without the hassle of having to build lots and lots of storage.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Tips&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
- Combine with windmill farms in windy maps for better results.&lt;br /&gt;
&lt;br /&gt;
- In early game, if you are using Metal makers, it generates non continuous Metal output, so do not build one if you are using Metal maker economy. &#039;&#039;&#039;Unless you have some sort of Metal maker ai.&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Those are the main changes for the level one energy structures.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Advanced Energy structures ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
At Level Two, XTA introduces the major changes and advantages compared to OTA.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
To start with, there is a &amp;quot;midway&amp;quot; Fusion Energy plant.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;The Mini Fusions&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Each side has its own. This units cover the gap between basic Energy sources and the more advanced ones, having around 38%-44% of the Energy output of the next step in the Energy build tree, and offering 19x-22x times the output of a single solar.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Core Mini Fusion ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Produces +300 Energy and are built by Level Two builders.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
- Is built by any Level Two construction unit.&lt;br /&gt;
&lt;br /&gt;
- Produces 300 Energy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Downside:&lt;br /&gt;
&lt;br /&gt;
- It uses more space, for less Energy output compared to bigger Fusions.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips&lt;br /&gt;
&lt;br /&gt;
- You can calculate 1 Mini Fusion per MohoMetalExtractor.&lt;br /&gt;
&lt;br /&gt;
- Huge explosion on self destroy, can be used as a bomb to kill incoming attacking force.&lt;br /&gt;
&lt;br /&gt;
==== Arm Mobile Fusion ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Arm ones are built in the Level Two tank lab, and produce 260 Energy.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Advantages:&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
- Quite less overall cost&lt;br /&gt;
&lt;br /&gt;
- Its build very fast because of the strong nanolathing form the Level Two Vehicle Factory.&lt;br /&gt;
&lt;br /&gt;
- It is Mobile! This means you can avoid attacks to it by hidding somewhere else.&lt;br /&gt;
&lt;br /&gt;
- Less efficient in space/Energy output than Core Mini Fusion&lt;br /&gt;
&lt;br /&gt;
- In times of peril can be used as bomb by Self Destructing.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Downside:&lt;br /&gt;
&lt;br /&gt;
- Forces the Arm player to build Level Two tank lab to have access to it.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Tips&lt;br /&gt;
&lt;br /&gt;
- You can calculate one Mobile Fusion per Moho Metal Extractor.&lt;br /&gt;
&lt;br /&gt;
- It has a huge explosion on self destroy, and is used often as a last resort defence, (as a Mobile bomb), with great results.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a [http://modinfo.adune.nl/index.php?act=editmultiple&amp;amp;from=find&amp;amp;MOD=XTApev955&amp;amp;units=Arm_Mobile_Fusion+Core_light_Fusion_power_plant reference for stats delta] between Arm and Core Minis.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Cloakable Fusions ====&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The big Fusions have changed as well.&lt;br /&gt;
&lt;br /&gt;
Now the Cloakable Fusion, is what the normal OTA Fusion used to be, that is, it produces 800 Energy and has a small penalty in its cost compared to Mini Fusions, and to big Fusions, but it almost completely stealth once its cloaked and within radar jammer range.&lt;br /&gt;
&lt;br /&gt;
==== Big Fusions ====&lt;br /&gt;
&lt;br /&gt;
The BIG Fusion makes 3500 Energy, and has a &#039;&#039;&#039;very high cost&#039;&#039;&#039; (in Energy Metal and BT), although its somehow more efficient than Cloakable Fusion, this unit is &#039;&#039;&#039;2 TIMES AS EXPENSIVE&#039;&#039;&#039; as what the original Fusion used to be, so &#039;&#039;&#039;DO NOT BUILD IT RIGHT AWAY&#039;&#039;&#039;. This big Fusion is intended for late game, when you will need huge Armies or mass nuclear weapons.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Here is a [http://modinfo.adune.nl/index.php?act=editmultiple&amp;amp;from=find&amp;amp;MOD=XTApev955&amp;amp;units=Arm_Cloakable_Fusion_reactor+Arm_Fusion_reactor comparative view of the Cloakable and Big Fusions.]&lt;br /&gt;
&lt;br /&gt;
==== Note ====&lt;br /&gt;
&lt;br /&gt;
This is an attempt to explain:&lt;br /&gt;
&lt;br /&gt;
1 You must &#039;&#039;&#039;NOT build a BIG (non Cloakable) Fusion power plant in XTA&#039;&#039;&#039;, like you used in OTA.&lt;br /&gt;
&lt;br /&gt;
Use a &#039;&#039;&#039;Cloakable Fusion&#039;&#039;&#039; for that purpose.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
2 There are several new power sources that fill the gap between 20 and 1000 e output OTA had.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
3 The Moho Metal Extractors take 300 Energy to work (extract Metal) so do not build them if you do not have the Energy, or will stall your entire production.&lt;br /&gt;
&lt;br /&gt;
= Power consumption/costs =&lt;br /&gt;
&lt;br /&gt;
The first thing you need to know, is, Moho Metal Extractors use 300 of Energy to work.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This can be justified, because of Metal is a quantitative scarce resource, and a Moho Metal Extractor, effectively quintuples the extraction rate, such marvel must come at a cost. In this case the cost, a part of the unit and tech Level itself, is the need of much more power to function.&lt;br /&gt;
&lt;br /&gt;
The increase in the Energy slightly higher than x^5, with x = Energy drain of Level One Metal Extractor.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Basic XTA description for OTA players =&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
All Level One units are worth building:&lt;br /&gt;
*Stumpies and Hammers are decent anti-Missile Tower choices.&lt;br /&gt;
*Jeffies are very dangerous, but they do cost nearly 200 Metal.&lt;br /&gt;
*There is a Level One Gunship now.&lt;br /&gt;
*Freedom Fighters and Avengers have been given their sorely needed boost.&lt;br /&gt;
&lt;br /&gt;
All Level Two units are worth building:&lt;br /&gt;
*Sumos have tons of Armour, huge range, rapid fire rate and move at medium speed.&lt;br /&gt;
*Their 2.1k Metal cost is well worth the unit you get in exchange.&lt;br /&gt;
*Goliaths have a great deal of health, a medium ranged Plasma main turret and a second laser turret.&lt;br /&gt;
*Mavericks build much faster.&lt;br /&gt;
*Flakkers fire at ground targets, and their Anti Air potential has been improved.&lt;br /&gt;
*Warlords and Leviathans were massively boosted in terms of Armour and firepower.&lt;br /&gt;
*Krogoths have 105,000 health and a lot of firepower, as well as a hefty price tag.&lt;br /&gt;
&lt;br /&gt;
Nearly all defences were revamped:&lt;br /&gt;
*MTs are nearly unchanged, except they are smaller so that you can fit more of them into the same space.&lt;br /&gt;
*LLTs have the range and power to be worth building.&lt;br /&gt;
*HLTs are a bit costly, but they can reach further than missiles.&lt;br /&gt;
*An excellent early creep weapon.&lt;br /&gt;
*Ambusher/Toaster are now buildable by Level One Construction units and fulfil the same role as Guardian/Punisher in OTA.&lt;br /&gt;
*Guardian/Punisher are Level Two structures with much longer range, firepower and Armour.&lt;br /&gt;
*Annihilators and Doomsday Machines have far higher range, more Armour, and they do not blow up half your base when they die.&lt;br /&gt;
*With all the Armour available in Level Two units, you will need them.&lt;br /&gt;
*Big Bertha has lost some accuracy, Intimidator lost some range. Both lost firepower but gained Armour and area of effect.&lt;br /&gt;
*Stunner/Neutron silos are short ranged, very fast building budget nukes.&lt;br /&gt;
*Anti Nuke silos build their missiles faster to accommodate for STUNNER/Neutron change.&lt;br /&gt;
&lt;br /&gt;
Resource structures have changed less than other parts of the mod but the game play impact is very big:&lt;br /&gt;
*Metal Extractors self destruct instantly and without damaging anything around them.&lt;br /&gt;
*This makes upgrading to Moho Extractors less tedious.&lt;br /&gt;
*ARM has a Mobile Fusion, CORE has a stationary Light Fusion.&lt;br /&gt;
*Both cost 1500 Metal and make about 300 Energy: ideal to fuel your Moho economy.&lt;br /&gt;
*Moho Extractors are quite cheap (750 Metal) and make lots of Metal, but they drain 300 Energy.&lt;br /&gt;
*You want to have at least a Geo or Mobile/Light Fusion before you build a Moho.&lt;br /&gt;
&#039;&#039;&#039;Cloakable Fusions have taken the place of OTA&#039;s regular ones.&#039;&#039;&#039;&lt;br /&gt;
*Regular Fusions now cost 12k Metal. Their Armour and Energy production have been increased appropriately.&lt;br /&gt;
&lt;br /&gt;
*Mine layers have several types of mines that are worth building and move faster.&lt;br /&gt;
*Energy and Metal Storage stores a lot more.&lt;br /&gt;
*Missile frigates have got firepower and health suitable for their cost.&lt;br /&gt;
*Mobile artillery and lugers are not inaccurate.&lt;br /&gt;
*Decoy commanders build as fast as real commanders.&lt;br /&gt;
*The build range on all Construction units has been increased.&lt;br /&gt;
&lt;br /&gt;
[[Category:xta]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA_Clans&amp;diff=19976</id>
		<title>XTA Clans</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA_Clans&amp;diff=19976"/>
		<updated>2010-01-21T21:28:19Z</updated>

		<summary type="html">&lt;p&gt;Jools: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;List of active clans and their members:&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[CoX]&#039;&#039;&#039; Commanders of XTA: &lt;br /&gt;
&lt;br /&gt;
Babbles &amp;quot;My Commander is the army&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
Tribulex &amp;quot;Why so serious? Let&#039;s put a *smile* on your face&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
FrozenLegacy &amp;quot;Sorry, Frozen has self destructed, come again later&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Jools &amp;quot;Do you want some mines with that?&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Ansiktsburk &amp;quot;Allies losing, need to tech faster!&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Malric &amp;quot;My gf won&#039;t let me play :(&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Scifi &amp;quot;I&#039;m modding, go away&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Jimjoe &amp;quot;Stop talking about my mum, Shift&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
V1ntage &amp;quot;I&#039;m really bad!&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Shift &amp;quot;UKRAINE IS JOKE TO YOU?!&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
Punarbhava &amp;quot;I&#039;m too out of it to care&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Snel &amp;quot;I&#039;m the only good Swedish player really&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[CoW]&#039;&#039;&#039; Core of War:&lt;br /&gt;
&lt;br /&gt;
Manolo &amp;quot;Less playing, more speccing!&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Seba &amp;quot;1v1?&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
TheMightyOne &amp;quot;It hasn&#039;t failed me the first 9000 times, so it won&#039;t now!&amp;quot;&amp;lt;br&amp;gt;  &lt;br /&gt;
FlorisXIV &amp;quot;I have more smurfs than ingame minutes&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Error232 &amp;quot;I&#039;m rusty, I swear!&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Kloot &amp;quot;HLT here, HLT there&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
HermuldXV &amp;quot;cow says mooh&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Jim Hatama &amp;quot;No-one knows who I am&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Ray &amp;quot;I hate people who are better than me; I love CoW&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[RoX]&#039;&#039;&#039; Rogues of XTA:&lt;br /&gt;
&lt;br /&gt;
Janid &amp;quot;I love my crashers like my children&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Tobi &amp;quot;I got bored of doing everything&amp;quot;&amp;lt;br&amp;gt; &lt;br /&gt;
John &amp;quot;My AK beats your AK&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Pintle &amp;quot;Hey, didn&#039;t my clan used to be good?&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
1v0ry_k1ng &amp;quot;I haven&#039;t actually played, but I know the balance better than you&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
PhreakY &amp;quot;I&#039;m riding on knowing Pintle&amp;quot;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;[SIN]&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
Basic &amp;quot;Everything is OP unless I say otherwise&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
el_barto &amp;quot;Barto timed out before he could be quoted&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
Black_cat &amp;quot;I&#039;m the second best Texan in Spring!&amp;quot;&amp;lt;br&amp;gt;&lt;br /&gt;
DearLordAnimal &amp;quot;I am but one of many&amp;quot; &amp;lt;br&amp;gt;&lt;br /&gt;
DojeH &amp;quot;Every low ranking German player is me&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[[Category:xta]]&lt;/div&gt;</summary>
		<author><name>Jools</name></author>
	</entry>
</feed>