showing gradual filling wagons

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
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

showing gradual filling wagons

Post by a.locritani »

Hi. quick question regarding how to show gradual filling wagons: i've read on wiki that, in action2, "If there are two load types, the first is shown below 50%, the other above 50%".

i've tried making this action 2:

Code: Select all

02 00 00 02 02 00 00 01 00 00 00 01 00
where set 00 is a spriteset showing an empty wagon and set 01 is a spriteset showing a full wagon.

in ttdpatch it works correctly (50% threshold) but in ottd spriteset 01 is used only when the wagon is completely full.
I'm making something wrong? and if not, how can I obtain the wished result?

thanks in advance
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: showing gradual filling wagons

Post by DaleStan »

In general, if it works the way you expect in Patch, but not in Open, your code is correct, and Open is interpreting it incorrectly.

I believe this is such a case, so you should make a post on the bugtracker.
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
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: showing gradual filling wagons

Post by Maedhros »

The code looks a little suspect to me. I think the attached patch makes it look more sensible, and should hopefully fix your problem. It seems to work better with the UKRS, but I don't think I have a set with wagons that only have two loading stages to test it with.

As DaleStan said, anyway, please post this to flyspray to get it to the attention of the other developers. :-)
Attachments
loading_stages.diff
(1.14 KiB) Downloaded 122 times
No-one's more important than the earthworm.
a.locritani
Engineer
Engineer
Posts: 111
Joined: 08 Feb 2007 11:59
Skype: a.locritani
Location: Italy

Re: showing gradual filling wagons

Post by a.locritani »

ok, it works as expected now, thanks to your patch.

thanks

just posting on flyspray...

edit: test grf attached
Attachments
new.grf
(1.43 KiB) Downloaded 94 times
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: No registered users and 12 guests