<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Gamedev%3AFeatureDefs</id>
	<title>Gamedev:FeatureDefs - Revision history</title>
	<link rel="self" type="application/atom+xml" href="https://www.fightorder.net/wiki/index.php?action=history&amp;feed=atom&amp;title=Gamedev%3AFeatureDefs"/>
	<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Gamedev:FeatureDefs&amp;action=history"/>
	<updated>2026-04-21T02:30:35Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.44.2</generator>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=Gamedev:FeatureDefs&amp;diff=603&amp;oldid=prev</id>
		<title>Qrow: 1 revision imported</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Gamedev:FeatureDefs&amp;diff=603&amp;oldid=prev"/>
		<updated>2025-11-13T02:24:12Z</updated>

		<summary type="html">&lt;p&gt;1 revision imported&lt;/p&gt;
&lt;table style=&quot;background-color: #fff; color: #202122;&quot; data-mw=&quot;interface&quot;&gt;
				&lt;tr class=&quot;diff-title&quot; lang=&quot;en&quot;&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;← Older revision&lt;/td&gt;
				&lt;td colspan=&quot;1&quot; style=&quot;background-color: #fff; color: #202122; text-align: center;&quot;&gt;Revision as of 19:24, 12 November 2025&lt;/td&gt;
				&lt;/tr&gt;&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-notice&quot; lang=&quot;en&quot;&gt;&lt;div class=&quot;mw-diff-empty&quot;&gt;(No difference)&lt;/div&gt;
&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;</summary>
		<author><name>Qrow</name></author>
	</entry>
	<entry>
		<id>https://www.fightorder.net/wiki/index.php?title=Gamedev:FeatureDefs&amp;diff=602&amp;oldid=prev</id>
		<title>interwiki&gt;Flozi: /* Sub Tables */ here also</title>
		<link rel="alternate" type="text/html" href="https://www.fightorder.net/wiki/index.php?title=Gamedev:FeatureDefs&amp;diff=602&amp;oldid=prev"/>
		<updated>2017-12-22T09:45:56Z</updated>

		<summary type="html">&lt;p&gt;&lt;span class=&quot;autocomment&quot;&gt;Sub Tables: &lt;/span&gt; here also&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;==Location==&lt;br /&gt;
