YACD - Yet Another CargoDestinations (v2.3 released)
Moderator: OpenTTD Developers
Re: YACD - Yet Another CargoDestinations
i kinda like the capacity information, it helps spotting the bottlenecks
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: YACD - Yet Another CargoDestinations
Some thoughts from early in my YACD game...
1. Don't forget to enable cargo destinations in your game: 2. The warning about bankruptcy in savegames is to be taken seriously
3. YACD throws up some interesting questions for industry sets. Broadly it looks to make cargo transportation much more interesting. I've found one edge case so far. The fishing chain in FIRS is explicitly designed to cluster source (fishing ground) and destination (fishing harbour), giving players an easy moneymaker to start with. However YACD favours fishing harbours a long way from the fishing grounds, rather than those clustered nearby
I'm not sure how this should be solved yet.
4. I haven't figured out how YACD handles transfers yet. Do I need explicit transfers, or does the cargo routing algorithm sort it out? I'm figuring the latter...
1. Don't forget to enable cargo destinations in your game: 2. The warning about bankruptcy in savegames is to be taken seriously

3. YACD throws up some interesting questions for industry sets. Broadly it looks to make cargo transportation much more interesting. I've found one edge case so far. The fishing chain in FIRS is explicitly designed to cluster source (fishing ground) and destination (fishing harbour), giving players an easy moneymaker to start with. However YACD favours fishing harbours a long way from the fishing grounds, rather than those clustered nearby

