Cargo Distribution
Moderator: OpenTTD Developers
Re: Cargo Distribution
Hi all,
Here is another binary, r18897 with MSVC.
Disclaimer:
If CargoDist crashes, do not report it to the OpenTTD developers. Report it to this thread. When making your post about the crash, please upload the crash.dmp, crash.log, crash.sav, and crash.png (only available as of r18184, so if you are using a build older than that, don't bother). These files are vital to finding what happened during the crash. For developers, you can find the PDB file and other files at this site: http://users.tt-forums.net/petert/dev/
Peter
Here is another binary, r18897 with MSVC.
Disclaimer:
If CargoDist crashes, do not report it to the OpenTTD developers. Report it to this thread. When making your post about the crash, please upload the crash.dmp, crash.log, crash.sav, and crash.png (only available as of r18184, so if you are using a build older than that, don't bother). These files are vital to finding what happened during the crash. For developers, you can find the PDB file and other files at this site: http://users.tt-forums.net/petert/dev/
Peter
- Attachments
-
- gdfba2bc4-cargodist_win32.rar
- (3.07 MiB) Downloaded 185 times
Re: Cargo Distribution
thats quite an interesting question, Id like to hear that as wellpopewiz wrote:Sounds like a solid change. Will this effect station ratings though? The problem with long routes with few large trains was always that the station ratings would plummet between arrivals and there wouldn't be any waiting cargo.
Re: Cargo Distribution
Why would it? I guess it only affects which route people choose (previously, these long routes where chosen less than one would expect if I understand Fonso correctly), not whether they show up at the station. Changing station rating calculation would be another patch. It would be fun if there's a rating per destination, but that's probably not as easy as it sounds.
I'm not familiar with the inner working of the patch so I might be off though
I'm not familiar with the inner working of the patch so I might be off though

Re: Cargo Distribution
There are some problems with the latest version of cargodist. You might not be able to load savegames. I'm working on a fix.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Isn't that always the case? CargoDist save games weren't usually compatible.fonso wrote:There are some problems with the latest version of cargodist. You might not be able to load savegames. I'm working on a fix.
Re: Cargo Distribution
You cannot load savegames the latest version of cargodist itself has generated. There is a problem in the saveload code.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Hi,
Could someone please explain (or help me find an explanation of) how to run CargoDist on Windows Vista for an absolute beginner? I'm not a coder or anything beyond a basic user, but I'd like to have a play with CargoDist as it's what I've always wanted from OpenTTD - and I understand very little of anything that's posted in this thread...
Thank you!
Could someone please explain (or help me find an explanation of) how to run CargoDist on Windows Vista for an absolute beginner? I'm not a coder or anything beyond a basic user, but I'd like to have a play with CargoDist as it's what I've always wanted from OpenTTD - and I understand very little of anything that's posted in this thread...
Thank you!
Re: Cargo Distribution
new version:
- fixed assertion from linkgraph and saveload code
- implemented sort of supply scaling: Your station ratings are capped at 50% + (sum of acceptance in linkgraph component / global acceptance). This means in order to get station ratings of more than 50% you have to offer more destinations. A rating of 100% can only be achieved if you connect every possible destination on the map. This behaviour is optional. You can switch off "cap station ratings" in the economy settings to get the old behaviour. The system can be slightly cheated, though. If you have multiple stations connected to the same linkgraph component and all of them serving some house, the house's acceptance is counted multiple times for that component. We'll see how grave this problem will be.
- cleaned up the smallmap code.
The guy on the picture is not me, it's Alonso.
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Cargo Distribution
Dude, just download OpenTTD (I would suggest OpenTTD v1.0.0 if you havent already downloaded oepnttd) then download and extract one of the builds, though you might want to wait till petert makes a new build with the fixed code so you can save and load games.jczech wrote:Hi,
Could someone please explain (or help me find an explanation of) how to run CargoDist on Windows Vista for an absolute beginner? I'm not a coder or anything beyond a basic user, but I'd like to have a play with CargoDist as it's what I've always wanted from OpenTTD - and I understand very little of anything that's posted in this thread...
Thank you!


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: Cargo Distribution
I've got OpenTTD (0.7.1) and ran the build that was posted here a few days ago (the one before last), but my passengers were still just behaving the usual way and travelling on the first vehicle for one stop. Then it crashed after about ten minutes (I can't remember what I was doing so I can't replicate it, but I'd rather work out how to get the main feature working first).NekoMaster wrote:Dude, just download OpenTTD (I would suggest OpenTTD v1.0.0 if you havent already downloaded oepnttd) then download and extract one of the builds, though you might want to wait till petert makes a new build with the fixed code so you can save and load games.jczech wrote:Hi,
Could someone please explain (or help me find an explanation of) how to run CargoDist on Windows Vista for an absolute beginner? I'm not a coder or anything beyond a basic user, but I'd like to have a play with CargoDist as it's what I've always wanted from OpenTTD - and I understand very little of anything that's posted in this thread...
Thank you!
Re: Cargo Distribution
I like it. Do you consider this a temporary solution for supply scaling, or will this system be tweaked? The only reason I ask is in regards to larger and larger maps. As the map size increases, and with it the number of available destinations, adding even 20 stations may only increase the supplied traffic by 2%. You have likely already planned this, but my suggestion would be to weight traffic increase based on both distance (similar to your "effect of distance on demands" setting) and size of destination. This way, connecting a local bus station (where you would assume people close by are more likely to want to go) would increase the supply more than connecting an airport across the map.fonso wrote:new version:
- fixed assertion from linkgraph and saveload code
- implemented sort of supply scaling: Your station ratings are capped at 50% + (sum of acceptance in linkgraph component / global acceptance). This means in order to get station ratings of more than 50% you have to offer more destinations. A rating of 100% can only be achieved if you connect every possible destination on the map. This behaviour is optional. You can switch off "cap station ratings" in the economy settings to get the old behaviour. The system can be slightly cheated, though. If you have multiple stations connected to the same linkgraph component and all of them serving some house, the house's acceptance is counted multiple times for that component. We'll see how grave this problem will be.
- cleaned up the smallmap code.
Anyway, excellent job so far, It's really amazing how much deeper this game is due to your patch. Thanks.
Re: Cargo Distribution
If you play on a large map and already have some network there should always be an incentive to connect even more destinations until all are connected. As the available space for rewards is limited the reward generated for the first few stations is smaller than on small maps - regardless of other complicated factors you might add. I won't increase the overall amount of cargo generated, if that's what you're asking for. It would have too many nasty implications. So I can only decrease the amount of cargo delivered to your station. This is limited as there is a limited amount of cargo and the minimum amount delivered shouldn't be too low.popewiz wrote:
I like it. Do you consider this a temporary solution for supply scaling, or will this system be tweaked? The only reason I ask is in regards to larger and larger maps. As the map size increases, and with it the number of available destinations, adding even 20 stations may only increase the supplied traffic by 2%. You have likely already planned this, but my suggestion would be to weight traffic increase based on both distance (similar to your "effect of distance on demands" setting) and size of destination. This way, connecting a local bus station (where you would assume people close by are more likely to want to go) would increase the supply more than connecting an airport across the map.
Anyway, excellent job so far, It's really amazing how much deeper this game is due to your patch. Thanks.
I also don't see why connecting a local bus station should be more beneficial to the supply than connecting an airport across the map. The rating cap is already weighed by size of destination. "Size of destination" in this case is the sum of acceptance numbers of houses and industries in the station's coverage area.
To sum it up: Yes, large maps are harder to play than small ones now. However, the minimum cap is 50%. You'll always get some cargo, even if you just connect two stations.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Would it be possible to make the cap adjustable?
Re: Cargo Distribution
Fair enough, but let me explain my reasoning with the bus station/airport thing. If I live in Paris, and I have a bus stop close by, it's much more likely that I'll use that stop if there is another one in Paris, maybe close to work, the grocery store, etc. On the other hand, having an airport open in New York is only worthwhile to me if I have a reason to go to New York. I would assume that in general, cross-town trips would be much more common, and thus have higher supply. Now, if the New York airport begins to be connected by train to a lot of other cities in the US, the odds that I'll use the airport go up, but are still unlikely to surpass that of the cross-town bus route.fonso wrote:If you play on a large map and already have some network there should always be an incentive to connect even more destinations until all are connected. As the available space for rewards is limited the reward generated for the first few stations is smaller than on small maps - regardless of other complicated factors you might add. I won't increase the overall amount of cargo generated, if that's what you're asking for. It would have too many nasty implications. So I can only decrease the amount of cargo delivered to your station. This is limited as there is a limited amount of cargo and the minimum amount delivered shouldn't be too low.popewiz wrote:
I like it. Do you consider this a temporary solution for supply scaling, or will this system be tweaked? The only reason I ask is in regards to larger and larger maps. As the map size increases, and with it the number of available destinations, adding even 20 stations may only increase the supplied traffic by 2%. You have likely already planned this, but my suggestion would be to weight traffic increase based on both distance (similar to your "effect of distance on demands" setting) and size of destination. This way, connecting a local bus station (where you would assume people close by are more likely to want to go) would increase the supply more than connecting an airport across the map.
Anyway, excellent job so far, It's really amazing how much deeper this game is due to your patch. Thanks.
I also don't see why connecting a local bus station should be more beneficial to the supply than connecting an airport across the map. The rating cap is already weighed by size of destination. "Size of destination" in this case is the sum of acceptance numbers of houses and industries in the station's coverage area.
To sum it up: Yes, large maps are harder to play than small ones now. However, the minimum cap is 50%. You'll always get some cargo, even if you just connect two stations.
I hope that wasn't too rambling, and either way, I'm happy with what we have.
- NekoMaster
- Tycoon
- Posts: 4001
- Joined: 16 Aug 2008 22:26
- Skype: neko-master
- Location: Oshawa, Ontario, CANADA
Re: Cargo Distribution
Try a older build, or wait till a new build is released. I dont see why what you did would have failed, unless your on Linux or another OSjczech wrote:I've got OpenTTD (0.7.1) and ran the build that was posted here a few days ago (the one before last), but my passengers were still just behaving the usual way and travelling on the first vehicle for one stop. Then it crashed after about ten minutes (I can't remember what I was doing so I can't replicate it, but I'd rather work out how to get the main feature working first).NekoMaster wrote:Dude, just download OpenTTD (I would suggest OpenTTD v1.0.0 if you havent already downloaded oepnttd) then download and extract one of the builds, though you might want to wait till petert makes a new build with the fixed code so you can save and load games.jczech wrote:Hi,
Could someone please explain (or help me find an explanation of) how to run CargoDist on Windows Vista for an absolute beginner? I'm not a coder or anything beyond a basic user, but I'd like to have a play with CargoDist as it's what I've always wanted from OpenTTD - and I understand very little of anything that's posted in this thread...
Thank you!


