OTTD support for powered 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
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

OTTD support for powered wagons?

Post by dev|ant »

I'm just wondering if OpenTTD has proper support for powered wagons? Nothing I can find in the wiki says it doesn't, however I can't get it to work with a grf I'm coding. The same grf works fine in TTDP. I've attached it below.
Attachments
danish_transport_setw.grf
(36.21 KiB) Downloaded 123 times
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1794
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Do you have the source NFO and PCX?

Code: Select all

$ grfcodec -d -p2 danish_transport_setw_177.grf 
GRFCodec version 0.9.10 r1604 - Copyright (C) 2000-2005 by Josef Drexler
*** stack smashing detected ***: grfcodec terminated
Aborted (core dumped)
He's like, some kind of OpenTTD developer.
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

Version 0.9.7 of grfcodec seems to handle the grf fine, even a version I grab from here? *shrug*

The engine I'm referring to is the Litra FC. I've included the relevant code below, and the nfo just in case.

Code: Select all

// Set veh ID 17 name
  162 * 20	 04 00 1F 01 17 4C 69 74 72 61 20 46 43 20 28 45 4D 55 29 00 
// Set VID 17 properties
  163 * 53	 00 00 12 01 17 00 AD 5C 03 1E 04 16 06 07 05 00 09 64 00 0B 19 01 0E 3C 4C 00 00 13 01 14 3C 15 00 16 16 24 00 19 30 1B 8C 00 1D 01 00 00 00 28 01 00 29 FE 00 
// 2 sets of sprites....
  164 * 6	  01 00 01 FF 08 00 
  ...
  173 * 9	  02 00 14 01 01 00 00 00 00 
  174 * 6	  01 00 01 FF 08 00 
  ...
  183 * 9	  02 00 15 01 01 00 00 00 00 
// Variational action 2 for front/rear car
  184 * 14	 02 00 16 81 40 00 FF 01 14 00 00 00 15 00 
// 2 more sets of sprites....
  185 * 6	  01 00 01 FF 08 00 
  ...
  194 * 9	  02 00 17 01 01 00 00 00 00 
  195 * 6	  01 00 01 FF 08 00 
  ...
  204 * 9	  02 00 18 01 01 00 00 00 00 
// Funky variational action 2 for middle carriages
  205 * 22	 02 00 19 81 40 00 03 03 14 00 00 00 17 00 01 01 18 00 02 02 15 00 
// Set a max consist length of 8
  206 * 23	 02 00 1A 8A 40 10 FF 00 00 00 01 1F 00 00 00 00 00 06 00 00 00 01 80 
// Callback splitter
  207 * 14	 02 00 1C 81 0C 00 FF 01 1A 00 1D 1D 16 00 
// Set VID 17 to use custom sprites
  208 * 7	  00 00 01 01 17 12 FD 
// Action 3
  209 * 7	  03 00 01 17 00 1C 00 
// Wagon override
  210 * 7	  03 00 81 1B 00 19 00 
Attachments
danish_transport_set.zip
(3.41 KiB) Downloaded 63 times
Last edited by dev|ant on 30 Jun 2007 12:37, edited 3 times in total.
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

Definitely needs more comments. :P
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1794
Joined: 30 Mar 2005 09:43

Post by peter1138 »

So is this wrong?
Attachments
Pindborough Transport, 26th Mar 2049.png
Pindborough Transport, 26th Mar 2049.png (39.6 KiB) Viewed 3189 times
He's like, some kind of OpenTTD developer.
User avatar
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

No that looks just the way I'd like. :D

But it doesn't look like you're using 0.5.2 there, because I can see several improvements:

- Powered wagons work
- Tractive effort displayed
- Refitting tag removed

So I guess just need to use a nightly instead?
PikkaBird wrote:Definitely needs more comments. :P
Good point. I'll put them in. :wink:
User avatar
PikkaBird
Graphics Moderator
Graphics Moderator
Posts: 5631
Joined: 13 Sep 2004 13:21
Location: The Moon

Post by PikkaBird »

dev|ant wrote:
PikkaBird wrote:Definitely needs more comments. :P
Good point. I'll put them in. :wink:
It makes it so much easier to read, both for you and for other people. :)
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

dev|ant wrote:So I guess just need to use a nightly instead?
Oh. Yes. That does tend to help.
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
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

DaleStan wrote:Oh. Yes. That does tend to help.
I can't tell if that's sarcasm or genuine. :lol:

I guess I was put off by the fact that in 0.5.2 the purchase screen says wagons will give extra power, but I couldn't get it to happen.

Peter's vanished but I'll just say a quick thanks to him and all who helped. :D
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Post by DaleStan »

Mostly, minor irritations. Irritation that you didn't mention the version, irritation that I didn't think to check, and irritation that the nightlies are so vastly different from 0.5.x in terms of GRF support. Major things -- newcargos, newindustries, &c. I can understand. But I would file that as: "0.5.x bug: 'purchase screen says it will happen, but it doesn't'", not "0.6.x feature: 'Purchase window no longer contains information that does not apply to the game.'" That's just me, though.

Aside from failing to mention the version, though, I don't see anything that's missing from the bug report. You attached the GRF, you reported the feature that wasn't working for you, and you even got the "I tested it in TTDPatch" part in there.
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
dev|ant
Traffic Manager
Traffic Manager
Posts: 140
Joined: 30 Nov 2005 11:26
Location: melbourne.au

Post by dev|ant »

DaleStan wrote:Aside from failing to mention the version, though, I don't see anything that's missing from the bug report. You attached the GRF, you reported the feature that wasn't working for you, and you even got the "I tested it in TTDPatch" part in there.
I had a look for your sig but couldn't find one quick enough. :lol:

Actually it wasn't intended as a bug report, just a question - I wasn't sure if it was my code not doing something that OpenTTD required, or the feature wasn't fully implemented.
peter1138
OpenTTD Developer
OpenTTD Developer
Posts: 1794
Joined: 30 Mar 2005 09:43

Post by peter1138 »

Powered wagons seem to work fine in 0.5.x with DBSetXL, but on the other hand it doesn't conform to the visual effects spec (because we followed a TTDPatch bug).

Trunk does conform to the spec after TTDPatch was changed (in r1553) but now DBSetXL doesn't work properly...

This may or may not be related to why this GRF behaves differently, though.
He's like, some kind of OpenTTD developer.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Bing [Bot] and 8 guests