Close announcement>
New Announcement
Here be dragons! Also maniacs wildly experimenting with code.

Cargo & Industry fixes for 1.06

A private forum for those folks working on patches for RRT3.
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06

Unread post by Gumboots »

I linked to your first link myself. :mrgreen: The second one is a handy reminder though. !*th_up*! I've seen it before, but had forgotten about it.

It sounds very promising. If scenario authors are sensible about selections (and understand the selection rules) and if some industries are designed so that some cargoes actually can be disabled while still having a viable scenario, then it should be possible to have the full 60 cargo slots set up in the editor.

I'll set something up and give it a good test run. I'm kinda in the mood for testing a few weird things at the moment.
PS. Don't really understand it, but I found a quote about the flatbed cars here by Milo. Not sure if it's anything?
Brilliant! Yes, that makes perfect sense. Got it in one. (0!!0)

The byte he's referring to is #32 in the cargo's .cty file. I just checked, and that has a value of 00 for Alcohol, which comes in boxcars with an icon on the side. It has a value of 04 for Steel, which comes on a flatcar, and a value of 0A (10 in decimal) for Iron, which comes in an open hopper.

This is muchly splendiferously awesomesauce. It should mean that by changing the values for Goods and Rubber to 00, I should be able to get those cargoes (or any other cargoes) showing their correct cargo icons when they are in my custom boxcars. I'll definitely test this, as I can see it being very handy. (Just tested, and it works.)

Edit: Although I still have my doubts if that will affect how things display inside CarSideView_1, because that may rely on some other extra trickery. It suspect that will always be locked to the four default eras and four default icons on that image. Still, it will be useful for flatcar cargoes that I want in boxcars.

Anyway, checked out the .cty file thing. It works like this:

00 at .cty byte 32 means normal cargo icon on side of car.
---------------------------------------------------------------------
01 to 08 inclusive define various default flatcar cargoes.
---------------------------------------------------------------------
01 is Lumber (but CargoModel ID for Lumber is 02).
02 is Weapons (but CargoModel ID for Weapons is 03).
03 is Goods (but CargoModel ID for Goods is 04).
04 is Steel (but CargoModel ID for Steel is 05).
05 is Rubber (but CargoModel ID for Rubber is 06).
06 is Aluminum (but CargoModel ID for Aluminum is 07).
07 is Uranium (but CargoModel ID for Uranium is 08).
08 is Logs (but CargoModel ID for Logs is 09).
---------------------------------------------------------------------
09 to 0B inclusive define various default open hopper cargoes.
---------------------------------------------------------------------
09 is Coal (CargoModel ID is 0A, or 10 in decimal).
0A is Iron (CargoModel ID is 0B, or 11 in decimal).
0B is Bauxite (CargoModel ID is 0C, or 12 in decimal).

The CargoModel ID numbers being (.cty byte 32)+1 is clear, and explains something I knew about but didn't know the reason for. The CargoModels don't use the 00 or 01 identifiers for any cargoes. It makes sense now, because the scale has to start at 01 + 1 = 2. Which is where it does start, with Lumber calling CargoModel02.3dp and going on from there for the other cargoes.

This is interesting, because it opens up the possibility of calling some of the default CargoModel slots for non-standard cargoes. WP&P's old pulpwood car already does this, by hijacking the default Goods cargo model and profile icon.

I just checked a copy of his car that I had lying around. It uses the default Goods value of 03 in the .cty file, so it appears that somehow WP&P figured this out. That .cty byte 32 obviously allows Pulpwood to call the default Goods icon in CarSideView and the default Goods CargoModel04.3dp, both of which WP&P then edited to turn them into Pulpwood loads. (0!!0)

Unlike most of his custom cars, his Pulpwood flats only have four eras. This implies that he couldn't get the profile icons working with custom eras while using CarSideView_1.imb as the source. He didn't mess with any other flatcar cargoes, so I think he ran into trouble there and then moved on to other things. But with what we know now, obviously there is more scope for custom shenanigans. You just have to define your own icons with another .imb file.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
RulerofRails
Dispatcher
Posts: 310
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06

Unread post by RulerofRails »

Sorry about the double-up. Milo left a lot of top quality info laying around. Here's something else, viewtopic.php?p=3283#p3283:
milo wrote:The Bad: We won't be able to skin express cargos. Passengers, mail, and troops all use custom RT3.lng messages and custom cargo code rather than reading most data from the cargo object. That probably kills the most obvious ways to use the Prisoners, Newspapers, Money, and Valuables skins.
Which we discovered the hard way when trying to change passenger price etc..
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06

Unread post by Gumboots »

That shouldn't affect renaming via RT3.lng (those names have to be translatable anyway, so are covered). It should only affect things like rot time and price. Not that I can see any real use for Prisoners and Money anyway.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06

Unread post by Gumboots »

Hey I'm just looking through this infamous list of hidden cargoes, wondering which ones might be useful enough to test. Some of them seem near enough to useless:

Code: Select all

