Need a bit of help with Action 0 properties

Discuss, get help with, or post new graphics for TTDPatch and OpenTTD, using the NewGRF system, here. Graphics for plain TTD also acceptable here.

Moderator: Graphics Moderators

Post Reply
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Need a bit of help with Action 0 properties

Post by NightFang »

Ok, to be more specific I need help finding out what a few of the values are for as they do not seem to be in the wiki.

Here is a line of the code that I am having trouble with: (This is from Zephyris Generic Tram Set that he showd me in another topic)
6 * 41 00 01 10 01 3A 00 F9 13 03 13 04 16 06 07 08 50 09 70 0F 23 10 00 11 6E 0E FF 1C 03 17 00 12 49
16 00 00 00 00 13 05 14 20
Here is what ones I already understand:
6 is the sprite
41 is the length
00 is the action
01 is for road vehicals
10 is the number of props to change
01 is the ammount of vehicles to change
3A is the ID of the one to be change

Now this is where it looses me, I cannot find the value of 00 in the wiki (I do not know what 00 changes), But what I do know with the help of Zephyris is that:
Property 1C (misc flags) is 01 - a so is a tram not a normal road vehicle.
Property 17 (callbacks) is 10, so an articulated vehicle.
Property 0E (graphics) is FF, so uses new graphics

So basicly I just need a bit of help finding what properties there are changing what values. As I as said,I'v looking through the wiki but cant seem to find the answer, mabye I'm just looking right over it, I dont know. Any and all help is appreciated.
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Need a bit of help with Action 0 properties

Post by Maedhros »

Properties 00, 02, 03, 04, 06 and 07 are general properties, and you can find them here in the wiki:

http://wiki.ttdpatch.net/tiki-index.php ... on0General
No-one's more important than the earthworm.
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: Need a bit of help with Action 0 properties

Post by NightFang »

I just knew I had to be over looking somthing, Thanks for your quick help
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: Need a bit of help with Action 0 properties

Post by NightFang »

Ok, need a bit more help.
00 F9 13 03 13 04 16 06 07 08 50 09 70 0F 23 10 00 11 6E 0E FF 1C 03 17 00 12 49
16 00 00 00 00 13 05 14 20
I now know, 00 is telling it what year to release it, but I am having some trouble figuring out what year the code after it is telling it to be relesed, I know that when converting it I have to reverse the order, but thats what I'm sort of having trouble with, after trying to convert it back to number I failed quite badly and would like to get some help with the conversion so I can continue coding the tram set im working on.

Thank you for any help.
User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Need a bit of help with Action 0 properties

Post by Maedhros »

F9 13 in little endian becomes 0x13F9, or 5113. This is the number of days after 1920, which works out to be about 14 years.
No-one's more important than the earthworm.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Need a bit of help with Action 0 properties

Post by PikkaBird »

If you're using Info version 7 and a relatively recent version of grfcodec, you can use an escape sequence for the intro date, eg 00 \w20-1-1949 - much easier. :P
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Need a bit of help with Action 0 properties

Post by DaleStan »

But reversing from hex to date is not nearly so easy, which appears to be what NightFang wants.
To get a good answer, ask a Smart Question. Similarly, if you want a bug fixed, write a Useful Bug Report. No TTDPatch crashlog? Then follow directions.
Projects: NFORenum (download) | PlaneSet (Website) | grfcodec (download) | grfdebug.log parser
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Re: Need a bit of help with Action 0 properties

Post by PikkaBird »

DaleStan wrote:But reversing from hex to date is not nearly so easy, which appears to be what NightFang wants.
Oh, I got the impression he was looking at Zephyris' grf just to learn how to write the actions.
NightFang
Engineer
Engineer
Posts: 32
Joined: 02 Nov 2006 11:51

Re: Need a bit of help with Action 0 properties

Post by NightFang »

Well, you are both sort of right, I am looking at Zephyris's to learn how to code my own, but if there is a simpler way I am all for that. I Am using Version seven so ill try what you said with the escape thing.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 18 guests