Cargo Distribution
Moderator: OpenTTD Developers
Re: Cargo Distribution
Thanks for the feedback. I see your point and will implement most of those things. The point about the separate listing of EXPRESS cargo is that with certain grfs EXPRESS can be passengers which you might want to handle symmetrically. Maybe I should make that more obvious.
The guy on the picture is not me, it's Alonso.
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Cargo Distribution
While we're at scrutinily looking at settings, let me add my share, too - without wanting to be evil 
You introduce there special treatment for the default cargos goods, food, and sweets and the NewGRF cargos tourists, fish, farm supplies, fruit and vegetables, and milk... - an assortment which IMHO definitely does not need special treatment nor special symmetrical treatment based on the 'express class'. Also it cannot be argued to have something in common. And adding a special piece of code just to suit tourists by considering express & passengers ... is not understandable either.
Keep it simple
- passengers and mail might be considered for symmetric treatment, but for the other classes I don't see that.
If one wants to go on a tangent, another way would be to introduce a a NewGRF property which introduces a flag like 'symmetric treatment' by cargo _label_. By default it'll be set for MAIL and PASS (EDIT: and VALU - GOLD and DIAM don't need symmetric settings as they're mined). Then a NewGRF introducing a new cargo which needs symmetric treatment could set that flag for that cargo and all will be fine. But it should not be something hardcoded in OpenTTD itself and it could just provide a setting like "use symmetric routing". But I'm not even convinced it'd need a setting, it could just be done always, and then newgrf-definable as said.
EDIT: and adding to Hirundo: I think he's right, cargodist should not be enabled on old savegames. They were not designed for it and might mis-behave. It should be (is, right?) a savegame setting, such old savegames must not have it enabled.

Passengers _always_ have the class PASSENGER; and it's the only class which defines for RV whether they use a truck or a bus station. ECS defines tourists as both, passenger and express - but does that warrant special treatment of the user-unknown class 'express': http://wiki.ttdpatch.net/tiki-index.php ... rgo_Labels ?fonso wrote:Thanks for the feedback. I see your point and will implement most of those things. The point about the separate listing of EXPRESS cargo is that with certain grfs EXPRESS can be passengers which you might want to handle symmetrically. Maybe I should make that more obvious.
You introduce there special treatment for the default cargos goods, food, and sweets and the NewGRF cargos tourists, fish, farm supplies, fruit and vegetables, and milk... - an assortment which IMHO definitely does not need special treatment nor special symmetrical treatment based on the 'express class'. Also it cannot be argued to have something in common. And adding a special piece of code just to suit tourists by considering express & passengers ... is not understandable either.
Keep it simple

