Transport Tycoon Forums

The place to talk about Transport Tycoon
It is currently Sun Feb 18, 2018 10:52 am

All times are UTC




Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next
Author Message
 Post subject: Conditional loading
PostPosted: Fri Mar 18, 2011 11:28 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
What it does is simple. I will examine on example.

    1: Go to Station1
    2: Go to Station2
    3: Jump to 2 if Load percentage is below 20.

This will cause a vehicle to stay without interruption in a station 2, loading for the condition to meet (tested only on train, but it should work on all types).


Attachments:
conditional_load_r22836.patch [2.19 KiB]
Downloaded 141 times
conditional_load_r25493.patch [2.62 KiB]
Downloaded 113 times

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Last edited by pavel1269 on Fri Jun 28, 2013 8:07 pm, edited 8 times in total.
Top
   
 Post subject: Re: Conditional loading
PostPosted: Fri Aug 26, 2011 10:46 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
Update

edit: Attachment removed. See first post.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Last edited by pavel1269 on Tue Sep 20, 2011 9:23 am, edited 1 time in total.

Top
   
 Post subject: Re: Conditional loading
PostPosted: Fri Aug 26, 2011 2:35 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2582
Location: Kent
The patch isnt adding the conditional loading option though is it?

What you are actually adding is a change to the train pathfinder where if a train is issued an order to the same station twice, it just stays there instead of trying to route back to the station?

_________________
Image


Top
   
 Post subject: Re: Conditional loading
PostPosted: Fri Aug 26, 2011 4:48 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
Leanden wrote:
The patch isnt adding the conditional loading option though is it?

No, nothing is added.

Leanden wrote:
What you are actually adding is a change to the train pathfinder where if a train is issued an order to the same station twice, it just stays there instead of trying to route back to the station?

I am not doing anything with PF. I am not sure if I understand you correctly, so I am not saying you are right or wrong. I hoped, that my example will demonstrate everything, which this patch does.

pavel1269 wrote:
    1: Go to Station1
    2: Go to Station2
    3: Jump to 2 if Load percentage is below 20.

This will cause a vehicle to stay without interruption in a station 2, loading for the condition to meet.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Conditional loading
PostPosted: Sat Aug 27, 2011 2:38 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Thu Mar 19, 2009 7:25 pm
Posts: 2582
Location: Kent
Ye so instead of leaving the station as the train currently does, the train stops in the station because it has been asked to return to the same station by the conditional order.

_________________
Image


Top
   
 Post subject: Re: Conditional loading
PostPosted: Tue Sep 20, 2011 9:27 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
I found a bug connected with this patch. Well, more like a unspecified behavior. The gradual loading works only for full load orders and this patch forces vehicles to stay at station without full load order. So the gradual loading was not working. Fix is in the first post.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Conditional loading
PostPosted: Fri Nov 04, 2011 2:52 pm 
Offline
Tycoon
Tycoon
User avatar

Joined: Tue Dec 09, 2008 4:20 pm
Posts: 2090
Skype: yes
Location: Slovakia
This is something worthy considering implementing in trunk.

I've been waiting for this since conditional orders were introduced! Current system is very awkward and not always useful.

_________________
Image

Only dumb people quote themselves, and only the truest retards put such quotes in their forum signatures
-Drury


Top
   
 Post subject: Re: Conditional loading
PostPosted: Thu Apr 12, 2012 5:53 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
A little update. Renamed variable, to fit a little more. Removed limitation of conditional orders which type is percentage loaded, for the sake of extensibility.


Attachments:
conditional_load_r24112.patch [2.11 KiB]
Downloaded 111 times

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)
Top
   
 Post subject: Re: Conditional loading
PostPosted: Fri Jun 28, 2013 7:48 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
Patch updated to current trunk. Patch file is in the first post.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Conditional loading
PostPosted: Wed Dec 18, 2013 9:00 am 
Offline
Engineer
Engineer

Joined: Mon Dec 09, 2013 10:39 am
Posts: 4
Hi, sorry to resume this old post but I have a problem with this patch.

I'm using it via this binary, but I cannot find the way to specify how much load percentage to wait on each station.

Should it need to be activated in some way? I cannot find any options.

Thanks.


Top
   
 Post subject: Re: Conditional loading
PostPosted: Wed Dec 18, 2013 9:39 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
benem wrote:
...I cannot find any options
http://wiki.openttd.org/Conditional_Orders


I would like to see this patch in a more universal form - while vehicle is on a station process it's orders and don't move it until another station order.

Example A:
[1] Go to station X
[2] Go to station X
[3] Go to station X
...
would keep the vehicle on the "station X"

