Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Feb 24, 2019 12:05 am

All times are UTC




Post new topic  Reply to topic  [ 120 posts ]  Go to page Previous 1 2 3 4 5 6 Next
Author Message
PostPosted: Tue Mar 27, 2012 9:08 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Hi,

I would like to ask for some opinions/ideas.
I am about to implement two points from the list and would like to know what could be a good way to do them, in principal.

First, making the refit of template-replaced trains optional.
While playing, I realized that I often have trains that look identical in terms of engines and wagons but have set a different refit-configuration. Also, I usually play very clean trains, carrying only one type of cargo, maximum two with passenger+mail trains.
So while playing I needed to have multiple templates that looked the same but had a different refit loadout. When replacing one train which carried lumber and one which carried coal I had two create two different templates which contained the same vehicles but had a different refit setting.
So I made it optional to use a template's refit setting and I can now just upgrade the wood train and the coal train from the same template as I can force both to use their original refit setting.
Only problem is, it is hard to find a procedure to 'restore the original refit setting'. Right now I'm using a simplistic approach in which I assume to the treated train to have only one type of cargo and refit all new vehicles in the chain accordingly (using the first wagon's refit setting, actually).
In a general way it seems hard to find a pattern of how you could keep a train's refit settings. Because the template and the incoming train can differ so wildly from another.

Second, 'replace all vehicles of type A in all templates by vehicles of type B'
This was from Eddi's suggestion and I think it might be useful to have. Only problem is that in contrast to the autoreplacement functions on trains, doing this on templates will have an immediate effect and could mess up all templates with one click.
What could be a reasonable way to prevent this ? Showing 3 confirmation dialogs 'are you sure?' ? Having a 'undo' button to restore all templates ?

Any ideas on these points are welcome, thanks ;)


Top
   
PostPosted: Tue Mar 27, 2012 12:45 pm 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 7281
maybe not "undo", but "apply changes" (like newgrf config. changes you make in the GUI won't have any effect until you press this button. "undo" will be to close the window without applying (needs confirmation window))

_________________
You might not exactly be interested in Ferion, but if you are, have fun :)


Top
   
PostPosted: Tue Mar 27, 2012 5:23 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4548
Location: /home/sweden
I think it is a strength to have the refit target and not just wagon types coded into the template. That will make the template a clear and precise target for replacements.

(I have however not playtested your patch much more than just a quick test with 0.1b)

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Tue Mar 27, 2012 6:29 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Zuu wrote:
I think it is a strength to have the refit target and not just wagon types coded into the template. That will make the template a clear and precise target for replacements.

(I have however not playtested your patch much more than just a quick test with 0.1b)


Hm, I'm not sure if we're talking about the same thing here :)
What is working is to specify the refit for a template just as well as for a real train. But as an additional option I'm also concernd with the case where I want a train to keep as much of its refit despite being template replaced. And the latter case is what my post was about, well the last one at least.


Top
   
PostPosted: Wed Apr 04, 2012 5:06 pm 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
There is a new version up, the first post has been updated.
patch, linux-build and screenshot for v0.4


The new features that came to my mind during testing it all. Most notably are the cargo transfer during replacement, so if the new train will receive as much cargo from the old as it can fit.
During template creation (which the screenshot cannot show) and in the main gui, there is now information about the refit settings of a template train.

I also implemented Eddi's idea of having a function to 'auto replace among templates', meaning that you can update all templates at once by replacing some particular vehicle types by others for all defined templates at once. The gui should be intuitive enough, it looks similar to the auto-replace gui, template will be changed only on pressing 'Apply'. Before the user applies the changes, he can do multiple such replacements successively.

As always, feedback is very welcome. Write what you wish for, what annoys you, what doesn't work or what crashes.

Regards


Top
   
PostPosted: Thu Apr 05, 2012 5:27 am 
Offline
Engineer
Engineer

Joined: Mon Mar 26, 2012 10:23 am
Posts: 55
Please create a patch against clean r24093 as it would otherwise fail to be imported.


Top
   
