Sprite
This page relates to the
.spritebank
-related setting.If you were looking for
sprites.png
-related setting, see [Sprite
(sprites.png)](Sprite (sprites.png)).
##Overview
The Sprite
setting is used to define what something will look like on the map (and also in menus, depending on the type of thing being defined).
##Syntax
This setting is optional, but almost always used in materials.txt
and must be within a definition block. It can be used only once per definition block.
Sprite <id>
Where <id>
is the Name
of a sprite defined in the relevant .spritebank
file.
##Example
Sprite Janitor
##Notes
The .spritebank
format is notoriously troublesome to work with, because you have to duplicate the whole file from the base game in to your mod, and then make the desired changes. This means that only one mod at a time can update the .spritebank
(if multiple mods try, only the last one will succeed as it will overwrite the previous one, and so on). It also means that if a new release of the game comes out, with an updated .spritebank
, your mod will not incorporate those changes without a manual update from you.
For detailed information, see:
-
.spritebank
- the old way of doing things -
sprites.png
- the new way, which is better but still has some issues
You can get and set the currently active Sprite
index for an object using the .SubType
property.
You can get and set the current rotation of your object using the .Or
property. This interacts with RotateType
sub-setting to choose which part of the Sprite
is being rendered.
You can access the slots on your object with the .Slot0..7
properties, their positions on screen are determined by an interaction of Marker
and RotateType
sub-settings.
##See Also
- [Sprite (sprites.png)](Sprite (sprites.png))
Marker
RotateType
SpriteVariants
ToolbarSprite
.Or
.slot0..7
.SubType
^ 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