Patch: Partial refit
Moderator: OpenTTD Developers
Patch: Partial refit
This patch allows to select a part of a train or road vehicle at the refit window and to refit only that part.
The source code can be found at http://devs.openttd.org/~terkhen/patches/partial_refit/. The patch is in need of testing; any feedback will be appreciated.
The source code can be found at http://devs.openttd.org/~terkhen/patches/partial_refit/. The patch is in need of testing; any feedback will be appreciated.
Last edited by Terkhen on 14 Dec 2010 14:49, edited 10 times in total.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patch: Partial refit
wow, nice patch
Re: Patch: Partial refit
Do you like drones, quadcopters & flying toys? Check out Drone Strike Force!
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Base Music Sets: OpenMSX | Scott Joplin Anthology | Traditional Winter Holiday Music | Modern Motion Music
Other Projects: 2CC Trams | Modern Waypoints | Sprite Sandbox & NewGRF Releases | Ideabox | Town Names | Isle of Sodor Scenario | Random Sprite Repository
Misc Topics: My Screenshots | Forgotten NewGRFs | Unfinished Graphics Sets | Stats Shack | GarryG's Auz Sets
Re: Patch: Partial refit
Is it possible to allow selecting wagons using ctrl+clicks/click with shift + click methods?
Is it possilble to resize window when there are many cargos possible?
Is it possilble to resize window when there are many cargos possible?
- Attachments
-
- Przechwytywanie.PNG (21.4 KiB) Viewed 7744 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Patch: Partial refit
Tiny bug: create train with refittable wagon and empty engine, select an engine - there are listed cargos and refit is refitting whole train.
- Attachments
-
- Przechwytywanie.PNG (81.05 KiB) Viewed 1334 times
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Patch: Partial refit
if you have a train with, say, one half open wagons and other half closed wagons, and you select e.g. grain as refit cargo, does it automatically unselect all closed wagons, which cannot be refit to grain?
Re: Patch: Partial refit
IMO, in this case, the patch should disable any cargo than is incompatible with any selected wagon.
Re: Patch: Partial refit
The Ctrl+click behaviour used in depots could be implemented. I don't know what Shift + click does, though (and I can't found any info about it at the tooltips either). This reminds me that I did not add any tooltips for the new widgets and behaviour.Kogut wrote:Is it possible to allow selecting wagons using ctrl+clicks/click with shift + click methods?
No, because in some cases it is impossible to display all the cargos at once. For example, check the refit window for the Ishizuchi Industrial Tram (HEQS) running with FIRS:Is it possilble to resize window when there are many cargos possible?
It is probably selecting the whole chain but not displaying the selection. Thank you for the report, I'll check it soon.Kogut wrote:Tiny bug: create train with refittable wagon and empty engine, select an engine - there are listed cargos and refit is refitting whole train.
In this case, the behaviour is unchanged from vanilla OpenTTD. You can select all options available to the current selection, and if you refit to a cargo option that is not available for all wagons of the selection, only the wagons that are able to refit to that cargo will be refitted. I agree that this is confusing, and because of that I would like to have a well defined behaviour to deal with this issue before implementing it. Have in mind that the creation of refit orders still uses the old method (and it is not the goal of this patch to implement partial refit orders), and both methods should stay as consistent as possible.Eddi wrote:if you have a train with, say, one half open wagons and other half closed wagons, and you select e.g. grain as refit cargo, does it automatically unselect all closed wagons, which cannot be refit to grain?
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patch: Partial refit
OMG!
great great great patch.. very very usefull. thank you
great great great patch.. very very usefull. thank you
The rest is confetti!
Re: Patch: Partial refit
Could you please explain for the less advanced players like me, why do you need this capability?
I never have a need for a train with more than one cargo (except passengers/mail but those come conveniently as two different wagons).
I never have a need for a train with more than one cargo (except passengers/mail but those come conveniently as two different wagons).
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Patch: Partial refit
Take a train set with wagons which have many refit options. Then you might take one wagon type and want to send it e.g. to the FIRS refinery. This example might not fit industries as found 100%, but just for the illustation: There you want half the wagons to pickup fuel oil and the other half to pickup goods (instead of the default milk).
Or a very good excample are the MU wagons of the 2cctrainset: PAX, mail and valuables. You want a mixed train. Currently not easy to assemble that train (not too difficult either, though)
Or a very good excample are the MU wagons of the 2cctrainset: PAX, mail and valuables. You want a mixed train. Currently not easy to assemble that train (not too difficult either, though)
OpenTTD: manual | online content | translations | Wanted contributions and patches
#openttdcoop: blog | wiki | public server | DevZone | NewGRF web translator
DevZone - home of the free NewGRFs: OpenSFX | OpenMSX | OpenGFX | Swedish Rails | OpenGFX+ Trains|RV|Industries|Airports|Landscape | NML
Re: Patch: Partial refit
It's only useful for mixed trains. Personally I don't use them much either (except for farms with very small production). It is already possible to do partial refits without the patch, but you need to move the wagons you don't want to refit outside the train, refit the rest, and join them back again. The patch aims to provide a GUI for doing an otherwise tedious task.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
-
- Engineer
- Posts: 105
- Joined: 30 Jun 2006 04:22
Re: Patch: Partial refit
Great patch!!
Hope it makes to trunk.
Hope it makes to trunk.
- cmoiromain
- Chief Executive
- Posts: 655
- Joined: 15 Jan 2007 21:45
- Location: FRANCE
- Contact:
Re: Patch: Partial refit
Terkhen explains it exactly how I see it. This gives you control over individual wagons, whereas OpenTTD currently only allows to globally control the whole train, which is annoying in some cases.
I am little, ugly, and nasty. How do you do?
-
- Tycoon
- Posts: 5948
- Joined: 27 Apr 2005 07:09
- Contact:
Re: Patch: Partial refit
In principal, there´s a comparable number of mouse actions needed as before (i.e., detaching wagons). And I could easily construct cases where the current method needs less actions.cmoiromain wrote: This gives you control over individual wagons, whereas OpenTTD currently only allows to globally control the whole train, which is annoying in some cases.
Other than that, an interesting approach, but in need of further discussion.
regards
Michael
Re: Patch: Partial refit
For example...michael blunck wrote:. And I could easily construct cases where the current method needs less actions.
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Re: Patch: Partial refit
I have not yet tested but I have been in a few situations where I wished something like this existed. eg. Delivering food and goods to towns by means of one train, combining iron ore and coal for steel mills, picking up/delivering supplies in FIRS, etc, etc, etc.
The way trunk is now you need an extra loc for refitting wagons or move a lot of wagons back in and out of the consist as wagons can not be refitted when not attached to an engine.
Very nice idea Terkhen.
Hope it makes trunk someday soon.
/ChillCore wonders if this can be extended to refitting specific wagons in the depot by means of the order list.
The way trunk is now you need an extra loc for refitting wagons or move a lot of wagons back in and out of the consist as wagons can not be refitted when not attached to an engine.
Very nice idea Terkhen.
Hope it makes trunk someday soon.
/ChillCore wonders if this can be extended to refitting specific wagons in the depot by means of the order list.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Re: Patch: Partial refit
It needs testing before I consider thatChillCore wrote:Very nice idea Terkhen.
Hope it makes trunk someday soon.
There are many problems of concept with that idea. For example, two trains that have a completely different combination of wagons can share orders. What should the partial refit order do then?. Other issues were discussed on IRC a few weeks ago, but I don't remember the most complicated one right now.ChillCore wrote:/ChillCore wonders if this can be extended to refitting specific wagons in the depot by means of the order list.
Besides that, there are also many implementation issues (IIRC there was not enough free space in one of the order data structures). This is why I said that partial refit orders are outside of the scope of this patch.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Re: Patch: Partial refit
Going to download the patch right now and have a looksie at the code.Terkhen wrote:It needs testing before I consider thatChillCore wrote: Very nice idea Terkhen.
Hope it makes trunk someday soon.
And test ofcourse.
Hmm ... yes I did not think of that.Terkhen wrote:There are many problems of concept with that idea. For example, two trains that have a completely different combination of wagons can share orders. What should the partial refit order do then?. Other issues were discussed on IRC a few weeks ago, but I don't remember the most complicated one right now.ChillCore wrote: /ChillCore wonders if this can be extended to refitting specific wagons in the depot by means of the order list.
Linkie to the IRC-log would be apreciated, if someone remembers when the conversation took place that is.
I have re-read the topic and I had missed that line before ... sorry.Terkhen wrote: Besides that, there are also many implementation issues (IIRC there was not enough free space in one of the order data structures). This is why I said that partial refit orders are outside of the scope of this patch.
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
Playing with my patchpack? Ask questions on usage and report bugs in the correct thread first, please.
All included patches have been modified and are no longer 100% original.
Re: Patch: Partial refit
Don't bother much with the code for now; I still have to clean up many inconsistencies. I also have to figure out if the vehicle image should be displayed for all vehicle types, as it does not serve an actual purpose for them.
The discussion started at this time, but I don't know when the issues were discussed.
The discussion started at this time, but I don't know when the issues were discussed.
Spanish translation of OpenTTD
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Extended heightmaps
Have fun, don't quarrel too much and add as many advanced settings as you can.
Who is online
Users browsing this forum: Semrush [Bot] and 34 guests