Nekomasters Projects! (Downloads available on BaNaNaS!) \(>^w^<)/
# NARS ADD-ON SET 2CC | 2cc Rapid Transit For Me! (2ccRTFM) | 2cc Wagons In NML (2ccWIN)
# NML Category System (Organize your GRFS!) <- TT-Forums Exclusive Download!
Re: Cargo Distribution
Wasila: That can be done. Instead of a simple on/off switch I can let you set the minimum cap. So if you set it to 100% it's like switching it off.
popewiz: The weighing of distances is already done as part of the demand calculation. Of course I could limit the cargo generation based on the question if the available destinations match some pattern of distances. That would be very complicated to determine, though. And if you have some sort of special map where all possible destinations are packed in a small space (for example) you might not be able to reach that pattern.
The only problem I see is the possibility to cheat the system. However, the cheat might not be very practical, so I'll see if someone can come up with a way to put it to use. If you think you have successfully done so, please post a savegame.
popewiz: The weighing of distances is already done as part of the demand calculation. Of course I could limit the cargo generation based on the question if the available destinations match some pattern of distances. That would be very complicated to determine, though. And if you have some sort of special map where all possible destinations are packed in a small space (for example) you might not be able to reach that pattern.
The only problem I see is the possibility to cheat the system. However, the cheat might not be very practical, so I'll see if someone can come up with a way to put it to use. If you think you have successfully done so, please post a savegame.
The guy on the picture is not me, it's Alonso.
Re: Cargo Distribution
Even more settings? I'm sry fonso, I appreciate your work on this patch, but I really hope all those settings will vanish when it's finished. It's hard to unterstand what each setting does and "I" (yes, it's my opinionfonso wrote:That can be done. Instead of a simple on/off switch I can let you set the minimum cap. So if you set it to 100% it's like switching it off.


Re: Cargo Distribution
I think having some settings isn't a problem at all, just as long as the default is something that 'just works'. If that is true, then the settings can be retained for people wanting to tweak a few bits and pieces to their liking.
Re: Cargo Distribution
Hm, ok, I'm sry, maybe I have a bad day :/ But what about some presets like the difficulty-settings (easy, etc.) that are easy to unterstand like "focus on local service" or something like that?
Re: Cargo Distribution
The amount of settings added is a small fraction of the amount of settings already there. Perhaps the settings could be better worded:
I assume that the ARMOURED cargo class is just valuables - if so, put valuables instead. Same sort of thing for EXPRESS. Perhaps the accuracy could be converted into a percentage, although I'm not sure how that would work. The last three settings I don't see a better wording.
I assume that the ARMOURED cargo class is just valuables - if so, put valuables instead. Same sort of thing for EXPRESS. Perhaps the accuracy could be converted into a percentage, although I'm not sure how that would work. The last three settings I don't see a better wording.
Who is online
Users browsing this forum: No registered users and 11 guests