The International Simutrans Forum

 

Author Topic: Help with upgradable vehicles  (Read 1480 times)

0 Members and 1 Guest are viewing this topic.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Help with upgradable vehicles
« on: December 04, 2013, 09:18:09 PM »
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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18565
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help with upgradable vehicles
« Reply #1 on: December 05, 2013, 12:07:25 AM »
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.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Help with upgradable vehicles
« Reply #2 on: December 05, 2013, 07:17:31 AM »
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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18565
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help with upgradable vehicles
« Reply #3 on: December 05, 2013, 12:43:35 PM »
Did you try upgrading with the compiled Pak128.Britain-Ex?

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Help with upgradable vehicles
« Reply #4 on: December 05, 2013, 01:49:28 PM »
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!

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18565
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help with upgradable vehicles
« Reply #5 on: December 05, 2013, 03:18:26 PM »
It is possible in principle, but I am not aware of any real life examples of this.

Offline Zeno

  • ENASSA Designer
  • Devotee
  • *
  • Posts: 1997
    • Zeno's Simutrans Creations
  • Languages: ES, EN, CAT
Re: Help with upgradable vehicles
« Reply #6 on: December 05, 2013, 06:49:54 PM »
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:
Code: [Select]
upgrade[0] = VehicleName...then I changed to...
Code: [Select]
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.

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Moderator
  • *
  • Posts: 18565
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: Help with upgradable vehicles
« Reply #7 on: December 05, 2013, 08:05:22 PM »
Interesting about the trolleybuses - and thank you for letting me know of the resolution of the issue! Glad that all now works for you.