Skip to content
aubergine10 edited this page Oct 19, 2015 · 4 revisions

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

###data/scripts/

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

^ Open "Pages" to Search



Settings:

* = multi-use per block
... = BEGIN...END block

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

Clone this wiki locally