4. I haven't figured out how YACD handles transfers yet. Do I need explicit transfers, or does the cargo routing algorithm sort it out? I'm figuring the latter...
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: YACD - Yet Another CargoDestinations
that's what i meant above with "local" cargo to be favoured. especially in very early game. (imagine eGRVTS with just horse carriages)
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: YACD - Yet Another CargoDestinations
My perception is that for industries based on land, local destinations are favoured. It appears to be water industries that favour distant destinations. (I have no science for this, just looking at industries in my game). Is this an issue of pathfinders + penalties?Eddi wrote:that's what i meant above with "local" cargo to be favoured. especially in very early game. (imagine eGRVTS with just horse carriages)
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: YACD - Yet Another CargoDestinations
it's a matter of heuristics. my brain knows two modes to read an abbreviation: 1) individual letters, or 2) word. XKCD clearly falls into category 1: /iks-ka-tse-de/, while YACD initially falls into category 2, but after the first syllable /yak/ it stops, because the /d/ is not a full syllable. with /yak-dest/ it would be a two-syllable word.Roujin wrote:Eddi: strangely I find it no harder to pronounce this than xkcd.(actually it's easier, "yay-ceedee" (which also carries our enthusiasm about the effort to implement cargo destinations into OpenTTD
) or "yassidy", compared to "ex-kay-ceedee")
Re: YACD - Yet Another CargoDestinations
Yeah, absolutely. I've been testing with a well developed game (mainly pax) from the savegame forum section. Without YACD, it's making several 100 millions each year, but since I enabled destinations on that game, I've been constantly loosing money, even after completely reorganizing the cargo network so it's actually carrying cargo again. The network just isn't built to manage the transport flow, which means that cargo is piling up in stations and not making money.andythenorth wrote: 2. The warning about bankruptcy in savegames is to be taken seriously![]()
Change the setting economy.cargodest.ind_chances to something like "90,95,100" (you can't do this via the in-game console though, the console command doesn't handle lists unfortunatelyandythenorth wrote: 3. YACD throws up some interesting questions for industry sets. Broadly it looks to make cargo transportation much more interesting. I've found one edge case so far. The fishing chain in FIRS is explicitly designed to cluster source (fishing ground) and destination (fishing harbour), giving players an easy moneymaker to start with. However YACD favours fishing harbours a long way from the fishing grounds, rather than those clustered nearbyI'm not sure how this should be solved yet.

Please read the first postandythenorth wrote: 4. I haven't figured out how YACD handles transfers yet. Do I need explicit transfers, or does the cargo routing algorithm sort it out? I'm figuring the latter...

-- Michael Lutz
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: YACD - Yet Another CargoDestinations
I'll try adjusting the chances list and report back.
Other observations...
(1) it's very addictive so far. My game is only two years old, but it's fun. I figured I have to connect as many nodes connected as possible in a passenger network as fast as possible. There's a critical mass where there are enough PAX journeys for vehicles to get a reasonable profit. In a traditional game I'd pick off a couple of money makers, then join up complete industry chains, but not worry about the overall graph.
(2) I have a hotel industry (PAX in/out) in FIRS which seems to be disproportionately favoured as a destination for nearby towns. It is a good hotel, and does serve alcohol
Might just be a random effect.
(3) EDIT - another early conclusion is that mail wants to travel to distant destinations? So starting with mail in a local network is not very money-making?
Other observations...
(1) it's very addictive so far. My game is only two years old, but it's fun. I figured I have to connect as many nodes connected as possible in a passenger network as fast as possible. There's a critical mass where there are enough PAX journeys for vehicles to get a reasonable profit. In a traditional game I'd pick off a couple of money makers, then join up complete industry chains, but not worry about the overall graph.
(2) I have a hotel industry (PAX in/out) in FIRS which seems to be disproportionately favoured as a destination for nearby towns. It is a good hotel, and does serve alcohol

(3) EDIT - another early conclusion is that mail wants to travel to distant destinations? So starting with mail in a local network is not very money-making?
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: YACD - Yet Another CargoDestinations
I reserved some time today for finally trying out this patch, but so far I've only set up and compiled the thing.
Small hint for any other windows users who are trying to apply the patch with gnu-win32 patch: you have to run the .patch file through a tool of your choosing first that converts the line endings to CRLF, or there will be cryptic errors. Took me a while to figure out
Small hint for any other windows users who are trying to apply the patch with gnu-win32 patch: you have to run the .patch file through a tool of your choosing first that converts the line endings to CRLF, or there will be cryptic errors. Took me a while to figure out

Re: YACD - Yet Another CargoDestinations
If the map has two larger towns/cities that aren't too far away (if you play random maps, that's obviously not going to be the case every single time), there's a very good chance they will have each other as a destination with a good share of the total passengers. A good starting strategy then is to build a local network for each city (can be just a simple circle route as long as it covers most of the houses) and a connection between them. When you've made some money from that, start connection the towns surrounding both cities, starting with those that have demand to both cities if possible. Watch out for overload of your connector line though.andythenorth wrote:(1) it's very addictive so far. My game is only two years old, but it's fun. I figured I have to connect as many nodes connected as possible in a passenger network as fast as possible. There's a critical mass where there are enough PAX journeys for vehicles to get a reasonable profit. In a traditional game I'd pick off a couple of money makers, then join up complete industry chains, but not worry about the overall graph.
The chance for a cargo with town effect (which pax should have as TE_PASSENGERS) is supposed to be 95% town, 5% industry. Maybe there's a bug somewhere, I'll have to check it.andythenorth wrote:(2) I have a hotel industry (PAX in/out) in FIRS which seems to be disproportionately favoured as a destination for nearby towns. It is a good hotel, and does serve alcoholMight just be a random effect.
-- Michael Lutz
Re: YACD - Yet Another CargoDestinations
sorry, but I'll be the first one to request it.
can anyone provide a win32 build ?
yes, I know I could learn, I tried... but the fact is I don't use same tools : I never understood git (but I can do few stuff with svn), gnu tools for windows is unknown for me, and my compiler is unsupported (VC6)...
thank you.
can anyone provide a win32 build ?
yes, I know I could learn, I tried... but the fact is I don't use same tools : I never understood git (but I can do few stuff with svn), gnu tools for windows is unknown for me, and my compiler is unsupported (VC6)...
thank you.
Re: YACD - Yet Another CargoDestinations
Windows release binary, built using Visual Studio 2008 Express. As far as I'm aware, It should contain DirectMusic support.
Bundle code: (needs cygwin/msys etc.)
Edit: I've used hg instead of subversion to checkout the OpenTTD source code which is why it shows up as version hdf8e89c9M in-game instead of r22374M.
Edit2: The bundle code above is only provided for reference, you don't need execute when using the bundle attached above. It was merly included so that others can spot if I've forgoten anything critical.
Bundle code: (needs cygwin/msys etc.)
Code: Select all
NAME=openttd-r22374M-win32
cp -Ra bin $NAME || exit
cp objs/win32/Release/openttd.exe $NAME
zip -r -q $NAME.zip $NAME
Edit: I've used hg instead of subversion to checkout the OpenTTD source code which is why it shows up as version hdf8e89c9M in-game instead of r22374M.
Edit2: The bundle code above is only provided for reference, you don't need execute when using the bundle attached above. It was merly included so that others can spot if I've forgoten anything critical.
My OpenTTD contributions (AIs, Game Scripts, patches, OpenTTD Auto Updater, and some sprites)
Junctioneer (a traffic intersection simulator)
Junctioneer (a traffic intersection simulator)
- andythenorth
- Tycoon
- Posts: 5705
- Joined: 31 Mar 2007 14:23
- Location: Lost in Music
Re: YACD - Yet Another CargoDestinations
...posting two games so you can see the development of the network.
Sligglesworth got it's trams and train before I provided ferry service to the rest of the network. PAX was low in the closed network, but I made a mistake there anyway - I should have checked the destinations, not many of them are in my main network
Sligglesworth got it's trams and train before I provided ferry service to the rest of the network. PAX was low in the closed network, but I made a mistake there anyway - I should have checked the destinations, not many of them are in my main network

