ToolbarSprite
The ToolbarSprite
setting defines which named sprite to show on a toolbar or menu button. It is hard-coded to use sprites defined in objects.spritebank
.
This optional setting is used in materials.txt
and must be within a definition block (see Notes section below for more details). It can be used only once per definition block.
ToolbarSprite <spriteId>
Where <spriteId>
is the name of a sprite defined in objects.spritebank
.
If not defined, the first Sprite
defined will be used. If no Sprite
is defined, the button will be blank, sometimes with a blue blueprint background.
ToolbarSprite Warden
This setting is useful if you want to quickly reuse a sprite that's already defined by the base game in objects.spritebank
(which covers all sprites from both objects.png
and people.png
).
Some definition blocks are hard-coded to use sprites from other files:
-
Rooms take their toolbar sprites from
interface.spritebank
which describesui.png
. -
Materials take their toolbar sprites from
tileset.png
by defining their locations directly within theBEGIN Material ... *
definition block.
It is not currently possible set ToolbarSprite
to use a sprite from sprites.png
.
If you want to use a sprite from sprites.png
, use the [Sprite
setting](Sprite (sprites.png)) instead. The first defined Sprite
will be used for the toolbar icon (except in the case of things like Rooms and Materials; as mentioned above they are hard-coded to use specific base game files).
Through scripting, you can set the .SubType
property of an object at runtime to change which sprite it uses on the map. This means, for example, you can define two sprites for an object - the first will be used in the toolbar (and also when placing the object on the map), and then switch to the second sprite once the object is fully constructed (by changing .SubType
within the Create() event
).
-
data/
materials.txt
:- [
Sprite
(sprites.png
)](Sprite (sprites.png)) Sprite
(objects.spritebank
)
- [
-
data/
objects.spritebank
-
data/
sprites.png
^ Open "Pages" to Search
Settings:
*
= multi-use per block...
=BEGIN...END
block
-
Name
<objectId>
-
AttachToWall
true|false
-
AttackPower
<number>
-
AutoOrder
<objectId>
-
AutoOrderQuantity
<num>
-
BlockedBy *
<groupId>
-
BlockMovement
true|false
-
BlockVisibility
true|fals
-
Capturable
true|false
-
ConstructionTime
<time>
-
Contraband ... *
<eqipId>
- [
Entity
](Entity (Callout))<entityId>
-
Equipment
<equipmentId>
-
Group
<groupId>
-
Height
<tiles>
-
IndoorOutdoor
<mode>
-
LikelyObject ... *
<objId>
-
MadeOf
<id>
-
MaxNumber
<number>
-
MaxStackSize
<number>
-
MoveCost
<number>
-
MoveSpeedFactor
<number>
-
NumEntities
<number>
-
NumSlots
<number>
-
NumSprites
<number>
-
ObjectRequired
<consumableId>
-
Price
<number>
-
Properties *
<id>
-
Qualification
-
Range
<tiles>
-
RechargeTime
-
RenderDepth
<number>
-
RenderPostOffset
<number>
-
RenderPreOffset
<number>
-
Requirement ... *
<id>
-
Research
[<researchId>
](Name (research.txt)) -
Rotatable
true|false
-
Scale
<number>
-
SoftEdged
<mode>
-
Sprite
<spriteId>
- [
Sprite ... *
](Sprite (sprites.png))x <offset> y <offset>
w <offset> h <offset>
-
RotateType
<mode>
Marker ... *
-
Sprite0..N ... *
x <x> y <y>
-
SpriteOverlayScale
<num>
-
SpriteScale
<number>
-
SpriteType
<mode>
-
SpriteVariants
<number>
-
StackSprite
<spriteId>
-
Teleportable
true|false
-
ToolbarSprite
<spriteId>
-
Toughness
<number>
-
TwoHanded
true|false
- [
Vehicle
](Vehicle (Callout))<vehicleId>
-
ViewRange
<tiles>
-
Width
<tiles>
-
Workers ...
-
Workgroup
<id>
Equipment:
Name Sprite AttackPower num RechargeTime num Properties Weapons Properties NoImport Properties Improvised Properties Metal Properties Tools Scale TwoHanded true|false Range num Rotatable true|false - eg. book
Callouts:
Name Cost num MaxNumber num Vehicle vehicleId Entity entityId NumEntities Sprite