showing different sprites according to different cargos
Posted: 26 Nov 2008 22:24
Hi! I've a problem with a simple grf.
just to test how it works, I tried to change the sprite of full-loaded coal wagon.so i coded in this way:
now something strange happens: on TTDPatch correct sprites appear but the refitting option is wrong: in the buying window, it is shown as "cargo: coal; refittable to rubber, oil, copper ore" instead of "cargo: coal; refittable to coal, oil, iron ore". on actual refit window the correct string appears.
on OTTD, instead, cargo refittability is ok, but sprite for full-loaded status only appear when train is full-loaded, instead of appearing when >50%, as in TTDP and as I expect.
and also:
if I understand the wiki this grf should show different sprites, according to different cargos loaded. in particular it should use action 2 defined in sprite 16 (the blue-cargo one) if cargo is oil (08) and action2 defined in sprite 15 (the red-cargo one) otherwise. but both in OTTD and TTDPatch it always use sprite 15 action2.
so, I'm sure I'm doing something wrong, but what?
Thanks in advance
just to test how it works, I tried to change the sprite of full-loaded coal wagon.so i coded in this way:
Code: Select all
[...]
2 * 4 01 00 02 04
3 sprites/new.pcx 66 8 01 16 8 -3 -8
4 sprites/new.pcx 82 8 09 14 20 -14 -5
5 sprites/new.pcx 114 8 01 10 28 -14 -4
6 sprites/new.pcx 162 8 09 14 20 -4 -6
7 sprites/new.pcx 194 8 01 16 8 -3 -8
8 sprites/new.pcx 210 8 09 14 20 -14 -5
9 sprites/new.pcx 242 8 01 10 28 -14 -4
10 sprites/new.pcx 290 8 09 14 20 -4 -6
11 * 0 02 00 00 02 02 00 00 01 00 00 00 01 00
12 * 0 03 00 01 1D 00 00 00
13 * 0 00 00 04 01 1D 12 FD 28 00 00 29 00 00 1D 0A 01 00 00
on OTTD, instead, cargo refittability is ok, but sprite for full-loaded status only appear when train is full-loaded, instead of appearing when >50%, as in TTDP and as I expect.
and also:
Code: Select all
[...]
2 * 4 01 00 03 04
3 sprites/new2.pcx 66 8 01 16 8 -3 -8
4 sprites/new2.pcx 82 8 09 14 20 -14 -5
5 sprites/new2.pcx 114 8 01 10 28 -14 -4
6 sprites/new2.pcx 162 8 09 14 20 -4 -6
7 sprites/new2.pcx 194 8 01 16 8 -3 -8
8 sprites/new2.pcx 210 8 09 14 20 -14 -5
9 sprites/new2.pcx 242 8 01 10 28 -14 -4
10 sprites/new2.pcx 290 8 09 14 20 -4 -6
11 sprites/new2.pcx 322 8 01 16 8 -3 -8
12 sprites/new2.pcx 338 8 09 14 20 -14 -5
13 sprites/new2.pcx 370 8 01 10 28 -14 -4
14 sprites/new2.pcx 418 8 09 14 20 -4 -6
15 * 13 02 00 00 02 02 00 00 01 00 00 00 01 00
16 * 13 02 00 01 02 02 00 00 02 00 00 00 02 00
17 * 10 03 00 01 1D 01 08 01 00 00 00
18 * 18 00 00 04 01 1D 12 FD 28 00 00 29 00 00 1D 0A 01 00 00
so, I'm sure I'm doing something wrong, but what?
Thanks in advance