Transport Fever 2

Transport Fever 2

Cargo visibility fix for Expanded production chains mod
15 Comments
RadiKyle 5 Mar @ 5:10pm 
Thanks @peteraklnz ! I came to similar conclusion, add the cargo models and types into the wagon mod for the various industry mods. But I wasn't sure if the fix mods (this one plus @doug 's) would fight it in some way if they are active too. For example the latter's code seems to add custom cargo types to wagons without first checking whether they already support them. But I did a quick test and it appears that altho it's redundant it doesn't mess up the wagon mod (at least for the Industry Expanded cargo that I tested). So hoping similar holds true in general for both fix mods and all industry mods. 🤞
peteraklnz  [author] 5 Mar @ 11:36am 
@RadiKyle,

No, I'm not on that Discord. But looking through the code of that mod I can see that that mod doesn't provide a gondola-type wagon (in terms of types of cargo it carries (like iron ore or coal), not the actual shape). So it should work fine with Expanded production chains mod too.

The only proper way of providing for mods that add more cargo types is to actually code for those types. I have seen that provided in some mods, for example Facs 124 https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=2823382419 can carry "oil sand", "silver ore", and "slag" out of the box, with no modifications required (my mod discovers these conditions and doesn't add its own version for those cargo types).
RadiKyle 4 Mar @ 3:42pm 
@peteraklnz are you on the NA Discord? Author of this flatbed mod is reviewing options for supporting the custom cargo types from industry mods. Since you've been active in this very recently maybe you can offer some insight. The wrinkle is the mod has a wagon livery randomizer which itself is defined as a custom load type, so every loadout includes the wagon itself, plus whatever cargo it carries.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3437541991
peteraklnz  [author] 25 Feb @ 11:09pm 
@Uporczywa_cisza

This mod doesn't modify anything beyond the way cargo is displayed and definitely shouldn't affect the town demand systems. Are you able to post a full stdout.txt somewhere. I suspect is some interaction with other mods here.
Uporczywa cisza 25 Feb @ 3:18pm 
After your update my game crash every time on load screen and throw error:
Assertion Failure: Assertion `town.customCargoNeeds || town_util::CargoNeedsValidForNonCustom(town.cargoNeeds)' failed.
In file: urban_games/train_fever/src/Game/ecs/TownSystem.cpp:41
peteraklnz  [author] 23 Feb @ 10:48pm 
@Blue_Bob-Omb

I've published a new version that includes that mod. The modification fixes visibility for: asphalt, copper ore, gold ore, oil sand, sand, silver ore, slag and sugar.

As it turns out there was yet another way of displaying custom cargo :-D
RadiKyle 22 Feb @ 6:59am 
@peteraklnz ah ok I got it, thanks! I see now that @doug says their mod is a generic fix for empty wagons rather than a custom tailored one for all cases.
Blue Bob-Omb 21 Feb @ 5:38pm 
I'm not sure if they would actually need it or not but can you do this for Gr1m's generic UK goods wagons V4? (I think it's V4 that's the latest one)
peteraklnz  [author] 16 Feb @ 1:04pm 
There are two different ways the wagons display cargo. If they use the 'default' method (the same one as the in-game wagons) - the additional cargo is displayed fine. On the other hand if they use 'customCargoModel' property (which provides more control and flexibility) - they need some extra work. If the wagons display something generic (like containers) for each type of cargo - re-using of the existing slot definition is sufficient. If they display something cargo-specific - new slots must be created for those types of cargo and new model definitions created for those slots. The gondola mods I listed in the description all use that second approach.
RadiKyle 16 Feb @ 11:13am 
There's so many it's hard to find / keep track of them all. I've duped some mods/features too lol.

Ah ok. I've generally had the correct cargo showing, but maybe the wagons and/or industry mods I used already had them supported natively. I only vaguely recall one wagon that was empty or had the wrong cargo but it was so long ago I don't remember which one.
peteraklnz  [author] 16 Feb @ 9:29am 
I was not aware of that mod :-)

The key difference is that my mod creates additional "slots" in the model definition that use the correct cargo textures. So when a gondola-type wagon transports gold ore and silver ore they actually look like gold ore and silver ore when using my mod. The other mod uses the "original" cargo definition, so the cargo always looks like iron ore.
RadiKyle 16 Feb @ 5:34am 
@kevin_o-1986 the "Empty Vehicle Fix" mod does that: https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=3110764312

@peteraklnz did you know about that mod? It already works for this industry mod (including asphalt) and several others. Or does this new have different features?
takashi 16 Feb @ 5:27am 
OK.
Thank you. I initially included a lot of industrial chains, but I removed them due to confusion and the lack of wagons that could be used (visibly), but I finally understood that they would be usable. Thank you.
peteraklnz  [author] 16 Feb @ 1:35am 
This mod only works for the Expanded Production Chains mod. Each of those "new industries" mods needs a slightly different treatment in terms of the mappings and from what I can see there's some overlap and potential for conflict. I'll see if I can find the time to look at those other mods too.
kevin_o-1986 15 Feb @ 10:36pm 
Sounds good. Does it work for mail and waste from the industry expanded mod?