Example B:
[1] Go to station X
[2] Jump to order 4
[3] Jump to order 1
[4] Jump to order 3
would keep the vehicle on the "station X"

Example C:
[1] Go to station X and unload all
[2] Go to station X and full load all
would give the same result as single "Go to station X, unload all and full load all" order

Example D:
[1] Go to station X
[2] Jump to order 5 if load percentage > 80
[3] Jump to order 1 if load percentage < 40
[4] Go to station Y and full load
[5] Go to station Z and unload all
would make the vehicle stay at station X until 40% loaded

etc.

_________________
:] don't worry, be happy and checkout my patches


Top
   
 Post subject: Re: Conditional loading
PostPosted: Sun Dec 22, 2013 6:32 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
While I see the point in examples B and D, I don't see what other examples have common with this patch at all.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Conditional loading
PostPosted: Sun Dec 22, 2013 6:54 pm 
Offline
OpenTTD Developer
OpenTTD Developer

Joined: Sun Sep 09, 2007 5:03 am
Posts: 4548
Location: home
After playing some cdist, I can see the idea of a partial load now.

However, all this jumping around in the orders seems a little complicated, what's wrong with extending loading or (for symmetry) unloading until some percentage?


Top
   
 Post subject: Re: Conditional loading
PostPosted: Sun Dec 22, 2013 7:01 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
I wanted to defend the example D, but I now see problem in it's concept. If I change it to the following:

Example D:
[1] Go to station X
[3] Jump to order 1 if load percentage < 40
[2] Jump to order 5 if load percentage > 80
[4] Go to station Y and full load
[5] Go to station Z and unload all

The it would work, right? :)

And to be honest, I don't see any in game example of example B, so you might be right that it is good as it stands now.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Conditional loading
PostPosted: Mon Dec 23, 2013 8:43 am 
Offline
Chief Executive
Chief Executive
User avatar

Joined: Mon Jan 14, 2008 3:51 pm
Posts: 644
Location: PL
These are not real life examples. The point is to unify things and allow user to create any layout, even crazy one.

_________________
:] don't worry, be happy and checkout my patches


Top
   
 Post subject: Re: Conditional loading
PostPosted: Mon Dec 23, 2013 11:55 am 
Offline
Tycoon
Tycoon

Joined: Wed Jan 17, 2007 12:14 am
Posts: 6961
Alberth wrote:
However, all this jumping around in the orders seems a little complicated, what's wrong with extending loading or (for symmetry) unloading until some percentage?

the main advantage of this method is that you don't need any new GUI elements, the order GUI is already very overloaded anyway.

also, it might allow something like this:

Goto A: unload and no loading, wait for 18 days
Goto A: load, wait for 2 days

at the end station. this way, cargo won't lose value during the waiting time.

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


Top
   
 Post subject: Re: Conditional loading
PostPosted: Sun Jan 19, 2014 10:48 pm 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Wed Oct 30, 2013 1:57 pm
Posts: 196
Something like this would be nice
  1. Station A: Wait for full cargo goods
  2. Station B: Unload all
  3. Station C: Load goods if available
  4. Station D: Skip if no goods onboard
  5. Goto 1

_________________
Skippern
OpenTTD Mac user


Top
   
 Post subject: Re: Conditional loading
PostPosted: Sun Jan 19, 2014 11:44 pm 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
You can't do that in clean trunk already?

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
 Post subject: Re: Conditional loading
PostPosted: Mon Jan 20, 2014 6:29 am 
Offline
Traffic Manager
Traffic Manager
User avatar

Joined: Wed Oct 30, 2013 1:57 pm
Posts: 196
I've seen AI's do if age > X skip order, but I havn't figured out how to do it myself

_________________
Skippern
OpenTTD Mac user


Top
   
 Post subject: Re: Conditional loading
PostPosted: Mon Jan 20, 2014 9:19 am 
Offline
Route Supervisor
Route Supervisor
User avatar

Joined: Sun Dec 03, 2006 1:22 pm
Posts: 473
Location: Czech Republic
Quote:
  1. Station A: Wait for full cargo goods
  2. Station B: Unload all
  3. Station C: Load goods if available
  4. Go to 1, if no goods on board
  5. Station D: Unload all (I guess)

You better search some tutorials next time for it. This patch has nothing to do with this.

_________________
My patches: Day length (new concept), Conditional loading, Auto separation, Unload all adds Leave empty, Better statue placement (in trunk)
My abandoned patches: Speed limits for RVs, Day length (old concept)


Top
   
Display posts from previous:  Sort by  
Post new topic  Reply to topic  [ 21 posts ]  Go to page 1 2 Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 5 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-2018 phpBB Limited

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