Articulated Road Vehicles

Get help, info, news and advice about the Transport Tycoon Deluxe patch.

Moderator: TTDPatch Moderators

User avatar
Maedhros
OpenTTD Developer
OpenTTD Developer
Posts: 603
Joined: 30 Mar 2006 18:24
Location: Durham, UK

Re: Articulated Road Vehicles

Post by Maedhros »

Yeah, basically all I did was to add a loop. Pretty much all the rest of the changes were just indentation. :)
No-one's more important than the earthworm.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Articulated Road Vehicles - TTDPatch Refit

Post by wallyweb »

Not being a developer of any kind (Although I'm pretty good at developing trouble :wink: ), I'm curious as to why it is so difficult for TTDPatch to handle cargo refitting of trailers in articulated RV's.
I would assume a simple loop would do the job, unless of course, the Patch can't handle loops.
The logic as I see it would be:
1. Call for refit to cargo X
2. Check for number of vehicles in RV train (tractor + trailers)
3. Start loop
4. Check if item is refitable (lead unit may be a tractor with no cargo capability)
5. If not refitable then jump to next iteration
6. Check if cargo is already the desired one
7. If cargo is already the desired one then jump to next iteration
8. Refit cargo
9. Check if count is equal to the number of vehicles
10. If count is not equal to the number of vehicles then jump to next iteration
11. End loop
12. Exit refit function
Note that this would even work for single vehicles with no trailers.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Before complaining about double posts, my post has gone over two weeks without a response and considering DaleStan's recent post here:
DaleStan wrote:Now that there are Patch-special orders ...
I would like to place a special order ... One TTDPatch fix to the refitability of trailers in articulated RV's to go. :mrgreen:
User avatar
stevenh
TTDPatch Developer
TTDPatch Developer
Posts: 759
Joined: 24 Jul 2005 05:07
Location: Canberra, Australia
Contact:

Re: Articulated Road Vehicles

Post by stevenh »

Not a double-post in itself... but a second mentioning of this request:
Current aRVs code is a nightmare and if ANYONE has the time or brainpower to sit down with me and go through it all to scope it out and properly code it then please give me a call.
I suppose I could just beg the OTTD Devs to allow me to copy their code byte for byte... but that would be breaking the game rules. heh.

Anyway... the plea still stands... After three rewrites of this code, I have still failed.

Sorry wallyweb... I'm probably the only one that still understands it. Lakie tried, heh.
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Thanks Steven for picking up on this. :)
Did my logic make any sense?
stevenh wrote:I suppose I could just beg the OTTD Devs to allow me to copy their code byte for byte... but that would be breaking the game rules. heh.
If you have the camera, I'll watch the door while you steal the code. :wink:
Sorry wallyweb... I'm probably the only one that still understands it. Lakie tried, heh.
You need a neophyte to whom you can pass the code as an assignment with the following instructions:
1. Make it human readable.
2. Fix it.
3. Run it by DaleStan for an insanity check.
:lol:

EDIT Adding more comments for stevenh's consideration:
1. RV's pre-existed aRV's
2. RV's had a refit function before aRV's
3. Does aRV refitting call the already existing RV refit function(s)?
4. Or does aRV have its own refit function(s)?
5. If item 3, then does aRV code really need to be touched? Would it not be the existing refit code that needs to be modified?
Last edited by wallyweb on 20 Dec 2007 05:50, edited 1 time in total.
DaleStan
TTDPatch Developer
TTDPatch Developer
Posts: 10285
Joined: 18 Feb 2004 03:06
Contact:

Re: Articulated Road Vehicles

Post by DaleStan »

wallyweb wrote:3. Run it by DaleStan for an insanity check.
Sorry. That code is too sane. Go back and try it again.
:D
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
Lakie
TTDPatch Developer
TTDPatch Developer
Posts: 1799
Joined: 26 May 2004 16:37
Location: Britain
Contact:

Re: Articulated Road Vehicles

Post by Lakie »