FeatureDef files are .lua files stored in the &amp;lt;code&amp;gt;Features/&amp;lt;/code&amp;gt; directory of a Spring Game.&lt;br /&gt;
&lt;br /&gt;
==Purpose==&lt;br /&gt;
FeatureDef files have one purpose; to define the properties of features. They are the main description file for what attributes your features should have and how units interact with them.&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/Features/FeatureHandler.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 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 FeatureDef table the internal &amp;lt;code&amp;gt;featureName&amp;lt;/code&amp;gt; desired for the unit.&lt;br /&gt;
&lt;br /&gt;
===General===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = description&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = This is the tooltip description of the feature seen by the player.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = damage&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much damage this feature can take before being destroyed. Analogous to {{xtaglink|Gamedev:UnitDefs|maxDamage}} for units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = featureDead&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The &amp;lt;code&amp;gt;featureName&amp;lt;/code&amp;gt; of the feature to spawn when this feature is destroyed. Used to make chains of features which &amp;#039;disintegrate&amp;#039; as they are further damaged. Analogous to {{xtaglink|Gamedev:UnitDefs|corpse}} for units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = indestructible&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Can the feature be destroyed or not? If &amp;lt;code&amp;gt;true&amp;lt;/code&amp;gt; the feature will not even take damage.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = flammable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false (true for engine trees)&lt;br /&gt;
|description = Can the feature be set on fire? The size of the flame particle is determined by the model radius. The duration of the fire in [[frames]] is a random number in the range [200, 230].&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = noSelect&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 cursor won&amp;#039;t change to `reclaim` when hovering the feature.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = mass&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.4 * metal + 0.1 * damage&lt;br /&gt;
|description = The mass of the feature, used in unit/feature crushing calculations (See [[Movedefs.lua]]). Minimum value is &amp;lt;code&amp;gt;1.0&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = crushResistance&lt;br /&gt;
|type = float&lt;br /&gt;
|default = mass&lt;br /&gt;
|special ={{new|85.0}}&lt;br /&gt;
|description = How resistant is the feature to being crushed? Any [[Movedefs.lua|&amp;#039;&amp;#039;&amp;#039;MoveClass&amp;#039;&amp;#039;&amp;#039;]] with a {{xtaglink|Movedefs.lua|crushStrength}} greater than this will crush the feature.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Visual===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = object&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|lua = modelname&lt;br /&gt;
|description = The filename of the 3D model file for this unit, assumes &amp;lt;code&amp;gt;Objects3D/&amp;lt;/code&amp;gt; directory. Analagous to {{xtaglink|Gamedev:UnitDefs|objectName}} for units.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = smokeTime&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 300&lt;br /&gt;
|description = How many frames a corpse feature should emit smoke for after unit death.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = drawType&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 0&lt;br /&gt;
|description = What kind of drawing type is the feature. Can be &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - A loaded model, &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - Nothing rendered for this feature at all (used for geovents), values &amp;gt;= &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; are used for the engine default trees. Generally speaking you should ignore this tag.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Reclaim &amp;amp; Resources===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true if not {{taglink|indestructible}}, false otherwise&lt;br /&gt;
|description = Can this feature be reclaimed by a construction unit?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = autoReclaimable&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = reclaimable&lt;br /&gt;
|description = Should this feature be reclaimed by a construction unit executing a patrol or area-reclaim command?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = reclaimTime&lt;br /&gt;
|type = float&lt;br /&gt;
|default = (metal + energy) * 6.0&lt;br /&gt;
|description = The time taken to reclaim this feature. Related to unit {{xtaglink|Gamedev:UnitDefs|reclaimSpeed}} such that &amp;lt;code&amp;gt;Time taken to reclaim = feature reclaimTime / unit reclaimSpeed&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = metal&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much metal resource this feature gives the player when reclaimed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = energy&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.0&lt;br /&gt;
|description = How much energy resource this feature gives the player when reclaimed.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = resurrectable&lt;br /&gt;
|type = int&lt;br /&gt;
|default = -1&lt;br /&gt;
|description = Can this feature be resurrected back into a living unit? Can be the following values &amp;lt;code&amp;gt;-1&amp;lt;/code&amp;gt; - Only resurrectable if it is the 1st level {{xtaglink|Gamedev:UnitDefs|corpse}} of the [[Gamedev:UnitDefs|UnitDef]], &amp;lt;code&amp;gt;0&amp;lt;/code&amp;gt; - Not resurrectable, &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt; - Always ressurrectable.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = geoThermal&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special={{new|83.0}}&lt;br /&gt;
|description = Does this feature act as a geothermal vent?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Placement===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How wide the feature is in footprint units, left to right. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = footprintZ&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 1&lt;br /&gt;
|description = How wide the feature is in footprint units, top to bottom. 1 footprint unit = 16 [[elmo]]s. Cannot be below &amp;lt;code&amp;gt;1&amp;lt;/code&amp;gt;.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = blocking&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = true&lt;br /&gt;
|description = Does this feature block the movement of units or can they pass right through it? Features that are non-blocking are also ignored by weapon aiming.&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = upright&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = Does the feature tilt with the slope of the terrain or remain upright?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = floating&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|special = {{new|90.0}}&lt;br /&gt;
|description = Does this feature float on the top of water or is it placed on the seabed?&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
===Decals===&lt;br /&gt;
{{tag&lt;br /&gt;
|name = useBuildingGroundDecal&lt;br /&gt;
|type = bool&lt;br /&gt;
|default = false&lt;br /&gt;
|description = For structures, do they display a ground decal on the terrain under their model?}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalType&lt;br /&gt;
|type = string&lt;br /&gt;
|default = &amp;quot;&amp;quot;&lt;br /&gt;
|description = The filename of the image to be used as ground decal. Assumed to be in &amp;lt;code&amp;gt;Unittextures/&amp;lt;/code&amp;gt;.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalSizeX&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How wide the decal is left to right, in footprint units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalSizeY&lt;br /&gt;
|type = int&lt;br /&gt;
|default = 4&lt;br /&gt;
|description = How wide the decal is top to bottom, in footprint units.}}&lt;br /&gt;
&lt;br /&gt;
{{tag&lt;br /&gt;
|name = buildingGroundDecalDecaySpeed&lt;br /&gt;
|type = float&lt;br /&gt;
|default = 0.1&lt;br /&gt;
|description = A measure of how quickly the decal should fade out if the structure dies. Essentially this value is multiplied by the time since death and subtracted from the original alpha until the decal is fully transparent.}}&lt;br /&gt;
&lt;br /&gt;
===Collision Volumes===&lt;br /&gt;
See [[Gamedev:UnitDefs#Collision_Volumes]].&lt;br /&gt;
&lt;br /&gt;
===Selection Volumes===&lt;br /&gt;
See [[Gamedev:UnitDefs#Selection_Volumes]].&lt;br /&gt;
&lt;br /&gt;
===Other===&lt;br /&gt;
&lt;br /&gt;
==Sub Tables==&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 FeatureDef allows the game designer to give their features 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;
===collisionVolume===&lt;br /&gt;
See [[Gamedev:UnitDefs#collisionVolume]].&lt;br /&gt;
&lt;br /&gt;
===selectionVolume===&lt;br /&gt;
See [[Gamedev:UnitDefs#selectionVolume]].&lt;br /&gt;
&lt;br /&gt;
==Examples==&lt;br /&gt;
Many games include unit corpse features into the UnitDef (See [[Gamedev:UnitDefs#Examples]])&lt;br /&gt;
&lt;br /&gt;
{{ExampleRepoLinks&lt;br /&gt;
|path = features/&lt;br /&gt;
|entity = FeatureDefs&lt;br /&gt;
}}&lt;br /&gt;
&lt;br /&gt;
[[Category: Game Dev]]&lt;/div&gt;</summary>
		<author><name>interwiki&gt;Flozi</name></author>
	</entry>
</feed>