[v2.1.0] Template based train replacement [OpenTTD 1.9.3]
Moderator: OpenTTD Developers
Re: [v0.1.b] Template based train replacement r24031
EDIT: ignore that, I've trown out my local source copy again and now it apears to be doing something else. Hang on!
EDIT2: I don't know what's up with that when I not throw out the complete source and just do "hg update discard any local changes". But anyways, now it works. Build is attached!
EDIT2: I don't know what's up with that when I not throw out the complete source and just do "hg update discard any local changes". But anyways, now it works. Build is attached!
- Attachments
-
- openttd-template-based-train-replacement-v0.2-r24054-windows-win32.zip
- (5.94 MiB) Downloaded 234 times
Last edited by FooBar on 21 Mar 2012 17:53, edited 1 time in total.
Re: [v0.1.b] Template based train replacement r24031
So you want to use it for automatic coupling and decoupling of trains along their route.Wowanxm wrote:It would be great to let the player choose in what depot ro to replace train.
Futhermore, it might be interesting feature if we could insert replacement procedure as a specific order in the train's timetable.
Like:
sawmill ----- wood -----> furniture factory ----- goods ------> town
Re: [v0.2] Template based train replacement r24054
Wow, that would indeed be a possibility, and when wagons aren't available in that depot, they'd have to be built. When you leave wagons in a depot, they just stay there. Than you could buy a specific engine which you use to transport empty wagons back to the depots manually where they are needed.
I like where this is going
I like where this is going
Re: [v0.1.b] Template based train replacement r24031
great, thanksFooBar wrote:EDIT: ignore that, I've trown out my local source copy again and now it apears to be doing something else. Hang on!
EDIT2: I don't know what's up with that when I not throw out the complete source and just do "hg update discard any local changes". But anyways, now it works. Build is attached!
I still didn't get around to install msvs on my computer
________________________________________________
I just deleted and uploaded the tbtr_v0.2.patch file. It is a hotfixed version because after some restructuring some code I had an oversight in some testcase which I only found while play-testing just now.
(It was: if the incoming train cannot be replaced because of a lack of money and was set to 'service in depot' it wouldn't leave the depot in this particular case)
So for all who downloaded the newest version, please download it again. Sorry :/
Re: [v0.2] Template based train replacement r24054
I got bored.
Have a linux binary
[out of date, removed]
(and a build log) EDIT: Build out of date,so i removed it, i'll try to put a new one up shortly
Have a linux binary
[out of date, removed]
(and a build log) EDIT: Build out of date,so i removed it, i'll try to put a new one up shortly
Last edited by Lord Aro on 22 Mar 2012 10:07, edited 1 time in total.
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: [v0.2] Template based train replacement r24054
Is this build based on the hotfixed version ?Lord Aro wrote:I got bored.
Have a linux binary (and a build log)
Re: [v0.2] Template based train replacement r24054
based on patch in the first post
(i had some troubles patching, [my own, not yours] if it matters)
(i had some troubles patching, [my own, not yours] if it matters)
AroAI - A really feeble attempt at an AI
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration. --Edsger Dijkstra
Re: [v0.1.b] Template based train replacement r24031
Always increase the version number if you replace the patch. You could add a "b" like you did before if you don't want to go a full step. By doing so you reduce the risk of people referring to different versions but with the same version name.ffpp wrote:I just deleted and uploaded the tbtr_v0.2.patch file. It is a hotfixed version because after some restructuring some code I had an oversight in some testcase which I only found while play-testing just now.
(It was: if the incoming train cannot be replaced because of a lack of money and was set to 'service in depot' it wouldn't leave the depot in this particular case)
So for all who downloaded the newest version, please download it again. Sorry :/
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
Re: [v0.2] Template based train replacement r24054
Yes, should have done that
Now there is another hotfix up anyways, as an attachement in the first post.
I found another problem during playtesting where a train for which the primary engine didn't need to get replaced was put into the default group during replacement.
This was due to the same code restructuring that made the v0.2b hotfix necessary before.
________
Edit: now with newest build for testing (linux only so far, sorry) -> first post
Now there is another hotfix up anyways, as an attachement in the first post.
I found another problem during playtesting where a train for which the primary engine didn't need to get replaced was put into the default group during replacement.
This was due to the same code restructuring that made the v0.2b hotfix necessary before.
________
Edit: now with newest build for testing (linux only so far, sorry) -> first post
Re: [v0.2c] Template based train replacement r24055
windows build
- Attachments
-
- openttd-template-based-train-replacement-v0.2c-r24055-windows-win32.zip
- (5.94 MiB) Downloaded 227 times
-
- openttd_vs100.log.txt
- (52.41 KiB) Downloaded 226 times
Re: [v0.2c] Template based train replacement r24055
thanks, I put it in the first post and will maintain that link for current versions in the future
Re: [v0.1.b] Template based train replacement r24031
Moreover. It could be possible to use it for loco change. Like:ffpp wrote:So you want to use it for automatic coupling and decoupling of trains along their route.
Like: sawmill ----- wood -----> furniture factory ----- goods ------> town
STATION A ===== electrified line ===== STATION B === Depot/replace loco ------ non-electrified line ------ STATION C.
Re: [v0.1.b] Template based train replacement r24031
In that instance, what would the electrified train components do at station b ? stay there or form a new train that goes back to station one ?Wowanxm wrote:Moreover. It could be possible to use it for loco change. Like:ffpp wrote:So you want to use it for automatic coupling and decoupling of trains along their route.
Like: sawmill ----- wood -----> furniture factory ----- goods ------> town
STATION A ===== electrified line ===== STATION B === Depot/replace loco ------ non-electrified line ------ STATION C.
Because if you want to change trains up so heavily it might be solvable more easily by just running two different trains.
Re: [v0.2c] Template based train replacement r24055
I just realized how annoying it is to create a template that is almost a copy of some running real train (if you want to make only a very slight modification).
So a good next feature would be to clone a template from an actual train and then modify it further.
So a good next feature would be to clone a template from an actual train and then modify it further.
Re: [v0.2d] Template based train replacement r24055
I was just going to suggest that!I just realized how annoying it is to create a template that is almost a copy of some running real train (if you want to make only a very slight modification).
So a good next feature would be to clone a template from an actual train and then modify it further.
I'd use this as: Electric loco + 7 carriages -> Depot -> Diesel loco + 7 carriages -> Depot -> Electric loco + 7 carriages...repeatIn that instance, what would the electrified train components do at station b ? stay there or form a new train that goes back to station one ?
Because if you want to change trains up so heavily it might be solvable more easily by just running two different trains.
Leave the electric loco in the depot, then exchange again in the other direction. Would be nice if possible, would make no sense with multiple units instead of individual locos.
Temporary Permanent signature filling text. Content coming soon delayed indefinitely! Oh, and I have had a screenshot thread.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Linux user (XMonad DWM/KDE, Arch), IRC obsessive and rail enthusiast. No longer building robots; now I ring church bells.
Author of an incredibly boring stickied post about NewGRFs.
Re: [v0.2d] Template based train replacement r24055
Certain things come to mind only when using the new pieces in a bigger context I guessFLHerne wrote:I was just going to suggest that!I just realized how annoying it is to create a template that is almost a copy of some running real train (if you want to make only a very slight modification).
So a good next feature would be to clone a template from an actual train and then modify it further.
That's why there are already a couple of improvements/extensions to the core principal are on my todo list.
I was already thinking about that idea and it isn't very high on my list right now. But it should certainly be possible to use the generic replacement mechanism to reorganize trains along their set of orders.FLHerne wrote:I'd use this as: Electric loco + 7 carriages -> Depot -> Diesel loco + 7 carriages -> Depot -> Electric loco + 7 carriages...repeatIn that instance, what would the electrified train components do at station b ? stay there or form a new train that goes back to station one ?
Because if you want to change trains up so heavily it might be solvable more easily by just running two different trains.
Leave the electric loco in the depot, then exchange again in the other direction. Would be nice if possible, would make no sense with multiple units instead of individual locos.
It would not be convenient to issue such orders from the current template replacement gui. I think the main gui should still be used to create templates and the order window could call the list of defined templates as a child-window when so chosen. Like it is done with the refit-orders.
But before I want to go into any such direction I want to make sure that the main things are easy to use and get confident that everything is working as intended. There is also a lot of cleaning up code to do before I want to add anything new to the mess
Re: [v0.1.b] Template based train replacement r24031
It depends on what you're planning to do with carriages at a depot. If we loose cargo when replacing the loco/train (new train => empty wagons), then it'll be useful to get train unload at Station B. And load renewed train at that station after replacement.ffpp wrote:In that instance, what would the electrified train components do at station b ? stay there or form a new train that goes back to station one ?
If something like this would sometines appear in OpenTTD, then carriages will just stay at station B while electric loco is being replaced at depot.
Yes, it might be solved now by using two trains. But it is not very realistic. Long-distance trains (espesially passenger trains) change locos, not wagons on their route.ffpp wrote:Because if you want to change trains up so heavily it might be solvable more easily by just running two different trains.
Re: [v0.2d] Template based train replacement r24055
currently, OpenTTD moves the cargo to the new wagons on autoreplace. (as long as there is enough space)
Re: [v0.2d] Template based train replacement r24055
The cargo transfer is not yet handled by my patch but is one of the next things to be done. It's one of those essential things to make the patch really useful.
Re: [v0.1.b] Template based train replacement r24031
I put it into the todo list as an advanced feature once the main things are done well.Wowanxm wrote:It depends on what you're planning to do with carriages at a depot. If we loose cargo when replacing the loco/train (new train => empty wagons), then it'll be useful to get train unload at Station B. And load renewed train at that station after replacement.ffpp wrote:In that instance, what would the electrified train components do at station b ? stay there or form a new train that goes back to station one ?
If something like this would sometines appear in OpenTTD, then carriages will just stay at station B while electric loco is being replaced at depot.
Yes, it might be solved now by using two trains. But it is not very realistic. Long-distance trains (espesially passenger trains) change locos, not wagons on their route.ffpp wrote:Because if you want to change trains up so heavily it might be solvable more easily by just running two different trains.
____________________________________________________________________________________________________
Dear diary,
the new patch for today is up. Files and changelog are included in in the first post, a fresh new screenshot for those too lazy to download and try the patch has been added as well.
TODO-list is growing faster than DONE-list
best
Who is online
Users browsing this forum: No registered users and 3 guests