- Attachments
-
- Fallington Transport, 22nd Feb 1886.sav
- (165.17 KiB) Downloaded 171 times
-
- Fallington Transport, 21st May 1882.sav
- (148.09 KiB) Downloaded 141 times
FIRS Industry Replacement Set (released) | HEQS Heavy Equipment Set (trucks, industrial trams and more) (finished)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Unsinkable Sam (ships) (preview released) | CHIPS Has Improved Players' Stations (finished)
Iron Horse ((trains) (released) | Termite (tracks for Iron Horse) (released) | Busy Bee (game script) (released)
Road Hog (road vehicles and trams) (released)
Re: YACD - Yet Another CargoDestinations
Heh, I'd've saved myself the trouble if I had foreseen someone posting a binary 
---
Michi_cc: how to interpret the contents of the town window correctly? (see attached screenshot) Outgoing cargo:
x out of y to z
What does that mean exactly? Out of y passengers, x were actually spawned? Or were y spawned but x transported?
Also, "local destinations" is the biggest number, does that mean most passengers in this city wanted to go somewhere else in the city? Now, I've got one station covering most of the city (train station Ctrl-combined to bus station in the center of the city), what happens if a passenger wants to go from x to y in the city where both x and y are in the catchment area of the same station?
---
edit:
well I think I found out what happens...
I have some passengers waiting at Rabourne now, that want to go via Rabourne Central, to Rabourne, i.e. start = destination. That's a bug, I guess?
edit2: clarification: no special orders used anywhere, just normal go to (load if available, unload if accepted)

---
Michi_cc: how to interpret the contents of the town window correctly? (see attached screenshot) Outgoing cargo:
x out of y to z
What does that mean exactly? Out of y passengers, x were actually spawned? Or were y spawned but x transported?
Also, "local destinations" is the biggest number, does that mean most passengers in this city wanted to go somewhere else in the city? Now, I've got one station covering most of the city (train station Ctrl-combined to bus station in the center of the city), what happens if a passenger wants to go from x to y in the city where both x and y are in the catchment area of the same station?
---
edit:
well I think I found out what happens...
I have some passengers waiting at Rabourne now, that want to go via Rabourne Central, to Rabourne, i.e. start = destination. That's a bug, I guess?
edit2: clarification: no special orders used anywhere, just normal go to (load if available, unload if accepted)
Re: YACD - Yet Another CargoDestinations
y passengers wanted to go to z last month, but only x found a suitable route and were actually transported. This means that ideally x is the same as y. To achieve that, you need to cover all houses at both ends and provide links between them that don't exceed the maximum path penalty (e.g. don't try to transport pax between two neighbouring towns via a complete loop around the map).Roujin wrote: Outgoing cargo:
x out of y to z
The passengers will "deliver" themselves to their destination without paying anything to you. YACD does favour transport though, so if the source and the destination are covered by the same station, but the destination is also covered by another station that has a sane link (i.e. fast enough for the short distance) to the source station, cargo will use the provided transport and not deliver itself.Roujin wrote:Also, "local destinations" is the biggest number, does that mean most passengers in this city wanted to go somewhere else in the city? Now, I've got one station covering most of the city (train station Ctrl-combined to bus station in the center of the city), what happens if a passenger wants to go from x to y in the city where both x and y are in the catchment area of the same station?
Nope, not a bug. The final destination shown in the GUI is the town, not the station. Check the "transferring at" lines in the station window, that's where the cargo gets off the vehicle (also if it's final delivery and not transfer).Roujin wrote: I have some passengers waiting at Rabourne now, that want to go via Rabourne Central, to Rabourne, i.e. start = destination. That's a bug, I guess?
I forgot something regarding load balancing in the first answer: Cargo packets are also randomly assigned a "transport class", they can be flagged as normal, "prefer cheap", "prefer fast" or both. "Prefer cheap" means that vehicle cost is penalized more (with aircraft being the most expensive and ship the cheapest) and "prefer fast" means that travel time is penalized more. This way you'll have up to four different "flows" that spread out over the network. I implemented that so if there's for example both an air and a train link between two towns, both links are used (imagine business travellers and holiday makers),fonso wrote:Another thing I'd like to know is how you get the load balancing into that setup. I never quite understood the inner workings of Yapf and I guess that's where I have to look. Maybe you can shed some light on this.
-- Michael Lutz
Re: YACD - Yet Another CargoDestinations
Awesome, thanks for the answers 
Rabourne here meaning "the town Rabourne" and not "the station Rabourne" clarifies a lot! Indeed, the "transfering at"-station is the other station in the town, "Rabourne Central".


