Custom Unit Icons: Difference between revisions

From Spring
Jump to navigationJump to search
No edit summary
 
Flozi (talk | contribs)
Redirected page to Icontypes.lua
 
(27 intermediate revisions by 6 users not shown)
Line 1: Line 1:
== Custom unit icons ==
#REDIRECT [[Icontypes.lua]]
 
=== What are they? ===
When you zoom in Spring, units will get replaced with icons. The default icon is the radar blip, but mod developers have the ability to assign different icons to units. The custom icon information is stored in gamedata/icontypes.tdf.
 
=== Icontypes.tdf ===
 
The custom icons specification, gamedata/icontypes.tdf, should look like this:
 
The explosion script is structured like this:
 
[icontypes]
{
[default]
{
// Spring replaces missing or incorrect bitmaps by the radar  dot.
size=1;
radiusadjust=1;
}
[type1]
{
bitmap=icons/type1.bmp;
size=2;
radiusadjust=0;
}
[type2]
{
bitmap=icons/type2.bmp;
size=2;
radiusadjust=0;
}
// other type definitions may follow
}
 
"bitmap" is the location of the custom icon bitmap. If it is missing or incorrect, Spring replaces it with the standard radar dot.
 
"size" is a number that acts multiplier for the icon size. Default is 1.
 
"radiusadjust" is a boolean (0 or 1) that tells Spring whether or not the icon should scale with the unit radius. Default is 0 (false).
 
=== Icon unit tag ===
 
To assign units to a specific icon type, add the following line to their FBI file:
 
iconType=type1;
 
You can replace "type1" with icontypes defined in gamedata/icontypes.tdf.

Latest revision as of 21:42, 2 April 2011

Redirect to: