Cargo & Industry fixes for 1.06

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

Re: Cargo & Industry fixes for 1.06 Unread post

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.
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06 Unread post

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: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

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.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

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.
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06 Unread post

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: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

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.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

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.
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06 Unread post

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: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

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)?
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06 Unread post

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.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

Aha. So based on that, it's sounding like the 60 cargo limit for the editor listings isn't relevant, and that it's the 52 cargo limit for economic cell tracking that puts the walloper on things. And that CTD will be triggered if the total number of .cty files in CargoTypes exceeds 52, regardless of how many cargoes are enabled on the map.

I'll run a few tests to confirm (or deny) this, later today.

I was kinda hoping that it would be possible to set up all 60 with .cty files, but only enable 52 or less per scenario. If that's not possible then yeah, modular packs makes the most sense. There's no real need to have the names restricted to what's in 1.06's hidden list either. Those were only set up for translation via RT3.lng, and people have made custom cargoes that don't use that list before, so if going modular you could more or less do wotcha like.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

Well, I just tried to get Salt going in AoS V, and I'm getting CTD whenever I try to save the test map. *!*!*!

The game loads just fine. It has a salt mine. This is enabled, but not assigned to any region or city. So I set up two warehouses: one to demand 8 salt per year, and the other to supply it. These get built, and show correct recipes. No problem.

Then I go to save it as a test map, and the game crashes. **!!!**

Edit: I think I figured out why this is happening. I don't have any diesels installed at the moment, and of course AoS V is coded for diesels. This could be borking things when I try to save a modified version. At the moment I can't be bothered throwing a pile of diesels at it.

-----------------------------------------------------------------------------

Ok, next test. Forget AoS V and start a new map. Basic 320x320 tile. Build one salt mine (just to make sure it works) and the two salt warehouses. Save this. No crash. Go to scenario selection menu > start scenario. Hey, it works. Except, for some reason, the salt is shipping in auto racks even though it's 1870 and I set it to covered hoppers. *!*!*!

Lulz.jpg

Ok, minor detail. It works anyway. Will try an extra cargo or two and see what happens.

-----------------------------------------------------------------------------

Ok, just added Sand and Sand Mine. Game will open to main menu and allow map selection, but as soon as you select a map it's instant CTD.

That's pretty definitive. You can have 52 .cty files in Data/CargoTypes, and no more. 53 is instant CTD.

Now, if you were a radically-minded sort of lunatic, you might think that over the past ten years somebody would have just said so quite clearly. Still, here we are. And now we know. :lol:

Just to make sure, edited the map so it started in 2010 with all cargoes enabled. Still seems fine with 52 cargoes (apart from the auto racks thing, which would be some minor error on my part).

Moar_lulz.jpg

Edit: Sorted the autoracks thing. It was a typo in the .cty file (I had Covered Hopper instead of Covered_Hopper).
zzc
Watchman
Posts: 65
Joined: Sat May 23, 2020 9:17 pm

Re: Cargo & Industry fixes for 1.06 Unread post

Is this already part of the patch or is there a separate download for it?

I've seen Electronics cargo appear before the factory becomes buildable. Pharma factory is buildable before chemicals appear.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

Is what part of the patch? The Salt and Sand cargoes? No, they aren't. They were test cargoes for confirming the maximum possible number of cargoes. Or, to put it another way, they are hidden cargoes in 1.06. Some of the files for them exist but the cargoes aren't activated (no .cty file, etc).

Since 1.06 already has 51 cargoes, and the maximum possible is 52 cargoes, if you want to enable more than one of the hidden cargoes you have to disable some of the standard 1.06 cargoes to stay within the 52 cargo limit. This becomes a bit of a rigmarole. It's possible, but it's a bit of a PITA by the time you get it all sorted.
zzc
Watchman
Posts: 65
Joined: Sat May 23, 2020 9:17 pm

Re: Cargo & Industry fixes for 1.06 Unread post