Rabourne here meaning "the town Rabourne" and not "the station Rabourne" clarifies a lot! Indeed, the "transfering at"-station is the other station in the town, "Rabourne Central".
That means it makes sense to create some local bus/tram stations inside the catchment of the big train station, in order to max the amount of "local destination" pax that are paying me instead of walking? Awesome.The passengers will "deliver" themselves to their destination without paying anything to you. YACD does favour transport though, so if the source and the destination are covered by the same station, but the destination is also covered by another station that has a sane link (i.e. fast enough for the short distance) to the source station, cargo will use the provided transport and not deliver itself.

Re: YACD - Yet Another CargoDestinations
Well, my endeavour to max out the "local destination" passengers in this town isn't really working out.. only a fraction of them seems to like my exceptional tram service 
Is this normal?
edit: Also (for example), I have all but four houses covered in Robourne, and all but three in Trundstone Bay, so why do only two third of the people actually spawn? Shouldn't all passengers spawn if all houses are connected?

Is this normal?
edit: Also (for example), I have all but four houses covered in Robourne, and all but three in Trundstone Bay, so why do only two third of the people actually spawn? Shouldn't all passengers spawn if all houses are connected?
- Attachments
-
- Tenningwell Transport, 1927-05-16.png
- (590.39 KiB) Downloaded 1 time
Re: YACD - Yet Another CargoDestinations
the number should still be modified by station rating, so if all your stations have around 67% station rating, then that are the passengers you are going to get.Roujin wrote:why do only two third of the people actually spawn? Shouldn't all passengers spawn if all houses are connected?
Re: YACD - Yet Another CargoDestinations
Aha! Well, I'm still in the steam era and haven't invested in statues and such, so naturally my rating is rather lowEddi wrote:the number should still be modified by station rating, so if all your stations have around 67% station rating, then that are the passengers you are going to get.Roujin wrote:why do only two third of the people actually spawn? Shouldn't all passengers spawn if all houses are connected?

- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: YACD - Yet Another CargoDestinations
Right after game start (2nd January) I checked a random town. Seems the % calcuated are slightly off 

Code: Select all
~>git show
commit d29e8fab891b03ac767942c91f7a97c5e78253e1
- Attachments
-
- yacd_01.png (95.18 KiB) Viewed 1774 times
-
- also later...
- yacd_02.png (89.07 KiB) Viewed 1774 times
-
- inconsistent cargo transported...
- yacd_03.png (48.35 KiB) Viewed 5105 times
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
- planetmaker
- OpenTTD Developer
- Posts: 9432
- Joined: 07 Nov 2007 22:44
- Location: Sol d
Re: YACD - Yet Another CargoDestinations
There seem to be issues with automatic orders, or maybe it's only that the cargo or routing cache has not being updated (yet); in any case it's a bit surprising:
see the attached savegame, train 4. I'd expect it to pickup at its next stop in Schwarzerhütte Woods all passengers except those heading for Lechsee. The train is was and will
be their only means to reach that destination. But it will leave behind most of them.
Previously Schwarzerhütte Woods was not an automatic order but a regular order as it was the end of line which was extended to Lechsee later.
Mind, the savegame uses a couple of AIs and NewGRFs. All should be available via bananas except the 5 attached nightly versions of some NewGRFs.
Making money was not that difficult, but I was warned and got some hints what to do beforehand and I was cautious
And it's more difficult than normal game, but obviously the better AIs are also doing well, better than me
And it's fun to actually build real networks for the passengers which actually then make sense
, trying to satisfy their needs, first jumping on the obvious routes between metropolises after they got a local network in order to be able to supply also long-distance passengers
. The real benefit is the implicit two-way transfer which avoids nasty two-station constructions with double stops for trains when such thing is planned in trunk.
see the attached savegame, train 4. I'd expect it to pickup at its next stop in Schwarzerhütte Woods all passengers except those heading for Lechsee. The train is was and will

Previously Schwarzerhütte Woods was not an automatic order but a regular order as it was the end of line which was extended to Lechsee later.
Mind, the savegame uses a couple of AIs and NewGRFs. All should be available via bananas except the 5 attached nightly versions of some NewGRFs.
Making money was not that difficult, but I was warned and got some hints what to do beforehand and I was cautious




- Attachments
-
- screenshot of train, orders and passengers.
- yacd_04_train04.png (120.24 KiB) Viewed 1774 times
-
- yacd-test.sav
- savegame
- (465.42 KiB) Downloaded 131 times
-
- NewGRFNightlies.zip
- Needed nightly versions of NewGRFs which are not on Bananas
- (1.43 MiB) Downloaded 152 times
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
Who is online
Users browsing this forum: No registered users and 9 guests