ActionA

From GRFSpecs
Revision as of 23:00, 28 July 2004 by Lakie (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigationJump to search

Modify TTD's sprites

Action A

Modify TTD's sprites.

-=Introduction=-

Unlike actions 1 and 5, which add new sprites for new features or vehicles, action A modifies TTD's built-in sprites.

-=Format=-

The data looks as follows:

 -+<Sprite-number> * <Length> 0A <num-sets> <num-sprites> <first-sprite>...+-

||Element|Size|Description

<Sprite-number>|dec|A sequential sprite number

<length>|dec|The total number of bytes used in this action

0A|B|Defines action 0A

<num-sets>|B|How many consecutive sets of sprites to replace

<num-sprites>|B|How many consecutives sprites in this set

<first-sprites>|W|Number of first sprite in this set||

The set of <num-sprites> and <first-sprites> is repeated as often as <num-sets> specifies.

The following sprites will be real sprites that replace the given TTD sprites.  There must be as many of them as num-sprites of all sets added up.

-=Filling in the terms=-

Sprite-number

This is just the number you are at.

Length

Count the number of bytes in this action.

num-sets

This sets how many different sets of sprites to replace. Each set are a number of consecutive sprites.

num-sprites

How many consecutive sprites to replace in this particular set.

first-sprite

The first sprite number to replace in this set.

-=Notes=-

You can find the sprite numbers by looking in trg1.pcx, they're the little numbers above each sprite, except for the climate-specific sprites which are more complicated.

Unlike actions 1 and 5, the real sprites of action A do not count towards the sprite limit of 11484 total active sprites.

To replace Sprites in other climates, you first need to find out what the sprite number is trg1.grf

You set it to replace that number and add an Action7 which turns it off if itis not in the right climate.

-=Example=-

Something to go here