PostPosted: Thu Apr 05, 2012 6:35 am 
Offline
Director
Director

Joined: Tue Jan 20, 2009 4:07 pm
Posts: 593
I haven't tested it, nor have I taken a look at the change logs. But the first post mentions r24092, not r24093, perhaps that's why it fails? A second possibility is ffpp first applied cargodist and build his patch against that one.


Top
   
PostPosted: Thu Apr 05, 2012 6:47 am 
Offline
Engineer
Engineer

Joined: Mon Mar 26, 2012 10:23 am
Posts: 55
Arie- wrote:
I haven't tested it, nor have I taken a look at the change logs. But the first post mentions r24092, not r24093, perhaps that's why it fails? A second possibility is ffpp first applied cargodist and build his patch against that one.


This patch is against his old one on r24056.


Top
   
PostPosted: Thu Apr 05, 2012 7:27 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Hi,

the compatibility information in the first post is just additional.
The patch on the first post is meant to be used against the current trunk of the game.

Since v0.4 it is not fully compatible to cargodist anymore (cd changed something about cargo loading). But I made a slight change to get them work together again. I will append the patch to this post, the first one is not allowed to hold more than 3 attachments.
This patch is against r24093 trunk + CargoDist, so cd is fully included in it, makes it a bit larger :).

---------------------------------------------------------------------------------
EDIT: I replaced the patch with one that is compatible with trunk+cargodist, but doesn't include cargodist.
Now this version of my patch will compile against recent trunk + cd but not against trunk alone, for r24093 alone there is still the patch on the first post.
(what a mess)


Attachments:
File comment: apply on top of cargodist
tbtr_v0.4c_forCargodist.patch [189.5 KiB]
Downloaded 84 times


Last edited by ffpp on Thu Apr 05, 2012 4:40 pm, edited 4 times in total.
Top
   
PostPosted: Thu Apr 05, 2012 7:39 am 
Offline
Engineer
Engineer

Joined: Mon Mar 26, 2012 10:23 am
Posts: 55
ffpp wrote:
Hi,

the compatibility information in the first post is just additional.
The patch on the first post is meant to be used against the current trunk of the game.

Since v0.4 it is not fully compatible to cargodist anymore (cd changed something about cargo loading). But I made a slight change to get them work together again. I will append the patch to this post, the first one is not allowed to hold more than 3 attachments.
This patch is against r24093 trunk + CargoDist, so cd is fully included in it, makes it a bit larger :).


Oops. I'm sorry. It was a problem with my working copy. Thank you again for a great patch. Applying now...


Top
   
PostPosted: Thu Apr 05, 2012 7:43 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
You can do so, I just changed the post above yours, but it wouldn't make any difference to your project, its just a cleaner way to do it ;)


Top
   
PostPosted: Sat Apr 07, 2012 4:26 pm 
Offline
Engineer
Engineer

Joined: Tue Dec 07, 2004 6:34 pm
Posts: 53
Location: Grafing bei München (Munich)
I've got another feature request:

