Page 1 of 1

[code help] Company color on station tile? Lenght?

Posted: 30 Dec 2008 11:43
by ISA
I have a problem to get work my company color station tile! Ok as I guess the line I'm trying to change is 9 * 22 .... This is correct one?
But where I can see what I should type there to get my color work correctly?

Code: Select all

09 * 22      00 04 09 01 01 08 "LAMP" 0C FE 0D FE 11 00 14 FF 15 FF 0A 00
10 * 4	 01 04 01 02
11 c:\games\ttd\sprites/lamps.pcx 319 8 09 45 64 -30 -14
12 c:\games\ttd\sprites/lamps.pcx 399 8 09 45 64 -30 -14
13 * 7	 02 04 00 00 01 00 00
14 * 7	 03 04 01 01 00 00 00
15 * 13	 04 04 9F 01 01 "Å<Fence" 00
Wiki wrote:The values are a byte, used as a bit mask. Bits 0 to 6 control the availability of number or length 1 to 7, and bit 7 controls the availability of the "+7" button. Each bit that is set disables the corresponding length or number of platforms.
Second question is about station length. I don't understand well where to I put this code what gives me bigger length to stations?
Are those

Code: Select all

0C FE 0D
on line 09 * 22?

Thanks for any tips :)

Re: [code help] Company color on station tile? Lenght?

Posted: 30 Dec 2008 22:04
by michael blunck
Sprite recolouring information has to be included into the sprite "number" itself, by property 09.

Regarding platform numbers and lengths, these are specified by properties 0C and 0D: 0C is a "bit mask of disabled numbers of platforms", likewise, 0D is a "bit mask of disabled platform lengths".

I.e.,

0C F0 -> 11110000 -> allow only platforms 1-4
0D FE -> 11111110 -> allow only platform length = 1.

HTH
regards
Michael

Re: [code help] Company color on station tile? Lenght?

Posted: 31 Dec 2008 01:55
by ISA
Ok thanks Ill try it out when I find some free time after new year!
Happy new year :)

Re: [code help] Company color on station tile? Lenght?

Posted: 31 Dec 2008 14:10
by ISA
Ok I had some free time I did try Michael advice! The lenght problem is solved but that compani color code are bit hard to understand! Maybe some example?
Cheers again :)

Edit: sry for double post

Re: [code help] Company color on station tile? Lenght?

Posted: 01 Jan 2009 19:48
by michael blunck
ISA wrote:[...] that compani color code are bit hard to understand! Maybe some example?
Well, from the Wiki:
0000042D+X use sprite X from the corresponding action 1 block (i.e. 0000042D for the first, 0000042E for the second, etc.)
0000842D+X same, but draw it using company colour translation

http://wiki.ttdpatch.net/tiki-index.php ... _layout_09_ [<- link!]
I.e., imagine simple station platforms, and one side´s sprites (42F, 430h) should contain objects in company colour, then:

-1 * 57 00 04 01 01 <ID> 09 02

// x-direction
2D 04 00 80 // groundtile
00 00 00 10 05 10 2D 04 00 00 // platform sprite
00 0B 00 10 05 10 2F 84 00 00 80 // .. in company colour

// y-direction
30 04 00 80 // groundtile
00 00 00 05 10 10 2E 04 00 00 // platform sprite
0B 00 00 05 10 10 30 84 00 00 80 // .. in company colour

HTH
regards
Michael

Re: [code help] Company color on station tile? Lenght?

Posted: 14 Jan 2009 13:51
by ISA
Thank You very much!