Orders patch - percentile and FIFO loading, cargo display...

Forum for technical discussions regarding development. If you have a general suggestion, problem or comment, please use one of the other forums.

Moderator: OpenTTD Developers

nzhook
Engineer
Engineer
Posts: 115
Joined: 02 Jul 2004 13:15
Location: NZ
Contact:

Orders patch - percentile and FIFO loading, cargo display...

Post by nzhook »

Updated version of the new orders patch (last updated: 20 Dec 2004 for r1148)

Heres the latest version of the order system patch I started on with the FIFO thread.

These are the options now available with this patch:

:idea: Loading Percentiles
You can load a train to a minimum of 10%, 20%, 30%.... instead of just a full load.
To use this use the new up/down arrows on the orders menu.

:idea: Exact loading
Percentile loading is only a guide to when to stop, if more exists it will continue loading. If however you want to force the train to stop loading when the perceile has been hit, use the Exact loading option.
-- use the blank button next to the arrows

:idea: Prioritity loading (button works again)
Prioritity loading is used to allow some trains to override already loading trains. (eg. a smaller train can take prioritiy over a mammoth train, so money keeps flowing) there are two available ways to use this, the default is to have all NON prioritity trains to load in the normal way (without FIFO) prioirty trains will load using the FIFO method.
The other method is to enable in patch menu option (under Stations) the ablity for all trains to use FIFO/Improved loading, prioritiy trains will always load before a normal train (even if it arrives after a normal train), normal trains will then also FIFO if no prioritiy trains are in the station.

:idea: Improved loading -> FIFO loading
The loading method has been converted from the original HackyKid/Tron improved loading system to be real First In First Out (FIFO) loading.

:idea: Load now shows on status bar (Patch)
The amount of cargo is now shown on the 'Loading/Unloading', ';Heading for xxx' status bar. So in the corner you can quickly see how loaded a train is.


Started, but not in GUIs:
* Min and Max waiting times (Just needs GUI and testing)
* Ablity to choose if the full load is based on cargo or train (per queue item, not globally) (Just needs GUI and testing)
* Expand size of orders window based on patch setting (this will be hard)
-- this is currently set at 10 instead of 6... needs a way to be more dynamic.

Still Todo/Thoughts:
* Move the FIFO ablity to the station gui
* Add default order options for station (eg. clicking goto on a station will use the default options for that station)
* Prioritity trains given more chances of being allowed to continue first at a signal
* Remove any of the patch options this will add gui items for
* Possibly also a dont stop if no room option. (Im going to need a new window I think)
* Leave if another X trains are at the station.


NOTE: Currently to avoid a save game bump becuase of the order options the above settings are not saved (sorry). Some of the options will automatically start working (eg. once a train arrives at a station it will start to FIFO. -- If a train was already at the station when loading it will be treated as a lod any situation until it arrives at another station)

Please feel free to apply this patch and let me know of any bugs you find (or even suggestions for the above list) :idea:
Attachments
Screenshot 2 - Shows the orders window again, along with the new cargo display (rubber is grey, so its a little hard to see)
Screenshot 2 - Shows the orders window again, along with the new cargo display (rubber is grey, so its a little hard to see)
Tindworth Transport, 11th Jun 1963.png (75.77 KiB) Viewed 16719 times
Screen shot 1 (revision 1041)
Screen shot 1 (revision 1041)
JHook Transport, 9th Jul 2070.png (77.98 KiB) Viewed 16713 times
additionalorders.r1148.patch
The patch, working with svn r1148
(27.57 KiB) Downloaded 762 times
Last edited by nzhook on 20 Dec 2004 07:01, edited 2 times in total.
User avatar
ThorRune
Tycoon
Tycoon
Posts: 5762
Joined: 09 Oct 2003 14:00
Location: Nordland, Norway
Contact:

Post by ThorRune »

While your at it, could you lengten the orders window? 6 orders at a time just isn't enough.

Sounds great tho. Can't wait for FIFO.
Alcohol is not the answer, it just makes you forget the question.
User avatar
ThorRune
Tycoon
Tycoon
Posts: 5762
Joined: 09 Oct 2003 14:00
Location: Nordland, Norway
Contact:

Post by ThorRune »

How come only i responded? This sounds great.

*installs linux so i can compile it*
Alcohol is not the answer, it just makes you forget the question.
nzhook
Engineer
Engineer
Posts: 115
Joined: 02 Jul 2004 13:15
Location: NZ
Contact:

Post by nzhook »

ThorRune wrote:How come only i responded? This sounds great.

*installs linux so i can compile it*
You dont need linux to run it :) Just apply it to the source and compile. (should work, and would be good to be able to have someone post it.. might get more comments :) )

Yes, im still working on it.... just need a good spot of time, should be an update Monday (Nz Time)
nzhook
Engineer
Engineer
Posts: 115
Joined: 02 Jul 2004 13:15
Location: NZ
Contact:

