<?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=8611</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=8611"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/8611"/>
	<updated>2026-11-08T19:50:40Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Associated_Development_Groups&amp;diff=2215</id>
		<title>Associated Development Groups</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Associated_Development_Groups&amp;diff=2215"/>
		<updated>2015-04-14T17:36:11Z</updated>

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

		<summary type="html">&lt;p&gt;8611: more efficient with Lua&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This file sorts units into different armor classes. Weapons can deal different amount of damage to different armor classes. &lt;br /&gt;
&lt;br /&gt;
=Location=&lt;br /&gt;
&amp;lt;code&amp;gt;armordefs.lua&amp;lt;/code&amp;gt; is a file in the &amp;lt;code&amp;gt;Gamedata/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
=Source=&lt;br /&gt;
The engine source code which parses the data from this file is viewable here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/Sim/Misc/DamageArrayHandler.cpp}}&lt;br /&gt;
&lt;br /&gt;
=Details=&lt;br /&gt;
By default a damage class named &amp;quot;default&amp;quot; exists and every unit is in it.&lt;br /&gt;
So if all your weapons only deal &amp;quot;default&amp;quot; damage then this file is not needed.&lt;br /&gt;
&lt;br /&gt;
=Example=&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local armorDefs = {&lt;br /&gt;
	tanks = {&lt;br /&gt;
		&amp;quot;supertank&amp;quot;,&lt;br /&gt;
		&amp;quot;megatank&amp;quot;,&lt;br /&gt;
	},&lt;br /&gt;
&lt;br /&gt;
	infantry = {&lt;br /&gt;
		&amp;quot;dude&amp;quot;,&lt;br /&gt;
	},&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
--NOTE: only needed for &amp;lt;95.0 (before engine was expecting a cryptic format)&lt;br /&gt;
if not(Game) or not(Game.version) then&lt;br /&gt;
  for categoryName, categoryTable in pairs(armorDefs) do&lt;br /&gt;
    local t = {}&lt;br /&gt;
    for _, unitName in pairs(categoryTable) do&lt;br /&gt;
      t[unitName] = 1&lt;br /&gt;
    end&lt;br /&gt;
    armorDefs[categoryName] = t&lt;br /&gt;
  end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
return armorDefs&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Weapon Example=&lt;br /&gt;
Goes with above example, a weapon that deals 60 damage to infantry but only 5 damage to tanks:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
...&lt;br /&gt;
damage = {&lt;br /&gt;
	infantry = 60,&lt;br /&gt;
	tanks = 5,&lt;br /&gt;
},&lt;br /&gt;
...&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Shields=&lt;br /&gt;
In engine versions =&amp;lt; 96.0 the damage dealt to shields is the weapon&#039;s &#039;&#039;default&#039;&#039; value.&lt;br /&gt;
This [http://springrts.com/mantis/view.php?id=4450 changed] in v98.0&lt;br /&gt;
&lt;br /&gt;
Putting a shield into an armor class is analogical to units, ie. the armorDefs entry is its weaponDef name:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
armorDefs = {&lt;br /&gt;
  units = { &amp;quot;shieldbot&amp;quot; },&lt;br /&gt;
  shields = { &amp;quot;shieldbot_shield&amp;quot; }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Then in some damage table:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;damage = {&lt;br /&gt;
  default = 123,&lt;br /&gt;
  units = 456,&lt;br /&gt;
  shields = 789&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=More efficient with Lua=&lt;br /&gt;
Spring armor categories are kludgy and messy because they are extremely inefficient. There are a lot of inconsistencies.&lt;br /&gt;
In some cases, only the first category listed will be obeyed. At other times in that same list, all will be obeyed.&lt;br /&gt;
&lt;br /&gt;
In other words, do not rely on categories too heavily, because you will end up quite frustrated with the results.&lt;br /&gt;
&lt;br /&gt;
You should look at smoth&#039;s armor system code. Evo uses it rather extensively.&lt;br /&gt;
&lt;br /&gt;
=Links to more Examples=&lt;br /&gt;
[http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/gamedata/armordefs.lua zero-K]&amp;lt;br&amp;gt;&lt;br /&gt;
Contains scripting to take into account various things like EMP damage.&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/trunk/SpringTutorialGame.sdd/Gamedata/armordefs.lua|Spring Tutorial Game]&amp;lt;br&amp;gt;&lt;br /&gt;
Uses default damage class, except for one unit that is &amp;quot;armored.&amp;quot;&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/p/mwspring/code/899/tree/Gamedata/armordefs.lua MechCommander: Legacy]&amp;lt;br&amp;gt;&lt;br /&gt;
Automatically assigns units to an armor class based on [[Gamedev:UnitDefs|UnitDef]] tags and custom params.&lt;br /&gt;
&lt;br /&gt;
[[Category:gamedata]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Movedefs.lua&amp;diff=14815</id>
		<title>Movedefs.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Movedefs.lua&amp;diff=14815"/>
		<updated>2015-04-14T17:22:34Z</updated>

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

		<summary type="html">&lt;p&gt;8611: expanded the part about more advanced scripting&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Interessted in creating a game on the spring engine?==&lt;br /&gt;
&lt;br /&gt;
Honestly, here isn&#039;t really the place to ask. The amount of available developers here is 0. We are all working on our own projects.&lt;br /&gt;
&lt;br /&gt;
Sucks, but we are a small community. I would suggest posting on moddb. There are usually people there looking for work.&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=User:Knorke/Sandbox2&amp;diff=20874</id>
		<title>User:Knorke/Sandbox2</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=User:Knorke/Sandbox2&amp;diff=20874"/>
		<updated>2015-04-14T17:07:30Z</updated>

		<summary type="html">&lt;p&gt;8611: updated for recent advances&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;This text describes making a gadget.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
 &amp;quot;move blah now;&amp;quot; so all your shit happens virtually instantly. &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Tutorial_GettingStarted&amp;diff=10915</id>
		<title>Lua:Tutorial GettingStarted</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Tutorial_GettingStarted&amp;diff=10915"/>
		<updated>2015-04-14T17:03:26Z</updated>

		<summary type="html">&lt;p&gt;8611: edited with better beginner widget&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;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
&lt;br /&gt;
function widget:GetInfo()&lt;br /&gt;
   return {&lt;br /&gt;
      name         = &amp;quot;Name as shown in widget list&amp;quot;,&lt;br /&gt;
      desc         = &amp;quot;&amp;quot;,&lt;br /&gt;
      author         = &amp;quot;john doe&amp;quot;,&lt;br /&gt;
      date         = &amp;quot;date&amp;quot;,&lt;br /&gt;
      license          = &amp;quot;PD&amp;quot;,&lt;br /&gt;
      layer          = 0,&lt;br /&gt;
      experimental   = false,&lt;br /&gt;
      enabled          = true&lt;br /&gt;
   }&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
local stringOfWords = &amp;quot;BLAH BLAH BLAH&amp;quot;&lt;br /&gt;
local toggle&lt;br /&gt;
&lt;br /&gt;
function widget:Initialize()&lt;br /&gt;
   Spring.Echo(stringOfWords .. &amp;quot; I STARTED LOOK AT ME JIM!&amp;quot;)&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
function widget:Update(frame)&lt;br /&gt;
   if(toggle == true) then&lt;br /&gt;
      Spring.Echo(&amp;quot;TOCK&amp;quot;)&lt;br /&gt;
      toggle = false&lt;br /&gt;
   else&lt;br /&gt;
      Spring.Echo(&amp;quot;TICK&amp;quot;)&lt;br /&gt;
      toggle = true&lt;br /&gt;
   end&lt;br /&gt;
end&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
[[category: Lua]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=General_Resources&amp;diff=9304</id>
		<title>General Resources</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=General_Resources&amp;diff=9304"/>
		<updated>2015-04-14T08:37:11Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Various */   added: Game Development Tutorials &amp;amp; Resources subforum&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game and Unit development]] &amp;lt; General Resources&lt;br /&gt;
&lt;br /&gt;
=Textures=&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?t=7093&amp;amp;start=0 Texture Competition 0001 - Metal]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?t=7188&amp;amp;start=0 Texture Competition 0002 - Camo]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?t=7731 Texture Competition 0003 - Stone/Concrete]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://www.cgtextures.com/ CG Textures]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://spring.clan-sy.com/phpbb/viewtopic.php?f=13&amp;amp;t=11009&amp;amp;st=0&amp;amp;sk=t&amp;amp;sd=a Skyboxes]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=13&amp;amp;t=30674 More skyboxes, based on NASA photography]&lt;br /&gt;
&lt;br /&gt;
=Features=&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?t=4047 Compilation List of Features for Maps]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://spring1944.com/s44/files/S44%20Trees.rar Trees]&lt;br /&gt;
&lt;br /&gt;
=Models=&lt;br /&gt;
[http://planet-wars.eu/ModelBase/Units.aspx Model Base] - models/textures/scripts by the CA/zK team (?), mostly remakes of TA units&lt;br /&gt;
&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?f=9&amp;amp;t=22283 KaiserJ&#039;s &amp;quot;Lego&amp;quot; pieces] - easily create units by puzzling together various &amp;quot;Lego pieces&amp;quot;, comes with texture.&lt;br /&gt;
&lt;br /&gt;
=Sounds=&lt;br /&gt;
[http://freesound.iua.upf.edu/ Freesound] free sounds and samples, distributed under the [http://creativecommons.org/licenses/sampling+/1.0/ Creative Commons License]&lt;br /&gt;
[http://www.pdsounds.org/ Public domain sounds] sounds and samples distributed to the public domain&lt;br /&gt;
&lt;br /&gt;
=Code=&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?t=7457 GPL Code Repository]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://springrts.com/phpbb/viewtopic.php?t=6569&amp;amp;postdays=0&amp;amp;postorder=asc&amp;amp;start=0 The Millionth Monkey Gets Its Typewriter - Movement Optimization]&lt;br /&gt;
&lt;br /&gt;
=Maps=&lt;br /&gt;
[http://cs.selu.edu/~ssmith/spring/GPL/islands_in_war/ Islands in war]&lt;br /&gt;
&lt;br /&gt;
=Games=&lt;br /&gt;
[http://spring.jobjol.nl/show_file.php?id=1531 THIS]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://spring.jobjol.nl/show_file.php?id=1070 Fibre]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://spring.jobjol.nl/show_file.php?id=1476 Micro Modules]&amp;lt;br&amp;gt;&lt;br /&gt;
[http://spring.jobjol.nl/show_file.php?id=1079 Under Pressure]&amp;lt;br&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=Lua=&lt;br /&gt;
[[WidgetDatabaseFAQ|Widget-DB]] - you may use this for finding code samples&lt;br /&gt;
&lt;br /&gt;
=Various=&lt;br /&gt;
[https://springrts.com/phpbb/viewforum.php?f=67 Game Development Tutorials &amp;amp; Resources] - A cornucopia of valuable resources, since years developers come here for top notch content. Also perfect to get old projects going again.&lt;br /&gt;
&lt;br /&gt;
[http://spring.clan-sy.com/phpbb/viewtopic.php?f=14&amp;amp;t=8573 Various Resources by various people]&lt;br /&gt;
- cegs in .tdf format, bos scripts and some 404s ;)&lt;br /&gt;
&lt;br /&gt;
[[CollectionOfStuff|Unsorted list of interesting threads about Spring game development]]&lt;br /&gt;
&lt;br /&gt;
{{forumlink|topic=23961|title= Dario D.&#039;s interface pack}} - contains textures and sounds, useable to make an interface&lt;br /&gt;
&lt;br /&gt;
[[Category:Game Dev]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sounds.lua&amp;diff=17039</id>
		<title>Sounds.lua</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Sounds.lua&amp;diff=17039"/>
		<updated>2015-04-13T12:22:49Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Example */ add PitchMod explosion examples. untested if that still works/is needed but the idea itself is good example. http://springrts.com/phpbb/viewtopic.php?t&amp;amp;t=28819&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;==Location==&lt;br /&gt;
&amp;lt;code&amp;gt;sounds.lua&amp;lt;/code&amp;gt; is a file in the &amp;lt;code&amp;gt;Gamedata/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
The file is used to define &#039;&#039;&#039;SoundItems&#039;&#039;&#039;. Beside simply &amp;quot;linking&amp;quot; to an audio file, &#039;&#039;&#039;SoundItems&#039;&#039;&#039; can use various tags to alter the playback of the file.&lt;br /&gt;
&lt;br /&gt;
==Source==&lt;br /&gt;
The engine source code which parses the data from this file is viewable here:&lt;br /&gt;
&lt;br /&gt;
* {{sourcelink|file=rts/System/Sound/SoundItem.cpp}}&lt;br /&gt;
&lt;br /&gt;
==Data Types==&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
Wherever a sound is played in Spring, be it associated with a [[Gamedev:UnitDefs|UnitDef]], [[Gamedev:WeaponDefs|WeaponDef]] or via the [[Lua_UnsyncedCtrl#Sounds|lua API]], a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; is used. If you access a raw sound file, a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; with the defaults is created for you.&lt;br /&gt;
&lt;br /&gt;
Additionally, multiple &#039;&#039;&#039;SoundItems&#039;&#039;&#039; can use one single file with different settings, this is very efficient, as they only use 1 shared buffer.&lt;br /&gt;
&lt;br /&gt;
{{new|89.0}}: All item names are treated in lowercase.&lt;br /&gt;
&lt;br /&gt;
==Tips==&lt;br /&gt;
You can update &amp;amp; reload your sounddefs at runtime via Spring.LoadSoundDef(&amp;quot;gamedata/sounds.lua&amp;quot;).&lt;br /&gt;
&lt;br /&gt;
===Reserved SoundItems===&lt;br /&gt;
The following &#039;&#039;&#039;SoundItems&#039;&#039;&#039; are reserved for specific engine sounds:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;IncomingChat&amp;lt;/code&amp;gt; - Is played when a chat message is received.&lt;br /&gt;
* &amp;lt;code&amp;gt;MultiSelect&amp;lt;/code&amp;gt; - Is played when multiple units are selected simultaneously.&lt;br /&gt;
* &amp;lt;code&amp;gt;MapPoint&amp;lt;/code&amp;gt; - Is played when a map point is placed by the player or an ally.&lt;br /&gt;
* &amp;lt;code&amp;gt;FailedCommand&amp;lt;/code&amp;gt; - Is played when a unit fails to execute a command. e.g. When a unit cannot reach it&#039;s destination etc.&lt;br /&gt;
* &amp;lt;code&amp;gt;default&amp;lt;/code&amp;gt; - Used for all sounds that aren&#039;t listed in &amp;lt;code&amp;gt;sounds.lua&amp;lt;/code&amp;gt;.&lt;br /&gt;
&lt;br /&gt;
===SoundItem Properties===&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = gain&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = This varies the loudness, &amp;gt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; is louder, &amp;lt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;  is quieter. &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; is silent.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = gainmod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = If &amp;gt; &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; then this adds a random amount to {{taglink|gain}} each time the sound is played. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;. The result is in the range &#039;&#039;&#039;[&#039;&#039;&#039;({{taglink|gain}} * (1 + {{taglink|gainMod}}))&#039;&#039;&#039;,&#039;&#039;&#039; ({{taglink|gain}} * (1 - {{taglink|gainMod}}))&#039;&#039;&#039;]&#039;&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pitch&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Varies the pitch of the sound, &amp;gt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; is higher pitched, &amp;lt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; is lower.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pitchmod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = If &amp;gt; &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; then this adds a random amount to {{taglink|pitch}} each time the sound is played. Clamped between &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;. The result is in the range &#039;&#039;&#039;[&#039;&#039;&#039;({{taglink|pitch}} * (1 + {{taglink|pitchMod}}))&#039;&#039;&#039;,&#039;&#039;&#039; ({{taglink|pitch}} * (1 - {{taglink|pitchMod}}))&#039;&#039;&#039;]&#039;&#039;&#039;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dopplerscale&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How unit and camera speed affects the pitch of the sound, to exaggerate it, use values &amp;gt; &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;. Use &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; to completely disable the effect.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = priority&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = When lots of sounds are played, sounds with lower {{taglink|priority}} are more likely to get cut off. A {{taglink|priority}} &amp;gt; &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; will never be cut of (priorities can be negative).}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxconcurrent&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 16&lt;br /&gt;
|description = How many copies of this sound can be played at once?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxdist&lt;br /&gt;
|type = float&lt;br /&gt;
|default = MAX_FLOAT&lt;br /&gt;
|description = The cut-off distance (in [[elmo]]s) at which this sound will no longer be played.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rolloff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the sound becomes quieter with distance. &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; means always the same loudness regardless of distance.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = in3d&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Non-3d sounds always came out of the front-speakers (or the centre one). 3d sounds are, well, in 3d.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = looptime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in milliseconds the sound should loop for.}}&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
===default sounds===&lt;br /&gt;
The following is the default &amp;lt;code&amp;gt;sounds.lua&amp;lt;/code&amp;gt; supplied in the base content [[springcontent.sdz]] archive, with some of the comments removed (As the information is presented here).&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local Sounds = {&lt;br /&gt;
  SoundItems = {&lt;br /&gt;
    IncomingChat = {&lt;br /&gt;
      --- always play on the front speaker(s)&lt;br /&gt;
      file = &amp;quot;sounds/beep4.wav&amp;quot;,&lt;br /&gt;
      in3d = &amp;quot;false&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    MultiSelect = {&lt;br /&gt;
      --- always play on the front speaker(s)&lt;br /&gt;
      file = &amp;quot;sounds/button9.wav&amp;quot;,&lt;br /&gt;
      in3d = &amp;quot;false&amp;quot;,&lt;br /&gt;
    },&lt;br /&gt;
    MapPoint = {&lt;br /&gt;
      --- respect where the point was set, but don&#039;t attenuate in distance&lt;br /&gt;
      --- also, when moving the camera, don&#039;t pitch it&lt;br /&gt;
      file = &amp;quot;sounds/beep6.wav&amp;quot;,&lt;br /&gt;
      rolloff = 0,&lt;br /&gt;
      dopplerscale = 0,&lt;br /&gt;
    },&lt;br /&gt;
    ExampleSound = {&lt;br /&gt;
      --- some things you can do with this file&lt;br /&gt;
      --- can be either ogg or wav&lt;br /&gt;
      file = &amp;quot;somedir/subdir/soundfile.ogg&amp;quot;,&lt;br /&gt;
      gain = 1,&lt;br /&gt;
      pitch = 1,&lt;br /&gt;
      dopplerscale = 1,&lt;br /&gt;
      priority = 0,&lt;br /&gt;
      maxconcurrent = 16,&lt;br /&gt;
      maxdist = 20000,&lt;br /&gt;
      rolloff = 1,&lt;br /&gt;
      in3d = true,&lt;br /&gt;
      looptime = 0,&lt;br /&gt;
    },&lt;br /&gt;
&lt;br /&gt;
    -- new since 89.0&lt;br /&gt;
    default = {&lt;br /&gt;
      gainmod = 0.35,&lt;br /&gt;
      pitchmod = 0.3,&lt;br /&gt;
      pitch = 0.7,&lt;br /&gt;
      in3d = true,&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return Sounds&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
===Using PitchMod to prevent loud explosions====&lt;br /&gt;
Taken from this thread by jK: {{forumlink|topic=28819|title=Use PitchMod in sounds.lua to prevent loud explosions}}&lt;br /&gt;
&lt;br /&gt;
Explosions can sound louder than intended when they are started in the same simFrame and so are played in sync -&amp;gt; resonance. PitchMod now changes the playback time (e.g. with 0.3 the sounds should have a playback time of 100-130%) and so there isn&#039;t a resonance anymore even when the sound is started multiple times in the same simframe.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local files = VFS.DirList(&amp;quot;sounds/explosions/&amp;quot;)&lt;br /&gt;
local t = Sounds.SoundItems&lt;br /&gt;
for i=1,#files do&lt;br /&gt;
   local fileName = files[i]&lt;br /&gt;
   t[fileName] = {&lt;br /&gt;
      file     = fileName;&lt;br /&gt;
      pitchmod = 0.3;&lt;br /&gt;
      gainmod  = 0.2;&lt;br /&gt;
      maxconcurrent = 8;&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;
&lt;br /&gt;
&lt;br /&gt;
===External Examples===&lt;br /&gt;
{{sourcelink|file=cont/base/springcontent/gamedata/sounds.lua}} - The original default &amp;lt;code&amp;gt;sounds.lua&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/zero-k/source/browse/trunk/mods/zk/gamedata/sounds.lua ZeroK sounds.lua]&lt;br /&gt;
&lt;br /&gt;
==Further Reading==&lt;br /&gt;
{{forumlink|topic=17647&amp;amp;start=25|title=Information about sounds.lua}}&lt;br /&gt;
{{forumlink|topic=20685|title=Information about gainMod and pitchMod}}&lt;br /&gt;
[[Category:gamedata]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10758</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=10758"/>
		<updated>2015-04-13T10:24:31Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Drawing */ none-&amp;gt;dt&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. 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 = 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 = 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 = 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 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>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19796</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19796"/>
		<updated>2015-03-10T17:31:42Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Download */ nobody was updating the links..think auto-dl is okay&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&lt;br /&gt;
[loganberry]Autohost&lt;br /&gt;
[durian]Autohost&lt;br /&gt;
[elderberry]Autohost&lt;br /&gt;
&amp;lt;/pre&amp;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;
===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>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19795</id>
		<title>XTA</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=XTA&amp;diff=19795"/>
		<updated>2015-03-10T17:19:59Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Important Autohost Commands */ commented out helium (its gone), updated a bit&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;
Official XTA autohosts are:&lt;br /&gt;
&amp;lt;pre&amp;gt;&lt;br /&gt;
[semprini]Autohost&lt;br /&gt;
[loganberry]Autohost&lt;br /&gt;
[durian]Autohost&lt;br /&gt;
[elderberry]Autohost&lt;br /&gt;
&amp;lt;/pre&amp;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;
===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>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Defs&amp;diff=3888</id>
		<title>CEG:Defs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Defs&amp;diff=3888"/>
		<updated>2015-03-09T23:16:42Z</updated>

		<summary type="html">&lt;p&gt;8611: add:CSmokeProjectile &amp;amp; CSmokeProjectile2. someone check or something&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CEG Definitions =&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/Projectiles/}} &lt;br /&gt;
* {{sourcelink|file=rts/Sim/Projectiles/Unsynced/}}&lt;br /&gt;
* {{sourcelink|file=rts/Rendering/GroundFlash.cpp}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
CEGs use the following data types:&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
You can use [[CEG:Operators]] to define floats that are not fixed.&lt;br /&gt;
&lt;br /&gt;
== CEG Textures ==&lt;br /&gt;
&lt;br /&gt;
* Textures on CEG definitions are referenced by name.&lt;br /&gt;
* The list of available textures and their names should be in [[resources.lua]]&lt;br /&gt;
* Texture definitions to be used in projectile classes should be placed within the &amp;lt;code&amp;gt;projectiletextures&amp;lt;/code&amp;gt; category and textures to be used with [[#CSimpleGroundFlash]] class should be placed within the &amp;lt;code&amp;gt;groundfx&amp;lt;/code&amp;gt; category.&lt;br /&gt;
* Texture images are usually placed in the &amp;quot;bitmaps&amp;quot; subfolder.&lt;br /&gt;
&lt;br /&gt;
== Overall Format ==&lt;br /&gt;
&lt;br /&gt;
A CEG file contains one or more CEGs. Each CEG follows this format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
  [&amp;quot;ceg_name&amp;quot;] = {&lt;br /&gt;
    -- EXPLOSION LEVEL&lt;br /&gt;
    useDefaultExplosions = false,&lt;br /&gt;
&lt;br /&gt;
    spawner1_name = {&lt;br /&gt;
      -- SPAWNER LEVEL&lt;br /&gt;
      class         = &amp;quot;CClassName&amp;quot;,&lt;br /&gt;
      count              = 1,&lt;br /&gt;
      air                = true,&lt;br /&gt;
      ground             = true,&lt;br /&gt;
      water              = true,&lt;br /&gt;
      properties = {&lt;br /&gt;
        -- CLASS LEVEL&lt;br /&gt;
        },&lt;br /&gt;
      },&lt;br /&gt;
    },&lt;br /&gt;
    spawner2_name = {&lt;br /&gt;
      -- SPAWNER LEVEL&lt;br /&gt;
      -- each spawner follows the above format&lt;br /&gt;
    },&lt;br /&gt;
    groundflash = {&lt;br /&gt;
      -- groundflash is a special spawner name; it always generates a CStandardGroundFlash&lt;br /&gt;
      -- CStandardGroundFlash properties&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explosion Level Tags ==&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useDefaultExplosions&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If this is set, the CEG will use the default explosion (based on damage and area of effect) in addition to any spawners you define. The default explosions are sometimes very performance heavy, especially for large damage values (leading to higher particle counts).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Spawner Level Tags ==&lt;br /&gt;
A CEG can contain any number of spawners. The name of the spawners don&#039;t really matter, as long as it&#039;s not &amp;lt;code&amp;gt;groundflash&amp;lt;/code&amp;gt;, which has a special meaning. You can think of each spawner as being one component of the overall explosion.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = class&lt;br /&gt;
|type = string&lt;br /&gt;
|default = spawner_name&lt;br /&gt;
|description = Each spawner has a class that determines what kind of graphical effect it creates. Spring has a number of standard classes that you can choose from. Currently available classes are:&lt;br /&gt;
* [[#CExpGenSpawner|CExpGenSpawner]]&lt;br /&gt;
* [[#CBitmapMuzzleFlame|CBitmapMuzzleFlame]]&lt;br /&gt;
* [[#CExploSpikeProjectile|CExploSpikeProjectile]] &lt;br /&gt;
* [[#CHeatCloudProjectile|CHeatCloudProjectile]]&lt;br /&gt;
* [[#CSimpleParticleSystem|CSimpleParticleSystem]]&lt;br /&gt;
* [[#CSpherePartSpawner|CSpherePartSpawner]]&lt;br /&gt;
* [[#CSimpleGroundFlash|CSimpleGroundFlash]]&lt;br /&gt;
* [[#CStandardGroundFlash|CStandardGroundFlash]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = count&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = The count determines the number of times the spawner will run.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Visibility Conditions ===&lt;br /&gt;
These determine under what conditions the spawner will run. If you set the condition to true, the spawner will run if the explosion takes place under that condition. If you set more than one condition, the spawner will run if &#039;&#039;any&#039;&#039; of them are true. If you want a spawner to run only if two or more conditions are &#039;&#039;all&#039;&#039; true, you have to do a little trick with the [[#CExpGenSpawner]] class as explained in &amp;quot;suggested use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = air&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if at least 20 [[elmo]]s above ground/sea level.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = water&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if in water to a depth of -5 [[elmo]]s.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = underwater&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if under water deeper than 5 [[elmo]]s.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ground&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if less than 20 [[elmo]]s above ground.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unit&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if the weapon hits a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = nounit&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if the weapon does not hit a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Class Level Tags ==&lt;br /&gt;
=== Common Properties ===&lt;br /&gt;
All classes have the following properties, although not all of them use them:&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 true, the spawner is always visible, ignoring LoS. Note that prior to 98.0 this did not work correctly.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useAirLos&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Whether the spawner uses air LoS to determine if it is visible. This may allow the spawner to be seen from a further distance than normal.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pos &lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The initial position vector of the spawner.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speed&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The initial speed vector of the spawner.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dir&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|description = The initial direction vector of the spawner.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CExpGenSpawner ===&lt;br /&gt;
This is the closest thing CEG has to a function call. Instead of creating a graphical effect on its own, it creates another CEG.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* If you use a spawner a lot of times, you may want to make it a separate CEG to avoid having to copy-paste many times.&lt;br /&gt;
* This is the only way to truly delay a graphical effect.&lt;br /&gt;
* The spawned CEG still checks conditions, so if you want to, say, spawn an effect only if it is in water &#039;&#039;and&#039;&#039; doesn&#039;t hit a unit, you can give the CExpGenSpawner &amp;lt;code&amp;gt;nounit = 1;&amp;lt;/code&amp;gt; and the spawned &amp;lt;code&amp;gt;CEG water = 1;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* This allows you to give a set of spawners the same (and possibly random) direction.&lt;br /&gt;
* You can animate an explosion flip-book style using delays and several bitmaps.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = delay&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How long to wait (in frames?) before spawning the CEG.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = damage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The CEG will be called with this damage. The CEG doesn&#039;t actually deal any damage, but you can use this as a parameter and read it using the [[CEG:Operators#Damage_.28.27d.27.29|&#039;d&#039; operator]].&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 the CEG you want to spawn.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CBitmapMuzzleFlame ===&lt;br /&gt;
This creates three rectangular textures at right angles to each other. The {{taglink|frontTexture}} has {{taglink|dir}} as its normal.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
*Muzzle flames, obviously.&lt;br /&gt;
*You can use an upward-pointing CBitmapMuzzleFlame as a simple splash of water or dirt.&lt;br /&gt;
*Railgun trails.&lt;br /&gt;
*This is the only class that both obeys perspective and allows for a custom texture.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sideTexture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Texture as viewed from the side.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = frontTexture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Texture as viewed from the front.&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 = See [[CColorMap]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial width of the muzzle flame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = length&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial length of the muzzle flame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = By the end of its life, the muzzle flame grows to &amp;lt;code&amp;gt;1 + sizeGrowth&amp;lt;/code&amp;gt; times its initial {{taglink|size}} and {{taglink|length}}. The flame grows quickly at first and more slowly toward the end.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = How long the muzzle flame lasts.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = frontOffset&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Where the frontTexture is along the length of the muzzle flame. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means it is in the back, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; is in the front.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CExploSpikeProjectile ===&lt;br /&gt;
&lt;br /&gt;
This creates a glowy spike. Note that the spike is two sided, i.e., symmetric about the position of the spawner.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* Anything glowy.&lt;br /&gt;
* For large, slow missiles, you can try using this as an extended engine flame. Set the width to something fairly large.&lt;br /&gt;
* Long and thin spikes will look spiky; meanwhile, shorter and wider spikes look more blobby.&lt;br /&gt;
* The colors of spikes add together, so if you have several spikes and all three color channels are non-zero, it will be white in the center.&lt;br /&gt;
* The length growth of the spike depends on the norm of the dir vector. The spike does not grow in width.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = length&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial length of (half) of the spike (multiplied by {{taglink|dir}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = lengthGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = dir.Length() * (0.5 + RandFloat() * 0.4)&lt;br /&gt;
|description = How much the length increases by per update.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = width&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Half the initial width of of the spike. This is an absolute value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alpha&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The starting alpha of the spike.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alphaDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How quickly the alpha of the spike decreases.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = rgb&lt;br /&gt;
|default = {1.0, 0.8, 0.5}&lt;br /&gt;
|description = The color of the spike.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CHeatCloudProjectile ===&lt;br /&gt;
&lt;br /&gt;
Creates an expanding sprite. Simple but effective.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* As the main background to an explosion.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heat&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Used in alpha calculations. See {{taglink|heatFalloff}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxheat&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Used in alpha calculations. See {{taglink|heatFalloff}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatFalloff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = This is really confusing way of representing alpha and alphaDecay. Basically &amp;lt;code&amp;gt;alpha = &amp;lt;/code&amp;gt;{{taglink|heat}}&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;{{taglink|maxheat}}, and &amp;lt;code&amp;gt;alphaDecay = &amp;lt;/code&amp;gt;{{taglink|heatFalloff}}&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;{{taglink|maxHeat}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial radius of the heatcloud.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The heatcloud grows by this amount every frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The size of the heatcloud is multiplied by &amp;lt;code&amp;gt;1 - sizeMod&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeModMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Each frame, {{taglink|sizeMod}} is multiplied by {{taglink|sizeModMod}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;heatcloud&amp;quot; as referenced in [[resources.lua]]&lt;br /&gt;
|description = The texture used for the heatcloud.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CSimpleParticleSystem ===&lt;br /&gt;
&lt;br /&gt;
Creates a sprite that can undergo complex motion. Probably the most versatile class.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* Anything moving that is not doing so at constant velocity.&lt;br /&gt;
* If you want something that expands (or shrinks) to some size then stops, set {{taglink|sizeMod}} to something less than &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, and {{taglink|sizeGrowth}} to something positive. The particle will grow to a size equal to &amp;lt;code&amp;gt;sizeGrowth / (1 - sizeMod)&amp;lt;/code&amp;gt; and stop. The smaller {{taglink|sizeMod}} is, the faster it will reach this size.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
===== Initial Velocity Properties =====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitVector&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The initial direction vector in which the particle is emitted. When spawning CEGs via EmitSfx you can make the particles go into the direction of the emiting piece with {{taglink|emitvector|dir}}. This is useful for e.g. fire coming out of a gun barrel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitRot&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = At what angle to emit the particle relative to {{taglink|emitVector}}. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means that the particle will be emitted in {{taglink|emitVector}}&#039;s direction; &amp;lt;code&amp;gt;180&amp;lt;/code&amp;gt; will emit the particle in the opposite direction. &amp;lt;code&amp;gt;90&amp;lt;/code&amp;gt; will emit the particle in a random direction perpendicular to {{taglink|emitVector}}, which is good for creating rings.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitRotSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|emitRotSpread}} is added to the {{taglink|emitRot}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitMul&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 1.0, 1.0}&lt;br /&gt;
|description = Scales the initial particle velocity; for this property, +y is considered to be in the direction of {{taglink|emitVector}}. Good if you want to create an egg-shaped explosion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSpeed &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The particle&#039;s initial speed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSpeedSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|particleSpeedSpread}} is added to the {{taglink|particleSpeed}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Movement Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = gravity&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = This will be added to the particle&#039;s velocity every frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airdrag&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The particle&#039;s velocity is multiplied by this every frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Size Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSize &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial size of the particle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSizeSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|particleSizeSpread}} is added to the {{taglink|particleSize}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much the particle grows each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The size of the particle is multiplied by this each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Visual Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = directional&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If true, the particle will point in the direction it is moving.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The texture to use for the particle.&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 = See [[CColorMap]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Life Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = numParticles&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = How many particles to create. This is not the same as &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt;; if you spawn multiple particles using &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt;, any [[CEG:Operators]] will be re-evaluated for each particle, whereas if you use {{taglink|numParticles}} they will not be. However, the spread properties are evaluated separately for each particle regardless of which one you use.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleLife&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How long each particle lasts. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleLifeSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|particleLifeSpread}} is added to the {{taglink|particleLife}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CSpherePartSpawner ===&lt;br /&gt;
&lt;br /&gt;
Draws an expanding sphere.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
*Looks like a shockwave.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alpha&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The alpha of the sphere.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = Time to live, in frames(?).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = expansionSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How quickly the sphere expands.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = rgb&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The color of the sphere.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CSimpleGroundFlash ===&lt;br /&gt;
&lt;br /&gt;
Draws an expanding ground texture.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* A short groundflash (~8 frames) is good for any explosion that gives off light. You can also use a longer groundflash to suggest the ground is glowing from heat.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The radius of the particle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much the particle grows each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = Time to live, in frames(?).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The texture to use for the particle.&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 = See [[CColorMap]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CStandardGroundFlash ===&lt;br /&gt;
If you name a spawner &amp;quot;groundflash,&amp;quot; it will always generate a standard groundflash. &lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
A short groundflash (~8 frames) is good for any explosion that gives off light. You can also use a longer groundflash to suggest the ground is glowing from heat.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flashSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The radius of the groundflash.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flashAlpha &lt;br /&gt;
|type = float&lt;br /&gt;
|range = [0, 1]&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How transparent the groundflash is. Generally the higher the brighter.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = circleGrowth &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = A groundflash can have an additional circle that expands outwards. This controls how fast the circle grows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = circleAlpha&lt;br /&gt;
|type = float&lt;br /&gt;
|range = [0, 1]&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How transparent the circle is.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = How long the groundflash lasts.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = rgb&lt;br /&gt;
|default = {1.0, 1.0, 0.8}&lt;br /&gt;
|description = The color of the groundflash.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CSmokeProjectile2 ===&lt;br /&gt;
( {{FIXME}} newly added to wiki. someone cross-check then remove this note )&lt;br /&gt;
&lt;br /&gt;
Particles that begin with a hard-coded yellow-red colorfade and then fade to monochrom. (shades of grey)&lt;br /&gt;
&lt;br /&gt;
Movement is influenced by the random wind.&lt;br /&gt;
Finer details of visual and position update are best explained by looking at the formulas in &amp;lt;code&amp;gt;CSmokeProjectile2::Update() &amp;amp; CSmokeProjectile2::Draw()&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
Smoke. Smokestacks, rocket exhaust, burning wreckage,...&lt;br /&gt;
&lt;br /&gt;
For a nicer stream of smoke spawn it frequently over multiple frames, otherwise it looks rather bland.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = How dark the final monochrom color of a particle is. 0 is black.&lt;br /&gt;
(Use &amp;gt;1 for slightly bugged funnies, like slightly non-monochrome colors or interessting black/white changes.)&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Size of a particle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ageSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = How fast the particle ages. Every frame: &amp;lt;code&amp;gt;age += ageSpeed&amp;lt;/code&amp;gt; The particle is deleted at &amp;lt;code&amp;gt;if (age &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = glowFalloff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How fast the particle fades to monochrom.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = wantedPos&lt;br /&gt;
|type = float3&lt;br /&gt;
|default = &amp;quot;0,0,0&amp;quot;&lt;br /&gt;
|description = In which direction the smoke tends to drift. Less effective in y-coordinate and influenced by random wind. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speed&lt;br /&gt;
|type = float3&lt;br /&gt;
|default = &amp;quot;0,0,0&amp;quot;&lt;br /&gt;
|description = &amp;lt;code&amp;gt;wantedPos += speed;&amp;lt;/code&amp;gt; How fast and in which vector the particles move.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = hardcoded&lt;br /&gt;
|default = randomly chosen. &lt;br /&gt;
|description = Particles randomly pick one of the smoke textures (bitmaps\smoke) and remain with it until death.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CSmokeProjectile ===&lt;br /&gt;
Monochrome particles that fade out.&lt;br /&gt;
A more &amp;quot;primitive&amp;quot; version of CSmokeProjectile2. &lt;br /&gt;
No hardcoded red-yellow start but it misses wantedPos to tweak the look a bit more detailed.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
Smoke. &lt;br /&gt;
For a nicer stream of smoke spawn it frequently over multiple frames, otherwise it looks rather bland.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = Brightness of the particle. 0 is black.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Size of a particle&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ageSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.5&lt;br /&gt;
|description = How fast the particle ages. Every frame: &amp;lt;code&amp;gt;age += ageSpeed&amp;lt;/code&amp;gt; The particle is deleted at &amp;lt;code&amp;gt;if (age &amp;gt; 1)&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speed&lt;br /&gt;
|type = float3&lt;br /&gt;
|default = &amp;quot;0,0,0&amp;quot;&lt;br /&gt;
|description = &amp;lt;code&amp;gt;pos += speed;&amp;lt;/code&amp;gt; How fast and in which vector the particles move.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = hardcoded&lt;br /&gt;
|default = randomly chosen. &lt;br /&gt;
|description = Particles randomly pick one of the smoke textures (bitmaps\smoke) and remain with it until death.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- can&#039;t use the following until all games use effects/ rather than gamedata/explosions&lt;br /&gt;
{{ExampleRepoLinks&lt;br /&gt;
|path = effects/&lt;br /&gt;
|entity = CEGs&lt;br /&gt;
}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://imolarpg.dyndns.org/trac/balatest/browser/trunk/gamedata/explosions &#039;Balanced Annihilation&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/conflictterra/source/browse/#svn%2Fgames%2FCT%2Fgamedata%2Fexplosions &#039;Conflict Terra&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/EvolutionRTS/Evolution-RTS/tree/master/Gamedata/explosions &#039;Evolution RTS&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/imperialwinter/swiw.sdd/tree/master/gamedata/explosions &#039;Imperial Winter&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/journeywar/source/browse/#svn%2Ftrunk%2Fgamedata%2Fexplosions &#039;Journeywar&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/p/mwspring/code/HEAD/tree/effects/ &#039;MechCommander: Legacy&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring1944/spring1944/tree/master/effects &#039;Spring: 1944&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/#svn%2Ftrunk%2FSpringTutorialGame.sdd%2FGamedata%2Fexplosions &#039;Spring Tutorial Game&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/xta-springrts/source/browse/#svn%2Ftrunk%2Fgamedata%2Fexplosions &#039;XTA&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ZeroK-RTS/Zero-K/tree/master/effects &#039;ZeroK&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[[Category:CEG]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Defs&amp;diff=3887</id>
		<title>CEG:Defs</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Defs&amp;diff=3887"/>
		<updated>2015-02-27T02:41:04Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Visibility Conditions */ the &amp;#039;trick&amp;#039; imo refers to using diff. conditions in CExpGenSpawner &amp;amp; spawned CEG&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CEG Definitions =&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/Projectiles/}} &lt;br /&gt;
* {{sourcelink|file=rts/Sim/Projectiles/Unsynced/}}&lt;br /&gt;
* {{sourcelink|file=rts/Rendering/GroundFlash.cpp}}&lt;br /&gt;
&lt;br /&gt;
== Data Types ==&lt;br /&gt;
CEGs use the following data types:&lt;br /&gt;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
You can use [[CEG:Operators]] to define floats that are not fixed.&lt;br /&gt;
&lt;br /&gt;
== CEG Textures ==&lt;br /&gt;
&lt;br /&gt;
* Textures on CEG definitions are referenced by name.&lt;br /&gt;
* The list of available textures and their names should be in [[resources.lua]]&lt;br /&gt;
* Texture definitions to be used in projectile classes should be placed within the &amp;lt;code&amp;gt;projectiletextures&amp;lt;/code&amp;gt; category and textures to be used with [[#CSimpleGroundFlash]] class should be placed within the &amp;lt;code&amp;gt;groundfx&amp;lt;/code&amp;gt; category.&lt;br /&gt;
* Texture images are usually placed in the &amp;quot;bitmaps&amp;quot; subfolder.&lt;br /&gt;
&lt;br /&gt;
== Overall Format ==&lt;br /&gt;
&lt;br /&gt;
A CEG file contains one or more CEGs. Each CEG follows this format:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
return {&lt;br /&gt;
  [&amp;quot;ceg_name&amp;quot;] = {&lt;br /&gt;
    -- EXPLOSION LEVEL&lt;br /&gt;
    useDefaultExplosions = false,&lt;br /&gt;
&lt;br /&gt;
    spawner1_name = {&lt;br /&gt;
      -- SPAWNER LEVEL&lt;br /&gt;
      class         = &amp;quot;CClassName&amp;quot;,&lt;br /&gt;
      count              = 1,&lt;br /&gt;
      air                = true,&lt;br /&gt;
      ground             = true,&lt;br /&gt;
      water              = true,&lt;br /&gt;
      properties = {&lt;br /&gt;
        -- CLASS LEVEL&lt;br /&gt;
        },&lt;br /&gt;
      },&lt;br /&gt;
    },&lt;br /&gt;
    spawner2_name = {&lt;br /&gt;
      -- SPAWNER LEVEL&lt;br /&gt;
      -- each spawner follows the above format&lt;br /&gt;
    },&lt;br /&gt;
    groundflash = {&lt;br /&gt;
      -- groundflash is a special spawner name; it always generates a CStandardGroundFlash&lt;br /&gt;
      -- CStandardGroundFlash properties&lt;br /&gt;
    },&lt;br /&gt;
  },&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
== Explosion Level Tags ==&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useDefaultExplosions&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If this is set, the CEG will use the default explosion (based on damage and area of effect) in addition to any spawners you define. The default explosions are sometimes very performance heavy, especially for large damage values (leading to higher particle counts).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Spawner Level Tags ==&lt;br /&gt;
A CEG can contain any number of spawners. The name of the spawners don&#039;t really matter, as long as it&#039;s not &amp;lt;code&amp;gt;groundflash&amp;lt;/code&amp;gt;, which has a special meaning. You can think of each spawner as being one component of the overall explosion.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = class&lt;br /&gt;
|type = string&lt;br /&gt;
|default = spawner_name&lt;br /&gt;
|description = Each spawner has a class that determines what kind of graphical effect it creates. Spring has a number of standard classes that you can choose from. Currently available classes are:&lt;br /&gt;
* [[#CExpGenSpawner|CExpGenSpawner]]&lt;br /&gt;
* [[#CBitmapMuzzleFlame|CBitmapMuzzleFlame]]&lt;br /&gt;
* [[#CExploSpikeProjectile|CExploSpikeProjectile]] &lt;br /&gt;
* [[#CHeatCloudProjectile|CHeatCloudProjectile]]&lt;br /&gt;
* [[#CSimpleParticleSystem|CSimpleParticleSystem]]&lt;br /&gt;
* [[#CSpherePartSpawner|CSpherePartSpawner]]&lt;br /&gt;
* [[#CSimpleGroundFlash|CSimpleGroundFlash]]&lt;br /&gt;
* [[#CStandardGroundFlash|CStandardGroundFlash]]&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = count&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = The count determines the number of times the spawner will run.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Visibility Conditions ===&lt;br /&gt;
These determine under what conditions the spawner will run. If you set the condition to true, the spawner will run if the explosion takes place under that condition. If you set more than one condition, the spawner will run if &#039;&#039;any&#039;&#039; of them are true. If you want a spawner to run only if two or more conditions are &#039;&#039;all&#039;&#039; true, you have to do a little trick with the [[#CExpGenSpawner]] class as explained in &amp;quot;suggested use&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = air&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if at least 20 [[elmo]]s above ground/sea level.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = water&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if in water to a depth of -5 [[elmo]]s.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = underwater&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if under water deeper than 5 [[elmo]]s.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ground&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if less than 20 [[elmo]]s above ground.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = unit&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if the weapon hits a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = nounit&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = The CEG will run if the weapon does not hit a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
== Class Level Tags ==&lt;br /&gt;
=== Common Properties ===&lt;br /&gt;
All classes have the following properties, although not all of them use them:&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 true, the spawner is always visible, ignoring LoS. Note that prior to 98.0 this did not work correctly.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useAirLos&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Whether the spawner uses air LoS to determine if it is visible. This may allow the spawner to be seen from a further distance than normal.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pos &lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The initial position vector of the spawner.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = speed&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The initial speed vector of the spawner.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = dir&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|description = The initial direction vector of the spawner.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CExpGenSpawner ===&lt;br /&gt;
This is the closest thing CEG has to a function call. Instead of creating a graphical effect on its own, it creates another CEG.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* If you use a spawner a lot of times, you may want to make it a separate CEG to avoid having to copy-paste many times.&lt;br /&gt;
* This is the only way to truly delay a graphical effect.&lt;br /&gt;
* The spawned CEG still checks conditions, so if you want to, say, spawn an effect only if it is in water &#039;&#039;and&#039;&#039; doesn&#039;t hit a unit, you can give the CExpGenSpawner &amp;lt;code&amp;gt;nounit = 1;&amp;lt;/code&amp;gt; and the spawned &amp;lt;code&amp;gt;CEG water = 1;&amp;lt;/code&amp;gt;.&lt;br /&gt;
* This allows you to give a set of spawners the same (and possibly random) direction.&lt;br /&gt;
* You can animate an explosion flip-book style using delays and several bitmaps.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = delay&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How long to wait (in frames?) before spawning the CEG.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = damage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The CEG will be called with this damage. The CEG doesn&#039;t actually deal any damage, but you can use this as a parameter and read it using the [[CEG:Operators#Damage_.28.27d.27.29|&#039;d&#039; operator]].&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 the CEG you want to spawn.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CBitmapMuzzleFlame ===&lt;br /&gt;
This creates three rectangular textures at right angles to each other. The {{taglink|frontTexture}} has {{taglink|dir}} as its normal.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
*Muzzle flames, obviously.&lt;br /&gt;
*You can use an upward-pointing CBitmapMuzzleFlame as a simple splash of water or dirt.&lt;br /&gt;
*Railgun trails.&lt;br /&gt;
*This is the only class that both obeys perspective and allows for a custom texture.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sideTexture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Texture as viewed from the side.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = frontTexture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Texture as viewed from the front.&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 = See [[CColorMap]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial width of the muzzle flame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = length&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial length of the muzzle flame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = By the end of its life, the muzzle flame grows to &amp;lt;code&amp;gt;1 + sizeGrowth&amp;lt;/code&amp;gt; times its initial {{taglink|size}} and {{taglink|length}}. The flame grows quickly at first and more slowly toward the end.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = How long the muzzle flame lasts.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = frontOffset&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Where the frontTexture is along the length of the muzzle flame. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means it is in the back, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; is in the front.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CExploSpikeProjectile ===&lt;br /&gt;
&lt;br /&gt;
This creates a glowy spike. Note that the spike is two sided, i.e., symmetric about the position of the spawner.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* Anything glowy.&lt;br /&gt;
* For large, slow missiles, you can try using this as an extended engine flame. Set the width to something fairly large.&lt;br /&gt;
* Long and thin spikes will look spiky; meanwhile, shorter and wider spikes look more blobby.&lt;br /&gt;
* The colors of spikes add together, so if you have several spikes and all three color channels are non-zero, it will be white in the center.&lt;br /&gt;
* The length growth of the spike depends on the norm of the dir vector. The spike does not grow in width.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = length&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial length of (half) of the spike (multiplied by {{taglink|dir}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = lengthGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = dir.Length() * (0.5 + RandFloat() * 0.4)&lt;br /&gt;
|description = How much the length increases by per update.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = width&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Half the initial width of of the spike. This is an absolute value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alpha&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The starting alpha of the spike.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alphaDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How quickly the alpha of the spike decreases.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = rgb&lt;br /&gt;
|default = {1.0, 0.8, 0.5}&lt;br /&gt;
|description = The color of the spike.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CHeatCloudProjectile ===&lt;br /&gt;
&lt;br /&gt;
Creates an expanding sprite. Simple but effective.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* As the main background to an explosion.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heat&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Used in alpha calculations. See {{taglink|heatFalloff}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = maxheat&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Used in alpha calculations. See {{taglink|heatFalloff}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = heatFalloff&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = This is really confusing way of representing alpha and alphaDecay. Basically &amp;lt;code&amp;gt;alpha = &amp;lt;/code&amp;gt;{{taglink|heat}}&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;{{taglink|maxheat}}, and &amp;lt;code&amp;gt;alphaDecay = &amp;lt;/code&amp;gt;{{taglink|heatFalloff}}&amp;lt;code&amp;gt;/&amp;lt;/code&amp;gt;{{taglink|maxHeat}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial radius of the heatcloud.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The heatcloud grows by this amount every frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The size of the heatcloud is multiplied by &amp;lt;code&amp;gt;1 - sizeMod&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeModMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = Each frame, {{taglink|sizeMod}} is multiplied by {{taglink|sizeModMod}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;heatcloud&amp;quot; as referenced in [[resources.lua]]&lt;br /&gt;
|description = The texture used for the heatcloud.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CSimpleParticleSystem ===&lt;br /&gt;
&lt;br /&gt;
Creates a sprite that can undergo complex motion. Probably the most versatile class.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* Anything moving that is not doing so at constant velocity.&lt;br /&gt;
* If you want something that expands (or shrinks) to some size then stops, set {{taglink|sizeMod}} to something less than &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;, and {{taglink|sizeGrowth}} to something positive. The particle will grow to a size equal to &amp;lt;code&amp;gt;sizeGrowth / (1 - sizeMod)&amp;lt;/code&amp;gt; and stop. The smaller {{taglink|sizeMod}} is, the faster it will reach this size.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
===== Initial Velocity Properties =====&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitVector&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The initial direction vector in which the particle is emitted. When spawning CEGs via EmitSfx you can make the particles go into the direction of the emiting piece with {{taglink|emitvector|dir}}. This is useful for e.g. fire coming out of a gun barrel.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitRot&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = At what angle to emit the particle relative to {{taglink|emitVector}}. &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means that the particle will be emitted in {{taglink|emitVector}}&#039;s direction; &amp;lt;code&amp;gt;180&amp;lt;/code&amp;gt; will emit the particle in the opposite direction. &amp;lt;code&amp;gt;90&amp;lt;/code&amp;gt; will emit the particle in a random direction perpendicular to {{taglink|emitVector}}, which is good for creating rings.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitRotSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|emitRotSpread}} is added to the {{taglink|emitRot}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = emitMul&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 1.0, 1.0}&lt;br /&gt;
|description = Scales the initial particle velocity; for this property, +y is considered to be in the direction of {{taglink|emitVector}}. Good if you want to create an egg-shaped explosion.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSpeed &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The particle&#039;s initial speed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSpeedSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|particleSpeedSpread}} is added to the {{taglink|particleSpeed}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Movement Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = gravity&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = This will be added to the particle&#039;s velocity every frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = airdrag&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The particle&#039;s velocity is multiplied by this every frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Size Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSize &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The initial size of the particle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleSizeSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|particleSizeSpread}} is added to the {{taglink|particleSize}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much the particle grows each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeMod&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The size of the particle is multiplied by this each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Visual Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = directional&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If true, the particle will point in the direction it is moving.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The texture to use for the particle.&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 = See [[CColorMap]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===== Life Properties =====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = numParticles&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = How many particles to create. This is not the same as &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt;; if you spawn multiple particles using &amp;lt;code&amp;gt;count&amp;lt;/code&amp;gt;, any [[CEG:Operators]] will be re-evaluated for each particle, whereas if you use {{taglink|numParticles}} they will not be. However, the spread properties are evaluated separately for each particle regardless of which one you use.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleLife&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How long each particle lasts. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = particleLifeSpread&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = For each particle, a random number between &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; and {{taglink|particleLifeSpread}} is added to the {{taglink|particleLife}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CSpherePartSpawner ===&lt;br /&gt;
&lt;br /&gt;
Draws an expanding sphere.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
*Looks like a shockwave.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alpha&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The alpha of the sphere.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = Time to live, in frames(?).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = expansionSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How quickly the sphere expands.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = rgb&lt;br /&gt;
|default = {0.0, 0.0, 0.0}&lt;br /&gt;
|description = The color of the sphere.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== CSimpleGroundFlash ===&lt;br /&gt;
&lt;br /&gt;
Draws an expanding ground texture.&lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
* A short groundflash (~8 frames) is good for any explosion that gives off light. You can also use a longer groundflash to suggest the ground is glowing from heat.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = size&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The radius of the particle.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sizeGrowth&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much the particle grows each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = Time to live, in frames(?).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The texture to use for the particle.&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 = See [[CColorMap]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== CStandardGroundFlash ===&lt;br /&gt;
If you name a spawner &amp;quot;groundflash,&amp;quot; it will always generate a standard groundflash. &lt;br /&gt;
&lt;br /&gt;
==== Suggested Use ====&lt;br /&gt;
A short groundflash (~8 frames) is good for any explosion that gives off light. You can also use a longer groundflash to suggest the ground is glowing from heat.&lt;br /&gt;
&lt;br /&gt;
==== Properties ====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flashSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The radius of the groundflash.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flashAlpha &lt;br /&gt;
|type = float&lt;br /&gt;
|range = [0, 1]&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How transparent the groundflash is. Generally the higher the brighter.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = circleGrowth &lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = A groundflash can have an additional circle that expands outwards. This controls how fast the circle grows.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = circleAlpha&lt;br /&gt;
|type = float&lt;br /&gt;
|range = [0, 1]&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How transparent the circle is.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = ttl&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = How long the groundflash lasts.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = color&lt;br /&gt;
|type = rgb&lt;br /&gt;
|default = {1.0, 1.0, 0.8}&lt;br /&gt;
|description = The color of the groundflash.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
&lt;br /&gt;
&amp;lt;!-- can&#039;t use the following until all games use effects/ rather than gamedata/explosions&lt;br /&gt;
{{ExampleRepoLinks&lt;br /&gt;
|path = effects/&lt;br /&gt;
|entity = CEGs&lt;br /&gt;
}}&lt;br /&gt;
--&amp;gt;&lt;br /&gt;
[http://imolarpg.dyndns.org/trac/balatest/browser/trunk/gamedata/explosions &#039;Balanced Annihilation&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/conflictterra/source/browse/#svn%2Fgames%2FCT%2Fgamedata%2Fexplosions &#039;Conflict Terra&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/EvolutionRTS/Evolution-RTS/tree/master/Gamedata/explosions &#039;Evolution RTS&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[https://github.com/imperialwinter/swiw.sdd/tree/master/gamedata/explosions &#039;Imperial Winter&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/journeywar/source/browse/#svn%2Ftrunk%2Fgamedata%2Fexplosions &#039;Journeywar&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[http://sourceforge.net/p/mwspring/code/HEAD/tree/effects/ &#039;MechCommander: Legacy&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[https://github.com/spring1944/spring1944/tree/master/effects &#039;Spring: 1944&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/springtutorialgame/source/browse/#svn%2Ftrunk%2FSpringTutorialGame.sdd%2FGamedata%2Fexplosions &#039;Spring Tutorial Game&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[http://code.google.com/p/xta-springrts/source/browse/#svn%2Ftrunk%2Fgamedata%2Fexplosions &#039;XTA&#039; CEGs] (TDF format)&lt;br /&gt;
&lt;br /&gt;
[https://github.com/ZeroK-RTS/Zero-K/tree/master/effects &#039;ZeroK&#039; CEGs]&lt;br /&gt;
&lt;br /&gt;
[[Category:CEG]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=User:8611&amp;diff=20351</id>
		<title>User:8611</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=User:8611&amp;diff=20351"/>
		<updated>2015-02-27T00:41:17Z</updated>

		<summary type="html">&lt;p&gt;8611: test&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;test&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Script.txt&amp;diff=16312</id>
		<title>Script.txt</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Script.txt&amp;diff=16312"/>
		<updated>2015-02-26T23:48:01Z</updated>

		<summary type="html">&lt;p&gt;8611: added: minimum script, generating scripts&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= Script.txt =&lt;br /&gt;
Start script file for Spring Engine. &lt;br /&gt;
&lt;br /&gt;
Lobbies create it for spring, usually found in &amp;lt;code&amp;gt;~/.spring/script.txt&amp;lt;/code&amp;gt; on Linux/MacOSX.&lt;br /&gt;
&lt;br /&gt;
On Windows it can be found mostly in &amp;lt;code&amp;gt;My Documents\My Games\Spring\script.txt&amp;lt;/code&amp;gt; or next to spring.exe.&lt;br /&gt;
&lt;br /&gt;
== Structure ==&lt;br /&gt;
See {{sourcelink|file=doc/StartScriptFormat.txt}} for a more detailed example.&lt;br /&gt;
&lt;br /&gt;
Spring 97.0 added &amp;lt;code&amp;gt;GAME/MUTATOR{0..9}&amp;lt;/code&amp;gt; so you can load arbitrary mutator archives before the game. Addtionally since 97.0 &amp;lt;code&amp;gt;GAME/GameID&amp;lt;/code&amp;gt; is the only seed of the synced random generator, so you can define the &amp;lt;code&amp;gt;GameID&amp;lt;/code&amp;gt; in a luaAI battle startscript and you will always get a syncing match.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;[GAME]&lt;br /&gt;
{&lt;br /&gt;
  // game attributes&lt;br /&gt;
  [MUTATOR0]&lt;br /&gt;
  {&lt;br /&gt;
    // mutator attributes&lt;br /&gt;
  }&lt;br /&gt;
  [AI0]&lt;br /&gt;
  {&lt;br /&gt;
    // AI attributes&lt;br /&gt;
  }&lt;br /&gt;
  [PLAYER0]&lt;br /&gt;
  {&lt;br /&gt;
    // player attributes&lt;br /&gt;
  }&lt;br /&gt;
  [TEAM0]&lt;br /&gt;
  {&lt;br /&gt;
    // team attributes&lt;br /&gt;
  }&lt;br /&gt;
  [ALLYTEAM0]&lt;br /&gt;
  {&lt;br /&gt;
    // ally team attributes&lt;br /&gt;
  }&lt;br /&gt;
  [RESTRICT]&lt;br /&gt;
  {&lt;br /&gt;
    // restrictions&lt;br /&gt;
  }&lt;br /&gt;
  [MODOPTIONS]&lt;br /&gt;
  {&lt;br /&gt;
    // values for the options defined in Modoptions.lua&lt;br /&gt;
  }&lt;br /&gt;
  [MAPOPTIONS]&lt;br /&gt;
  {&lt;br /&gt;
    // values for the options defined in Mapoptions.lua&lt;br /&gt;
  }&lt;br /&gt;
}&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Examples =&lt;br /&gt;
== minimal functional startscript ==&lt;br /&gt;
Based on {{forumlink|topic=32893&amp;amp;p=566971#p566953|title=these two posts:}} &lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[GAME]&lt;br /&gt;
{&lt;br /&gt;
	MapName=DeltaSiegeDry;&lt;br /&gt;
	GameType=Balanced Annihilation V8.10;&lt;br /&gt;
	IsHost=1;&lt;br /&gt;
	[PLAYER0]&lt;br /&gt;
	{&lt;br /&gt;
		Team=0;&lt;br /&gt;
	}&lt;br /&gt;
	[TEAM0]&lt;br /&gt;
	{&lt;br /&gt;
		TeamLeader=0;&lt;br /&gt;
		AllyTeam=0;&lt;br /&gt;
	}&lt;br /&gt;
	[ALLYTEAM0]&lt;br /&gt;
	{&lt;br /&gt;
	}&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== More examples ==&lt;br /&gt;
startscripts used for pre-defined offline matches vs AI in different team configurations -  &lt;br /&gt;
https://code.google.com/p/springtanks/source/browse/#svn%2Ftrunk%2FMissions&lt;br /&gt;
&lt;br /&gt;
= Generating startscripts =&lt;br /&gt;
It is possible to use for example Springlobby to setup a game via the Singleplayer tab.&lt;br /&gt;
&lt;br /&gt;
The temporary file that gets generated can be copied for further use.&lt;br /&gt;
&lt;br /&gt;
== Converting Lua tables to script.txt format ==&lt;br /&gt;
&lt;br /&gt;
{{forumlink|topic=t=32643|title=lua table -&amp;gt; script.txt generator}} - thread with two examples&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Miscellaneous&amp;diff=3913</id>
		<title>CEG:Miscellaneous</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Miscellaneous&amp;diff=3913"/>
		<updated>2015-02-01T09:14:18Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Performance */ cegTag every 0.1 seconds&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CEG Miscellaneous =&lt;br /&gt;
&lt;br /&gt;
A collection of miscellaneous things to consider when making a CEG.&lt;br /&gt;
&lt;br /&gt;
== Blending ==&lt;br /&gt;
&lt;br /&gt;
CEGs use the blending mode &amp;lt;code&amp;gt;GL_ONE, GL_ONE_MINUS_SRC_ALPHA&amp;lt;/code&amp;gt;. This is in contrast to the default &amp;lt;code&amp;gt;GL_SRC_ALPHA, GL_ONE_MINUS_SRC_ALPHA&amp;lt;/code&amp;gt;. This means that the alpha determines how much of whatever is behind the particle will show through, but doesn&#039;t affect how the particle itself looks. If you want default blending, you&#039;ll have to scale the color components by the alpha by hand if the class you&#039;re using doesn&#039;t do it for you (most classes don&#039;t). Note that an alpha of 0 will cause the CEG not to be displayed at all. &lt;br /&gt;
&lt;br /&gt;
== Z-Fighting ==&lt;br /&gt;
&lt;br /&gt;
A related problem is Z-fighting. If you have several high-alpha particles moving through each other, you may get an undesirable flickering effect as one particle is drawn at first, then the other. To solve this, reduce the alpha.&lt;br /&gt;
&lt;br /&gt;
== Randomness ==&lt;br /&gt;
&lt;br /&gt;
Always put a little randomness in your CEGs. CEGs are more interesting if they happen a little differently every time, especially if your CEG gets called more than once at the same time on the same screen.&lt;br /&gt;
&lt;br /&gt;
== Realism ==&lt;br /&gt;
&lt;br /&gt;
While it&#039;s important to make sure a CEG doesn&#039;t look completely implausible, don&#039;t get too hung up on realism. In almost any RTS, concessions are made for gameplay at the cost of a bit of realism; likewise with CEGs, you&#039;ll need to make some concessions for looking cool.&lt;br /&gt;
&lt;br /&gt;
== Gameplay ==&lt;br /&gt;
&lt;br /&gt;
As well as looking cool, CEGs are an important part of gameplay. They let players know when things are happening and where they are happening. CEGs should give clues as to what is happening in the mechanics of the game. A powerful weapon should have a powerful-looking CEG; a blast that affects a large area should have a large CEG. Use the alwaysVisisble and useAirLos tags where appropriate. Hopefully we will eventually have a radius operator so CEGs can automatically be scaled to the radius of the weapon.&lt;br /&gt;
&lt;br /&gt;
At the same time, you don&#039;t want to obstruct players&#039; views of the game. A CEG should look cool for a moment, and then get out of the way.&lt;br /&gt;
&lt;br /&gt;
== Performance ==&lt;br /&gt;
&lt;br /&gt;
Bascially, try not to use more particles than necessary, and try not to use them longer than necessary. Be aware of how often you expect your CEG to run; if it&#039;s a commander death or a nuclear missile, you can afford to spend some extra particles, but if it&#039;s a machine gun or a cegtag (which is called every 0.1 seconds), you&#039;ll want to keep it down.&lt;br /&gt;
&lt;br /&gt;
[[Category:CEG]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Calls&amp;diff=3861</id>
		<title>CEG:Calls</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=CEG:Calls&amp;diff=3861"/>
		<updated>2015-02-01T09:13:28Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Weapon CEGs */  cegTag every 0.1 seconds&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;= CEG Calls =&lt;br /&gt;
== Overview ==&lt;br /&gt;
There are four places where you can call a CEG: weapons, COB or LUS unit scripts, flying piece projectiles and synced Lua gadgets.&lt;br /&gt;
&lt;br /&gt;
== Weapon CEGs ==&lt;br /&gt;
&lt;br /&gt;
There are three weapon tags that can spawn CEGs:&lt;br /&gt;
&lt;br /&gt;
*{{xtaglink|Gamedev:WeaponDefs|cegTag}} - Spawns the CEG every 0.1 seconds at the weapon projectile&#039;s position and direction.&lt;br /&gt;
*{{xtaglink|Gamedev:WeaponDefs|explosionGenerator}} - Spawns the CEG when the weapon hits its target.&lt;br /&gt;
*{{xtaglink|Gamedev:WeaponDefs|bounceExplosionGenerator}} - For bouncing weapons only. Spawns the CEG when the weapon bounces.&lt;br /&gt;
&lt;br /&gt;
== Calling CEGs from unit scripts ==&lt;br /&gt;
&lt;br /&gt;
Calling a CEG from unit scripts requires two steps. First, in the unit&#039;s definition, you need to &#039;&#039;&#039;define the order of the effects:&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
For a .fbi unitdef use:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
[sfxtypes] {&lt;br /&gt;
  explosiongenerator0 = custom:ExplosionGeneratorName0;&lt;br /&gt;
  explosiongenerator1 = custom:ExplosionGeneratorName1;&lt;br /&gt;
  //and so on...&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
For a .lua unitdef use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
sfxtypes = {&lt;br /&gt;
  explosiongenerators = {&lt;br /&gt;
    &amp;quot;custom:ExplosionGeneratorName0&amp;quot;,&lt;br /&gt;
    &amp;quot;custom:ExplosionGeneratorName1&amp;quot;,&lt;br /&gt;
    --and so on...&lt;br /&gt;
  },&lt;br /&gt;
},&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
(See [[Gamedev:UnitDefs#SFXTypes]])&lt;br /&gt;
&lt;br /&gt;
=== COB ===&lt;br /&gt;
To actually generate the explosion in a COB, you need to call [[Animation-CobConstants#emit-sfx|emit-sfx]]:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;emit-sfx 1024 + ceg_num from pieceName;&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where ceg_num is the number of the explosion generator in the unit definition (the first one is 0, the next is 1, and so on). The CEG will have the position and direction of the piece you emit it from. For syntactic sugar you can use:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;#define MY_FIRST_AWESOME_CEG 1024 + 0&lt;br /&gt;
emit-sfx MY_FIRST_AWESOME_CEG from pieceName;&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
In a COB script, you can call:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;set CEG_DAMAGE damage_value&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Any &amp;lt;code&amp;gt;emit-sfx&amp;lt;/code&amp;gt; instructions will then use that value for the &amp;quot;damage&amp;quot; (use the &#039;[[CEG:Operators#Damage_.28.27d.27.29|&#039;d&#039; operator]] to access this value).&lt;br /&gt;
&lt;br /&gt;
=== LUS ===&lt;br /&gt;
In a Lua unit script you generate the explosion using [[Animation-LuaCallouts#Effects|Spring.UnitScript.EmitSfx]] e.g.:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;EmitSfx(pieceName, SFX.CEG + ceg_num)&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Where ceg_num is the number of the explosion generator in the unit definition as before.&lt;br /&gt;
&lt;br /&gt;
== Piece Projectiles ==&lt;br /&gt;
CEGs can be attached to piece projectiles which are created when a unit script calls [[Animation-CobConstants#explode|explode]] (COB) or [[Animation-LuaCallouts#Effects|Explode]] (lua) with an argument of &amp;lt;code&amp;gt;COB.FALL&amp;lt;/code&amp;gt;. See [[Gamedev:UnitDefs#pieceExplosionGenerators]].&lt;br /&gt;
&lt;br /&gt;
== Synced Lua Gadget CEGs ==&lt;br /&gt;
The only method that lets you directly call a CEG by name, anywhere on the map.&lt;br /&gt;
See [[Lua_SyncedCtrl#Other|Spring.SpawnCEG]]. Note that the damage parameter does not apply damage, but is used to set the [[CEG:Operators#Damage_.28.27d.27.29|&#039;d&#039; operator]].&lt;br /&gt;
&lt;br /&gt;
[[Category:CEG]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8790</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=8790"/>
		<updated>2015-02-01T09:12:39Z</updated>

		<summary type="html">&lt;p&gt;8611: /* Visuals */ cegTag every 0.1 seconds&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;
{{DataTypes}}&lt;br /&gt;
&lt;br /&gt;
==Details==&lt;br /&gt;
There follows a comprehensive (certain deprecated tags are not present) list of the tags available, their data type, default value and a brief description of what they do. Bear in mind that the source code linked above is the ultimate reference when dealing with these tags. &lt;br /&gt;
&lt;br /&gt;
In lua tables keys (i.e. the tags) should be lower case, here they are represented in camelCase for readability. In your files you may use the &amp;lt;code&amp;gt;lowerkeys&amp;lt;/code&amp;gt; function on your final table to ensure the keys are properly cased.&lt;br /&gt;
&lt;br /&gt;
It is usual to name the returned 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;
|special = lua: selfExplode&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;
|special = lua: noEnemyCollide&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;
|special = lua: noFriendlyCollide&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;
|special = lua: noFeatureCollide&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;
|special = lua: noNeutralCollide&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;
|special = lua: noGroundCollide&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 &amp;lt;strike&amp;gt;non-instant-hit&amp;lt;/strike&amp;gt; [https://github.com/spring/spring/blob/3034e5f5a8f5b9fb4624a97f7a85cb5c90457725/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp#L250 hitscan] 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;
|special = lua: damageAreaOfEffect&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. Behaviour changed slightly in 98.0 as previously craters were 1.5x {{taglink|craterAreaOfEffect}} whilst decals were 1.0x, they are now both the same size.}}&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;
|special = lua: damages.paralyzeDamageTime&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 every 0.1 seconds.&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] 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 = armorType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Specifies the armorclass of the shield; you can input either an [[Armordefs.lua|armorclass]] name OR a unitdef {{xtaglink|Gamedev:UnitDefs|name}} to share that unit&#039;s armorclass.}}&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;
Some games may have most WeaponDefs integrated into their [[Gamedev:UnitDefs#Examples|UnitDefs]].&lt;br /&gt;
&lt;br /&gt;
S44 and MC:L implement 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;
&lt;br /&gt;
{{ExampleRepoLinks&lt;br /&gt;
|path = weapons/&lt;br /&gt;
|entity = WeaponDefs&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Dev]]&lt;/div&gt;</summary>
		<author><name>8611</name></author>
	</entry>
</feed>