<?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=Anarchid</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=Anarchid"/>
	<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/wiki/Special:Contributions/Anarchid"/>
	<updated>2026-11-08T19:53:50Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.43.11</generator>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2186</id>
		<title>Assimp</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2186"/>
		<updated>2020-05-06T10:32:26Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Blender Workflow Tutorial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
=Assimp=&lt;br /&gt;
Open Asset Import Library (short name: Assimp) is used in Spring for loading a number of common and well supported model formats (.3ds, .dae, .lwo, .blend - currently .obj is parsed by a different code path).&lt;br /&gt;
&lt;br /&gt;
What Spring supports in its Assimp renderer:&lt;br /&gt;
* extended metafile (&amp;lt;code&amp;gt;%modelfilename%.lua&amp;lt;/code&amp;gt; next to the modefile)&lt;br /&gt;
* still uses tex1 &amp;amp; tex2 texture system of S3O (same shader as S3O)&lt;br /&gt;
* 2nd texcoord&lt;br /&gt;
* loading of the texture filepaths from the model (don&#039;t have to be in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;)&lt;br /&gt;
* when texture filepaths aren&#039;t included in the model, it searches for &amp;lt;code&amp;gt;%modelfilename%.*&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;%modelfilename%2.*&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;&lt;br /&gt;
* special modelpieces `SpringHeight` &amp;amp; `SpringRadius` {{removed|101.0}}&lt;br /&gt;
* {{new|102.0}} auto-normalize normals and tangents for all AssImp-loaded models&lt;br /&gt;
* {{new|95.0}} allow modellers to work around {{mantis|3552}} (differing axes conventions between software) by recognizing a number of new piece-table keys as follows&lt;br /&gt;
&lt;br /&gt;
For the root piece: {{removed|104.0}}&lt;br /&gt;
* &amp;quot;xaxis&amp;quot; = float3, &amp;quot;yaxis&amp;quot; = float3, &amp;quot;zaxis&amp;quot; = float3 (determine global orientation of model)&lt;br /&gt;
For all pieces: {{removed|104.0}}&lt;br /&gt;
* &amp;quot;rotAxisSigns&amp;quot; = float3 (determines direction of script-applied rotations around each axis)&lt;br /&gt;
* &amp;quot;rotAxisMap&amp;quot; = number (currently can only be 0=XYZ or 3=XZY, determines coordinate conversion)&lt;br /&gt;
&lt;br /&gt;
=Assimp Textures=&lt;br /&gt;
See [[3DModels:Textures#Textures_-_Assimp_Model_Formats_.28DAE.2CMDL.2CMD3_and_others_except_OBJ.29 |3DModels:Textures (Assimp Section)]]&lt;br /&gt;
&lt;br /&gt;
=Standard Workflow=&lt;br /&gt;
The following Workflow is provided for a standard 3D Modeling package using the Z = forward, Y = upwards convention, like Maya, Modo or Lightwave. You can also use Blender to export models for ASSIMP, as covered in the next section.&lt;br /&gt;
&lt;br /&gt;
* [[3DModels:AssimpWorkflow]]&lt;br /&gt;
* [[3DModels:AssimpMetadata]]&lt;br /&gt;
&lt;br /&gt;
=Blender Workflow Tutorial=&lt;br /&gt;
This is a stub containing a simple outline of a Blender workflow.&lt;br /&gt;
&lt;br /&gt;
# Open an existing Blender model or import a different format through the File menu (File &amp;gt; Import). You can import s3o models - complete with materials - using the [https://github.com/sanguinariojoe/blender_s3o_import s3o import] plugin.&lt;br /&gt;
# Compose your model by making a series of rigid pieces, and parenting them to one another (ctrl+P). These will be imported as `pieces` into Spring.&lt;br /&gt;
# It is preferred to apply all scale transforms, because uneven transforms will not be tolerated by Spring. You can keep rotations, though.&lt;br /&gt;
# Blender is Z-up and Spring is Y-up. Spring will import Blender models as Z-up. If you want to fix that, add a root piece to your model, and rotate its children 90 degrees, such that their local Y-axis points up.&lt;br /&gt;
# Make sure you have a lamp in your scene while in this mode or your model will be dark. You can delete it before export.&lt;br /&gt;
# If you want to animate the model using the animation exporter [https://github.com/Anarchid/blender2lus addon] later, set the rotation mode for all your pieces to be Euler ZXY.&lt;br /&gt;
# Applying texture: &lt;br /&gt;
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it&#039;s not there, click on Image &amp;gt; Open Image to browse for it.&lt;br /&gt;
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode. You can select multiple objects if you want to unwrap the entire model without going piece-by-piece.&lt;br /&gt;
## Hit A to select all your faces.&lt;br /&gt;
## In the 3D View, hit A to select all the faces there and select your image with the image icon. Assuming there&#039;s a UVMap, you should see your texture.&lt;br /&gt;
## If you don&#039;t see any faces you&#039;ll need to add the UVMap to a new texture:&lt;br /&gt;
### In the Properties view click on Textures (checkerboard icon).&lt;br /&gt;
### Click on Add New Texture (plus icon).&lt;br /&gt;
### Select Type = Image or Movie.&lt;br /&gt;
### Under Image, click on the image icon and choose your image file.&lt;br /&gt;
### Under Mapping, select Coordinates = UV.&lt;br /&gt;
### Under Influence &amp;gt; Diffuse, check Color and make sure it&#039;s 1.00.&lt;br /&gt;
## To add a normalmap:&lt;br /&gt;
### Repeat steps 5.5.1 to 5.5.5.&lt;br /&gt;
### Under Image Sampling, check Normal Map.&lt;br /&gt;
### Under Influence &amp;gt; Geometry, check Normal. Make sure it.s 1.00.&lt;br /&gt;
## You&#039;ll need to do this for each piece.&lt;br /&gt;
# Piece hierarchy:&lt;br /&gt;
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B.&lt;br /&gt;
# Setting piece origins:&lt;br /&gt;
## Select a piece.&lt;br /&gt;
## Place the 3D cursor where you want the origin to be (left-click).&lt;br /&gt;
## Click on Object &amp;gt; Transform &amp;gt; Origin to 3D Cursor.&lt;br /&gt;
## You can now rotate your pieces:&lt;br /&gt;
### Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select Individual Origins.&lt;br /&gt;
### Rotate.&lt;br /&gt;
## Do this for all your pieces.&lt;br /&gt;
# Preparing for Spring (this may or may not apply depending on how assimp handles your model.):&lt;br /&gt;
## Ensure that the scales for each object in your scene are uniform (that is, x, y, and z scales are equal to each other). A quick way to ensure that is select all (a) and apply scale (ctrl+a -&amp;gt; scale).&lt;br /&gt;
# Save your model.&lt;br /&gt;
# Select all the pieces of your model, ignore the lamp.&lt;br /&gt;
# Click on File &amp;gt; Export &amp;gt; Collada.&lt;br /&gt;
# Check &amp;quot;Export Only Selected&amp;quot; and export.&lt;br /&gt;
# The dae file will be used as your object.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t hesitate to google for answers if you bump into questions with how to use Blender itself. It&#039;s a powerful piece of software with a lot of tutorials on how to use - the scope of this article is not teaching how to use Blender, but only how to use Blender for making Spring models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2185</id>
		<title>Assimp</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2185"/>
		<updated>2020-05-06T10:21:18Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Blender Workflow Tutorial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
=Assimp=&lt;br /&gt;
Open Asset Import Library (short name: Assimp) is used in Spring for loading a number of common and well supported model formats (.3ds, .dae, .lwo, .blend - currently .obj is parsed by a different code path).&lt;br /&gt;
&lt;br /&gt;
What Spring supports in its Assimp renderer:&lt;br /&gt;
* extended metafile (&amp;lt;code&amp;gt;%modelfilename%.lua&amp;lt;/code&amp;gt; next to the modefile)&lt;br /&gt;
* still uses tex1 &amp;amp; tex2 texture system of S3O (same shader as S3O)&lt;br /&gt;
* 2nd texcoord&lt;br /&gt;
* loading of the texture filepaths from the model (don&#039;t have to be in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;)&lt;br /&gt;
* when texture filepaths aren&#039;t included in the model, it searches for &amp;lt;code&amp;gt;%modelfilename%.*&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;%modelfilename%2.*&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;&lt;br /&gt;
* special modelpieces `SpringHeight` &amp;amp; `SpringRadius` {{removed|101.0}}&lt;br /&gt;
* {{new|102.0}} auto-normalize normals and tangents for all AssImp-loaded models&lt;br /&gt;
* {{new|95.0}} allow modellers to work around {{mantis|3552}} (differing axes conventions between software) by recognizing a number of new piece-table keys as follows&lt;br /&gt;
&lt;br /&gt;
For the root piece: {{removed|104.0}}&lt;br /&gt;
* &amp;quot;xaxis&amp;quot; = float3, &amp;quot;yaxis&amp;quot; = float3, &amp;quot;zaxis&amp;quot; = float3 (determine global orientation of model)&lt;br /&gt;
For all pieces: {{removed|104.0}}&lt;br /&gt;
* &amp;quot;rotAxisSigns&amp;quot; = float3 (determines direction of script-applied rotations around each axis)&lt;br /&gt;
* &amp;quot;rotAxisMap&amp;quot; = number (currently can only be 0=XYZ or 3=XZY, determines coordinate conversion)&lt;br /&gt;
&lt;br /&gt;
=Assimp Textures=&lt;br /&gt;
See [[3DModels:Textures#Textures_-_Assimp_Model_Formats_.28DAE.2CMDL.2CMD3_and_others_except_OBJ.29 |3DModels:Textures (Assimp Section)]]&lt;br /&gt;
&lt;br /&gt;
=Standard Workflow=&lt;br /&gt;
The following Workflow is provided for a standard 3D Modeling package using the Z = forward, Y = upwards convention, like Maya, Modo or Lightwave. You can also use Blender to export models for ASSIMP, as covered in the next section.&lt;br /&gt;
&lt;br /&gt;
* [[3DModels:AssimpWorkflow]]&lt;br /&gt;
* [[3DModels:AssimpMetadata]]&lt;br /&gt;
&lt;br /&gt;
=Blender Workflow Tutorial=&lt;br /&gt;
This is a stub containing a simple outline of a Blender workflow.&lt;br /&gt;
&lt;br /&gt;
# Open an existing Blender model or import a different format through the File menu (File &amp;gt; Import). You can import s3o models - complete with materials - using the [https://github.com/sanguinariojoe/blender_s3o_import s3o import] plugin.&lt;br /&gt;
# Compose your model by making a series of rigid pieces, and parenting them to one another (ctrl+P). These will be imported as `pieces` into Spring.&lt;br /&gt;
# It is preferred to apply all scale transforms, because uneven transforms will not be tolerated by Spring. You can keep rotations, though.&lt;br /&gt;
# Blender is Z-up and Spring is Y-up. Spring will import Blender models as Z-up. If you want to fix that, add a root piece to your model, and rotate its children 90 degrees, such that their local Y-axis points up.&lt;br /&gt;
# Make sure you have a lamp in your scene while in this mode or your model will be dark. You can delete it before export.&lt;br /&gt;
# If you want to animate the model using the animation exporter addon later, set the rotation mode for all your pieces to be Euler ZXY.&lt;br /&gt;
# Applying texture: &lt;br /&gt;
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it&#039;s not there, click on Image &amp;gt; Open Image to browse for it.&lt;br /&gt;
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode. You can select multiple objects if you want to unwrap the entire model without going piece-by-piece.&lt;br /&gt;
## Hit A to select all your faces.&lt;br /&gt;
## In the 3D View, hit A to select all the faces there and select your image with the image icon. Assuming there&#039;s a UVMap, you should see your texture.&lt;br /&gt;
## If you don&#039;t see any faces you&#039;ll need to add the UVMap to a new texture:&lt;br /&gt;
### In the Properties view click on Textures (checkerboard icon).&lt;br /&gt;
### Click on Add New Texture (plus icon).&lt;br /&gt;
### Select Type = Image or Movie.&lt;br /&gt;
### Under Image, click on the image icon and choose your image file.&lt;br /&gt;
### Under Mapping, select Coordinates = UV.&lt;br /&gt;
### Under Influence &amp;gt; Diffuse, check Color and make sure it&#039;s 1.00.&lt;br /&gt;
## To add a normalmap:&lt;br /&gt;
### Repeat steps 5.5.1 to 5.5.5.&lt;br /&gt;
### Under Image Sampling, check Normal Map.&lt;br /&gt;
### Under Influence &amp;gt; Geometry, check Normal. Make sure it.s 1.00.&lt;br /&gt;
## You&#039;ll need to do this for each piece.&lt;br /&gt;
# Piece hierarchy:&lt;br /&gt;
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B.&lt;br /&gt;
# Setting piece origins:&lt;br /&gt;
## Select a piece.&lt;br /&gt;
## Place the 3D cursor where you want the origin to be (left-click).&lt;br /&gt;
## Click on Object &amp;gt; Transform &amp;gt; Origin to 3D Cursor.&lt;br /&gt;
## You can now rotate your pieces:&lt;br /&gt;
### Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select Individual Origins.&lt;br /&gt;
### Rotate.&lt;br /&gt;
## Do this for all your pieces.&lt;br /&gt;
# Preparing for Spring (this may or may not apply depending on how assimp handles your model.):&lt;br /&gt;
## Ensure that the scales for each object in your scene are uniform (that is, x, y, and z scales are equal to each other). A quick way to ensure that is select all (a) and apply scale (ctrl+a -&amp;gt; scale).&lt;br /&gt;
# Save your model.&lt;br /&gt;
# Select all the pieces of your model, ignore the lamp.&lt;br /&gt;
# Click on File &amp;gt; Export &amp;gt; Collada.&lt;br /&gt;
# Check &amp;quot;Export Only Selected&amp;quot; and export.&lt;br /&gt;
# The dae file will be used as your object.&lt;br /&gt;
&lt;br /&gt;
Don&#039;t hesitate to google for answers if you bump into questions with how to use Blender itself. It&#039;s a powerful piece of software with a lot of tutorials on how to use - the scope of this article is not teaching how to use Blender, but only how to use Blender for making Spring models.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua:Callins&amp;diff=10788</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=10788"/>
		<updated>2016-11-19T17:20:52Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: add projID doc to Explosion&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;
Related Sourcecode :&lt;br /&gt;
[https://github.com/spring/spring/blob/d9b3927a528a876b9ab4042771e82b050267572a/rts/Lua/LuaHandle.cpp https://github.com/spring/spring/rts/Lua/LuaHandle.cpp]&lt;br /&gt;
&lt;br /&gt;
For now, to use these addons in a widget, replace addon with widget and, for a gadget, replace addon with gadget. For example,&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
    function widget:UnitCreated(unitID, unitDefID, unitTeam, builderID)&lt;br /&gt;
        ...  &lt;br /&gt;
    end&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Some functions may differ between (synced) gadget and widgets; those are in the [[#Synced_-_Unsynced_Shared]] section. Essentially the reason is that all information should be available to synced (game logic controlling) gadgets, but restricted to unsynced gadget/widget (e.g. information about an enemy unit only detected via radar and not yet in LOS). In such cases the full (synced) param list is documented.&lt;br /&gt;
&lt;br /&gt;
== Common ==&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Initialize&lt;br /&gt;
|info = 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;
|info = 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;
|args = type, id&lt;br /&gt;
|return = {{type|number}} cmdID&lt;br /&gt;
|info = 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 {{var|unitID}} or {{var|featureID}} respectively. &lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandNotify&lt;br /&gt;
|args = cmdID, cmdParams, cmdOptions&lt;br /&gt;
|return = {{type|bool}} removeCmd&lt;br /&gt;
|info = Called when a command is issued. Returning {{value|true}} deletes the command and does not send it through the network.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = CommandsChanged&lt;br /&gt;
|args = None&lt;br /&gt;
|return = ?&lt;br /&gt;
|info = Called when the command descriptions changed, e.g. when selecting or deselecting a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = WorldTooltip&lt;br /&gt;
|args = ttType, data1, data2, data3&lt;br /&gt;
|return = {{type|string}} newTooltip&lt;br /&gt;
|info = The parameters can be {{value|&amp;quot;unit&amp;quot;}}, {{var|unitID}}; {{value|&amp;quot;feature&amp;quot;}}, {{var|featureID}}; {{value|&amp;quot;ground&amp;quot;}}, {{var|posX}}, {{var|posY}}, {{var|posZ}} or {{value|&amp;quot;selection&amp;quot;}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnsyncedHeightMapUpdate&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = 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;
|args = serverFrameNum&lt;br /&gt;
|info = 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;
|args =  state, ready, playerStates&lt;br /&gt;
|return = {{type|bool}} success, {{type|bool}} newReady&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = SunChanged&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AddConsoleLine&lt;br /&gt;
|args = msg, priority&lt;br /&gt;
|info = 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;
|args = aiTeam, dataStr&lt;br /&gt;
|return = ???&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvFromSynced&lt;br /&gt;
|args = ...&lt;br /&gt;
|info = 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;
|args = zip&lt;br /&gt;
|info = 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;
|args = message, replaceLastLine&lt;br /&gt;
|info = Only available to LuaIntro.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GroupChanged&lt;br /&gt;
|args = groupID&lt;br /&gt;
|info = 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;
|args = ???&lt;br /&gt;
|return = ???&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Input ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = IsAbove&lt;br /&gt;
|args = x, y&lt;br /&gt;
|return = {{type|bool}} isAbove&lt;br /&gt;
|info = Called every Update. Must return {{value|true}} for {{name|Mouse*}} events and {{name|GetToolTip}} to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GetTooltip&lt;br /&gt;
|args = x, y&lt;br /&gt;
|return = {{type|string}} tooltip&lt;br /&gt;
|info = Called when {{name|IsAbove}} returns {{value|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyPress&lt;br /&gt;
|args = key, mods, isRepeat&lt;br /&gt;
|return = {{type|bool}} becomeOwner&lt;br /&gt;
|info = Called repeatedly when a key is pressed down. If you want an action to occur only once check for {{var|1=isRepeat == {{value|false}}}}. The {{var|mods}} parameter is a {{type|table}}, with keys {{value|&amp;quot;alt&amp;quot;}}, {{value|&amp;quot;ctrl&amp;quot;}}, {{value|&amp;quot;meta&amp;quot;}} and {{value|&amp;quot;shift&amp;quot;}} each having a boolean value. Return {{value|true}} if you don&#039;t want other callins or the engine to also receive this keypress.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = KeyRelease&lt;br /&gt;
|args = key&lt;br /&gt;
|return = {{type|bool}}&lt;br /&gt;
|info = 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;
|args = utf8char&lt;br /&gt;
|info = 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;
|args = ???&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MousePress&lt;br /&gt;
|args = x, y, button&lt;br /&gt;
|return = {{type|bool}} becomeMouseOwner&lt;br /&gt;
|info = Called when a mouse button is pressed. The {{var|button}} parameter supports up to 7 buttons. Must return {{value|true}} for {{name|MouseRelease}} and other functions to be called.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseRelease&lt;br /&gt;
|args = x, y, button&lt;br /&gt;
|return = bool becomeMouseOwner&lt;br /&gt;
|info = Called when a mouse button is released. Please note that in order to have Spring call {{name|MouseRelease}}, you need to have a {{name|MousePress}} call-in in the same addon that returns {{value|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MouseWheel&lt;br /&gt;
|args = up, value&lt;br /&gt;
|info = 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;
|args = x, y, dx, dy, button&lt;br /&gt;
|info = Called when the mouse is moved. The {{var|dx}} and {{var|dy}} 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;
|args = playerID&lt;br /&gt;
|info = 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;
|args = playerID&lt;br /&gt;
|info = 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;
|args = playerID, reason&lt;br /&gt;
|info = Called whenever a player is removed from the game.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Downloads ===&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DownloadStarted&lt;br /&gt;
|args = id&lt;br /&gt;
|info = Called when a [[Pr-downloader]] download is started via [[Lua_VFS#Archives|VFS.DownloadArchive]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DownloadFinished&lt;br /&gt;
|args = id&lt;br /&gt;
|info = Called when a [[Pr-downloader]] download finishes successfully.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DownloadFailed&lt;br /&gt;
|args = id, errorID&lt;br /&gt;
|info = Called when a [[Pr-downloader]] download fails to complete.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DownloadProgress&lt;br /&gt;
|args = id, downloaded, total&lt;br /&gt;
|info = Called incrementally during a [[Pr-downloader]] download.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
=== Drawing ===&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ViewResize&lt;br /&gt;
|args = viewSizeX, viewSizeY&lt;br /&gt;
|info = Called whenever the window is resized.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Update&lt;br /&gt;
|args = dt&lt;br /&gt;
|info = 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;
|info = 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;
|info = 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;
|info = 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;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldReflection&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawWorldRefraction&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawGroundPreForward&lt;br /&gt;
|info = Runs at the start of the forward pass when a custom map shader has been assigned via [[Lua_UnsyncedCtrl#Map|{{name|Spring.SetMapShader}}]] (convenient for setting uniforms).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawGroundPreDeferred&lt;br /&gt;
|info = Runs at the start of the deferred pass when a custom map shader has been assigned via [[Lua_UnsyncedCtrl#Map|{{name|Spring.SetMapShader}}]] (convenient for setting uniforms).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawGroundPostDeferred&lt;br /&gt;
|info = This runs at the end of its respective deferred pass and allows proper frame compositing (with ground flashes/decals/foliage/etc, which are drawn between it and [[#API:DrawWorldPreUnit|{{name|DrawWorldPreUnit}}]]) via [[Lua_OpenGL_Api#Textures|{{name|gl.CopyToTexture}}]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawUnitsPostDeferred&lt;br /&gt;
|info = Runs at the end of the unit deferred pass to inform Lua code it should make use of the {{value|$model_gbuffer_*}} textures before another pass overwrites them (and to allow proper blending with e.g. cloaked objects which are drawn between these events and [[#API:DrawWorld|{{name|DrawWorld}}]] via [[Lua_OpenGL_Api#Textures|{{name|gl.CopyToTexture}}]]). N.B. The *PostDeferred events are only sent (and only have a real purpose) if forward drawing is disabled.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawFeaturesPostDeferred&lt;br /&gt;
|info = Runs at the end of the feature deferred pass to inform Lua code it should make use of the {{value|$model_gbuffer_*}} textures before another pass overwrites them (and to allow proper blending with e.g. cloaked objects which are drawn between these events and [[#API:DrawWorld|{{name|DrawWorld}}]] via [[Lua_OpenGL_Api#Textures|{{name|gl.CopyToTexture}}]]). N.B. The *PostDeferred events are only sent (and only have a real purpose) if forward drawing is disabled.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreen&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawScreenEffects&lt;br /&gt;
|args = vsx, vsy&lt;br /&gt;
|info = Where {{var|vsx}}, {{var|vsy}} are screen coordinates.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawLoadScreen&lt;br /&gt;
|info = {{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;
|args = sx, sy&lt;br /&gt;
|info = Where {{var|sx}}, {{var|sy}} 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;
|args = sx, sy&lt;br /&gt;
|info = Where {{var|sx}}, {{var|sy}} 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 {{var|drawMode}} can be one of the following, {{var|1=notDrawing = {{value|0}}}}, {{var|1=normalDraw = {{value|1}}}}, {{var|1=shadowDraw = {{value|2}}}}, {{var|1=reflectionDraw = {{value|3}}}}, {{var|1=refractionDraw = {{value|4}}}}, and finally {{var|1=gameDeferredDraw = {{value|5}}}} which was added in 102.0.&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = DrawUnit&lt;br /&gt;
|args = unitID, drawMode&lt;br /&gt;
|return = {{type|bool}} suppressEngineDraw&lt;br /&gt;
|info = 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;
|args = unitID, drawMode&lt;br /&gt;
|return = {{type|bool}} suppressEngineDraw&lt;br /&gt;
|info = 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;
|args = unitID, weaponID, drawMode&lt;br /&gt;
|return = {{type|bool}} suppressEngineDraw&lt;br /&gt;
|info = 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;
|args = projectileID, drawMode&lt;br /&gt;
|return = {{type|bool}} suppressEngineDraw&lt;br /&gt;
|info = 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;
|args = msg, player&lt;br /&gt;
|info = Called when a player issues a UI command e.g. types {{var|/foo}} or {{var|/luarules foo}}.&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;
|args = gameID&lt;br /&gt;
|info = Called once to deliver the {{var|gameID}}. As of 101.0+ the string is encoded in hex.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePaused&lt;br /&gt;
|info = Called when the game is paused.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameOver&lt;br /&gt;
|args = winningAllyTeams&lt;br /&gt;
|info = The parameter is a {{type|table}} 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;
|args = frame&lt;br /&gt;
|info = Called for every game simulation frame (30 per second). Starts at frame {{value|0}} in 101.0+ and {{value|1}} in previous versions.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GamePreload&lt;br /&gt;
|info = Called before the 0 gameframe.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = GameStart&lt;br /&gt;
|info = 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;
|args = teamID&lt;br /&gt;
|info = ???&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = TeamDied&lt;br /&gt;
|args = teamID&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, builderID&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, factID, factDefID, userOrders&lt;br /&gt;
|info = Called when a factory finishes construction of a unit.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitReverseBuilt&lt;br /&gt;
|args = unitID, unitDefID, unitTeam&lt;br /&gt;
|info = Called when a living unit becomes a nanoframe again.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitGiven&lt;br /&gt;
|args = unitID, unitDefID, newTeam, oldTeam&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, oldTeam, newTeam&lt;br /&gt;
|info = 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;
|args =  unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|info = Called when a unit is damaged (after {{name|UnitPreDamaged}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDestroyed&lt;br /&gt;
|args = unitID, unitDefID, unitTeam, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|info = Called when a unit is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RenderUnitDestroyed&lt;br /&gt;
|args = unitID, unitDefID, unitTeam&lt;br /&gt;
|info = Called just before a unit is invalid, after it finishes its death animation. {{new|101.0}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitStunned&lt;br /&gt;
|args =  unitID, unitDefID, unitTeam, stunned&lt;br /&gt;
|info = Called when a unit changes its stun status. {{new|99.0}}&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitUnitCollision&lt;br /&gt;
|args = colliderID, collideeID&lt;br /&gt;
|info = 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;
|args = colliderID, collideeID&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOpts, cmdTag&lt;br /&gt;
|info = Called after when a unit accepts a command, after {{name|AllowCommand}} returns {{value|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitCmdDone&lt;br /&gt;
|args = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOpts, cmdTag&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, transportID, transportTeam&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, experience, oldExperience&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam&lt;br /&gt;
|info = Called when a unit cloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitDecloaked&lt;br /&gt;
|args = unitID, unitDefID, unitTeam&lt;br /&gt;
|info = Called when a unit decloaks.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoved&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitMoveFailed&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ??? Not implemented in base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = StockpileChanged&lt;br /&gt;
|args = unitID, unitDefID, unitTeam, weaponNum, oldCount, newCount&lt;br /&gt;
|info = 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;
|args = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|info = 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;
|args = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|info = 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;
|args = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|info = 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;
|args = unitID, unitTeam, allyTeam, unitDefID&lt;br /&gt;
|info = 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;
|args = ???&lt;br /&gt;
|info = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftAir&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitEnteredWater&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitLeftWater&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ??? Not implemented by base handler&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitSeismicPing&lt;br /&gt;
|args = x, y, z, strength, allyTeam, unitID, unitDefID&lt;br /&gt;
|info = 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;
|args = featureID, allyTeamID&lt;br /&gt;
|info = Called when a feature is created.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDamaged&lt;br /&gt;
|args =  featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|info = Called when a feature is damaged.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureDestroyed&lt;br /&gt;
|args = featureID, allyTeamID&lt;br /&gt;
|info = Called when a feature is destroyed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeatureMoved&lt;br /&gt;
|args = ???&lt;br /&gt;
|info = ???&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;
|args = proID, proOwnerID, weaponDefID&lt;br /&gt;
|info = Called when the projectile is created. Note that {{var|weaponDefID}} is missing if the projectile is spawned as part of a burst, but [[Lua_SyncedRead#Projectiles|Spring.GetProjectileDefID]] and [[Lua_SyncedRead#Projectiles|Spring.GetProjectileName]] still work in callin scope using {{var|proID}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = ProjectileDestroyed&lt;br /&gt;
|args = proID&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag&lt;br /&gt;
|return = {{type|bool}} used, {{type|bool}} finished&lt;br /&gt;
|info = Called when the unit reaches an unknown command in its queue (i.e. one not handled by the engine). If no addon returns {{var|used}} as {{value|true}} the command is dropped, if an addon returns {{value|true}}, {{value|true}} the command is removed because it&#039;s done, with {{value|true}}, {{value|false}} it&#039;s kept in the queue and {{name|CommandFallback}} 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;
|args = unitID, unitDefID, unitTeam, cmdID, cmdParams, cmdOptions, cmdTag, synced&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = unitDefID, builderID, builderTeam, x, y, z, facing&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = unitID, unitDefID, oldTeam, newTeam, capture&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = builderID, builderTeam, unitID, unitDefID, part&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = featureDefID, teamID, x, y, z&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = builderID, builderTeam, featureID, featureDefID, part&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = teamID, res, level&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = oldTeamID, newTeamID, res, amount&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args =  clampedX, clampedY, clampedZ, playerID, readyState, rawX, rawY, rawZ&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = {{var|clamped{X,Y,Z}}} are the coordinates clamped into start-boxes, {{var|raw}} is where player tried to place their marker. The {{var|readyState}} can be any one of &lt;br /&gt;
* {{value|0}} - player picked a position, &lt;br /&gt;
* {{value|1}} - player clicked ready, &lt;br /&gt;
* {{value|2}} - player pressed ready OR  the game was force-started (player did not click ready, but is now forcibly readied) or &lt;br /&gt;
* {{value|3}} - 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 (0,0,0) 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;
|args = unitID, unitDefID, unitTeam, playerID&lt;br /&gt;
|return = {{type|bool}} allow&lt;br /&gt;
|info = 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;
|args = attackerID, attackerWeaponNum, attackerWeaponDefID&lt;br /&gt;
|return = {{type|bool}} allowCheck, {{type|bool}} ignoreCheck&lt;br /&gt;
|info = Determines if this weapon can automatically generate targets itself. See also {{xtaglink|Gamedev:WeaponDefs|commandFire}} weaponDef tag. The {{var|ignoreCheck}} return value was added in 99.0 to allow ignoring the callin i.e. running normal engine check for this weapon.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = AllowWeaponTarget&lt;br /&gt;
|args = attackerID, targetID, attackerWeaponNum, attackerWeaponDefID, defPriority&lt;br /&gt;
|return = {{type|bool}} allowed, {{type|number}} newPriority&lt;br /&gt;
|info = 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 {{var|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;
|args = interceptorUnitID, interceptorWeaponID, targetProjectileID&lt;br /&gt;
|return = {{type|bool}} allowed&lt;br /&gt;
|info = 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 {{var|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;
|args = unitID, unitDefID, action&lt;br /&gt;
|return = {{type|bool}} actionAllowed&lt;br /&gt;
|info = {{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;{{var|action}} is one of following:&lt;br /&gt;
* {{value|-1}} Build&lt;br /&gt;
* {{value|CMD.REPAIR}} Repair&lt;br /&gt;
* {{value|CMD.RECLAIM}} Reclaim&lt;br /&gt;
* {{value|CMD.RESTORE}} Restore&lt;br /&gt;
* {{value|CMD.RESURRECT}} Resurrect&lt;br /&gt;
* {{value|CMD.CAPTURE}} Capture&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = Explosion&lt;br /&gt;
|args = weaponDefID, px, py, pz, AttackerID, ProjectileID&lt;br /&gt;
|return = {{type|bool}} noGfx&lt;br /&gt;
|info = Called when an explosion occurs. If it returns {{value|true}} 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;
|args = unitID, unitDefID, unitTeam, buildUnitID, buildUnitDefID, buildUnitTeam&lt;br /&gt;
|return = {{type|bool}} stop&lt;br /&gt;
|info = Called when pre-building terrain levelling terraforms are completed (c.f. {{xtaglink|Gamedev:UnitDefs|levelGround}}). If the return value is {{value|true}} the current build order is terminated.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = MoveCtrlNotify&lt;br /&gt;
|args = unitID, unitDefID, unitTeam, data&lt;br /&gt;
|return = {{type|bool}} moveCtrlComplete&lt;br /&gt;
|info = 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 {{value|1}} (&amp;quot;unit hit the ground&amp;quot;). The return value determines whether or not the unit should remain script-controlled ({{value|false}}) or return to engine controlled movement ({{value|true}}).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = RecvLuaMsg&lt;br /&gt;
|args = msg, playerID&lt;br /&gt;
|info = 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;
|args = zip&lt;br /&gt;
|info = Called after {{name|GamePreload}} and before {{name|GameStart}}. 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, {{var|weaponDefID}} may be one of the following:&lt;br /&gt;
* {{value|-1}} - debris collision, also default of [[Lua_SyncedCtrl#Unit_Control|Spring.AddUnitDamage]]&lt;br /&gt;
* {{value|-2}} - ground collision&lt;br /&gt;
* {{value|-3}} - object collision&lt;br /&gt;
* {{value|-4}} - fire damage&lt;br /&gt;
* {{value|-5}} - water damage&lt;br /&gt;
* {{value|-6}} - kill damage&lt;br /&gt;
* {{value|-7}} - crush damage&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = UnitPreDamaged&lt;br /&gt;
|args = unitID, unitDefID, unitTeam, damage, paralyzer, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = {{type|number}} newDamage, {{type|number}} impulseMult&lt;br /&gt;
|info = 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;
|args = proID, proOwnerID, shieldEmitterWeaponNum, shieldCarrierUnitID, bounceProjectile, beamEmitterWeaponNum, beamEmitterUnitID&lt;br /&gt;
|return = {{type|bool}} handleCollision&lt;br /&gt;
|info = Called before any engine shield-vs-projectile logic executes. If the return value is {{value|true}} the gadget handles the collision event and the engine does not remove the projectile. If the weapon is a hitscan type ([[Gamedev:WeaponDefs#Tag:weaponType|BeamLaser]] or [[Gamedev:WeaponDefs#Tag:weaponType|LightningCanon]]) then {{var|proID}} is {{value|nil}} and {{var|beamEmitterWeaponNum}} and {{var|beamEmitterUnitID}} are populated instead.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{LuaCallin&lt;br /&gt;
|name = FeaturePreDamaged&lt;br /&gt;
|args = featureID, featureDefID, featureTeam, damage, weaponDefID, projectileID, attackerID, attackerDefID, attackerTeam&lt;br /&gt;
|return = {{type|number}} newDamage, {{type|number}} impulseMult&lt;br /&gt;
|info = 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>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2179</id>
		<title>Assimp</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2179"/>
		<updated>2016-03-24T16:45:42Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Blender Workflow Tutorial */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
=Assimp=&lt;br /&gt;
Open Asset Import Library (short name: Assimp) is used in Spring for loading a number of common and well supported model formats (.3ds, .dae, .lwo, .blend - currently .obj is parsed by a different code path).&lt;br /&gt;
&lt;br /&gt;
What Spring supports in its Assimp renderer:&lt;br /&gt;
* extended metafile (&amp;lt;code&amp;gt;%modelfilename%.lua&amp;lt;/code&amp;gt; next to the modefile)&lt;br /&gt;
* still uses tex1 &amp;amp; tex2 texture system of S3O (same shader as S3O)&lt;br /&gt;
* 2nd texcoord&lt;br /&gt;
* loading of the texture filepaths from the model (don&#039;t have to be in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;)&lt;br /&gt;
* when texture filepaths aren&#039;t included in the model, it searches for &amp;lt;code&amp;gt;%modelfilename%.*&amp;lt;/code&amp;gt; &amp;amp; &amp;lt;code&amp;gt;%modelfilename%2.*&amp;lt;/code&amp;gt; in &amp;lt;code&amp;gt;unittextures/&amp;lt;/code&amp;gt;&lt;br /&gt;
* special modelpieces `SpringHeight` &amp;amp; `SpringRadius`&lt;br /&gt;
* {{new|95.0}} allow modellers to work around {{mantis|3552}} (differing axes conventions between software) by recognizing a number of new piece-table keys as follows&lt;br /&gt;
&lt;br /&gt;
For the root piece:&lt;br /&gt;
* &amp;quot;xaxis&amp;quot; = float3, &amp;quot;yaxis&amp;quot; = float3, &amp;quot;zaxis&amp;quot; = float3 (determine global orientation of model)&lt;br /&gt;
For all pieces:&lt;br /&gt;
* &amp;quot;rotAxisSigns&amp;quot; = float3 (determines direction of script-applied rotations around each axis)&lt;br /&gt;
* &amp;quot;rotAxisMap&amp;quot; = number (currently can only be 0=XYZ or 3=XZY, determines coordinate conversion)&lt;br /&gt;
&lt;br /&gt;
=Assimp Textures=&lt;br /&gt;
See [[3DModels:Textures#Textures_-_Assimp_Model_Formats_.28DAE.2CMDL.2CMD3_and_others_except_OBJ.29 |3DModels:Textures (Assimp Section)]]&lt;br /&gt;
&lt;br /&gt;
=Blender Workflow Tutorial=&lt;br /&gt;
This is a stub containing a simple outline of a Blender workflow.&lt;br /&gt;
&lt;br /&gt;
# Open an existing Blender model or import a different format through the File menu (File &amp;gt; Import).&lt;br /&gt;
# In the 3D view, drag out the secret panel from the right.  [[File:3-12-2013 5-02-21 PM.pngâ€Žâ€Ž|secret panel]]&lt;br /&gt;
# In that panel, select Display &amp;gt; Shading &amp;gt; GLSL. [[File:3-12-2013 5-02-04 PM.pngâ€Žâ€Ž|display settings]]&lt;br /&gt;
# Make sure you have a lamp in your scene while in this mode or your model will be dark.&lt;br /&gt;
# Applying texture: &lt;br /&gt;
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it&#039;s not there, click on Image &amp;gt; Open Image to browse for it.&lt;br /&gt;
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode.&lt;br /&gt;
## Hit A to select all your faces.&lt;br /&gt;
## In the 3D View, hit A to select all the faces there and select your image with the image icon. Assuming there&#039;s a UVMap, you should see your texture.&lt;br /&gt;
## If you don&#039;t see any faces you&#039;ll need to add the UVMap to a new texture:&lt;br /&gt;
### In the Properties view click on Textures (checkerboard icon).&lt;br /&gt;
### Click on Add New Texture (plus icon).&lt;br /&gt;
### Select Type = Image or Movie.&lt;br /&gt;
### Under Image, click on the image icon and choose your image file.&lt;br /&gt;
### Under Mapping, select Coordinates = UV.&lt;br /&gt;
### Under Influence &amp;gt; Diffuse, check Color and make sure it&#039;s 1.00.&lt;br /&gt;
## To add a normalmap:&lt;br /&gt;
### Repeat steps 5.5.1 to 5.5.5.&lt;br /&gt;
### Under Image Sampling, check Normal Map.&lt;br /&gt;
### Under Influence &amp;gt; Geometry, check Normal. Make sure it.s 1.00.&lt;br /&gt;
## You&#039;ll need to do this for each piece.&lt;br /&gt;
# Piece hierarchy:&lt;br /&gt;
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B.&lt;br /&gt;
## &amp;lt;strike&amp;gt;Make sure all the pieces are descending from one single piece.&amp;lt;/strike&amp;gt; This is no longer necessary but is still good practice. Spring will now place all your pieces into one root piece for you, regardless.&lt;br /&gt;
# Setting piece origins:&lt;br /&gt;
## Select a piece.&lt;br /&gt;
## Place the 3D cursor where you want the origin to be (left-click).&lt;br /&gt;
## Click on Object &amp;gt; Transform &amp;gt; Origin to 3D Cursor.&lt;br /&gt;
## You can now rotate your pieces:&lt;br /&gt;
### Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select Individual Origins.&lt;br /&gt;
### Rotate.&lt;br /&gt;
## Do this for all your pieces.&lt;br /&gt;
# Preparing for Spring (this may or may not apply depending on how assimp handles your model.):&lt;br /&gt;
## Ensure that the scales for each object in your scene are uniform (that is, x, y, and z scales are equal to each other). A quick way to ensure that is select all (a) and apply scale (ctrl+a -&amp;gt; scale).&lt;br /&gt;
# Save your model.&lt;br /&gt;
# Select all the pieces of your model, ignore the lamp.&lt;br /&gt;
# Click on File &amp;gt; Export &amp;gt; Collada.&lt;br /&gt;
# Check &amp;quot;Export Only Selected&amp;quot; and export.&lt;br /&gt;
# The dae file will be used as your object.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:3D Models]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8806</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=8806"/>
		<updated>2015-11-19T20:35:49Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Collision &amp;amp; Avoidance */&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. Since version 100.0, Spring will record a warning whenever it finds an unknown tag.&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. Since 99.0 &amp;lt;code&amp;gt;maxVelocity&amp;lt;/code&amp;gt; is a synonym.}}&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 = Depends on {{taglink|weaponType}}&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. A value of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means that no shields will intercept the weapon. The defaults are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - [[#DGun]]&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 = Modifies visual size of EMG and Flame projectiles, and physical size &#039;&#039;&#039;only&#039;&#039;&#039; for hitscan interceptor weapons (e.g. antinuke lasers). [[https://github.com/spring/spring/blob/3034e5f5a8f5b9fb4624a97f7a85cb5c90457725/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp#L250 1]][[https://github.com/spring/spring/blob/master/rts/Sim/Misc/CollisionHandler.cpp#L33 2]]}}&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 (+/- ~18 degrees)&lt;br /&gt;
|description = The amount (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) 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 = fireTolerance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32768.0 (+/- 180 degrees)&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description =  Final check to prevent weapons from shooting sideways. If a weapon is about to fire but the difference between its old aim and requested aim is greater than this angle (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) then it will not fire.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowNonBlockingAim&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description = When enabled it makes [[Animation-LuaCallins#Weapons|AimWeapon()]] script calls non-blocking (still the {{taglink|fireTolerance}} tag might prevent the weapon firing). This is very useful for fast units that need to re-target often.}}&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}} only once for each salvo (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or for every round in a burst (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;)?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundStart&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitDry&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with solid ground. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitWet&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with water. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
====Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cegTag&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name, without prefixes, of a [[CEG]] to be emitted by the projectile each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = intensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9 (0.2 for [[#Cannon]])&lt;br /&gt;
|description = Alpha transparency for non-3D model projectiles. Lower values are more opaque, but &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will cause the projectile to disappear entirely.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = model&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of a 3D model to use when rendering the projectile. Note that only the root piece of a projectile model is rendered. Currently only for [[#Cannon]], [[#LaserCannon]], [[#MissileLauncher]], [[#StarburstLauncher]] and [[#TorpedoLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionScar&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon&#039;s explosion leave a scar decal on the ground? For all types except [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the weapon is always rendered regardless of whether or not it is in LOS range of a player&#039;s units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.0, 0.0} (See Description)&lt;br /&gt;
|description = The primary colour for sprite rendering weapons. Additional defaults are as follows:&lt;br /&gt;
* [[#Cannon]] - &amp;lt;code&amp;gt;{1.0, 0.5, 0.0}&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[#EmgCannon]] - &amp;lt;code&amp;gt;{0.9, 0.9, 0.2}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn as the weapon&#039;s explosion. Does not currently work for [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceExplosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = For weapons which can use {{taglink|groundBounce|true}}, the name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn when weapon the bounces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture1&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The projectile texture for [[#AircraftBomb]], [[#Cannon]], [[#EmgCannon]], [[#Flame]]; beam texture for [[#LaserCannon]], [[#BeamLaser]], [[#LightningCannon]]; flare texture for [[#MissileLauncher]], [[#StarburstLauncher]] and dome texture for the [[#Shield]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture2&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The end-of-beam texture for [[#LaserCannon]], [[#BeamLaser]] and {{taglink|smoketrail}} texture for [[#MissileLauncher]], [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture3&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]], or muzzle texture if {{taglink|largeBeamLaser|true}}. Also used as the flame texture for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture4&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]] with {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===AircraftBomb===&lt;br /&gt;
Drops a ballistic projectile at the same movement vector as the unit itself. Intended only for aircraft. Visually drawn as a billboarded sprite as used by the [[#Cannon]], but more commonly used with a 3D model.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====AircraftBomb Visuals====&lt;br /&gt;
&lt;br /&gt;
When not using a {{taglink|model}}, the AircraftBomb is the same as [[#Cannon Visuals]].&lt;br /&gt;
&lt;br /&gt;
===BeamLaser===&lt;br /&gt;
An instant-hit weapon which spawns a beam and does a portion of its total damage each frame. Cannot be [[Animation-LuaCallouts#Effects|script emitted]] if it has a {{taglink|beamTime}} longer than one frame. Visually drawn as a [http://en.wikipedia.org/wiki/Star_Trek Star Trek] Phaser-style laser weapon. The {{taglink|largeBeamLaser}} tag allows changing the visual effect of the laser, such as using a tileable, scrolling texture without changing the behaviour.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minIntensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum percentage the weapon&#039;s damage can fall-off to over its range. Setting to &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will disable fall off entirely. Unrelated to the visual-only {{taglink|intensity}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How long in seconds to fire the laser before waiting for {{taglink|reloadTime}} to start. Damage is distributed over the duration of the {{taglink|beamTime}}, and the weapon will aim to hit the target when the beam is in the middle of its {{taglink|beamTime}} (i.e. using prediction).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamBurst&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser fire a burst of beams that are all aimed towards the target (instead of aimed with the piece). A [[#BeamLaser]] can do its full damage with every shot if {{taglink|beamBurst}} is enabled. Disables {{taglink|beamTime}} in favour of the [[#Bursts|burst tags]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sweepFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser continue firing while it aims for a new target, &#039;sweeping&#039; across the terrain. Reimplemented in 95.0, still has no script interaction so use with care. Respects {{taglink|reloadTime}} constraint but not much else.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====BeamLaser Visuals====&lt;br /&gt;
&lt;br /&gt;
See also {{taglink|thickness}} and {{taglink|coreThickness}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTTL&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in frames for which the laser beam remains visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the beam fades out. Each frame the {{taglink|intensity}} is multiplied by this value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = laserFlareSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 15.0&lt;br /&gt;
|description = Determines the size of the firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = largeBeamLaser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Changes the visual effect allowing tiling and scrolling of the texture and a pulsating firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tileLength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 200.0&lt;br /&gt;
|description = Defines the length before the texture used is repeated (tiled). Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scrollSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = Controls how fast the texture scrolls. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pulseSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how fast the pulsating effect at the start of the beam is. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Cannon===&lt;br /&gt;
The default &#039;&#039;&#039;WeaponType&#039;&#039;&#039;. Fires a ballistic projectile, for the best result (without under/overshooting) the {{taglink|weaponVelocity}} should be set so as to give an elevation of 45Â° when firing at the maximum {{taglink|range}}. Substituting the angle into the [http://en.wikipedia.org/wiki/Trajectory#Range_and_height trajectory equation] 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 = weaponAcceleration&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}}. Since 99.0 &amp;lt;code&amp;gt;acceleration&amp;lt;/code&amp;gt; is a synonym.&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>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8805</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=8805"/>
		<updated>2015-11-19T20:35:20Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Collision &amp;amp; Avoidance */ collisionSize hatepost intensifies&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. Since version 100.0, Spring will record a warning whenever it finds an unknown tag.&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. Since 99.0 &amp;lt;code&amp;gt;maxVelocity&amp;lt;/code&amp;gt; is a synonym.}}&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 = Depends on {{taglink|weaponType}}&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. A value of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means that no shields will intercept the weapon. The defaults are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - [[#DGun]]&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 = Modifies size of EMG and Flame projectiles, and physical size &#039;&#039;&#039;only&#039;&#039;&#039; for hitscan interceptor weapons (e.g. antinuke lasers). [[https://github.com/spring/spring/blob/3034e5f5a8f5b9fb4624a97f7a85cb5c90457725/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp#L250 1]][[https://github.com/spring/spring/blob/master/rts/Sim/Misc/CollisionHandler.cpp#L33 2]]}}&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 (+/- ~18 degrees)&lt;br /&gt;
|description = The amount (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) 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 = fireTolerance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32768.0 (+/- 180 degrees)&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description =  Final check to prevent weapons from shooting sideways. If a weapon is about to fire but the difference between its old aim and requested aim is greater than this angle (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) then it will not fire.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowNonBlockingAim&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description = When enabled it makes [[Animation-LuaCallins#Weapons|AimWeapon()]] script calls non-blocking (still the {{taglink|fireTolerance}} tag might prevent the weapon firing). This is very useful for fast units that need to re-target often.}}&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}} only once for each salvo (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or for every round in a burst (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;)?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundStart&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitDry&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with solid ground. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitWet&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with water. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
====Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cegTag&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name, without prefixes, of a [[CEG]] to be emitted by the projectile each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = intensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9 (0.2 for [[#Cannon]])&lt;br /&gt;
|description = Alpha transparency for non-3D model projectiles. Lower values are more opaque, but &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will cause the projectile to disappear entirely.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = model&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of a 3D model to use when rendering the projectile. Note that only the root piece of a projectile model is rendered. Currently only for [[#Cannon]], [[#LaserCannon]], [[#MissileLauncher]], [[#StarburstLauncher]] and [[#TorpedoLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionScar&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon&#039;s explosion leave a scar decal on the ground? For all types except [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the weapon is always rendered regardless of whether or not it is in LOS range of a player&#039;s units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.0, 0.0} (See Description)&lt;br /&gt;
|description = The primary colour for sprite rendering weapons. Additional defaults are as follows:&lt;br /&gt;
* [[#Cannon]] - &amp;lt;code&amp;gt;{1.0, 0.5, 0.0}&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[#EmgCannon]] - &amp;lt;code&amp;gt;{0.9, 0.9, 0.2}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn as the weapon&#039;s explosion. Does not currently work for [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceExplosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = For weapons which can use {{taglink|groundBounce|true}}, the name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn when weapon the bounces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture1&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The projectile texture for [[#AircraftBomb]], [[#Cannon]], [[#EmgCannon]], [[#Flame]]; beam texture for [[#LaserCannon]], [[#BeamLaser]], [[#LightningCannon]]; flare texture for [[#MissileLauncher]], [[#StarburstLauncher]] and dome texture for the [[#Shield]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture2&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The end-of-beam texture for [[#LaserCannon]], [[#BeamLaser]] and {{taglink|smoketrail}} texture for [[#MissileLauncher]], [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture3&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]], or muzzle texture if {{taglink|largeBeamLaser|true}}. Also used as the flame texture for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture4&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]] with {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===AircraftBomb===&lt;br /&gt;
Drops a ballistic projectile at the same movement vector as the unit itself. Intended only for aircraft. Visually drawn as a billboarded sprite as used by the [[#Cannon]], but more commonly used with a 3D model.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====AircraftBomb Visuals====&lt;br /&gt;
&lt;br /&gt;
When not using a {{taglink|model}}, the AircraftBomb is the same as [[#Cannon Visuals]].&lt;br /&gt;
&lt;br /&gt;
===BeamLaser===&lt;br /&gt;
An instant-hit weapon which spawns a beam and does a portion of its total damage each frame. Cannot be [[Animation-LuaCallouts#Effects|script emitted]] if it has a {{taglink|beamTime}} longer than one frame. Visually drawn as a [http://en.wikipedia.org/wiki/Star_Trek Star Trek] Phaser-style laser weapon. The {{taglink|largeBeamLaser}} tag allows changing the visual effect of the laser, such as using a tileable, scrolling texture without changing the behaviour.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minIntensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum percentage the weapon&#039;s damage can fall-off to over its range. Setting to &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will disable fall off entirely. Unrelated to the visual-only {{taglink|intensity}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How long in seconds to fire the laser before waiting for {{taglink|reloadTime}} to start. Damage is distributed over the duration of the {{taglink|beamTime}}, and the weapon will aim to hit the target when the beam is in the middle of its {{taglink|beamTime}} (i.e. using prediction).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamBurst&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser fire a burst of beams that are all aimed towards the target (instead of aimed with the piece). A [[#BeamLaser]] can do its full damage with every shot if {{taglink|beamBurst}} is enabled. Disables {{taglink|beamTime}} in favour of the [[#Bursts|burst tags]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sweepFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser continue firing while it aims for a new target, &#039;sweeping&#039; across the terrain. Reimplemented in 95.0, still has no script interaction so use with care. Respects {{taglink|reloadTime}} constraint but not much else.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====BeamLaser Visuals====&lt;br /&gt;
&lt;br /&gt;
See also {{taglink|thickness}} and {{taglink|coreThickness}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTTL&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in frames for which the laser beam remains visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the beam fades out. Each frame the {{taglink|intensity}} is multiplied by this value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = laserFlareSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 15.0&lt;br /&gt;
|description = Determines the size of the firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = largeBeamLaser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Changes the visual effect allowing tiling and scrolling of the texture and a pulsating firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tileLength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 200.0&lt;br /&gt;
|description = Defines the length before the texture used is repeated (tiled). Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scrollSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = Controls how fast the texture scrolls. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pulseSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how fast the pulsating effect at the start of the beam is. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Cannon===&lt;br /&gt;
The default &#039;&#039;&#039;WeaponType&#039;&#039;&#039;. Fires a ballistic projectile, for the best result (without under/overshooting) the {{taglink|weaponVelocity}} should be set so as to give an elevation of 45Â° when firing at the maximum {{taglink|range}}. Substituting the angle into the [http://en.wikipedia.org/wiki/Trajectory#Range_and_height trajectory equation] 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 = weaponAcceleration&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}}. Since 99.0 &amp;lt;code&amp;gt;acceleration&amp;lt;/code&amp;gt; is a synonym.&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>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8804</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=8804"/>
		<updated>2015-11-19T20:31:45Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Collision &amp;amp; Avoidance */&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. Since version 100.0, Spring will record a warning whenever it finds an unknown tag.&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. Since 99.0 &amp;lt;code&amp;gt;maxVelocity&amp;lt;/code&amp;gt; is a synonym.}}&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 = Depends on {{taglink|weaponType}}&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. A value of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means that no shields will intercept the weapon. The defaults are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - [[#DGun]]&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 = Modifies size of EMG and Flame projectiles, and physical size &#039;&#039;&#039;only&#039;&#039;&#039; for [https://github.com/spring/spring/blob/3034e5f5a8f5b9fb4624a97f7a85cb5c90457725/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp#L250 hitscan] interceptor weapons (e.g. antinuke lasers).}}&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 (+/- ~18 degrees)&lt;br /&gt;
|description = The amount (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) 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 = fireTolerance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32768.0 (+/- 180 degrees)&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description =  Final check to prevent weapons from shooting sideways. If a weapon is about to fire but the difference between its old aim and requested aim is greater than this angle (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) then it will not fire.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowNonBlockingAim&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description = When enabled it makes [[Animation-LuaCallins#Weapons|AimWeapon()]] script calls non-blocking (still the {{taglink|fireTolerance}} tag might prevent the weapon firing). This is very useful for fast units that need to re-target often.}}&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}} only once for each salvo (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or for every round in a burst (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;)?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundStart&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitDry&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with solid ground. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitWet&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with water. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
====Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cegTag&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name, without prefixes, of a [[CEG]] to be emitted by the projectile each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = intensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9 (0.2 for [[#Cannon]])&lt;br /&gt;
|description = Alpha transparency for non-3D model projectiles. Lower values are more opaque, but &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will cause the projectile to disappear entirely.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = model&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of a 3D model to use when rendering the projectile. Note that only the root piece of a projectile model is rendered. Currently only for [[#Cannon]], [[#LaserCannon]], [[#MissileLauncher]], [[#StarburstLauncher]] and [[#TorpedoLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionScar&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon&#039;s explosion leave a scar decal on the ground? For all types except [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the weapon is always rendered regardless of whether or not it is in LOS range of a player&#039;s units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.0, 0.0} (See Description)&lt;br /&gt;
|description = The primary colour for sprite rendering weapons. Additional defaults are as follows:&lt;br /&gt;
* [[#Cannon]] - &amp;lt;code&amp;gt;{1.0, 0.5, 0.0}&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[#EmgCannon]] - &amp;lt;code&amp;gt;{0.9, 0.9, 0.2}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn as the weapon&#039;s explosion. Does not currently work for [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceExplosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = For weapons which can use {{taglink|groundBounce|true}}, the name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn when weapon the bounces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture1&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The projectile texture for [[#AircraftBomb]], [[#Cannon]], [[#EmgCannon]], [[#Flame]]; beam texture for [[#LaserCannon]], [[#BeamLaser]], [[#LightningCannon]]; flare texture for [[#MissileLauncher]], [[#StarburstLauncher]] and dome texture for the [[#Shield]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture2&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The end-of-beam texture for [[#LaserCannon]], [[#BeamLaser]] and {{taglink|smoketrail}} texture for [[#MissileLauncher]], [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture3&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]], or muzzle texture if {{taglink|largeBeamLaser|true}}. Also used as the flame texture for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture4&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]] with {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===AircraftBomb===&lt;br /&gt;
Drops a ballistic projectile at the same movement vector as the unit itself. Intended only for aircraft. Visually drawn as a billboarded sprite as used by the [[#Cannon]], but more commonly used with a 3D model.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====AircraftBomb Visuals====&lt;br /&gt;
&lt;br /&gt;
When not using a {{taglink|model}}, the AircraftBomb is the same as [[#Cannon Visuals]].&lt;br /&gt;
&lt;br /&gt;
===BeamLaser===&lt;br /&gt;
An instant-hit weapon which spawns a beam and does a portion of its total damage each frame. Cannot be [[Animation-LuaCallouts#Effects|script emitted]] if it has a {{taglink|beamTime}} longer than one frame. Visually drawn as a [http://en.wikipedia.org/wiki/Star_Trek Star Trek] Phaser-style laser weapon. The {{taglink|largeBeamLaser}} tag allows changing the visual effect of the laser, such as using a tileable, scrolling texture without changing the behaviour.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minIntensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum percentage the weapon&#039;s damage can fall-off to over its range. Setting to &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will disable fall off entirely. Unrelated to the visual-only {{taglink|intensity}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How long in seconds to fire the laser before waiting for {{taglink|reloadTime}} to start. Damage is distributed over the duration of the {{taglink|beamTime}}, and the weapon will aim to hit the target when the beam is in the middle of its {{taglink|beamTime}} (i.e. using prediction).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamBurst&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser fire a burst of beams that are all aimed towards the target (instead of aimed with the piece). A [[#BeamLaser]] can do its full damage with every shot if {{taglink|beamBurst}} is enabled. Disables {{taglink|beamTime}} in favour of the [[#Bursts|burst tags]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sweepFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser continue firing while it aims for a new target, &#039;sweeping&#039; across the terrain. Reimplemented in 95.0, still has no script interaction so use with care. Respects {{taglink|reloadTime}} constraint but not much else.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====BeamLaser Visuals====&lt;br /&gt;
&lt;br /&gt;
See also {{taglink|thickness}} and {{taglink|coreThickness}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTTL&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in frames for which the laser beam remains visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the beam fades out. Each frame the {{taglink|intensity}} is multiplied by this value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = laserFlareSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 15.0&lt;br /&gt;
|description = Determines the size of the firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = largeBeamLaser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Changes the visual effect allowing tiling and scrolling of the texture and a pulsating firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tileLength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 200.0&lt;br /&gt;
|description = Defines the length before the texture used is repeated (tiled). Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scrollSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = Controls how fast the texture scrolls. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pulseSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how fast the pulsating effect at the start of the beam is. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Cannon===&lt;br /&gt;
The default &#039;&#039;&#039;WeaponType&#039;&#039;&#039;. Fires a ballistic projectile, for the best result (without under/overshooting) the {{taglink|weaponVelocity}} should be set so as to give an elevation of 45Â° when firing at the maximum {{taglink|range}}. Substituting the angle into the [http://en.wikipedia.org/wiki/Trajectory#Range_and_height trajectory equation] 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 = weaponAcceleration&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}}. Since 99.0 &amp;lt;code&amp;gt;acceleration&amp;lt;/code&amp;gt; is a synonym.&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>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8803</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=8803"/>
		<updated>2015-11-19T20:31:22Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Collision &amp;amp; Avoidance */ collisionSize hate edit&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. Since version 100.0, Spring will record a warning whenever it finds an unknown tag.&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. Since 99.0 &amp;lt;code&amp;gt;maxVelocity&amp;lt;/code&amp;gt; is a synonym.}}&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 = Depends on {{taglink|weaponType}}&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. A value of &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; means that no shields will intercept the weapon. The defaults are as follows:&lt;br /&gt;
* &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - [[#DGun]]&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 = Modifies size of EMG and Flame projectiles, and physical size &#039;&#039;&#039;only&#039;&#039;&#039; for [https://github.com/spring/spring/blob/3034e5f5a8f5b9fb4624a97f7a85cb5c90457725/rts/Sim/Projectiles/WeaponProjectiles/WeaponProjectile.cpp#L250 hitscan] interceptor weapons (e.g. antinuke lasers).&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 (+/- ~18 degrees)&lt;br /&gt;
|description = The amount (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) 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 = fireTolerance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 32768.0 (+/- 180 degrees)&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description =  Final check to prevent weapons from shooting sideways. If a weapon is about to fire but the difference between its old aim and requested aim is greater than this angle (in [[Gamedev:UnitsOfMeasurement#Angular|cau]]) then it will not fire.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = allowNonBlockingAim&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|99.0}}&lt;br /&gt;
|description = When enabled it makes [[Animation-LuaCallins#Weapons|AimWeapon()]] script calls non-blocking (still the {{taglink|fireTolerance}} tag might prevent the weapon firing). This is very useful for fast units that need to re-target often.}}&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}} only once for each salvo (&amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt;) or for every round in a burst (&amp;lt;code&amp;gt;false&amp;lt;/code&amp;gt;)?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundStart&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon fires.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitDry&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with solid ground. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = soundHitWet&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a &#039;&#039;&#039;SoundItem&#039;&#039;&#039; (See [[Sounds.lua]]) or filename of a sound to play when the weapon collides with water. Note that a [[#BeamLaser]] will play this sound every frame of its lifetime.}}&lt;br /&gt;
&lt;br /&gt;
====Visuals====&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = cegTag&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name, without prefixes, of a [[CEG]] to be emitted by the projectile each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = intensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9 (0.2 for [[#Cannon]])&lt;br /&gt;
|description = Alpha transparency for non-3D model projectiles. Lower values are more opaque, but &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will cause the projectile to disappear entirely.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = model&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of a 3D model to use when rendering the projectile. Note that only the root piece of a projectile model is rendered. Currently only for [[#Cannon]], [[#LaserCannon]], [[#MissileLauncher]], [[#StarburstLauncher]] and [[#TorpedoLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionScar&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon&#039;s explosion leave a scar decal on the ground? For all types except [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the weapon is always rendered regardless of whether or not it is in LOS range of a player&#039;s units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.0, 0.0} (See Description)&lt;br /&gt;
|description = The primary colour for sprite rendering weapons. Additional defaults are as follows:&lt;br /&gt;
* [[#Cannon]] - &amp;lt;code&amp;gt;{1.0, 0.5, 0.0}&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[#EmgCannon]] - &amp;lt;code&amp;gt;{0.9, 0.9, 0.2}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn as the weapon&#039;s explosion. Does not currently work for [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceExplosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = For weapons which can use {{taglink|groundBounce|true}}, the name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn when weapon the bounces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture1&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The projectile texture for [[#AircraftBomb]], [[#Cannon]], [[#EmgCannon]], [[#Flame]]; beam texture for [[#LaserCannon]], [[#BeamLaser]], [[#LightningCannon]]; flare texture for [[#MissileLauncher]], [[#StarburstLauncher]] and dome texture for the [[#Shield]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture2&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The end-of-beam texture for [[#LaserCannon]], [[#BeamLaser]] and {{taglink|smoketrail}} texture for [[#MissileLauncher]], [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture3&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]], or muzzle texture if {{taglink|largeBeamLaser|true}}. Also used as the flame texture for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture4&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]] with {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===AircraftBomb===&lt;br /&gt;
Drops a ballistic projectile at the same movement vector as the unit itself. Intended only for aircraft. Visually drawn as a billboarded sprite as used by the [[#Cannon]], but more commonly used with a 3D model.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====AircraftBomb Visuals====&lt;br /&gt;
&lt;br /&gt;
When not using a {{taglink|model}}, the AircraftBomb is the same as [[#Cannon Visuals]].&lt;br /&gt;
&lt;br /&gt;
===BeamLaser===&lt;br /&gt;
An instant-hit weapon which spawns a beam and does a portion of its total damage each frame. Cannot be [[Animation-LuaCallouts#Effects|script emitted]] if it has a {{taglink|beamTime}} longer than one frame. Visually drawn as a [http://en.wikipedia.org/wiki/Star_Trek Star Trek] Phaser-style laser weapon. The {{taglink|largeBeamLaser}} tag allows changing the visual effect of the laser, such as using a tileable, scrolling texture without changing the behaviour.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minIntensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum percentage the weapon&#039;s damage can fall-off to over its range. Setting to &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will disable fall off entirely. Unrelated to the visual-only {{taglink|intensity}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How long in seconds to fire the laser before waiting for {{taglink|reloadTime}} to start. Damage is distributed over the duration of the {{taglink|beamTime}}, and the weapon will aim to hit the target when the beam is in the middle of its {{taglink|beamTime}} (i.e. using prediction).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamBurst&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser fire a burst of beams that are all aimed towards the target (instead of aimed with the piece). A [[#BeamLaser]] can do its full damage with every shot if {{taglink|beamBurst}} is enabled. Disables {{taglink|beamTime}} in favour of the [[#Bursts|burst tags]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sweepFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser continue firing while it aims for a new target, &#039;sweeping&#039; across the terrain. Reimplemented in 95.0, still has no script interaction so use with care. Respects {{taglink|reloadTime}} constraint but not much else.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====BeamLaser Visuals====&lt;br /&gt;
&lt;br /&gt;
See also {{taglink|thickness}} and {{taglink|coreThickness}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTTL&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in frames for which the laser beam remains visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the beam fades out. Each frame the {{taglink|intensity}} is multiplied by this value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = laserFlareSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 15.0&lt;br /&gt;
|description = Determines the size of the firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = largeBeamLaser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Changes the visual effect allowing tiling and scrolling of the texture and a pulsating firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tileLength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 200.0&lt;br /&gt;
|description = Defines the length before the texture used is repeated (tiled). Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scrollSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = Controls how fast the texture scrolls. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pulseSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how fast the pulsating effect at the start of the beam is. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Cannon===&lt;br /&gt;
The default &#039;&#039;&#039;WeaponType&#039;&#039;&#039;. Fires a ballistic projectile, for the best result (without under/overshooting) the {{taglink|weaponVelocity}} should be set so as to give an elevation of 45Â° when firing at the maximum {{taglink|range}}. Substituting the angle into the [http://en.wikipedia.org/wiki/Trajectory#Range_and_height trajectory equation] 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 = weaponAcceleration&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}}. Since 99.0 &amp;lt;code&amp;gt;acceleration&amp;lt;/code&amp;gt; is a synonym.&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>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=AI:Development:Lang:Java&amp;diff=654</id>
		<title>AI:Development:Lang:Java</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=AI:Development:Lang:Java&amp;diff=654"/>
		<updated>2015-09-23T12:41:44Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Links */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[AI:Development|AI Development]] &amp;lt; Java AI Development&lt;br /&gt;
&lt;br /&gt;
== Getting Started on your own Java AI ==&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; This tutorial assumes you have Spring working on your machine. The Spring directory will be referred to as &#039;Spring&#039; from here on.&lt;br /&gt;
&lt;br /&gt;
You will also need to make sure that Java AI&#039;s run properly on your machine. This is most easily done by running a Spring game with the &#039;&#039;NullOOJavaAI&#039;&#039; that comes with the engine. You will need the JRE 1.5 or greater, and to set the &#039;&#039;JAVA_HOME&#039;&#039; environment variable on your system to point to the correct location.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;Note:&#039;&#039; If you&#039;re using a &#039;&#039;64 bit&#039;&#039; version of &#039;&#039;Windows&#039;&#039;, you will need a 32 bit Java Runtime Environment/Java Development Kit anyway, because Spring is (as of May 2014) not yet available as a 64bit version for Windows.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Setting up a Java Project ===&lt;br /&gt;
&lt;br /&gt;
To start working on your own Java AI, you should first set up a project in your favorite Java IDE. You need to import the Spring Java AI Interface libraries, and then create an AI class and an AI Factory.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;OUTDATED&#039;&#039;&#039; If you are using &#039;&#039;&#039;Netbeans IDE&#039;&#039;&#039;, you can find a detailed tutorial [http://springrts.com/phpbb/download/file.php?id=4970 here] (from [http://springrts.com/phpbb/viewtopic.php?p=448743#p448743 this forum thread]). Otherwise, please continue reading this page.&lt;br /&gt;
&lt;br /&gt;
==== Importing the interface libraries ====&lt;br /&gt;
&lt;br /&gt;
In order to use the Java Interface, you will need to import the Java Interface libraries (optionally, you can attach the sources for JavaDoc support in your editor) &lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;Spring/AI/Interfaces/Java/[version]/AIInterface.jar&amp;lt;/code&amp;gt; (sources: jlib/AIInterface-src.jar&amp;lt;/code&amp;gt;)&lt;br /&gt;
* &amp;lt;code&amp;gt;Spring/AI/Skirmish/NullOOJavaAI/0.1/jlib/vecmath.jar&amp;lt;/code&amp;gt; (sources: vecmath-src.jar)&lt;br /&gt;
* &amp;lt;code&amp;gt;JavaOO-AIWrapper.jar&amp;lt;/code&amp;gt; (sources: TODO)&lt;br /&gt;
&lt;br /&gt;
==== Creating the main class ====&lt;br /&gt;
&lt;br /&gt;
Now that you have the libraries, the next step is to create your AI&#039;s main class. Firstly, you may want to create a package to put your classes in, for example, &#039;&#039;myjavaai&#039;&#039;. Create a new class, named MyJavaAI (or whatever you would like your AI to be called). MyJavaAI should extend com.springrts.ai.oo.AbstractOOAI.&lt;br /&gt;
&lt;br /&gt;
=== Adding your AI to Spring ===&lt;br /&gt;
&lt;br /&gt;
Your AI needs to have its own folder, and the engine will need to know your AI&#039;s attributes.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Creating an AI folder ====&lt;br /&gt;
&lt;br /&gt;
Every Spring AI is stored in &#039;&#039;Spring/AI/Skirmish&#039;&#039;. You will have to create a folder for your AI as well. It is easiest to go to the directory &#039;&#039;Spring/AI/Skirmish&#039;&#039;, make a copy of the folder &#039;&#039;NullOOJavaAI&#039;&#039;, and rename the copy to &#039;&#039;MyJavaAI&#039;&#039;.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==== Telling the Engine about your AI ====&lt;br /&gt;
&lt;br /&gt;
The &#039;&#039;MyJavaAI&#039;&#039; folder you created contains the different versions of your AI. As of this writing, the &#039;&#039;NullOOJavaAI&#039;&#039; only has a version &#039;&#039;0.1&#039;&#039;, so there should be a folder &#039;&#039;0.1&#039;&#039; inside the &#039;&#039;MyJavaAI&#039;&#039; folder. Inside you will find a number of files.&lt;br /&gt;
These files are:&lt;br /&gt;
* &#039;&#039;SkirmishAI.jar&#039;&#039;: the jar file that contains the AI code.&lt;br /&gt;
* &#039;&#039;AIInfo.lua&#039;&#039;: contains information about the AI.&lt;br /&gt;
* &#039;&#039;AIOptions.lua&#039;&#039;: you can specify your AI&#039;s options in here.&lt;br /&gt;
* Possibly some text files: these are log files generated by the &#039;&#039;NullOOJavaAI&#039;&#039;. If you don&#039;t plan on using the same files, you may as well delete these.&lt;br /&gt;
&lt;br /&gt;
Additionally, there is a folder named &#039;&#039;jlib&#039;&#039;. This is where you should place any additional libraries you use in your AI.&lt;br /&gt;
&lt;br /&gt;
In order to let Spring recognize your AI, you will have to edit &#039;&#039;AIInfo.lua&#039;&#039;. You can do this with any regular text editor.&lt;br /&gt;
When you open it, the file will look something like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
local infos = {&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;shortName&#039;,&lt;br /&gt;
      value  = &#039;NullOOJavaAI&#039;,&lt;br /&gt;
      desc   = &#039;machine conform name.&#039;,&lt;br /&gt;
   },&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;version&#039;,&lt;br /&gt;
      value  = &#039;0.1&#039;, -- AI version - !This comment is used for parsing!&lt;br /&gt;
   },&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;className&#039;,&lt;br /&gt;
      value  = &#039;nulloojavaai.NullOOJavaAI&#039;,&lt;br /&gt;
      desc   = &#039;fully qualified name of a class that implements interface com.springrts.ai.AI&#039;,&lt;br /&gt;
   },&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;name&#039;,&lt;br /&gt;
      value  = &#039;high-level Java stub Skirmish AI&#039;,&lt;br /&gt;
      desc   = &#039;human readable name.&#039;,&lt;br /&gt;
   },&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;loadSupported&#039;,&lt;br /&gt;
      value  = &#039;no&#039;,&lt;br /&gt;
      desc   = &#039;whether this AI supports loading or not&#039;,&lt;br /&gt;
   },&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;interfaceShortName&#039;,&lt;br /&gt;
      value  = &#039;Java&#039;, -- AI Interface name - !This comment is used for parsing!&lt;br /&gt;
      desc   = &#039;the shortName of the AI interface this AI needs&#039;,&lt;br /&gt;
   },&lt;br /&gt;
   {&lt;br /&gt;
      key    = &#039;interfaceVersion&#039;,&lt;br /&gt;
      value  = &#039;0.1&#039;, -- AI Interface version - !This comment is used for parsing!&lt;br /&gt;
      desc   = &#039;the minimum version of the AI interface required by this AI&#039;,&lt;br /&gt;
   },&lt;br /&gt;
}&lt;br /&gt;
&lt;br /&gt;
return infos&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
The file describes a number of attributes. Each attribute has a key, a value and a desc(ription). The key is the name of the attribute, the description tells you what the attribute is used for, and the value is what you will want to edit.&lt;br /&gt;
&lt;br /&gt;
The shortName attribute is the name used for your AI internally. It&#039;s most logical to change this into to the same name you gave your AI class. (MyJavaAI.)&lt;br /&gt;
&lt;br /&gt;
&#039;version&#039; tells the engine which version of your AI this is. If you&#039;re in the 0.1 folder, make this 0.1. Your AI should be located at AI/Skirmish/&#039;&#039;shortName&#039;&#039;/&#039;&#039;version&#039;&#039;/.&lt;br /&gt;
&lt;br /&gt;
&#039;classname&#039; tells the interface which class is your AIFactory class. Take care that you use the fully qualified class name, or it won&#039;t work. In this example, this should be myjavaai.MyJavaAIFactory.&lt;br /&gt;
&lt;br /&gt;
&#039;name&#039; describes your AI to the user. In this example, you might put &#039;A simple Java AI to learn about AI programming in Spring.&#039;&lt;br /&gt;
&lt;br /&gt;
&#039;loadSupported&#039; is rather self-explanatory. Since you have just started working on your AI, you may not get around to implementing loading support for some time, so it&#039;s best to put &#039;no,&#039; for now.&lt;br /&gt;
&lt;br /&gt;
&#039;interfaceShortName&#039; and &#039;interfaceversion&#039; tell the engine about the interface your AI uses. Since MyJavaAI uses the same interface as the NullOOJavaAI, leave these as they are.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Finally, the last thing you should do is exporting your AI to SkirmishAI.jar. The way to do this varies depending on your Java editor.&lt;br /&gt;
&lt;br /&gt;
=== Test your AI ===&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After following all the above steps, you should be able to run your AI. Either use SpringLobby to start a new game and see if you can add your AI as a bot, or run &#039;&#039;spring.exe&#039;&#039; to see if you can start the script MyJavaAI Test.&lt;br /&gt;
Of course, since you haven&#039;t told the AI what to do, your starting unit(s) will sit there doing nothing.&lt;br /&gt;
&lt;br /&gt;
== Getting your AI to Do Something ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
After getting your AI running, you will want to make it do something. Traditionally, the first thing to get your AI to is to build a solar plant, assuming you want it to play BA. If not, it is quite straightforward to build other units once you have the general idea.&lt;br /&gt;
You will need four things to get your AI to build a solar plant:&lt;br /&gt;
* A reference to the callback&lt;br /&gt;
* A reference to the commander (your starting unit in BA)&lt;br /&gt;
* A reference to the solar plant definition object&lt;br /&gt;
* To tell the commander to build the solar plant&lt;br /&gt;
&lt;br /&gt;
However, before we go about building solar plants, first you should know about events. We will use these to get the required object references.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Events ===&lt;br /&gt;
&lt;br /&gt;
Nearly everything that happens in the game is an event. When a unit is created, this is an event. Enemy spotted? Also an event. A player sends your AI a message? You got it, this is an event as well.&lt;br /&gt;
&lt;br /&gt;
Every event is made known to your AI. Have a look at the &amp;lt;code&amp;gt;MyJavaAI&amp;lt;/code&amp;gt; class again. &amp;lt;code&amp;gt;MyJavaAI&amp;lt;/code&amp;gt; extends &amp;lt;code&amp;gt;AbstractOOA&amp;lt;/code&amp;gt;. &amp;lt;code&amp;gt;AbstractOOAI&amp;lt;/code&amp;gt; implements a number of methods like &amp;lt;code&amp;gt;unitCreated()&amp;lt;/code&amp;gt;, &amp;lt;code&amp;gt;enemyEnterRadar()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;message()&amp;lt;/code&amp;gt;.&lt;br /&gt;
Sound familiar? The method &amp;lt;code&amp;gt;unitCreated(Unit unit, Unit builder)&amp;lt;/code&amp;gt; is called every time a unit is created, and tells you the unit that was created and the unit that built it. Similarly, enemyEnterRadar(Unit enemy) and message(int player, String message) tell you about an enemy unit entering radar range and receiving a message from another player respectively.&lt;br /&gt;
There are many other events that all have corresponding methods. To have your AI respond to these events, simply override the method in your &amp;lt;code&amp;gt;MyJavaAI&amp;lt;/code&amp;gt; class.&lt;br /&gt;
The return type of these methods is an integer. The return value can be used for debugging. 0 means that no errors occurred, while any other value is threated as an error. This system can be used for debugging, but is it much easier to implement proper logging.&lt;br /&gt;
&lt;br /&gt;
In the sections below you will see an example of the use of these events.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
=== Getting a reference to the callback ===&lt;br /&gt;
&lt;br /&gt;
The callback is the object through which the AI communicates with the engine. All information that does not change the state of the engine can be retrieved through individual methods in the callback, and state changing commands (eg to units) will go through a single, specialized method, which is in the callback as well.&lt;br /&gt;
Getting a reference to the callback is easy.&lt;br /&gt;
First create a class field &amp;lt;code&amp;gt;OOAICallback callback&amp;lt;/code&amp;gt; to put the reference in, then overwrite the method &amp;lt;code&amp;gt;init(int teamId, OOAICallback callback)&amp;lt;/code&amp;gt;. The init method is called at the start of every game (right at the end of the countdown).&lt;br /&gt;
As you can see, all that you need to do is set the parameter value callback to the field callback:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public int init(int teamId, OOAICallback callback)&lt;br /&gt;
{&lt;br /&gt;
    this.callback = callback;&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Getting a reference to the commander ===&lt;br /&gt;
&lt;br /&gt;
Whenever a unit has been built, the engine sends a unitFinished event. At the start of the game, the engine will send a UnitFinished event for every starting unit. When playing BA, this means you will get a UnitFinished event for the commander. Therefore, the most straightforward way of finding the reference to the commander is overriding the &amp;lt;code&amp;gt;unitFinished()&amp;lt;/code&amp;gt; method:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public int unitFinished(Unit unit) {&lt;br /&gt;
    if (unit.getDef().getName().equals(&amp;quot;armcom&amp;quot;)) {&lt;br /&gt;
        commander = unit;&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
=== Getting a reference to the solar plant definition ===&lt;br /&gt;
&lt;br /&gt;
Every unit in Spring has a UnitDef (a &#039;unit defintion&#039;). This object tells you all there is to know about the properties of the unit type, such as maximum speed, turn rate and what weapons it carries.&lt;br /&gt;
One way to get the reference to the definition of a solar plant is to use &amp;lt;code&amp;gt;callback.getUnitDefs()&amp;lt;/code&amp;gt;. This will give you a list of all the available unit types in the game that is currently being played.&lt;br /&gt;
The name of the unit def we are looking for is &#039;armsolar&#039;, so we can just iterate through the list and find the one named armsolar, like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
List&amp;lt;UnitDef&amp;gt; unitDefs = this.callback.getUnitDefs();&lt;br /&gt;
UnitDef solarPlant = null;&lt;br /&gt;
for (UnitDef def : unitDefs)&lt;br /&gt;
   if (def.getName().equals(&amp;quot;armsolar&amp;quot;))&lt;br /&gt;
   {&lt;br /&gt;
       solarPlant = def;&lt;br /&gt;
       break;&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;
=== Telling the commander to build the solar plant ===&lt;br /&gt;
&lt;br /&gt;
Now, the only thing left to do is to tell the commander that we want it to build the solar plant, and where to place it. In short, we need to give the commander a build command.&lt;br /&gt;
&lt;br /&gt;
We want to give this command only once at the first frame of the game. For this we can use the &amp;lt;code&amp;gt;update()&amp;lt;/code&amp;gt; method, which is called at every frame of the game. All we need to do is overwrite the &amp;lt;code&amp;gt;update(int frame)&amp;lt;/code&amp;gt; method and give the command if the frame is 1. This results in the following code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
@Override&lt;br /&gt;
public int update(int frame)&lt;br /&gt;
{&lt;br /&gt;
    if (frame == 0)&lt;br /&gt;
    {&lt;br /&gt;
        // give command here&lt;br /&gt;
    }&lt;br /&gt;
&lt;br /&gt;
    return 0;&lt;br /&gt;
}&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Commands are issued by invoking the respective method on the &amp;lt;code&amp;gt;Unit&amp;lt;/code&amp;gt; (or &amp;lt;code&amp;gt;Group&amp;lt;/code&amp;gt;). In our case, that&#039;s the &amp;lt;code&amp;gt;build&amp;lt;/code&amp;gt; method, which takes the following arguments:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;UnitDef toBuildUnitDef&amp;lt;/code&amp;gt;: the kind of unit to build&lt;br /&gt;
* &amp;lt;code&amp;gt;AIFLoat3 buildPos&amp;lt;/code&amp;gt;: the location the unit should be built at (in our case, we use the commander&#039;s current position)&lt;br /&gt;
* &amp;lt;code&amp;gt;int facing&amp;lt;/code&amp;gt;: the direction the new unit will be facing (mostly matters for buildings, which can not turn after being constructed)&lt;br /&gt;
* &amp;lt;code&amp;gt;short options&amp;lt;/code&amp;gt;: a set of UnitCommandOptions. 0 means no option.&lt;br /&gt;
* &amp;lt;code&amp;gt;int timeout&amp;lt;/code&amp;gt;: the number of frames after which the command times out. We don&#039;t want a timeout, and therefore specify a suitably high number :-)&lt;br /&gt;
&lt;br /&gt;
Therefore, our command looks like this:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&lt;br /&gt;
    commander.build(solarDef, commander.getPos(), 0, (short) 0, Integer.MAX_VALUE);&lt;br /&gt;
&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
At this point you will want to see if your AI actually works. Export your code to &#039;&#039;Spring/AI/Skirmish/MyJavaAI/SkirmishAI.jar&#039;&#039; and start up a game. Your AI should now build a solar plant at its start position.&lt;br /&gt;
&lt;br /&gt;
===Building a metal extractor===&lt;br /&gt;
Building a metal extractor is slightly more complicated. Assuming you&#039;re not on a metal map, you will need to find a suitable site to place the extractor. Generally, it&#039;s preferable to select a site closest to wherever your construction unit (commander) is located.&lt;br /&gt;
&lt;br /&gt;
Modify your code that got a reference to the solar plant by making the following changes:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
List&amp;lt;UnitDef&amp;gt; unitDefs = this.callback.getUnitDefs(); UnitDef solarPlant = null; for (UnitDef def : unitDefs)&lt;br /&gt;
&lt;br /&gt;
  if (def.getName().equals(&amp;quot;armsolar&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
      solarPlant = def;&lt;br /&gt;
  }&lt;br /&gt;
  else if (def.getName().equals(&amp;quot;armmex&amp;quot;))&lt;br /&gt;
  {&lt;br /&gt;
       metalExtractor=def;&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Again, you will need to create a Unitdef metalExtractor field by where you declared your solarPlant field.&lt;br /&gt;
&lt;br /&gt;
Next, you need a method for determining the distance between two 3D coordinates (since Spring locations are three dimensional). A slightly modified version of a distance function is found below.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
public float calculateDistance(AIFloat3 a, AIFloat3 b)&lt;br /&gt;
    {&lt;br /&gt;
    float xDistance = a.x - b.x;&lt;br /&gt;
    float yDistance = a.y - b.y;&lt;br /&gt;
    float zDistance = a.z - b.z;&lt;br /&gt;
    float totalDistanceSquared = xDistance*xDistance + yDistance*yDistance + zDistance*zDistance;&lt;br /&gt;
    return totalDistanceSquared;&lt;br /&gt;
    } &lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
The above code actually returns the distance squared, but it will work for our purposes. In your init function, you will want to add the following code above the return statement but below the line defining the callback:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
checkForMetal();&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
This will call the following function you need to place in your code:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
public void checkForMetal()&lt;br /&gt;
    {&lt;br /&gt;
    Resource metal=Resource.getInstance(clb, 0);&lt;br /&gt;
    availablemetalspots=clb.getMap().getResourceMapSpotsPositions(metal);&lt;br /&gt;
    if(availablemetalspots.isEmpty())&lt;br /&gt;
        {&lt;br /&gt;
        sendTextMsg(&amp;quot;This is a map with no metal spots&amp;quot;);&lt;br /&gt;
        metalmap=false;&lt;br /&gt;
        }&lt;br /&gt;
    else&lt;br /&gt;
        {metalmap=true;&lt;br /&gt;
        sendTextMsg(&amp;quot;This is a map with metal spots. Listing Values...&amp;quot;);&lt;br /&gt;
        for (AIFloat3 metalspot : availablemetalspots) {&lt;br /&gt;
            sendTextMsg(&amp;quot;Metal Spot at X: &amp;quot;+metalspot.x + &amp;quot;, Y: &amp;quot;+metalspot.y +&amp;quot;, Z: &amp;quot;+metalspot.z);&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;
For the above code to function properly, you will need to create a Boolean named metalmap and a List&amp;lt;AIFloat3&amp;gt; availablemetalspots. You will now have a function set up for calculating distance between two points, and a data structure holding a list of positions of metal spots. The next step is to tie these two together:&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
public AIFloat3 closestMetalSpot(AIFloat3 unitposition)&lt;br /&gt;
    {&lt;br /&gt;
    AIFloat3 closestspot=null;&lt;br /&gt;
    for (AIFloat3 metalspot : availablemetalspots) {&lt;br /&gt;
            if (closestspot==null)&lt;br /&gt;
                {&lt;br /&gt;
                closestspot=metalspot;&lt;br /&gt;
                }&lt;br /&gt;
        else if(calculateDistance(metalspot, unitposition) &amp;lt; calculateDistance(closestspot, unitposition) &amp;amp;&amp;amp; metalspot.hashCode()!=unitposition.hashCode())&lt;br /&gt;
                    {&lt;br /&gt;
                    closestspot=metalspot;&lt;br /&gt;
                    }&lt;br /&gt;
        }&lt;br /&gt;
    availablemetalspots.remove(closestspot);&lt;br /&gt;
    return closestspot;&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;
The above function accepts an AIFloat3 containing the location of your construction unit (commander). It will then find the closest metal spot and return that location. The next step is to have your commander make use of this.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
  if (frame == 600)&lt;br /&gt;
  {&lt;br /&gt;
       if(metalmap){       sendTextMsg(&amp;quot;About to build mex at frame &amp;quot; + frame);&lt;br /&gt;
       AIFloat3 closestspot=closestMetalSpot(commander.getPos());&lt;br /&gt;
       commander.build(metalExtractor, closestspot, 0, (short) 0, Integer.MAX_VALUE);&lt;br /&gt;
  }&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Place the above code in your update() method. When the frame count reaches 600, your commander will start to build a metal extractor at the closest metal spot. The extractor may not be right on top of where the metal spot appears to be, but you can mouse over the extractor to make sure it&#039;s drawing the metal properly.&lt;br /&gt;
&lt;br /&gt;
== Frequently Asked Questions ==&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; What is the difference between &amp;lt;code&amp;gt;unitCreated()&amp;lt;/code&amp;gt; and &amp;lt;code&amp;gt;unitFinished()&amp;lt;/code&amp;gt;?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; The difference is that &amp;lt;code&amp;gt;unitCreated()&amp;lt;/code&amp;gt; is called when construction of a unit starts, while &amp;lt;code&amp;gt;unitFinished()&amp;lt;/code&amp;gt; when construction on the unit has been completed. Any number of things may happen in-between, including the unit under construction being destroyed, so it is important to remember this distinction.&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; Do I have to copy and paste my jar file to the directory in Spring/AI/Skirmish/MyAI/0.1 each time I want to test my AI out?&lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Yes, but it is much easier if you automate the process. In Windows, a simple batch file can be created to move the files over for you. For example&lt;br /&gt;
&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
copy C:\Users\msm8bball\Documents\NetBeansProjects\MyAI\dist\MyAI.jar &amp;quot;C:\Program Files (x86)\Spring\AI\Skirmish\MyAI\0.1&amp;quot;&lt;br /&gt;
&lt;br /&gt;
del &amp;quot;C:\Program Files (x86)\Spring\AI\Skirmish\MyAI\0.1\SkirmishAI.jar&amp;quot;&lt;br /&gt;
rename &amp;quot;C:\Program Files (x86)\Spring\AI\Skirmish\MyAI\0.1\MyAI.jar&amp;quot; SkirmishAI.jar&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
Modify the above code to match your computer&#039;s directories. Place it in a text file and save it as MoveAI.bat. This will create a batch file that you can double click and it will automatically move your AI to the proper location and rename it. You might wish to put a shortcut to this in your Start menu or taskbar. &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;Q:&#039;&#039;&#039; I have problems with the class-loader in my AI, any idea? &lt;br /&gt;
&lt;br /&gt;
&#039;&#039;&#039;A:&#039;&#039;&#039; Each Java AI implementation is loaded by a separate class loader. This is used to load all the AI&#039;s class files and dependency libraries (in the &#039;&#039;jlib&#039;&#039; dir). Some libraries though, use the Thread contexts class loader, instead of the one of the current class. Therefore, if you want to load something from the AI&#039;s own class-path, make sure to let these libraries use the class-path of your AI classes, eg:&lt;br /&gt;
&amp;lt;code&amp;gt;&amp;lt;pre&amp;gt;&lt;br /&gt;
ClassLoader myClassLoader = AIFactory.class.getClassLoader();&lt;br /&gt;
MySpecialUtil msp = new MySpecialUtil();&lt;br /&gt;
msp.setClassLoader(myClassLoader);&lt;br /&gt;
&amp;lt;/pre&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Please do not set this class-loader on the thread with &amp;lt;code&amp;gt;Thread.currentThread().setContextClassLoader(myClassLoader)&amp;lt;/code&amp;gt;, because all AI&#039;s are run in the same Java thread, and therefore this will cause problems.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
== Links ==&lt;br /&gt;
* [[AIInterface:Java|Java AI Interface]]&lt;br /&gt;
* [http://spring.abma.de/doc-Interface-JavaOO/ Javadoc of the Java AI OO Wrapper] (generated in 2014 from source by [[User:Abma|abma]], currently broken)&lt;br /&gt;
* &#039;&#039;&#039;OUTDATED&#039;&#039;&#039; [http://springrts.com/phpbb/download/file.php?id=4970 Netbeans Java Skirmish AI Tutorial] (from [http://springrts.com/phpbb/viewtopic.php?p=448743#p448743 this forum thread])&lt;br /&gt;
* [http://modinfo.adune.nl/index.php?MOD=ba712 ModInfo] (contains a list of units and their short names)&lt;br /&gt;
&lt;br /&gt;
[[Category: AI Dev]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaScripting&amp;diff=2099</id>
		<title>Animation-LuaScripting</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaScripting&amp;diff=2099"/>
		<updated>2015-02-02T10:10:31Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Workflow */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Lua unit animation is implemented partially in the engine, and partially in a Lua gadget which is shipped with Spring in [[springcontent.sdz]]. By default, gadget is not loaded, so a bit of setup is required to enable Lua unit scripts. (In some games, gadget is alredy activated, for example in Zero:k)&lt;br /&gt;
&lt;br /&gt;
To enable Lua unit scripts, create a file &#039;&#039;LuaRules/Gadgets/unit_script.lua&#039;&#039;, and paste the following into it:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|style=&amp;quot;background: #41545c; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
 -- Enables Lua unit scripts by including the gadget from springcontent.sdz&lt;br /&gt;
 &lt;br /&gt;
 -- Uncomment to override the directory which is scanned for *.lua unit scripts.&lt;br /&gt;
 --UNITSCRIPT_DIR = &amp;quot;scripts/&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 return include(&amp;quot;LuaGadgets/Gadgets/unit_script.lua&amp;quot;)&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, do check whether your [http://github.com/spring/spring/blob/master/installer/builddata/springcontent/LuaGadgets/system.lua &#039;&#039;LuaRules/system.lua&#039;&#039;] is up to date, if you copied this verbatim into your game. (Must be from a later date than 5 september 2009)&lt;br /&gt;
&lt;br /&gt;
Now this is done, you can start putting *.lua files in your &#039;&#039;scripts/&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
=== Workflow ===&lt;br /&gt;
&lt;br /&gt;
Lua has the major advantage over BOS/COB that you do not need to compile it, which can reduce the time to develop scripts quite a bit.&lt;br /&gt;
&lt;br /&gt;
To save further time, do not restart Spring for each small change. Simply run Spring in an window so you can easily switch between your editor and Spring, and use &#039;&#039;/cheat&#039;&#039; and &#039;&#039;/luarules reload&#039;&#039; to reload all Lua unit scripts.&lt;br /&gt;
&lt;br /&gt;
To be able to use commands above, unzip your game into directory named &amp;quot;myGame.sdd&amp;quot;, then you can directly change lua scripts (animations etc.) and reload.&lt;br /&gt;
&lt;br /&gt;
Additionally, for Lua unit scripts operating on Assimp models (primarily .dae and .blend), it is possible to do most of your animating in Blender using the [https://github.com/Anarchid/blender2lus blender2lus] export addon.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [http://tvo.github.com/spring/2010/04/19/lus-stumpy.html Stumpy tutorial]&lt;br /&gt;
* [http://tvo.github.com/spring/2010/04/26/lus-stumpy-2.html Polishing the stumpy]&lt;br /&gt;
* [[Animation-LuaCallins]]&lt;br /&gt;
* [[Animation-LuaCallouts]]&lt;br /&gt;
* [[Animation-CobLuaDifferences | comparing Lua and COB unit scripts]]&lt;br /&gt;
* [[SpringTutorialGame]] contains simple  examples unit scripts&lt;br /&gt;
* [[SpringRtsTutorialAnimDef]] examples animation scripts&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* Conversion tool&lt;br /&gt;
* Performance measurements&lt;br /&gt;
* Link to article in piro&#039;s magazine&lt;br /&gt;
* Coordinate system (axis, direction of rotation, picture)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaScripting&amp;diff=2098</id>
		<title>Animation-LuaScripting</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Animation-LuaScripting&amp;diff=2098"/>
		<updated>2015-02-02T10:09:40Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Workflow */ added b2l reference&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;== Getting started ==&lt;br /&gt;
&lt;br /&gt;
=== Setup ===&lt;br /&gt;
&lt;br /&gt;
Lua unit animation is implemented partially in the engine, and partially in a Lua gadget which is shipped with Spring in [[springcontent.sdz]]. By default, gadget is not loaded, so a bit of setup is required to enable Lua unit scripts. (In some games, gadget is alredy activated, for example in Zero:k)&lt;br /&gt;
&lt;br /&gt;
To enable Lua unit scripts, create a file &#039;&#039;LuaRules/Gadgets/unit_script.lua&#039;&#039;, and paste the following into it:&lt;br /&gt;
&lt;br /&gt;
{|border=&amp;quot;0&amp;quot; cellpadding=&amp;quot;4&amp;quot;&lt;br /&gt;
|style=&amp;quot;background: #41545c; border: 1px #aaa solid;&amp;quot;|&lt;br /&gt;
&amp;lt;small&amp;gt;&lt;br /&gt;
 -- Enables Lua unit scripts by including the gadget from springcontent.sdz&lt;br /&gt;
 &lt;br /&gt;
 -- Uncomment to override the directory which is scanned for *.lua unit scripts.&lt;br /&gt;
 --UNITSCRIPT_DIR = &amp;quot;scripts/&amp;quot;&lt;br /&gt;
 &lt;br /&gt;
 return include(&amp;quot;LuaGadgets/Gadgets/unit_script.lua&amp;quot;)&lt;br /&gt;
&amp;lt;/small&amp;gt;&lt;br /&gt;
|}&lt;br /&gt;
&lt;br /&gt;
Also, do check whether your [http://github.com/spring/spring/blob/master/installer/builddata/springcontent/LuaGadgets/system.lua &#039;&#039;LuaRules/system.lua&#039;&#039;] is up to date, if you copied this verbatim into your game. (Must be from a later date than 5 september 2009)&lt;br /&gt;
&lt;br /&gt;
Now this is done, you can start putting *.lua files in your &#039;&#039;scripts/&#039;&#039; folder.&lt;br /&gt;
&lt;br /&gt;
=== Workflow ===&lt;br /&gt;
&lt;br /&gt;
Lua has the major advantage over BOS/COB that you do not need to compile it, which can reduce the time to develop scripts quite a bit.&lt;br /&gt;
&lt;br /&gt;
To save further time, do not restart Spring for each small change. Simply run Spring in an window so you can easily switch between your editor and Spring, and use &#039;&#039;/cheat&#039;&#039; and &#039;&#039;/luarules reload&#039;&#039; to reload all Lua unit scripts.&lt;br /&gt;
&lt;br /&gt;
To be able to use commands above, unzip your game into directory named &amp;quot;myGame.sdd&amp;quot;, then you can directly change lua scripts (animations etc.) and reload.&lt;br /&gt;
&lt;br /&gt;
Additionally, for Lua unit scripts operating on Assimp models (primarily .dae and .blend), it is possible to do most of your animating in Blender using the blender2lus[https://github.com/Anarchid/blender2lus] export addon.&lt;br /&gt;
&lt;br /&gt;
== Further reading ==&lt;br /&gt;
* [http://tvo.github.com/spring/2010/04/19/lus-stumpy.html Stumpy tutorial]&lt;br /&gt;
* [http://tvo.github.com/spring/2010/04/26/lus-stumpy-2.html Polishing the stumpy]&lt;br /&gt;
* [[Animation-LuaCallins]]&lt;br /&gt;
* [[Animation-LuaCallouts]]&lt;br /&gt;
* [[Animation-CobLuaDifferences | comparing Lua and COB unit scripts]]&lt;br /&gt;
* [[SpringTutorialGame]] contains simple  examples unit scripts&lt;br /&gt;
* [[SpringRtsTutorialAnimDef]] examples animation scripts&lt;br /&gt;
&lt;br /&gt;
== TODO ==&lt;br /&gt;
&lt;br /&gt;
* Conversion tool&lt;br /&gt;
* Performance measurements&lt;br /&gt;
* Link to article in piro&#039;s magazine&lt;br /&gt;
* Coordinate system (axis, direction of rotation, picture)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
[[Category:Animation]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Gamedev:WeaponDefs&amp;diff=8789</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=8789"/>
		<updated>2014-12-15T19:12:56Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Collision &amp;amp; Avoidance */  debunk collisionSize&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 each frame.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = intensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.9 (0.2 for [[#Cannon]])&lt;br /&gt;
|description = Alpha transparency for non-3D model projectiles. Lower values are more opaque, but &amp;lt;code&amp;gt;0.0&amp;lt;/code&amp;gt; will cause the projectile to disappear entirely.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = model&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of a 3D model to use when rendering the projectile. Note that only the root piece of a projectile model is rendered. Currently only for [[#Cannon]], [[#LaserCannon]], [[#MissileLauncher]], [[#StarburstLauncher]] and [[#TorpedoLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionScar&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the weapon&#039;s explosion leave a scar decal on the ground? For all types except [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = alwaysVisible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the weapon is always rendered regardless of whether or not it is in LOS range of a player&#039;s units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = rgbColor&lt;br /&gt;
|type = float[3]&lt;br /&gt;
|default = {1.0, 0.0, 0.0} (See Description)&lt;br /&gt;
|description = The primary colour for sprite rendering weapons. Additional defaults are as follows:&lt;br /&gt;
* [[#Cannon]] - &amp;lt;code&amp;gt;{1.0, 0.5, 0.0}&amp;lt;/code&amp;gt;&lt;br /&gt;
* [[#EmgCannon]] - &amp;lt;code&amp;gt;{0.9, 0.9, 0.2}&amp;lt;/code&amp;gt;&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = explosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn as the weapon&#039;s explosion. Does not currently work for [[#Melee]] and [[#Rifle]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = bounceExplosionGenerator&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = For weapons which can use {{taglink|groundBounce|true}}, the name of a [[CEG]], with &amp;lt;code&amp;gt;custom:&amp;lt;/code&amp;gt; prefix, to spawn when weapon the bounces.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture1&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The projectile texture for [[#AircraftBomb]], [[#Cannon]], [[#EmgCannon]], [[#Flame]]; beam texture for [[#LaserCannon]], [[#BeamLaser]], [[#LightningCannon]]; flare texture for [[#MissileLauncher]], [[#StarburstLauncher]] and dome texture for the [[#Shield]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture2&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The end-of-beam texture for [[#LaserCannon]], [[#BeamLaser]] and {{taglink|smoketrail}} texture for [[#MissileLauncher]], [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture3&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]], or muzzle texture if {{taglink|largeBeamLaser|true}}. Also used as the flame texture for [[#StarburstLauncher]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = texture4&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = Flare texture for [[#BeamLaser]] with {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===AircraftBomb===&lt;br /&gt;
Drops a ballistic projectile at the same movement vector as the unit itself. Intended only for aircraft. Visually drawn as a billboarded sprite as used by the [[#Cannon]], but more commonly used with a 3D model.&lt;br /&gt;
&lt;br /&gt;
There are no tags specific to this &#039;&#039;&#039;WeaponType&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
====AircraftBomb Visuals====&lt;br /&gt;
&lt;br /&gt;
When not using a {{taglink|model}}, the AircraftBomb is the same as [[#Cannon Visuals]].&lt;br /&gt;
&lt;br /&gt;
===BeamLaser===&lt;br /&gt;
An instant-hit weapon which spawns a beam and does a portion of its total damage each frame. Cannot be [[Animation-LuaCallouts#Effects|script emitted]] if it has a {{taglink|beamTime}} longer than one frame. Visually drawn as a [http://en.wikipedia.org/wiki/Star_Trek Star Trek] Phaser-style laser weapon. The {{taglink|largeBeamLaser}} tag allows changing the visual effect of the laser, such as using a tileable, scrolling texture without changing the behaviour.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = minIntensity&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = The minimum percentage the weapon&#039;s damage can fall-off to over its range. Setting to &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt; will disable fall off entirely. Unrelated to the visual-only {{taglink|intensity}} tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How long in seconds to fire the laser before waiting for {{taglink|reloadTime}} to start. Damage is distributed over the duration of the {{taglink|beamTime}}, and the weapon will aim to hit the target when the beam is in the middle of its {{taglink|beamTime}} (i.e. using prediction).&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamBurst&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser fire a burst of beams that are all aimed towards the target (instead of aimed with the piece). A [[#BeamLaser]] can do its full damage with every shot if {{taglink|beamBurst}} is enabled. Disables {{taglink|beamTime}} in favour of the [[#Bursts|burst tags]].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = sweepFire&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Makes the laser continue firing while it aims for a new target, &#039;sweeping&#039; across the terrain. Reimplemented in 95.0, still has no script interaction so use with care. Respects {{taglink|reloadTime}} constraint but not much else.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
====BeamLaser Visuals====&lt;br /&gt;
&lt;br /&gt;
See also {{taglink|thickness}} and {{taglink|coreThickness}}.&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamTTL&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = The time in frames for which the laser beam remains visible.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = beamDecay&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = How fast the beam fades out. Each frame the {{taglink|intensity}} is multiplied by this value.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = laserFlareSize&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 15.0&lt;br /&gt;
|description = Determines the size of the firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = largeBeamLaser&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Changes the visual effect allowing tiling and scrolling of the texture and a pulsating firing flare.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = tileLength&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 200.0&lt;br /&gt;
|description = Defines the length before the texture used is repeated (tiled). Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = scrollSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 5.0&lt;br /&gt;
|description = Controls how fast the texture scrolls. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = pulseSpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 1.0&lt;br /&gt;
|description = Controls how fast the pulsating effect at the start of the beam is. Only if {{taglink|largeBeamLaser|true}}.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Cannon===&lt;br /&gt;
The default &#039;&#039;&#039;WeaponType&#039;&#039;&#039;. Fires a ballistic projectile, for the best result (without under/overshooting) the {{taglink|weaponVelocity}} should be set so as to give an elevation of 45Â° when firing at the maximum {{taglink|range}}. Substituting the angle into the [http://en.wikipedia.org/wiki/Trajectory#Range_and_height trajectory equation] 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>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_MoveCtrl&amp;diff=11388</id>
		<title>Lua MoveCtrl</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Lua_MoveCtrl&amp;diff=11388"/>
		<updated>2014-06-30T13:25:20Z</updated>

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

		<summary type="html">&lt;p&gt;Anarchid: /* Scripting And Unit Stats files */  STARTED A REVOLUTION IN SPRING ANIMATION WORKFLOW&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
A Comprehensive list of tools to make Spring content.&lt;br /&gt;
&lt;br /&gt;
*Those that are Open Source are marked with a &amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&lt;br /&gt;
*Those that are Free are marked with a &amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&lt;br /&gt;
*Those that Cost are marked with a &amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
=== Image Editing ===&lt;br /&gt;
# &#039;&#039;&#039;[http://krita.org/ Krita]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt; digital painting application, cross platform, with 16bit image support.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.gimp.org Gimp]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&lt;br /&gt;
# &#039;&#039;&#039;[http://www.adobe.com/products/photoshop/main.html Adobe Photoshop]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; The most widely used image editing program ever.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.getpaint.net Paint.NET]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Basically an expanded version of Paint. Contains many functions such as layers, and is much easier to use then The Gimp.&lt;br /&gt;
&lt;br /&gt;
=== 3d Modeling ===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;[http://blender.org Blender]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;FREE-&amp;gt; The most used open-source modeller that has its own way of doing things.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.wings3d.com/ Wings 3D]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;FREE-&amp;gt; Probably the most popular modeller for Spring.&amp;lt;br&amp;gt;-&amp;gt; Easy to learn modelling and UV mapping environments.&amp;lt;br&amp;gt;-&amp;gt; Excellent introduction to using it can be found [http://www.wings3d.com/doghouse.php here]. &amp;lt;br&amp;gt;-&amp;gt; For help on how to UV map with it just ask around.low poly&lt;br /&gt;
# &#039;&#039;&#039;[http://www.anim8or.com/main/index.html Anim8or]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;[http://www.autodesk.com/products/autodesk-3ds-max/overview 3DS MAX]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; The most widely used and acclaimed modelling program ever. Used in creation of many games and movies (The Matrix). One of the three major modelling programs used by professionals.&amp;lt;br&amp;gt;-&amp;gt; The s3o plugin for 3DS MAX can be found here. NOTE: This is not backwards compatible with versions prior to 7. Also this only exports: &#039;&#039;&#039;[http://taspring.clan-sy.com/temp/s3oexport.dle broken link fix if possible]&#039;&#039;&#039;&lt;br /&gt;
# &#039;&#039;&#039;[https://www.lightwave3d.com Lightwave]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; A popular modelling program that&#039;s been around a long time. One of the three major modelling programs used by professionals.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.rhino3d.com/ Rhinoceros]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Uses a lot of nurbs surfaces. &lt;br /&gt;
# &#039;&#039;&#039;[http://www.turbosquid.com/gmax GMAX]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Great for learning as it is 3DS MAX v4 without rendering and has game packs for a fair amount of games. It is locked in exporting however there are a few workarounds.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.autodesk.com/products/autodesk-maya/overview MAYA]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; The other most widely used and acclaimed modeling program. Used in creation of many games and movies. One of the three major model programs used by professionals.&lt;br /&gt;
&lt;br /&gt;
===3d Model converters/Assemblers===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;[[upspring|UpSpring]]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Help, information, manual and tips can be found here: &#039;&#039;&#039;[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2839&amp;amp;start=0 Forum]&amp;lt;br&amp;gt;-&amp;gt; This is the only other way to get files into the [[About_s3o|s30]] file format for Spring other then the [[About_s3o|s30]] plugin for 3DS MAX.&lt;br /&gt;
# &#039;&#039;&#039;[http://springrts.com/phpbb/viewtopic.php?f=9&amp;amp;t=28156 S30 &amp;lt;-&amp;gt; OBJ Converter]&#039;&#039;&#039;&lt;br /&gt;
&lt;br /&gt;
===Sound/Audio Editors and Recorders===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;[http://audacity.sourceforge.net/ Audacity]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Audacity is a free, easy-to-use audio editor and recorder for Windows, Mac OS X, GNU/Linux, and other operating systems.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.goldwave.com/ GoldWave]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; GoldWave is a commercial digital audio editing software developed by GoldWave Inc for Windows. It was first released to public in April 1993, and is similar to applications like the open source Audacity.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.sonycreativesoftware.com/products/soundforgefamily.asp Sound Forge]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; The Sound Forge is an digital audio production suite includes everything you need to quickly get from raw audio to finished master. Use this suite to create and edit stereo and multichannel audio files with speed and precision. Efficiently analyze, record and edit audio, digitize and restore old recordings, model acoustic environments, design sound for multimedia, and master replication-ready CDs.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.speech.kth.se/wavesurfer/ WaveSurfer]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Wavesurfer is an audio editor widely used for studies of acoustic phonetics. Wavesurfer provides basic audio editing operations, such as excision, copying, pasting, zero-crossing adjustment, and effects such as fading, normalization, echo, inversion, reversal, replacement with silence, and DC-removal, but, in view of its scientific orientation, does not offer effects of interest to musicians such as flange.&lt;br /&gt;
&lt;br /&gt;
=== Scripting And Unit Stats files ===&lt;br /&gt;
# &#039;&#039;&#039;[http://springfiles.com/spring/tools/scriptor-v1 Scriptor]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; The by far best compiler for your handmade .bos scripts into endless lines of letters and numbers that the TA engine reads. The program is large, easy to operate and with broad error tracing (well, better than the other two alternatives). While other versions of this program sometimes refuse to compile on-off functions, this download is guaranteed to work in every condition.&lt;br /&gt;
# &#039;&#039;&#039;[http://springfiles.com/spring/tools/cobbler-v4 Cobbler]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; This is a very simple script compiler that converts your newly written .bos files understood by humans into a hexadecimal .cob gibberish used by the TA engine. Beware, however, that this program may fail to compile some perfectly valid scripts and it doesn&#039;t always tell where the alleged error lies either. Parts of the program are in French.&lt;br /&gt;
# &#039;&#039;&#039;[http://springrts.com/phpbb/viewtopic.php?f=9&amp;amp;t=24702&amp;amp;p=460639 Servo]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Rhad&#039;s awesome but somewhat buggy animation scripting program. It features keyframed animation script generation from a 3D positioner.&lt;br /&gt;
# &#039;&#039;&#039;[https://github.com/Anarchid/blender2lus blender2lus]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; A Blender addon that allows Spring lua unitscripts (for assimp models only) to be authored in Blender, with (almost) all the goodies involved therein.&lt;br /&gt;
# &#039;&#039;&#039;[http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=25104 Spring Poser by knorke]&#039;&#039;&#039;  A not-yet-so-usefull gadget-widget-unitscript brewage that allows you to &amp;quot;pose&amp;quot; units by moving &amp;amp; rotating their pieces. It can then save the posed position as a list of Move &amp;amp; Turn commands.&lt;br /&gt;
# &#039;&#039;&#039;[http://springrts.com/phpbb/viewtopic.php?f=23&amp;amp;t=24499 CEG Browser/Spawn by CarRepairer]&#039;&#039;&#039; Spawn particle effects from a menu, ie if you want to reuse effects from another game.&lt;br /&gt;
# &#039;&#039;&#039;[http://springrts.com/phpbb/viewtopic.php?f=23&amp;amp;t=25847 piece tree widget]&#039;&#039;&#039; Print an ascii view of a units piece hierachy. Might be usefull to create notes for scripting.&lt;br /&gt;
# &#039;&#039;&#039;[http://springrts.com/phpbb/viewtopic.php?f=67&amp;amp;t=23391 bos2lua converter page by CarRepairer]&#039;&#039;&#039; Converts .bos scripts to .lua scripts.&lt;br /&gt;
# &#039;&#039;&#039;[[ToolBox]]&#039;&#039;&#039; A game-mutator with some tools for modding. Contains newest version of some of the above scripts plus others.&lt;br /&gt;
&lt;br /&gt;
=== Map Creation ===&lt;br /&gt;
&lt;br /&gt;
# &#039;&#039;&#039;[[Maps:SpringMapEdit|SpringMapEdit]]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Our very own complete map making solution, created by Frostregen.&lt;br /&gt;
# &#039;&#039;&#039;[http://www.springfiles.com/show_file.php?id=2441 Beherith&#039;s mapconv]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; The latest map compiler, supports all features of maps while still retaining backwards compatibility with previous scripts. &lt;br /&gt;
# &#039;&#039;&#039;[http://taspring.clan-sy.com/phpbb/viewtopic.php?t=2420 SMD Creator]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;red&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Maelstroms SMD creator&lt;br /&gt;
# &#039;&#039;&#039;[http://www.bundysoft.com/L3DT/ L3DT Large 3D Terrain Generator]&#039;&#039;&#039;&amp;lt;font color=&amp;quot;blue&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;font color=&amp;quot;green&amp;quot;&amp;gt;*&amp;lt;/font&amp;gt;&amp;lt;br&amp;gt;-&amp;gt; Commercial Map Maker, standard version is free, but pro version requires payment but includes all the tools required to make an SD7 Spring map from scratch.&lt;br /&gt;
#  &#039;&#039;&#039;[http://code.google.com/p/conflictterra/wiki/MapsAndRocks#Coordinate_Helper_Widget Coordinate helper widget]&#039;&#039;&#039; Need to find lots of coordinates, for example to position units? Log the coordinates into a file just by placing markers, no more pen&amp;amp;paper!&lt;br /&gt;
#  &#039;&#039;&#039;[http://www.world-machine.com/ World Machine]&#039;&#039;&#039; Commercial terrain generation software, can output height and diffuse textures.&lt;br /&gt;
#  &#039;&#039;&#039;[http://en.wikipedia.org/wiki/Bryce_(software) Bryce3D]&#039;&#039;&#039; Shareware terrain generation software.&lt;br /&gt;
#  &#039;&#039;&#039;[http://en.wikipedia.org/wiki/Carrara_(software) Carrara]&#039;&#039;&#039; Shareware 3D software.&lt;br /&gt;
&lt;br /&gt;
[[Category:Development]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2153</id>
		<title>Assimp</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Assimp&amp;diff=2153"/>
		<updated>2013-02-19T16:48:43Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Blender Workflow Tutorial */  addzored rx-90 mega hax&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; [[Game_and_Unit_development|Game Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
== Blender Workflow Tutorial ==&lt;br /&gt;
&lt;br /&gt;
This is a stub containing a simple outline of a Blender workflow. Disclaimer: I&#039;m not modeling expert, there may be a better way to do this.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# Open an existing Blender model or import a different format through the File menu (File &amp;gt; Import).&lt;br /&gt;
# In the 3D view, drag out the secret panel from the right.&lt;br /&gt;
# In that panel, select Display &amp;gt; Shading &amp;gt; GLSL.&lt;br /&gt;
# Make sure you have a lamp in your scene while in this mode or your model will be dark.&lt;br /&gt;
# Applying texture: &lt;br /&gt;
## In the UV/Image editor, click the image icon (Tooltip: Browse Image to be linked) to select your texture. If it&#039;s not there, click on Image &amp;gt; Open Image to browse for it.&lt;br /&gt;
## In the 3D View, select (right-click) your object and hit Tab to enter Mesh Mode.&lt;br /&gt;
## Hit A to select all your faces.&lt;br /&gt;
## In the 3D View, hit A to select all the faces there and select your image with the image icon. Assuming there&#039;s a UVMap, you should see your texture.&lt;br /&gt;
## If you don&#039;t see any faces you&#039;ll need to add the UVMap to a new texture:&lt;br /&gt;
### In the Properties view click on Textures (checkerboard icon).&lt;br /&gt;
### Click on Add New Texture (plus icon).&lt;br /&gt;
### Select Type = Image or Movie.&lt;br /&gt;
### Under Image, click on the image icon and choose your image file.&lt;br /&gt;
### Under Mapping, select Coordinates = UV.&lt;br /&gt;
### Under Influence &amp;gt; Diffuse, check Color and make sure it&#039;s 1.00.&lt;br /&gt;
## To add a normalmap:&lt;br /&gt;
### Repeat steps 5.1 to 5.5.&lt;br /&gt;
### Under Image Sampling, check Normal Map.&lt;br /&gt;
### Under Influence &amp;gt; Geometry, check Normal. Make sure it.s 1.00.&lt;br /&gt;
## You&#039;ll need to do this for each piece.&lt;br /&gt;
# Piece hierarchy:&lt;br /&gt;
## Select piece A, hold shift and select piece B. Hit Ctrl+P and it will make piece A a child of piece B.&lt;br /&gt;
## Make sure all the pieces are descending from one single piece.&lt;br /&gt;
# Setting piece origins:&lt;br /&gt;
## Select a piece.&lt;br /&gt;
## Place the 3D cursor where you want the origin to be (left-click).&lt;br /&gt;
## Click on Object &amp;gt; Transform &amp;gt; Origin to 3D Cursor.&lt;br /&gt;
## You can now rotate your pieces:&lt;br /&gt;
### Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select Individual Origins.&lt;br /&gt;
### Rotate.&lt;br /&gt;
## Do this for all your pieces.&lt;br /&gt;
# Preparing for Spring:&lt;br /&gt;
## Select your root piece.&lt;br /&gt;
## Press Shift-C to put the 3D cursor in the center of the world.&lt;br /&gt;
## Click on the dropdown &amp;quot;Pivot Center for Rotation/Scaling&amp;quot; and select 3D Cursor.&lt;br /&gt;
## Rotate your whole model so that it&#039;s -90 degrees. You can do this by typing &amp;quot;R X -90&amp;quot;. This will make your model lie on its back.&lt;br /&gt;
## Click Object &amp;gt; Apply &amp;gt; Rotation &amp;amp; Scale.&lt;br /&gt;
# Save your model.&lt;br /&gt;
# Select all the pieces of your model, ignore the lamp.&lt;br /&gt;
# Click on File &amp;gt; Export &amp;gt; Collada.&lt;br /&gt;
# Check &amp;quot;Export Only Selected&amp;quot; and export.&lt;br /&gt;
# The dae file will be used as your object.&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
	<entry>
		<id>https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Game_and_Unit_development&amp;diff=8080</id>
		<title>Game and Unit development</title>
		<link rel="alternate" type="text/html" href="https://springrts-wiki.p2004a.com/mediawiki/index.php?title=Game_and_Unit_development&amp;diff=8080"/>
		<updated>2012-07-23T07:00:09Z</updated>

		<summary type="html">&lt;p&gt;Anarchid: /* Modeling */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;[[Engine_Development|Development]] &amp;lt; {{FULLPAGENAME}}&lt;br /&gt;
&lt;br /&gt;
=Game development=&lt;br /&gt;
This information is meant to help newcomers learn how to develop their own games for the Spring Engine.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
==General==&lt;br /&gt;
* [[Map,_Mod,_And_Unit_Development_Programs|Development Tools]]&lt;br /&gt;
*[[Game structure]]&amp;lt;br /&amp;gt;&lt;br /&gt;
*[[Game specification|Game specification]]&amp;lt;br /&amp;gt;&lt;br /&gt;
*[http://answers.springlobby.info/ Q&amp;amp;A Site for the Spring Engine]&lt;br /&gt;
*[http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=26409| Porting TA content to Spring]&lt;br /&gt;
&lt;br /&gt;
==Resources==&lt;br /&gt;
*[[General_Resources|Free Assets]]&lt;br /&gt;
*[[SpringTutorialGame|Spring Tutorial Game]] - (attempt to create) a &amp;quot;template game&amp;quot; for new projects.&lt;br /&gt;
*[[LUPS]]&lt;br /&gt;
*[[Chili]]&lt;br /&gt;
*[[IceUI]]&lt;br /&gt;
*[[RedUI]]&lt;br /&gt;
*[[LOLUI]]&lt;br /&gt;
*[[Map Making: Feature Placer|Feature Placer]]&lt;br /&gt;
&lt;br /&gt;
==Reference==&lt;br /&gt;
*UnitDefs (.fbi, .lua)&lt;br /&gt;
**[[Units-UnitDefs|UnitDefs]] - define the attributes of units&lt;br /&gt;
**[[Unit_Categories]] - define which weapon type aim at which targets&lt;br /&gt;
**[[Unit_collision_volumes | Unit Collision Volumes]] - collision detection&lt;br /&gt;
*WeaponDefs (.tdf, .lua)&lt;br /&gt;
**[[Weapon Variables]] : This is the most up to date&lt;br /&gt;
**[[Units:WeaponMainDir]]&lt;br /&gt;
**[[Weapons:Antinukes]]: All about antinukes.&lt;br /&gt;
*MoveDefs*&lt;br /&gt;
**[[Units:MoveTypes]]&lt;br /&gt;
*FeatureDefs (objects on the map, wrecks of destroyed units)&lt;br /&gt;
**[[Units-FeatureDefs]]&lt;br /&gt;
*Global game variables (modrules.lua)&lt;br /&gt;
**[[Modrules.lua]]&lt;br /&gt;
*[[CEG]] Particle effects (explosions etc)&lt;br /&gt;
&lt;br /&gt;
*Misc&lt;br /&gt;
**[[VirtualFileSystem]]&lt;br /&gt;
**[[MouseCursors]]&lt;br /&gt;
**[[Units:Textures]]&lt;br /&gt;
**[[Units:Buildpics]]&lt;br /&gt;
**[[Sidedata.lua]]&lt;br /&gt;
**[[Units:FlankingBonus]]&lt;br /&gt;
**[[Armordefs.lua|Units: Armor classes]]&lt;br /&gt;
**[[Mod Development:Archives|Game Development:Archives]]&lt;br /&gt;
**[[Mod Development:Sidepics|Game Development:Sidepics]]&lt;br /&gt;
**[[CustomUnitIcons|Game Development:Custom unit icons]]&lt;br /&gt;
&lt;br /&gt;
=Unit Scripting/Animations (.cob, .bos, .lua)=&lt;br /&gt;
Unit scripts animate units and are needed for various function such as firing weapons.&lt;br /&gt;
* [[Animation-CobLuaDifferences | Differences of .lua and .cob unit scripts]]&lt;br /&gt;
&lt;br /&gt;
==Lua Animations==&lt;br /&gt;
*[[Animation-LuaScripting]]&lt;br /&gt;
**[[Animation-LuaCallins]]&lt;br /&gt;
**[[Animation-LuaCallouts]]&lt;br /&gt;
**[[Animation-CobLuaDifferences]]&lt;br /&gt;
&lt;br /&gt;
==COB Animations==&lt;br /&gt;
The binary &#039;.cob&#039; file format is a compiled &#039;.bos&#039; script. To convert a &#039;.bos&#039; script file to &#039;.cob&#039; file you will need [[Scriptor]]&lt;br /&gt;
&lt;br /&gt;
*[[Animation-CobOverview]]&lt;br /&gt;
**[[Animation-CobExamples]]&lt;br /&gt;
**[[Animation-CobAnimation]]&lt;br /&gt;
**[[Animation-CobCallins]]&lt;br /&gt;
**[[Animation-CobConstants]]&lt;br /&gt;
**[[Animation-CobThreads]]&lt;br /&gt;
**[[Animation-CobHitByWeaponID]]&lt;br /&gt;
*[[Units:LuaCOB]] - how to interface COB with LUA&lt;br /&gt;
*[[CEG_For_Units|Game Development:Calling basic CEGs from COB]]&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?p=132943#132943 GPL-compliant sourcecode, scripting code examples, and other things.]&lt;br /&gt;
&lt;br /&gt;
=Modeling =&lt;br /&gt;
Spring supports different 3d representations: &#039;[[About_s3o|.s3o]]&#039; and &#039;[[About_3do|.3do]]&#039;, and additionally a variety of common model formats as supported by the ASSIMP library. The biggest difference between these formats is the workflow to create a new unit. There are also s3o exporter plugins for &#039;3ds-max&#039; and an older version of &#039;blender&#039; so that texturing and modeling can be done using these.&lt;br /&gt;
In contrast: when you model an &#039;.3do&#039; you have to use [[upspring]] currently.&lt;br /&gt;
&lt;br /&gt;
The animation with can either be done using &#039;lua&#039; or &#039;COB/BOS&#039; is does not depend on either, see rigging/animation. For new units use &#039;lua&#039; scripting.&lt;br /&gt;
&lt;br /&gt;
=Engine Related=&lt;br /&gt;
* [[Download_Testing]] - Test the compatibility of your game on upcoming versions of the Spring engine.&lt;br /&gt;
&lt;br /&gt;
=Tutorials=&lt;br /&gt;
===Game Development Tutorials===&lt;br /&gt;
*[[The Complete Guide To Making A Spring Game]] - A fairly comprehensive getting started tutorial.&lt;br /&gt;
*[http://springrts.com/phpbb/viewtopic.php?f=14&amp;amp;t=26409| Porting TA content to Spring]&lt;br /&gt;
*&amp;lt;strike&amp;gt;[[Simple Mod Tutorial|Simple Game Tutorial]]&amp;lt;/strike&amp;gt; - needs to be updated&lt;br /&gt;
&lt;br /&gt;
===Modeling Tutorials===&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?t=10612 Wings UV Mapping Tutorial]&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?f=9&amp;amp;t=12354 Saving polygons in Wings3d Tutorial]&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?t=10503 Runecrafter&#039;s 3DS Max UV Mapping Tutorial]&lt;br /&gt;
&lt;br /&gt;
===Texture Tutorials===&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?f=57&amp;amp;t=22392 DDS Textures:  How To]&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?t=10947 Greeble Tutorial 1]&lt;br /&gt;
* [http://springrts.com/phpbb/viewtopic.php?f=9&amp;amp;t=12356 Greeble Tutorial 2]&lt;br /&gt;
&lt;br /&gt;
[[Category: Unit_development]]&lt;br /&gt;
[[Category:Game development]]&lt;/div&gt;</summary>
		<author><name>Anarchid</name></author>
	</entry>
</feed>