Page 1 of 1
OTTD support for powered wagons?
Posted: 30 Jun 2007 03:43
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.
Posted: 30 Jun 2007 06:41
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)
Posted: 30 Jun 2007 07:39
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
Posted: 30 Jun 2007 08:00
by PikkaBird
Definitely needs more comments.

Posted: 30 Jun 2007 08:01
by peter1138
So is this wrong?
Posted: 30 Jun 2007 08:33
by dev|ant
No that looks just the way I'd like.
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.

Good point. I'll put them in.

Posted: 30 Jun 2007 08:38
by PikkaBird
dev|ant wrote:PikkaBird wrote:Definitely needs more comments.

Good point. I'll put them in.

It makes it so much easier to read, both for you and for other people.

Posted: 01 Jul 2007 02:12
by DaleStan
dev|ant wrote:So I guess just need to use a nightly instead?
Oh. Yes. That does tend to help.
Posted: 01 Jul 2007 11:24
by dev|ant
DaleStan wrote:Oh. Yes. That does tend to help.
I can't tell if that's sarcasm or genuine.
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.

Posted: 02 Jul 2007 02:08
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.
Posted: 02 Jul 2007 04:28
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.
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.
Posted: 02 Jul 2007 07:00
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.