I have tried and in some senses I made quite a few improvements, however my efforts were in vain as it has not completely solved trams and has lead to a few new errors.

What someone really needs to do is completely redesign the way RV movement is done, although I suppose since the OpenTTD source is under an Open Source License, you could read through it to find out how to try and do it or copy it (I doubt that'd work personally), but I feel getting the OpenTTD Developer who did it to explain how it was implemented and the logic of it would be fair more useful, Steven. ;)

~ Lakie
TTDpatch Developer 2005 - 2010 ~ It all started because of shortened vehicle not loading correctly, now look where I've gone with it!
Grfs coded ~ Finnish Train Set (Teaser) | Bm73 (Release 3) | Emu 680 (Release 3)| Glass Station (Release 1) | UK Roadset (Version 1.1a) | New Water Coasts (Version 7)
Pikka: "Lakie's a good coder, but before he'll add any feature to TTDP you have to convince him that you're not going to use it to destroy the world as we know it."
User avatar
Carlo Ghega
Engineer
Engineer
Posts: 92
Joined: 07 Jan 2007 19:37
Location: Vienna

Re: Articulated Road Vehicles

Post by Carlo Ghega »

Just wanted to quickly drop over and say, that the hope and the fascination in this topic never stopped for me - albeit trams still don't work for me (as posted before) .

Thanks 4 not giving it up yet - also to Wally for staying this interested!

Patiently and wishfully awaiting the day, when this might really get to work...

Very best regards,

Carlo
E pur si muove!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Steve's Lament
or
"Lawdy! Lawdy! Mah aRV trailer won't refit!
Mah aRV trailer won't refit!
Mah aRV trailer won't refit!
Lawdy! Lawdy! Mah aRV trailer won't refit!"

Our little tale of woe picks up from this here thread here.
wallyweb wrote:
stevenh wrote:I suppose I could just beg the OTTD Devs to allow me to copy their code byte for byte... but that would be breaking the game rules. heh.
If you have the camera, I'll watch the door while you steal the code. :wink:
The scene has shifted to a hidden back room server room in the currently vacant OTTD camp. Seems as how they've all gone out to party in the New Year!

wallyweb: Somebody's coming.
stevenh: (sounds of camera clicking) It's ok ... I'm almost done.
OTTD gang leader: Come out! We know you're in there!
wallyweb: It ain't us! We ain't here! The place is empty! Go away!
OTTD gang leader: We've got a dozen C/C++ assemblers and we know how to use them!
wallyweb: Damn! My x86 just jammed! Hurry up, will ya Steve? We gotta get outta here!
stevenh: Got it! Where to now?
wallyweb: We can hide out over at SAC's place. These guys won't know about it.
stevenh: SAC's the lady with all them trees?
wallyweb: Yea ... that's her.
stevenh: Just one question ... Who was it what stole 'em?
wallyweb: Wasn't me and that's all you need to know. Now let's ride and see if we can fix some aRVs.
(Sounds of assemblers assembling)
wallyweb: Damn! I've just been coded in the arm! Let's ride! NOW!
(sounds of code rushing through the intarwebs)

:lol: :lol:

Happy New Year All!
User avatar
athanasios
Tycoon
Tycoon
Posts: 3138
Joined: 23 Jun 2005 00:09
Contact:

Re: Articulated Road Vehicles

Post by athanasios »

wallyweb wrote:We can hide out over at SAC's place. These guys won't know about it.
Simply stated: You won't (re)fit there!
:lol: :lol: :lol:
http://members.fortunecity.com/gamesart
"If no one is a fool I am also a fool." -The TTD maniac.


I prefer to be contacted through PMs. Thanks.
User avatar
Carlo Ghega
Engineer
Engineer
Posts: 92
Joined: 07 Jan 2007 19:37
Location: Vienna

Re: Articulated Road Vehicles

Post by Carlo Ghega »

The John Whiting Award (from 2007 renamed the Peter Wolff Trust Supports the John Whiting Award) is awarded annually to a British or Commonwealth playwright who, in the opinion of a consortium of UK theatres shows a new and distinctive development in dramatic writing with particular relevance to contemporary society.
The award was established in 1965 to commemorate John Whiting and his distinctive contribution to post-war British theatre. The award was initially worth £1000, but is currently worth £6000 per year.

Winners of the John Whiting Award:

1967
  • Tom Stoppard
    Rosencrantz and Guildenstern are Dead

    Wole Soyinka
    The Interpreters

    Peter Nichols
    A Day in the Death of Joe Egg
1968
  • Peter Barnes
    The Ruling Class

    Edward Bond
    Saved
1969
  • Howard Brenton
    Christie in Love
1970
  • Freehold Company
    Freehold on Antigone
1971
  • Mustapha Matura
    As Time Goes By
1972
  • Heathcote Williams
    AC/DC
1973
  • John Arden
1974
  • David Rudkin
1975
  • David Edgar
    Destiny
1976
  • David Lan
    The Winter Dancers

1978
  • David Halliwell

    Snoo Wilson
    The Glad Hand
1979
  • Stephen Bill
    The Old Order

1981
  • David Pownall
    Beef
1982
  • Karim Alrawi
    Before Dawn
1983
  • Peter Flannery
    Our Friends in the North
1984
  • Ron Hutchinson
    The Rat in the Skull
1985
  • Guy Hibbert
    On the Edge

    Heidi Thomas
    Shamrocks & Crocodiles
1986
  • Nick Dear
    The Art of Success

1988
  • Iain Heggie
    American Bagpipes
1989
  • Billy Roche
    A Handful of Stars
1990
  • Tony Kushner

    Lucy Gannon
    Keeping Tom Nice
1991
  • Terry Johnson
    Imagine Drowning
1992
  • Rod Wooden
    Your Home in the West
1993
  • Martin Crimp
    The Treatment

    Helen Edmundson
    The Clearing
1994
  • Jonathan Harvey
    Beautiful Thing
1995
  • Joe Penhall
    Some Voices
1996
  • Ayub Khan-Din
    East is East
1997
  • Ann Coburn
    Get up and Tie your Fingers
1998
  • Roy Williams
    Starstruck

2000
  • David Greig
    The Cosmonaut's Last Message to the Woman He Once Loved in the Former Soviet Union

    Tanika Gupta
    The Waiting Room
2001
  • Zinnie Harris
    Further than the Furthest Thing
2002
  • Peter Rumney
    Jumping on my Shadow
2003
  • Rona Munro
    Iron
2004
  • Owen McCafferty
    Scenes from the Big Picture
2005
  • Fin Kennedy
    How to Disappear Completely and Never Be Found
2006
  • James Philips
    Rubenstein Kiss

    Fraser Grace
    Breakfast with Mugabe
2008
  • wallyweb
    Steve's Lament or "Lawdy! Lawdy! Mah aRV trailer won't refit! Mah aRV trailer won't refit! Mah aRV trailer won't refit! Lawdy! Lawdy! Mah aRV trailer won't refit!"


Honour to whom honour is due! :]

