|
TTDPatch Site |
Action1
Action 1Defining a set of real sprites.Action 01 is used to define sets of real sprites (as opposed to pseudo-sprites). It can be put anywhere in the .nfo file after Action 8. The data looks as follows: <sprite-number> * <length> 01 <feature> <num-sets> <num-ent>
The block of data that always follows after action 01 should consist of num-sets * num-ent RealSprites. sprite-numberThis is just the number you are at.lengthCount the number of bytes in this action.featureThis sets the type of feature that you wish to change. Set it to:00 for trains 01 for road vehicles 02 for ships 03 for planes 04 for stations 05 for canals 06 for bridges 07 for houses 09 for industry tiles 0B for cargos 0F for newobjects 10 for rail types (since OpenTTD r18969) num-setsThe amount of stations, vehicles, ships, etc that the following sprites represent (be warned, one spriteset can be used for more as one vehicle, or truck; you will see this when you reach Action 2 and Action 3)num-entThis sets how many different views each entry has.For vehicles, this corresponds to the different directions it can be in. If your vehicle is symmetrical you need 4 views, and if it isn't symmetrical then use 8 views. A station should normally be 12 (hex) because a station is made out of 18 (decimal) sprites, although if you use a different sprite layout for your station this number may vary. For canals, it depends on the canal feature, see Action 3. For houses and industry tiles, this should be between 1 and 4 and specifies the number of different construction stages. Sprites after the first four are always ignored. See also action 2 and 3. For cargos, this should always be 1. The following sprites should be no larger than 10x10 pixels or they won't fit into the station window correctly. Since TTDPatch 2.0.1 alpha 49, this value is a so-called "extended byte" (see GRFActionsDetailed). Since 2.0.1 alpha 63, it is possible to have <num-ent>=0. This is useful for defining an action 1/2 combination that only serves as invalid callback result. If the .grf file defines no graphics otherwise, this way callbacks can return an explicit failure code without needing any actual sprites to be allocated. Below is an example of what a real Action 1 pseudo-sprite could look like with the sprite entries under it. 2 * 4 01 00 01 08 3 C:\TTD\SPRITES\mytrain.pcx 66 8 01 18 8 -3 -10 4 C:\TTD\SPRITES\mytrain.pcx 82 8 09 15 20 -14 -6 5 C:\TTD\SPRITES\mytrain.pcx 114 8 01 12 28 -14 -6 6 C:\TTD\SPRITES\mytrain.pcx 162 8 09 16 20 -4 -8 7 C:\TTD\SPRITES\mytrain.pcx 194 8 01 18 8 -3 -10 8 C:\TTD\SPRITES\mytrain.pcx 210 8 09 16 20 -14 -7 9 C:\TTD\SPRITES\mytrain.pcx 242 8 01 12 28 -14 -6 10 C:\TTD\SPRITES\mytrain.pcx 290 8 09 15 20 -4 -7
Created by: system last modification: Friday 23 of July, 2010 [11:06:46 UTC] by mb |
Login Search
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||