Can vehicle effective lengths be changed on the fly?

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
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Can vehicle effective lengths be changed on the fly?

Post by krtaylor »

During the development of the Tropicset, uzurpator drew a set of traincars that are shorter than the norm. This is because in the early days, the traincars were little, and they looked cool. The short vehicles were never released because they caused various confusion with the Patch.

The Patch now supports short vehicles. However, there still seem to be a couple of problems:

1. We still want the longer version of each vehicle to be available, just not at the beginning of the game. They'd show up in the late 1950s or early 1960s. But there aren't enough IDs to have an early and a late version of each and every vehicle.

2. The AIs aren't choosy about which vehicles they buy, and they will stick with the early version through the entire game which is silly.

Thus, my question is:

Is it possible to do a graphics override that not only changes the graphic, but actually changes the length of the vehicle? We know it is possible for the graphics of one particular vehicle to change over time, with already-built instances keeping the same appearance that they started with but newly purchased ones looking new. E.g. the local passenger cars in the DBset - they start out as green, but change liveries and get more modern looking as the game goes along, although only one is available at any given time and they're still the same vehicle. That would be the way to handle short traincars - at the beginning they are all short, but sometime in the middle of the game the graphics get replaced with the newer, longer version. But any existing instances of the vehicles stay short until they are manually replaced.

Is this doable, or would it cause irreparable spacing confusion?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Not possible.
BobXP
Tycoon
Tycoon
Posts: 2720
Joined: 04 May 2003 11:00
Location: Torquay, England
Contact:

Post by BobXP »

The Patch now supports short vehicles.
Is that in the manual anywhere? I want short wagons...
<!-- End Of Post !-->
Image
nilsi
Transport Coordinator
Transport Coordinator
Posts: 268
Joined: 20 Nov 2002 16:20
Location: Dresden, Germany

Post by nilsi »

Then do paint them :-)
It is stated in newgrf.txt

I am sure you will find somebody to write nfo files for your wonderfull self drawn new vehicle sprites.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

OK Josef, I understand, do you have a suggestion as to how to square this circle, since you know the possibilities better? You know what the goal is, it doesn't really matter how we get there as long as it works.
Prof. Frink
Tycoon
Tycoon
Posts: 3849
Joined: 20 Jan 2003 14:51
Location: Broadstone, Dorset
Contact:

Post by Prof. Frink »

Could you set parameters after the grf entry for long or short wagons and manually switch them?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

Yes, that would actually work. The current length of a train vehicle is stored as well, so you could even make it that the short ones remain short.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

And the AIs would be OK with this? By "manually" you mean a sign cheat, or something you could build into the Patch to trigger at a certain time?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

The vehicle stats shouldn't change... although I suppose capacities could. You'd do this by saving, quitting TTD, changing your newgrf.cfg and going back in the game. I don't see a way to automate this.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

Hmm.

OK, let's see about the other way - is it possible to have two types for every vehicle, the short and the long, and somehow convince the AIs to switch to the long ones when they come available?
Chris 'Awkward' McKenna
Tycoon
Tycoon
Posts: 1050
Joined: 26 Oct 2003 18:32
Location: Somerset, UK
Contact:

Post by Chris 'Awkward' McKenna »

To do that you might have to remove the short ones as soon as the long ones arrive.

Does the AI replace the carraiges with teh engine, or does it keep the same carriages for the entire existance of a train?

Chris
Anything can be achieved if you don't care who gets the credit
--Author Unknown
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

I have no objection to the short vehicles being removed from the list as soon as the equivalent long vehicle becomes available, in fact that would be mostly realistic.

I've no idea how the AI handles replacing vehicles, I would suspect that the entire train is replaced at once which would work fine.

The "persistent vehicles" part of the Patch would have to be changed to allow this, since by definition the short vehicles would no longer be available to purchase while they were still in play.

Does this sound feasible?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

krtaylor wrote:The "persistent vehicles" part of the Patch would have to be changed to allow this, since by definition the short vehicles would no longer be available to purchase while they were still in play.
No, they'd be the same vehicle, except some would (could) have a different look because they were bought when they were shorter.
User avatar
krtaylor
Tycoon
Tycoon
Posts: 11784
Joined: 07 Feb 2003 01:58
Location: Texas, USA
Contact:

Post by krtaylor »

Oh, and this wouldn't screw up the spacing, since the two versions would have different lengths? I thought you said that wouldn't work.
User avatar
uzurpator
Tycoon
Tycoon
Posts: 2227
Joined: 10 Jan 2003 12:21
Location: Katowice, Poland

Post by uzurpator »

If we switch grfs then I persume all wagons will have "new" graphics since old "short" sprites will be in the old grf - thus making impossible to have varying length... or am I missing something?
Patchman
Tycoon
Tycoon
Posts: 7575
Joined: 02 Oct 2002 18:57
Location: Ithaca, New York
Contact:

Post by Patchman »

You don't switch grfs, you change the parameter in newgrf.cfg.

Then the parameter sets the length of the wagon in action 0.

However, for displaying the wagon, you always use the current length of it, and it'll show as short when bought before changing the parameter and as long if bought afterwards.
Post Reply

Return to “Graphics Development”

Who is online

Users browsing this forum: Ahrefs [Bot] and 19 guests