~4459Beer
~4464Candidates
~4468Containers
~4477Energy
~4479Food
~4482Gravel
~4495Money
~4508Perfume
~4510Pottery
~4511Prisoners
~4518Spaceships
~4523Tea
~4542Wire
~4541Wine
Just thinking about how you'd potentially use them as default cargoes:

Houses already have all their visible demands full. There's no room for more cargoes going to houses. To make room for an extra cargo to houses, an existing one would have to be removed. This pretty much makes different types of alcohol pointless. Even if you did split it up into Beer, Spirits and Wine, you'd need a map full of terminal alcoholics to make them all viable cargoes. Given that the default Alcohol works well as a cargo, it's probably best to avoid ~4459Beer and ~4541Wine.

Candidates seems pointless. Ditto Containers (they need a cargo inside them). Ditto Energy (let's see you pack that into a boxcar). Ditto Food (the game already has several defined types of food, which are known to work). Gravel is just little rocks, and 1.06 already has Rock. Money seems a bit too specialised for general use. I can't see anyone wanting boxcars full of Chanel No. 5, so scratch Perfume too. Pottery is just Ceramics, which 1.06 has. Prisoners seem too specialised (could rename Troops via RT3.lng for a specific scenario). Spaceships is a bit of a joke given current technology. Coffee could be renamed Tea for a a specific scenario (don't think we need both). Wire seems too specialised.

So if you get rid of that lot you're left with:

Code: Select all

~4466China
~4471Detergents
~4472Deuterium
~4478Fish
~4481Glass
~4497Newspaper
~4507Paint
~4509Potash
~4515Salt
~4516Sand
~4520Syrup
~4525Tin
~4529Tobacco
~4530Tools
~4538Valuables
I can see some of these having potential. China is basically Ceramics, but there seems to be a consensus that 1.06 Ceramics is actually Portland cement. So if that gets renamed via RT3.lng then a stand in for actual Ceramics could be useful. Detergents I'm not sure about, but we do use a lot of them commercially and domestically (would also stand in for soap, etc). If you wanted to get really technical you could call them Surfactants, which covers soaps and detergents, but whatever.

Deuterium is an interesting one. Obviously someone was thinking of fusion reactors, which are still sci-fi, or possibly thermonuclear weapons, which have a very restricted market, but it turns out that deuterium has a surprising range of commercial uses. As a low-volume, high-priced cargo for late eras, it could be worth considering. Incidentally, lithium is another obvious cargo for the 21st century (it's going to be big) but it's not on the list anywhere (because back when the list was made people didn't realise how important it's going to be).

I can see some people wanting Fish sometimes. It is a pretty distinct food type with a distinct production process, and a big part of markets in some locations. Ports are one obvious source of supply. Glass is an obvious commercial product with a wide range of applications. Newspaper is a possibility, but is declining these days. Still, it could work for the late 19th century and the 20th century (Australian railways used to have dedicated newspaper vans).

Paint is obviously used a lot, so make sense if there's room for it and a viable production chain. Potash is ideal for fertiliser production and a range of other uses. Salt has a wide range of industrial uses too (domestic use is comparatively minor). Sand is what people think we should have instead of 1.06's Crystals, so why not have it? Crystals are hardly used at all anyway. Syrup I'm not sure about (yes, I know what it covers).

Tin is widely used, and an interesting case. The US produces heaps of it, but only via recycling. The world is actually running out of mineable tin. Tobacco I could take or leave. Horrible stuff, but I realise it has quite a commercial history. Tools could be useful if there is space for them. People seem to like the idea of Valuables too.

So that's 15 cargoes (16 if you shoehorn lithium in too) that I think you could make a reasonable argument for. Only problem is that there is a maximum of 9 slots available, so 15 is 6 too many, and 16 is 7 too many. *!*!*! TBH lithium probably makes more sense than deuterium if you have to chose between the two. In terms of shippable volume this century it will leave deuterium for dead.

Which leads to a thought: where are all these critters hidden? If ~4495Money is largely useless as an in-game cargo, it would presumably be possible to rename it (somewhere) to ~4495Lithium. I know you can do it in RT3.lng, but I assume there's some weirdness hidden in the .exe as well.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
RulerofRails
Dispatcher
Posts: 310
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06

Unread post by RulerofRails »

You may be getting a little ahead of yourself before doing some proof of concept. ;-) It would be nice if it works, but this is RT3 . . . . . !*00*!

RT3 economy is after all an automated system that's pretty lossy. The lack of don't-haul-this-type on custom consists is a blow to tight cargo management as seen in TM.

Low volume chains aren't going to add that much to the typical game. Even if it makes sense to concentrate enough resources in one area to make a production facility worthwhile, if the product is not demanded at houses there needs to be serious consideration of how to build sufficient demand map wide.
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06

Unread post by Gumboots »

I suppose the easiest way to test the concept is to just grab them cargoes and make "mines" that just produce the relevant cargo, with the relevant files copied from a basic coal mine. To just test the limits of the cargo list, it shouldn't be necessary to have an actual use for the generated cargoes.

And sure, how to use the things does require thought, and in terms of production, consumption and pricing should be based on established cargoes that are known to work well.

I suppose there is scope for having some house demands not being visible, as long as they still work.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06

Unread post by Gumboots »

Having slept on it (literally) I have a better idea. AoS V has every 1.06 cargo enabled, so is a good test case in that respect. It already uses 6 of the port/warehouse slots, but obviously that means there are another 6 slots not being used. Each port/warehouse can supply or demand up to 5 cargoes, so that's plenty of scope for testing.

10 cargoes on top of the existing ones is enough to push things past the 60 cargo limit. All it needs is four more ports/warehouses set up, two of which supply five cargoes each and two of which demand five cargoes each. This should allow testing them all to check they are actually accessible on the editor cargo listings, with minimum custom files required (should be ten .cty files only). They should all be haulable too (although not all at once, obviously). Actual cargo prices shouldn't be relevant, since the warehouse demand should take care of haulage if all ten cargoes share the same price.

To keep the rest of the cargo chain functioning for as long as we feel like running it, it makes sense to only add .cty files for cargoes which will be listed after the 1.06 ~4513Rock. All the 1.06 cargoes are displayed at the end of the cargo listings in the editor, so I assume if there are too many cargoes enabled the last one will simply drop off the end of the list, and won't be usable, while everything else should function normally.

Fortunately there are eleven cargoes in the "hidden" list that come after Rock:

~4515Salt
~4516Sand
~4518Spaceships
~4520Syrup
~4523Tea
~4525Tin
~4529Tobacco
~4530Tools
~4538Valuables
~4541Wine
~4542Wire

That's easily enough for proof of concept. I'll start setting it up. !*th_up*!

Also had some thought about the "cargoes not demanded by houses" thing. If we leave 1.06 out of it and just consider the 1.05 cargo chain (which is a better setup in general): out of the 41 cargoes available over all eras, these ones are not demanded by houses:

Aluminum
Ammunition
Bauxite
Chemicals
Cotton
Fertilizer
Iron
Livestock
Logs
Plastic
Pulpwood
Rubber
Steel
Tires
Troops
Uranium
Waste
Weapons
Wool

On most maps these cargoes don't lack for demand. On a lot of maps, some of them are notorious for lack of supply. Still, most of them have products that are demanded by houses, even though the cargo itself isn't. So, nailing it down to the ones that never have anything to do with houses we have:

Ammunition
Troops
Uranium
Weapons

I suppose Uranium is a dubious case, since it is demanded by Nuclear Power Plants and I assume the demand for electricity is influenced by the number of houses and industries on the map. So Uranium demand could be very indirectly influenced by houses if you were considering building your own nukes, but not if it was the result of seeded ones.

Troops is a dodgey one, being an express cargo, so for the really strict cases we're down to Ammunition and Weapons. And yup, those two do exhibit somewhat dodgey behaviour if the map is not set up carefully. Production is often tricky or pointless, and prices at demand locations tend to swing rather wildly. IME the Munitions and Weapons factories only really work when you have a range of Barracks in locations that are not too distant, and adequate raw materials at reasonable prices, and little or no competition. So that's definitely something to bear in mind when considering cargo chains.



The other thing that I noticed while checking things out is that the old PopTop California scenario, and my California Uber Alles revamp, only have 34 cargoes enabled in 2050. It's been a while since I played them, but I can't remember ever wishing there were more cargoes. Ditto for the Latvia map. As far as I can tell, by the time you have 30 cargoes running you should have plenty to do.

And there are plenty of early scenarios which have fewer cargoes but still keep everyone busy and entertained. The Guatemala map (which we had a lot of fun with recently) only has 18 cargoes running. It could maybe have benefited from a couple more, but I don't remember hanging out for any. How the scenario is scripted appears to be far more important than the number of cargoes it has.
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
RulerofRails
Dispatcher
Posts: 310
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06

Unread post by RulerofRails »

I don't know really what I am doing . . . . I managed to add Beer but when I tried Containers I got an immediate CTD whenever I try to load/start a map in any form. I tried loading those which shouldn't use all 52 cargoes in the .gmp including 1.05 maps. Maybe I did something wrong, idk.
User avatar
Gumboots
CEO
Posts: 1203
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06

Unread post by Gumboots »

Weird. I haven't tried it yet. Were you trying to add Containers on top of Beer (ie: 53 cargoes total) or instead of Beer (ie: 52 cargoes total)?
Gumbootz Lokomotivfabrik und Bierkeller

LMR Samson 0-4-0 - Pennsy H3 Consolidation - Custom double tank cars set
User avatar
RulerofRails
Dispatcher
Posts: 310
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06

Unread post by RulerofRails »

I was adding cargo #53, in addition to Beer. I tried Candidates first, then in a fresh attempt Containers. Maybe this isn't what you were thinking of. It could probably work to manually move cargoes in and out of the folder to keep the total below 52, but if that's necessary may as well do a completely modular approach: a separate set of files on a per scenario basis.
Post Reply