Very best regards,

Carlo

(Nearly went mad formatting this - and swearing by owen's authentic photograph in his avatar that I will never ever do something like that again ;) )
E pur si muove!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Carlo Ghega wrote:Honour to whom honour is due! :]
Thank you, thank you :bow: Now where is my £6000? :mrgreen:
User avatar
Carlo Ghega
Engineer
Engineer
Posts: 92
Joined: 07 Jan 2007 19:37
Location: Vienna

Re: Articulated Road Vehicles

Post by Carlo Ghega »

wallyweb wrote:Thank you, thank you :bow: Now where is my £6000? :mrgreen:
Just give me a sec or two: Only thing left to do for me, is to earn it. Right afterwards I'll put it into the scanner and there You go! ;)
E pur si muove!
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Carlo Ghega wrote:
wallyweb wrote:Thank you, thank you :bow: Now where is my £6000? :mrgreen:
Just give me a sec or two: Only thing left to do for me, is to earn it. Right afterwards I'll put it into the scanner and there You go! ;)
Just do not put it into the trailer of an aRV. We don't seem to be able to refit it to valuables. :(
User avatar
Carlo Ghega
Engineer
Engineer
Posts: 92
Joined: 07 Jan 2007 19:37
Location: Vienna

Re: Articulated Road Vehicles

