Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Mon May 27, 2019 10:34 am

All times are UTC




Post new topic  Reply to topic  [ 127 posts ]  Go to page Previous 13 4 5 6 7
Author Message
PostPosted: Fri Mar 15, 2019 8:02 pm 
Offline
Engineer
Engineer

Joined: Fri Mar 15, 2019 7:56 pm
Posts: 22
Hello, I am new here but I have been playing OTTD for quite some time now :-)

I love this feature!

I have a question:

Is it possible to create a template that would replace only wagons for all trains in a given group? Let's say I have a train that has an obsolete engine which is not available anymore and I want to keep that engine and just remove or add wagons according to the template. Is it possible to do that somehow?

Thank you!

Best regards


Top
   
PostPosted: Fri Mar 15, 2019 9:23 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1162
Generally good idea, to have possibility of cloning consist regardless of any vehicles accessibility.
Sometimes I need to make action similar to HapticTactic, or opposite (keep wagons, change locomotive, or just add/rearrange wagons), but it is not possible to create new template.

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.


Top
   
PostPosted: Sat Mar 16, 2019 12:18 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 122
HapticTactic wrote:
Hello, I am new here but I have been playing OTTD for quite some time now :-)

I love this feature!

I have a question:

Is it possible to create a template that would replace only wagons for all trains in a given group? Let's say I have a train that has an obsolete engine which is not available anymore and I want to keep that engine and just remove or add wagons according to the template. Is it possible to do that somehow?

Thank you!

Best regards


Hi!

that is possible, but you need to have an existing template which contains this obsolete engine.
You can always create a new template from an existing train by cloning it, so if you have some train with the old engine, you should be able to create a template containing the old engine.
You can then modify it to contain the new model wagons. Just select the template from the list and click "Delete last engine" to remove the old wagons from the template, select a new type of wagon from the engines list on the left and click "Add engine" to add it to the selected template.
With that template you can keep the old loco around.

I just tried to test it but couldn't because the old engines wouldn't expire when I cheated the date from 1900 to 2050... I tried with the default engine set and with the UKRS 2.0 train set. Do you have an example of a newgrf where the engines are set to expire?


Top
   
PostPosted: Sat Mar 16, 2019 6:31 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Sat Jan 18, 2014 6:10 pm
Posts: 1162
ffpp wrote:
You can always create a new template from an existing train by cloning it, so if you have some train with the old engine, you should be able to create a template containing the old engine.

Actually it is not possible (at least for patch version implemented in JGRPP) to make new template by cloning existing train with expired vehicles.
The question is, if it is possible to fix it, or maybe such assertion is deeply build into copy function?

_________________
My experimental openTTD server: 149.156.194.203:3979 non-standard client, now testing: JGRPP http://tiny.pl/ggnch
Projects: Reproducible Map Generation patch, NewGRFs: Manpower industries, PolTrams, Polroad, 600mm narrow gauge, preindustrial houses, wired, ECS industry extension, V4 CEE train set.
Addicted to freeciv longturn.


Top
   
PostPosted: Sun Mar 17, 2019 7:27 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 122
McZapkie wrote:
ffpp wrote:
You can always create a new template from an existing train by cloning it, so if you have some train with the old engine, you should be able to create a template containing the old engine.

Actually it is not possible (at least for patch version implemented in JGRPP) to make new template by cloning existing train with expired vehicles.
The question is, if it is possible to fix it, or maybe such assertion is deeply build into copy function?


Ah I see, JGRPP is using an older version of the patch. I reworked a lot of things for version 2.0.0. In that version what you described works just fine.
For 2.0.0 I had made a pull request into the openttd's master branch. I am working on this integration at the moment. But I can also try to see with JGR whether an update of tbtr in his PP would be an option as well.

Anyways, thanks for pointing this out.


Top
   
PostPosted: Sun Mar 17, 2019 3:26 pm 
Offline
Engineer
Engineer

Joined: Fri Mar 15, 2019 7:56 pm
Posts: 22
ffpp wrote:
McZapkie wrote:
ffpp wrote:
You can always create a new template from an existing train by cloning it, so if you have some train with the old engine, you should be able to create a template containing the old engine.

Actually it is not possible (at least for patch version implemented in JGRPP) to make new template by cloning existing train with expired vehicles.
The question is, if it is possible to fix it, or maybe such assertion is deeply build into copy function?


Ah I see, JGRPP is using an older version of the patch. I reworked a lot of things for version 2.0.0. In that version what you described works just fine.
For 2.0.0 I had made a pull request into the openttd's master branch. I am working on this integration at the moment. But I can also try to see with JGR whether an update of tbtr in his PP would be an option as well.

Anyways, thanks for pointing this out.


Excellent. Thank you for your time. I will try my lobbying skills with JGR to include the latest version of your patch in his pack! :-)))))


Top
   
PostPosted: Wed Mar 27, 2019 6:59 pm 
Offline
Engineer
Engineer

Joined: Fri Mar 15, 2019 7:56 pm
Posts: 22
ffpp, I have asked JGR about updating the template feature. I was under the impression that he uses directly your code but it seems to be more complicated. See our conversation about it:

HapticTactic wrote:
Hi guys, hi JGR!

...

I have a question about ffpp's "Template based train replacement" patch you are using in your pack. Would it be possible for you to update it to the latest version with your next or future JGRPP updates? There is at least one crucial feature in the latest version of "ffpp's TBTR" that I would, personally, love to see in the game. It allows for creating template clones from trains that contain obsolete vehicles. The version you are using currently in JGRPP does not allow this. It would be an extremely useful feature for us who love to play with the templates feature.

...


JGR wrote:
The implementation of TBTR which I have is loosely based on https://github.com/flitzpiepe/OpenTTD_T ... d82a6a59aa partly updated to match KeldorKatarn's fork (JokerPP) (971ba4928a5c7c7916fea55d91a3b6dd5bba140c), with a few dozen changes/fixes on top.
The commit in KeldorKatarn's branch is now gone as he periodically rebased it.
I don't know what version this may correspond to in terms of the forum thread.
Enabling creating templates with obsolete vehicles seems doesn't seem like a big change. If there is a commit where it's implemented and it is compatible I could cherry pick it, otherwise I can look into the possibility of implementing it directly in due course.


I am a bit lost at the moment in who did what etc and what would be the easiest way for JGR to update the feature.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 127 posts ]  Go to page Previous 13 4 5 6 7

All times are UTC


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000-2019 phpBB Limited

Copyright © Owen Rudge/The Transport Tycoon Forums 2001-2019.
Hosted by Zernebok Hosting.