News:

Simutrans Forum Archive
A complete record of the old Simutrans Forum.

Help with upgradable vehicles

Started by Zeno, December 04, 2013, 09:18:09 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Zeno

I've been trying to make an upgradable vehicle, obviously without success.

In my first tries, I did set up upgrade[0]=vehicleB in the dat file of vehicle A. Then did set the upgrade cost in vehicleB's dat file. Should that be enough? If so, why can't I upgrade the vehicle in depot? I never used this feature, so I don't know whether it's 11.13's fault or (more probably) mine.

Maybe there are vehicles in pak128.britain-exp that I can look at? Thanks in advance.

jamespetts

Here is an example .dat file for an upgradeable vehicle in Pak128.Britain-Ex. One obvious thing to check is whether, if you have the timeline on, you are trying to upgrade to a vehicle that has not been introduced yet. The other thing to check is that you are using the Experimental version of Makeobj to compile your .pak files. It is also important to get the name of the vehicle to which the vehicle will be upgrading exactly right.

Perhaps you could use Pak128.Britain-Ex, start a new game with the timeline off, and see whether you can upgrade the Class 47 to a Class 57 in the "modern traction" rail depot to see whether your problem is understanding the UI or whether it is your .dat files. If your problem is understanding the UI, then I should appreciate any suggestions that you might have to make it clearer, since if you cannot understand it, a new user has not much hope.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

Uhm, I think I did it like in the example. I have timeline on, but I can purchase both vehicles separately, and they are compiled with latest makeobj from 11.13, although I can of course doublecheck that.

About the UI, well I tried both: (1) in the replace dialog and (2) with a vehicle to upgrade stopped at the depot. But in both cases, whenever I switch the selector to "upgrade" all vehicles turn to unavailable (purple line below them). Is that how is it done? I'm not sure if I missed any steps or wathever; when I'm back home this evening I can retry, and I'll post both dat files if no success.

jamespetts

Did you try upgrading with the compiled Pak128.Britain-Ex?
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

I will, now that you told me that upgradable vehicle above.

Just one more question: could be a bus upgradable to a trolleybus? Is there any restriction for it? Thanks!

jamespetts

It is possible in principle, but I am not aware of any real life examples of this.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.

Zeno

Oh my... I've found out what was going on. I don't know if that is intentional or not, so I'll let you know the problem has been:
upgrade[0] = VehicleName
...then I changed to...
upgrade[0]=VehicleName
...and it worked.
Thank you for your assistance.

By the way, in Barcelona we had some buses built on Tilling Stevens X4 chassis built during the 20s and 30s. After the civil war, in year 41 and 42 lots of them were converted to trolleybuses due to the lack of fuel.

jamespetts

Interesting about the trolleybuses - and thank you for letting me know of the resolution of the issue! Glad that all now works for you.
Download Simutrans-Extended.

Want to help with development? See here for things to do for coding, and here for information on how to make graphics/objects.

Follow Simutrans-Extended on Facebook.