Template based building of new trains. :-) Do I have to say more? (Except that I'd be most thankful for it)


Top
   
PostPosted: Sun Apr 08, 2012 10:18 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
AndiK wrote:
I've got another feature request:

Template based building of new trains. :-) Do I have to say more? (Except that I'd be most thankful for it)


Hm, what would be the benefit over just cloning trains in a depot ? The only difference would be that when a train is cloned from a template that th new train would probably be neutral ragarding its group and orders settings.


Top
   
PostPosted: Sun Apr 08, 2012 9:38 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Apr 08, 2008 9:47 am
Posts: 228
Location: Finland
ffpp wrote:
Hm, what would be the benefit over just cloning trains in a depot ?.


The obvious one that occurs to me right away is not needing the train to clone in the depot. Frequently I want to clone a train that's already running on my network.


Top
   
PostPosted: Sun Apr 08, 2012 9:50 pm 
Offline
Engineer
Engineer

Joined: Tue Dec 07, 2004 6:34 pm
Posts: 53
Location: Grafing bei München (Munich)
CoreXii:
This is already possible. Open Depot, click "Clone Train", Ctrl+Click on train on the network - voila!


ffpp:
The benefit would be the neutral group and orders, as you already pointed out, as well as me, the lazy player, not having to find a train to clone from.

I'd use it to create the first train for a new line. The rest of them are just clones, of course. The feature would obviously only save a few seconds per new line, but these are the kind of seconds that get kind of annoying once you've played TTD for 17 years (gosh, I'm getting old...). :-D

I thought it was kind of an obvious idea, if the infrastructure was already there. Anyways. In the end it's your decision if it's worth the while and it's your spare time. *shrug*


Top
   
PostPosted: Mon Apr 09, 2012 3:37 am 
Offline
Engineer
Engineer

Joined: Mon Mar 26, 2012 10:23 am
Posts: 55
AndiK wrote:
CoreXii:
This is already possible. Open Depot, click "Clone Train", Ctrl+Click on train on the network - voila!


ffpp:
The benefit would be the neutral group and orders, as you already pointed out, as well as me, the lazy player, not having to find a train to clone from.

I'd use it to create the first train for a new line. The rest of them are just clones, of course. The feature would obviously only save a few seconds per new line, but these are the kind of seconds that get kind of annoying once you've played TTD for 17 years (gosh, I'm getting old...). :-D

I thought it was kind of an obvious idea, if the infrastructure was already there. Anyways. In the end it's your decision if it's worth the while and it's your spare time. *shrug*


Seconded. Also, I would like to suggest to let users set 'default' train length so that I don't have to double-click wagons 9 times for the train length of 5. However, for dual-head engines, care must be taken not to exceed that default. Of course, users will be able to override that default by some other method...


Top
   
PostPosted: Mon Apr 09, 2012 7:22 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Tue Apr 08, 2008 9:47 am
Posts: 228
Location: Finland
AndiK wrote:
This is already possible. Open Depot, click "Clone Train", Ctrl+Click on train on the network - voila!

God dammit, why isn't this stuff more discoverable!? Would have been handy to know earlier! :bow:


Top
   
PostPosted: Mon Apr 09, 2012 7:31 pm 
Offline
OpenTTD Developer
OpenTTD Developer
User avatar

Joined: Mon Jun 09, 2003 6:21 pm
Posts: 4548
Location: /home/sweden
At least all/most "hidden features" are collected at a wiki page: http://wiki.openttd.org/Hidden_features

_________________
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)


Top
   
PostPosted: Tue May 01, 2012 9:29 pm 
Offline
Engineer
Engineer

Joined: Mon May 29, 2006 6:59 am
Posts: 62
Location: Germany
Hey :)

I've tested your patch. It is very nice and helpful. The patch came with handrakes HPPS r24122 (viewtopic.php?f=33&t=59374&start=40).

The first few hours I was afraid to use the function(s). It was a bit hard to understand, where to start. I have read your instructions. But something looked a little outdated? I also missed pictures (a tutorial would be great).

Otherwise, the creation of trains is very difficult. If an engine is added, it is very difficult to move them to the first position. I also miss a copy / clone function to copy existing templates.

Overall it's a really good nice to have. Thank you for your work!

Best regards,
Robert


Top
   
PostPosted: Wed May 02, 2012 6:45 am 
Offline
Engineer
Engineer
User avatar

Joined: Fri Jan 29, 2010 12:56 pm
Posts: 120
Thanks Eienbaehr, and yes I also think some of these issues you mentioned are worth of improving.
- The function to copy an existing template: I plan to use the already existing 'clone' button for this
- During the creation of a template, it is complicated to get an engine to be the first vehicle in the chain: this is also the same when dealing with a train in a depot, only that there you have multiple lines available to make things easier. Should be improved as well.
- Introduction: good idea actually, especially since I feel some of the additional functions like 'use template refit' are a bit fuzzy perhaps :)

Lately I was taking a brake from working on this patch due to important exams but will continue. There are also some stability issues which I noted during some longer playtesting, those should get priority, I guess.


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 120 posts ]  Go to page Previous 1 2 3 4 5 6 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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.