If one wants to go on a tangent, another way would be to introduce a a NewGRF property which introduces a flag like 'symmetric treatment' by cargo _label_. By default it'll be set for MAIL and PASS (EDIT: and VALU - GOLD and DIAM don't need symmetric settings as they're mined). Then a NewGRF introducing a new cargo which needs symmetric treatment could set that flag for that cargo and all will be fine. But it should not be something hardcoded in OpenTTD itself and it could just provide a setting like "use symmetric routing". But I'm not even convinced it'd need a setting, it could just be done always, and then newgrf-definable as said.
EDIT: and adding to Hirundo: I think he's right, cargodist should not be enabled on old savegames. They were not designed for it and might mis-behave. It should be (is, right?) a savegame setting, such old savegames must not have it enabled.
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: Cargo Distribution
hihi ...
- Attachments
-
- screenie.png (284.49 KiB) Viewed 1234 times
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Awesome! That is a screenshot right?
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: Cargo Distribution
Hm, nice. What about having the link lines start right from the station signs? It'd be more clear what they refer to, especially in crowded areas.fonso wrote:hihi ...
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: Cargo Distribution
[maybe the viewport overlay patch should warrant its own thread]
maybe the viewport overlay should become more generic, like handling town names/station signs/etc. in the viewport overlay. and allow tile highlighting stuff like town authority, station catchment area or railtype. and lots more functionality.
also, maybe the links should be clickable and a statistics window should pop up (this would be the same as clicking a station sign, from user's point of view)
maybe the viewport overlay should become more generic, like handling town names/station signs/etc. in the viewport overlay. and allow tile highlighting stuff like town authority, station catchment area or railtype. and lots more functionality.
also, maybe the links should be clickable and a statistics window should pop up (this would be the same as clicking a station sign, from user's point of view)
-
- Engineer
- Posts: 111
- Joined: 08 Feb 2007 11:59
- Skype: a.locritani
- Location: Italy
Re: Cargo Distribution
Hi Fonso,
just a proposal, but I think that would be nice to have the "Vehicle Cargo List" feature of the old cargodest project.
For every vehicle, a list of destination (and maybe source) of its transported cargo is displayed, like:
what do you think?
Thanks
just a proposal, but I think that would be nice to have the "Vehicle Cargo List" feature of the old cargodest project.
For every vehicle, a list of destination (and maybe source) of its transported cargo is displayed, like:
Code: Select all
31 passengers
10 from StationA to StationB
11 from StationC to StationD
10 from StationC to StationB
Thanks
Re: Cargo Distribution
Small update from my side: I've played a game for a while now, but I hate upgrading main lines (which is starting to get necessary if I'm to connect farms and other primary industries) and the computer I usually play (which is an old one) with can't cope with the game any more when there are too many trains in the screen, so here it is from me to share with you guys, do with it as you like. It's created in version g003d86e4, furthermore: NewGFS's in the first screen shot attachment and I've changed parameters once during play to decrease 2cc running costs.
Looking forward to a new build, with the new overlay link graph. I'll start a server again then, but for now, running a server currently is screwed because of some router/port forwarding issues which I cannot figure out.
Looking forward to a new build, with the new overlay link graph. I'll start a server again then, but for now, running a server currently is screwed because of some router/port forwarding issues which I cannot figure out.
- Attachments
-
- Ridderend Transport, 1997-03-04#1.png
- (143.34 KiB) Downloaded 1 time
-
- Ridderend Transport, 1997-03-04.png
- (122.31 KiB) Downloaded 1 time
-
- Ridderend Transport, 1996-08-25.sav
- (209.9 KiB) Downloaded 162 times
Re: Cargo Distribution
Yes, obviously that's a screenshot. It's made with the viewport-overlay branch. However, if you test that branch you'll find there are quite a few things that need to be done before the feature is actually usable:
1. Make the lines thicker.
2. Draw them below the various signs and texts.
3. Introduce a legend where you can choose cargoes and companies.
So you'll have to wait a week or two before this will be done.
And as I expected, as soon as I implement something in that direction people come and want 10 more features. In short: no. My day only has the same 24 hours as yours and those are quite full already. Of course anyone is free to implement additional features on top of cargodist and I'll even give some advice on how to do things if you ask nicely
1. Make the lines thicker.
2. Draw them below the various signs and texts.
3. Introduce a legend where you can choose cargoes and companies.
So you'll have to wait a week or two before this will be done.
And as I expected, as soon as I implement something in that direction people come and want 10 more features. In short: no. My day only has the same 24 hours as yours and those are quite full already. Of course anyone is free to implement additional features on top of cargodist and I'll even give some advice on how to do things if you ask nicely

The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
That looks pretty cool fonso.fonso wrote: hihi ...
I guess you have found "the" zoomed in smallmap.

Does this mean that once implemented you will be removing the smallmap linkstats view?
-- .- -.-- / - .... . / ..-. --- .-. -.-. . / -... . / .-- .. - .... / -.-- --- ..- .-.-.-
--- .... / -.-- . .- .... --..-- / .- -. -.. / .--. .-. .- .. ... . / - .... . / .-.. --- .-. -.. / ..-. --- .-. / .... . / --. .- ...- . / ..- ... / -.-. .... --- --- -.-. .... --- --- ... .-.-.- / ---... .--.
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: Cargo Distribution
No, both will be available using the same internal mechanics, but there won't be zoom-in for the smallmap. You can already see that in the branch smallmap-overlay.ChillCore wrote:Does this mean that once implemented you will be removing the smallmap linkstats view?
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Some questions for the setting:
1. Accuracy when calculating...
The higher the value the more perfomance needs the CPU? Does it have an effect to the mass of passengers and the average distance?
2. Effect of distance on demands. SO it seems that its here the rule the higher the value the higher lower the passenger distance. I Aspected that its the opposite meaning.
3. Effect of remote stations polularity
Don't know what zhis means. What do i have to set if i like lower average distance of passangers?
4. Saturation of short Paths before using capacitious path. I had already 1 % but the passenger are going on taking the crowded trains.
Thanks for answering and sorry for bad english or if its already answered in the other 100 pages aof this thread.
1. Accuracy when calculating...
The higher the value the more perfomance needs the CPU? Does it have an effect to the mass of passengers and the average distance?
2. Effect of distance on demands. SO it seems that its here the rule the higher the value the higher lower the passenger distance. I Aspected that its the opposite meaning.
3. Effect of remote stations polularity
Don't know what zhis means. What do i have to set if i like lower average distance of passangers?
4. Saturation of short Paths before using capacitious path. I had already 1 % but the passenger are going on taking the crowded trains.
Thanks for answering and sorry for bad english or if its already answered in the other 100 pages aof this thread.
Re: Cargo Distribution
Unfortunately I don't have the time at the moment to actually play/test/help but DAMN THIS LOOKS AMAZING! I already want to thank you for that feature and taking up that idea in the first place, I'm sure this will make a lot of things much MUCH easier and visually clear! Especially if/once this becomes adopted for other visualizations as well...
again, thank you! (not just for this new feature but the whole CargoDist, giving a new dimension to the game I love!)
again, thank you! (not just for this new feature but the whole CargoDist, giving a new dimension to the game I love!)
Re: Cargo Distribution
No, it doesn't have any useful effect on the actual distribution. The higher the value the slower the game will run and the better the distribution of passengers will be adapted to your network. What it does if you raise the value is assign demand in smaller chunks and thus take longer to assign all of it, but leave less "bleed" around the "edges". If you set it to a very low value you'll get surprising results of where cargo wants to go and what way it will take. Some places will suddenly be overcrowded because Cargodist assigned a single big chunk to them and some others will be empty because all the demand was already assigned when it got to that place. The distribution gets more random and less predictable.Logital82 wrote:1. Accuracy when calculating... The higher the value the more perfomance needs the CPU? Does it have an effect to the mass of passengers and the average distance?
The higher you set this, the more cargo will only want to go short distances. If you set it to 0 cargo doesn't care about traveling distance at all.Logital82 wrote:2. Effect of distance on demands. SO it seems that its here the rule the higher the value the higher lower the passenger distance. I Aspected that its the opposite meaning.
The higher you set it the more cargo will only want to go to stations where there is a lot of cargo of the same type being produced. This is only the case for symmetrically distributed cargoes as obviously for asymmetric distribution it doesn't make sense. If you set it to 0 people will like the smallest village just as much as the big central station in some city.Logital82 wrote:3. Effect of remote stations polularity Don't know what zhis means. What do i have to set if i like lower average distance of passangers?
This only takes effect if there are multiple ways to get from one place to another. Cargodist will first saturate all paths to certain percentage, in the order of their length (shortest first), and later assign all remaining cargo round-robin to all paths. This setting is the aforementioned percentage. it has been introduced because the capacity measurements are not always very exact and you may want to leave some leeway to not overcrowd the shortest path while leaving others unused. It doesn't help at all if all paths to some given destination are hopelessly overcrowded.Logital82 wrote:4. Saturation of short Paths before using capacitious path. I had already 1 % but the passenger are going on taking the crowded trains.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
First thing is to say thanks to fonso for his work and all the time he spends for making cargoDist better and better.
I think its just great to have such a feature which improves OpenTTD in many ways.
For me, OpenTTD without CargoDist is not playable.
Unfortunately i am not able to generate my own game files out of the trunk. That wasn´t a problem so far, because Fonso does a great job and releases my Win32 game files often, so i am always up to date.
But now i have seen another project which i would love to have in my game as well. The 32bpp Extra Zoom Levels.
Is there any chance to get both in my game. CargoDist and the 32bpp Extra Zoom Levels?
Would be great if anyone out there may help me with this problem or is there still a solution and i just cant find it.
Thanks.
I think its just great to have such a feature which improves OpenTTD in many ways.
For me, OpenTTD without CargoDist is not playable.
Unfortunately i am not able to generate my own game files out of the trunk. That wasn´t a problem so far, because Fonso does a great job and releases my Win32 game files often, so i am always up to date.
But now i have seen another project which i would love to have in my game as well. The 32bpp Extra Zoom Levels.
Is there any chance to get both in my game. CargoDist and the 32bpp Extra Zoom Levels?
Would be great if anyone out there may help me with this problem or is there still a solution and i just cant find it.
Thanks.
- Simons Mith
- Transport Coordinator
- Posts: 326
- Joined: 14 Jan 2010 23:45
Re: Cargo Distribution
That looks good! I'm looking forward to playing with this more.fonso wrote:hihi ... [screengrab]
Here's a minor UI question: at the moment you seem to use single-colour lines for the traffic routes. Have you tried, say, a thicker black line for the background colour, with the coloured traffic lines drawn on top? I'm wondering if that might improve clarity, especially for zoomed views of complex cargo networks.
Re: Cargo Distribution
I've been messing around with Open TTD for a few months now, and have been very impressed with your mod in particular because it gives the functionality that was sorely missing from Locomotion (the only previous version I'd played).
However, I started a game a few days ago and ran into a problem, and I'm wondering if you can help solve it.
I wish I could give you a savegame, but I ended up "working around" the problem, so I can't replicate the issue. I'm using NARS and FIRS on this game.
With that, I was trying to get a supply chain to a Brewery going. I had a Fruit Orchard at one end and the Brewery at the other. In between (and oddly almost directly in line with the two) is a Grain Farm. So, I set 3 stations up. One at the Orchard, one at the Farm, and 1 at the Brewery. I then create a train, half with reefers, half with grain hoppers. I set the orders as non-stop between the 3 stations and set the loading options to "Full Load Any Cargo" at the Orchard, and "Full Load" at the Farm. First stop - everything works fine and when the reefers are full, the train sets out. Second stop - I get 99% loaded and it hangs. No matter what, it won't load that list 4 tons of grain needed to leave. Meanwhile, I've got 600+ tons built up of grain for the destination. What's even more odd, is if I split the train and add a second locomotive (so now 2 separate trains) the same 4 Grain Cars with the same "Full Load" order departs the Farm without a hitch.
After a while, I'm wondering 2 things -
1) Is it possible the issue is the "regearing" of the NARS locomotives? If so, why does it work fine when I have just the locomotive and 4 cars but not the locomotive and 8 cars?.
2) If 1 is correct and it is the "regearing" how can I setup the route so that the train will wait for the grain cars to be filled before moving on to the Brewery? Is there something within the mod that will allow this, or is it something I have to do from outside the mod?
However, I started a game a few days ago and ran into a problem, and I'm wondering if you can help solve it.
I wish I could give you a savegame, but I ended up "working around" the problem, so I can't replicate the issue. I'm using NARS and FIRS on this game.
With that, I was trying to get a supply chain to a Brewery going. I had a Fruit Orchard at one end and the Brewery at the other. In between (and oddly almost directly in line with the two) is a Grain Farm. So, I set 3 stations up. One at the Orchard, one at the Farm, and 1 at the Brewery. I then create a train, half with reefers, half with grain hoppers. I set the orders as non-stop between the 3 stations and set the loading options to "Full Load Any Cargo" at the Orchard, and "Full Load" at the Farm. First stop - everything works fine and when the reefers are full, the train sets out. Second stop - I get 99% loaded and it hangs. No matter what, it won't load that list 4 tons of grain needed to leave. Meanwhile, I've got 600+ tons built up of grain for the destination. What's even more odd, is if I split the train and add a second locomotive (so now 2 separate trains) the same 4 Grain Cars with the same "Full Load" order departs the Farm without a hitch.
After a while, I'm wondering 2 things -
1) Is it possible the issue is the "regearing" of the NARS locomotives? If so, why does it work fine when I have just the locomotive and 4 cars but not the locomotive and 8 cars?.
2) If 1 is correct and it is the "regearing" how can I setup the route so that the train will wait for the grain cars to be filled before moving on to the Brewery? Is there something within the mod that will allow this, or is it something I have to do from outside the mod?
Re: Cargo Distribution
Search the forum, because I think I remember seeing this before. http://www.tt-forums.net/viewtopic.php?f=29&t=52326 maybe?
Re: Cargo Distribution
I saw that and did a search - the problem is it still doesn't answer my question - being within CargoDist, is there a way to setup a multi-point chain of cargos like I'm talking about?
Re: Cargo Distribution
yes, but with "full load" it is trying to load regearing cargo
Correct me If I am wrong - PM me if my English is bad
AIAI - AI for OpenTTD
AIAI - AI for OpenTTD
Who is online
Users browsing this forum: No registered users and 13 guests