Post by Carlo Ghega »

wallyweb wrote:Just do not put it into the trailer of an aRV. We don't seem to be able to refit it to valuables. :(
Don't say that: Who knows what might happen in the one ore two seconds that I still need to earn it? :wink:
E pur si muove!
User avatar
Doclouis
Engineer
Engineer
Posts: 81
Joined: 26 May 2003 18:51
Location: Uelzen, Germany
Contact:

Re: Articulated Road Vehicles

Post by Doclouis »

?( I've enabled the "articulatedrvs" switch in the TTDX-Configurator, I do have installed some articulated trams-grf, but: I don't get them articulated. They appear just as single parts. CTRL doesn't help either. What am I doing wrong?
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Doclouis wrote:?What am I doing wrong?
In your ttdpatch.cfg file try setting the last digit of the curves and mountains parameters to 0.
User avatar
The Irish
Tycoon
Tycoon
Posts: 2092
Joined: 14 Apr 2004 16:06
Location: Bonn, Germany
Contact:

Re: Articulated Road Vehicles

Post by The Irish »

Hmm. interesting suggestion.
somehow, in my savegame, it all works OK at the beginning, but after something like 40 gameyears, the articulated trams go all wacky. Existing ones run OK, but new ones would just have the first part.

But I will try Wally's suggestion now, maybe it works.
*** Ce French Train Set ***
*** Visit my transport related pictures on Flickr ***
ImageImageImageImageImage
Llanfairpwllgwyngyllgogerychwyrndrobwllllantysiliogogogoch
"A committee is a group of men who individually can do nothing but as a group decide that nothing can be done" (Fred Allen 1894-1956 US radio comic).
User avatar
Ameecher
Tycoon
Tycoon
Posts: 11919
Joined: 12 Aug 2006 15:39
Contact:

Re: Articulated Road Vehicles

Post by Ameecher »

The Irish wrote:Hmm. interesting suggestion.
somehow, in my savegame, it all works OK at the beginning, but after something like 40 gameyears, the articulated trams go all wacky. Existing ones run OK, but new ones would just have the first part.

But I will try Wally's suggestion now, maybe it works.
I have an identical problem and wally's suggest will not sort it. I have reported it before and nothing could be identified. I just get on with it.
Image
User avatar
wallyweb
Tycoon
Tycoon
Posts: 6102
Joined: 27 Nov 2004 15:05
Location: Canada

Re: Articulated Road Vehicles

Post by wallyweb »

Ameecher wrote:
The Irish wrote:Hmm. interesting suggestion.
somehow, in my savegame, it all works OK at the beginning, but after something like 40 gameyears, the articulated trams go all wacky. Existing ones run OK, but new ones would just have the first part.

But I will try Wally's suggestion now, maybe it works.
I have an identical problem and wally's suggest will not sort it. I have reported it before and nothing could be identified. I just get on with it.
[rant]I can't speak for OTTD but Articulated RV's is seriously broken in TTDPatch and nobody seems to be motivated to take the bull by the horns and fix it. As a result I simply refuse to use Articulated RV's. The refit issue was quickly addressed and resolved in OTTD but nobody seemed to want to touch it in TTDPatch. Now we have the issue identified by The Irish and Ameecher. Quite frankly, Articulated RV is the only game killer feature that I know of, mainly because it so obvious to the players and it is continuously surfacing in this thread and elsewhere. This is really too bad because the feature makes such good sense in a game devoted to emulating real life transportation solutions.[/rant]
Post Reply

Return to “General TTDPatch”

Who is online

Users browsing this forum: No registered users and 25 guests