Post by nzhook »

Just updated the patch, it looks like modifying a post dosnt update its position, also reworded the description.
Kebabrov
Engineer
Engineer
Posts: 39
Joined: 20 May 2004 18:36

Post by Kebabrov »

Hey,

This looks great!! I havent tried it, but i like the idea.

btw, do u mean Exact instead of Excat, or is it just a typo in your post?
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Is anyone still working on this patch? Or would anyone be interested if I tried to get it working on the latest SVN?
We Am De Best

Host of ThroughTheTube site
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

look at the dates, i think you've got the job.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Yeah, thats what i thought would happen!

btw, shouldnt you be working :wink:
We Am De Best

Host of ThroughTheTube site
FoxAlpha
Engineer
Engineer
Posts: 85
Joined: 06 May 2005 18:19
Location: Germany
Contact:

Post by FoxAlpha »

Nice to see that anyone interested in this patch.

When u get it working to the latest SVN, i include it in my integrated build 4.5 (see sig.)

This patch sounds very cool and when it works it could improve the gameplay.

Pls tell me if u get it work.

Fox
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Yeah course Fox, and theres also my day length patch that needs a bit of polishing too :wink:
We Am De Best

Host of ThroughTheTube site
nzhook
Engineer
Engineer
Posts: 115
Joined: 02 Jul 2004 13:15
Location: NZ
Contact:

Post by nzhook »

Its on the back burner.

I had scaled down the patch to smaller bits but couldnt get the stuff I wanted to pass via multiplayer or into save games. I also changed computers and havnt reinstalled linux so I can have my compiling environment back. Not to mention the normal limiting factors kicking in :( (eg. work)

I might try and track down the most recent version of the code I had which would get you upto a newer version but it will still take a little work to get it upto the latest SVN.


edit: Heres a diff against r2235 I cant remember exactly how finished this was at this point, as I said I broke it down into smaller bits as I wasnt having much luck getting patches into the main trunk so I though I would make seperate patches for each thing. -- This is the percentile loading stuff.
Attachments
additionalorders.r2235.patch
(54.43 KiB) Downloaded 547 times
User avatar
bobingabout
Tycoon
Tycoon
Posts: 1850
Joined: 21 May 2005 15:10
Location: Hull, England

Post by bobingabout »

sacro spent all last night working on converting it to the latest SVN. he said its going to take a while.
JPG SUX!!! USE PNG!!!
There are times when JPG is useful, TTD screenshots is not one of them. Please use PNG instead.

[/url]
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1517
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Great! I hope Sacro can finish it today - FoxAlpha will probably release the new build of Integrated_nightly tomorrow, so just PM him the finished patch. :D
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

It's almost done, just figuring out a few last things, here is as far as ive got, but it doesnt compile yet, sorry :oops:
Attachments
additionalorders.almost2912.patch
(54.15 KiB) Downloaded 506 times
We Am De Best

Host of ThroughTheTube site
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1517
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

Great!

Well - I have looked at it - and to understand it thoroughly, I would have to look quite a bit more at it. :)
In any case - if you manage to complete it in the next couple of days, PM one copy to FoxAlpha too, so it can be included in the upcoming Integrated_nightly. 8)


EDIT: BTW - Sacro - is 987 and 1020.5 any good of a result for that funny penguin game you got on your website? :lol:
FoxAlpha
Engineer
Engineer
Posts: 85
Joined: 06 May 2005 18:19
Location: Germany
Contact:

Post by FoxAlpha »

How about this patch ?

I am shortly before finishing my next I4.5.

U wrote that it wont compile now.
What do u mean how long u need to finished ?

Fox
Sacro
Tycoon
Tycoon
Posts: 1145
Joined: 18 Jun 2005 21:08
Location: Here
Contact:

Post by Sacro »

Sorry, haven't been able to get online in a while, still waiting to get my own place with net access. I'm still working on it, but I have just started college, and had a bit on my mind, i should have it going soon though, sorry about the wait.

SirkoZ: not updated my site in ages! i really should though
We Am De Best

Host of ThroughTheTube site
User avatar
SirkoZ
Tycoon
Tycoon
Posts: 1517
Joined: 06 Mar 2004 23:51
Location: The sunny side of Alps

Post by SirkoZ »

:)

Great!
Well - drop a line, when it's finished, so a new release of integrated nightly can be made.
Psycho Dude
Engineer
Engineer
Posts: 4
Joined: 11 Sep 2005 14:30

Post by Psycho Dude »

Sounds nice, especially the part in the planning list about priority trains, the thing I've always wanted in my busy train networks, would increase my profits a lot without having to create the most f*** up train networks to prevent too many cross-tracks.
Post Reply

Return to “OpenTTD Development”

Who is online

Users browsing this forum: No registered users and 0 guests