I also meant all the other changes/suggestions earlier in this thread, are they part of the patch or a separate download? Like the dye to hides suggestion.
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

Those were just ideas which were being kicked around at some point. They're not part of any patch. The short version is that there was a lot of talk, but little was decided and implemented. Testing for game balance with changes to cargoes and industries takes a lot of time, because not all of the effects are immediately obvious.

Since most of us only play the game intermittently, enthusiasm for testing changes tends to be intermittent too. Although every so often a few of us might simultaneously get enthusiastic, but that's all a bit random for timing. :)

There have been some minor fixes done. Blackhawk made a nice little pack. The 1.06 industries use the default warehouse model and skin, which is a tad boring, so he made up some custom skins on other models so the 1.06 industries look better. You can find that here: 1.06 Warehouse replacements.

(Come to think of it, I should put that in the site archives.)
User avatar
RulerofRails
CEO
Posts: 2061
Joined: Sun Dec 08, 2013 1:26 am

Re: Cargo & Industry fixes for 1.06 Unread post

To summarize a little (my view), there were a lot of good ideas. But also, the game (1.05) isn't really "missing" any MAJOR cargo groups. Also, there wasn't a clear consensus on a "package" that was better than the 1.06 picks.

The supply/demand/price balance in the game is depending a lot that there be a near-map-wide demand for all products. The whole idea of coming up with "extra" cargoes is to admit that they are not really key pieces of the puzzle.

Also, the average author is having enough work to balance lower usage cargoes if 1.06 and TM complex cargo chains are anything to go by.

Of course, many ideas can work, but over time (after this project fizzled out) I leant toward the idea of a modular scenario design. In certain scenarios these less important cargoes can play a bigger role in the local economy. By overwriting some files (using existing naming, but new asset), the player will see what appears to be a new cargo in his game. An author who is experienced a little with the game (especially balancing) can then make a truly unique scenario. All he needs to do is put all required assets in the zip for his map.

At the end of the day, a new "version" isn't much good if nobody is there to make maps for it. At the moment, map authors that want to experiment are a bit scarce (I'm not the creative type myself either).
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

That's a reasonable summary. :)

The only thing that sticks in my head from all this discussion was the idea of splitting the 1.06 furnace into two industries, each with a single production chain. That would be a useful alteration to 1.06, and could be done fairly easily. But I must admit most of my playing has been 1.05. If I knew how to hack and repackage the .exe I would be tempted to do some hybridising of versions: knock out the 1.06 haul at a loss (not being able to use for-profit custom consists annoys me), fix price islands, and a couple other details.
zzc
Watchman
Posts: 65
Joined: Sat May 23, 2020 9:17 pm

Re: Cargo & Industry fixes for 1.06 Unread post

I've seen Electronics cargo appear before the factory becomes buildable. Pharma factory is buildable before chemicals appear. Any idea how to tinker this?
User avatar
Gumboots
CEO
Posts: 4813
Joined: Mon Aug 13, 2012 4:32 am
Location: Australia

Re: Cargo & Industry fixes for 1.06 Unread post

The first one is a mistake, but in practice is not an issue. Any cargo takes several years to develop a demand after it is introduced. This means there is no point in building the associated industry for several years (usually 3 to 5 years, IIRC). As long as the Electronics factory isn't held back for more than 5 years I wouldn't worry about it.

However, if you want to edit the start year it is bytes 38 and 39 in the building's .bca file (found in Data/BuildingTypes). As an example, just because it sits at the top of the folder's file list, the AluminumMill.bca has this code:

Code: Select all

f2 03 00 00 41 6c 75 6d 69 6e 75 6d
4d 69 6c 6c 00 cc cc cc cc cc cc cc
cc cc cc cc cc cc cc cc cc cc 80 84
1e 00 76 07
That is with the hex editor set to 12 columns (usually the most convenient). The last two bytes are #38 and #39 (numbering starts at zero). The start year is 0776 in hexadecimal*, which is 1910 in decimal.

*RT3 hex files use Little Endian formatting.
Post Reply