Cities: Skylines

Cities: Skylines

NS 2200 Mixed Cargo
30 Comments
Maylow 15 Jun, 2023 @ 6:54am 
About my last comment, perhaps not the randomization, but the instantiation of the asset object i mean.
Maylow 15 Jun, 2023 @ 5:17am 
I think the randomization process of this asset has its trailers undefined until after the moment of usage (spawning, or by other mod). And i think with latest game update, something has changed in the way the game and mods anticipate trains and their trailers. Maybe the game and mods now expect the trailers to be defined before spawning/usage. I don't know for sure, but the results of these tests imply to look for a solution in that direction imo.
Maylow 15 Jun, 2023 @ 5:11am 
Ok, also without Vehicle Effects mod, the object reference not set to instance exception occurred:
"
1,127,831ms | Simulation error: Object reference not set to an instance of an object
at Vehicle.CalculateTotalLength (uint16,int&) <0x00281>
at Vehicle.CalculateTotalLength (uint16) <0x00036>
at TrainAI.PathFindReady (uint16,Vehicle&) <0x000c5>
at CargoTrainAI.PathFindReady (uint16,Vehicle&) <0x0008b>
at (wrapper dynamic-method) TrainAI.TrainAI.SimulationStep_Patch0 (TrainAI,uint16,Vehicle&,UnityEngine.Vector3) <0x0009d>
at (wrapper dynamic-method) CargoTrainAI.CargoTrainAI.SimulationStep_Patch0 (CargoTrainAI,uint16,Vehicle&,UnityEngine.Vector3) <0x0037c>
at (wrapper dynamic-method) VehicleManager.VehicleManager.SimulationStepImpl_Patch0 (VehicleManager,int) <0x004d9>
"
Maylow 15 Jun, 2023 @ 4:44am 
Tested without RTT mod, had all trains except for this train disabled with Vehicle Selector mod, waited, and after a while another object reference not set to instance exception occurred.
Interestingly, this exception was now thrown by Vehicle Effects mod:

"
129,318ms | Vehicle Effects An exception was thrown:
NullReferenceException: Object reference not set to an instance of an object
at VehicleEffects.VehicleEffectsMod.ParseVehicleDefinitio
"
Imho this indicates that the issue points more towards this asset than to RTT mod.

Some additional info in output_log.txt related to this asset and Vehicle Effects mod:
129,314ms | Vehicle Effects Added effect Train Brake Cargo to vehicle 551161964.Trailer0
However, no explicit errors in output_log.txt referring to this asset id 551161964

I will run another test with Vehicle Effects disabled & unsubscribed.
Maylow 15 Jun, 2023 @ 4:16am 
Also, I found this asset mentioned by RTT in the output_log.txt again:
130,499ms | Random Train Trailers: 551161964.Trailer1 can not be found!

I will now try this asset without RTT mod, and wait for it to spawn. Back in a moment.
Maylow 15 Jun, 2023 @ 4:16am 
I unsubscribed from this asset and the RTT mod, then had Skyve run "Workshop Packages Cleanup", then subscribed to this asset and RTT mod again. Alas, the results are this same:
"
The Mod C:\Program Files (x86)\Steam\steamapps\workshop\content\255710\870291141 [RandomTrainTrailers.dll] has caused an error [ModException]

Details:
System.NullReferenceException: Object reference not set to an instance of an object
at RandomTrainTrailers.TrailerManager.ApplyDefinition (RandomTrainTrailers.TrailerDefinition
"
Maylow 15 Jun, 2023 @ 3:16am 
I'm also running that version of Loading Screen Mod.
I haven't tried your suggestions yet. I will try them and let you know asap.
Thanks for all support in advance!
Acc3ss Violation  [author] 14 Jun, 2023 @ 11:11am 
I'm running it together with Skyve and this version of the Loading Screen Mod: https://sp.zhabite.com/workshop/filedetails?id=2858591409

Have you tried unsubscribing from this asset and the RTT mod, running Skyve's "Workshop Packages Cleanup" and then subscribing again? A fresh download like that may work

Also, does this asset work fine without RTT enabled or does that still cause issues when it spawns somewhere?
Maylow 12 Jun, 2023 @ 1:49pm 
Last note for today (going to sleep in a moment). I saw today Cities Skylines updating itself with a 50mb patch from CO. Let's hope for a miracle that they fixed the mess they created ;)
Back after a goodnight rest, cheers.
Maylow 12 Jun, 2023 @ 1:39pm 
Oh, side-note, i may have caused some confusion when referring to those other assets with issues, if you mean 2 Lane 2 Way - Tram Road for example which i referred to earlier with a link. While both maybe related to issues with network assets, perhaps caused by the same game changes as of latest CO update, the issues are technically separated.

The issue with this asset, NS 2200 Mixed Cargo, is in combination with Random Train Trailers which throws an object not set to instance exception.

The issue with those other assets, like 2 Lane 2 Way - Tram Road, is an assertion failed error.

Let's minimize further ambiguity and keep things separated ;) (my bad and apologies that i caused the confusion).
Maylow 12 Jun, 2023 @ 1:28pm 
Also odd that other train assets do not have Random Train Trailers throw an exception.
For instance, the following train assets all work fine with Random Train Trailer mod:
NS 1600 Cargo Train https://sp.zhabite.com/sharedfiles/filedetails/?id=471746386
NS 1700 Intercity https://sp.zhabite.com/sharedfiles/filedetails/?id=2275677324
NS 6400 Coal Train https://sp.zhabite.com/sharedfiles/filedetails/?id=500984466

But this may be completely explainable because those assets do not have randomization applied for their trailers? While NS 2200 Mixed Cargo is the only one that does? I don't know.
Maylow 12 Jun, 2023 @ 1:25pm 
Possible, but i doubt it to be caused by other mods. Last week when i earlier reported the issue, i had removed all mods and assets to test with a clean environment. Only the necessary, most recent mods, like loading screen mod, skyve, etc, and the assets with mentioned issues. Tested it, and and the exception occurred.
The only mod that could interfere, is Random Train Trailers i believe.

If really necessary, i can perform more clean tests (as early as tomorrow).
Acc3ss Violation  [author] 12 Jun, 2023 @ 10:30am 
I tried again with some of the other assets you had issues with, they all work perfectly fine on my end. What other mods are you using? I suspect some (outdated) loading screen/loading order mod may be causing issues here
Maylow 11 Jun, 2023 @ 7:22am 
I think after latest game update, CO has changed things again in such way that this asset fails to load (and many others unfortunately). Maybe constructor arguments, their order, their format, subclasses, inheritance, i don't know, just my guts that tell me to look into that direction.
Maylow 11 Jun, 2023 @ 7:15am 
When searching output_log.txt for the asset id of NS 2200 Mixed Cargo, i came across multiple messages like:

116,403ms | Random Train Trailers: 551161964.Trailer1 can not be found!

116,404ms | Random Train Trailers: 551161964.Trailer2 can not be found!

I hope this info helps.
Maylow 11 Jun, 2023 @ 7:15am 
Results of testing with NS 2200 Mixed Cargo: object not set to instance error again.

Output_log.txt contains:

NullReferenceException: Object reference not set to an instance of an object
at RandomTrainTrailers.TrailerManager.ApplyDefinition (RandomTrainTrailers.TrailerDefinition&) <0x01065>
at RandomTrainTrailers.TrailerManager.Setup () <0x00102>
at RandomTrainTrailers.ModLoadingExtension.OnLevelLoaded (ICities.LoadMode) <0x00057>
at (wrapper dynamic-method) LoadingWrapper.LoadingWrapper.OnLevelLoaded_Patch9 (LoadingWrapper,SimulationManager/UpdateMode) <0x00114>
Maylow 11 Jun, 2023 @ 7:15am 
@Acc3ss Violation i've updated the comment section in https://sp.zhabite.com/sharedfiles/filedetails/?id=1778587650&searchtext=2+Lane+2+Way+-+Tram+Road with relevantoutput_log.txt information. I will repost them here again because my mix up of the authors of two assets with technically related issues, may cause confusion.
Maylow 11 Jun, 2023 @ 5:57am 
@Acc3ss Violation thanks for responding this fast again and glad to hear in some way it might not be this asset after all but something else on my end.
I will test again in a moment and share new insights/post relevant info from output_log.txt.

To prevent comment spamming ;) i'll update comments in https://sp.zhabite.com/sharedfiles/filedetails/?id=1778587650&searchtext=2+Lane+2+Way+-+Tram+Road about this issue, since that asset, this one and a few other all report the same on my system.
Acc3ss Violation  [author] 10 Jun, 2023 @ 3:04am 
If you can share an output_log.txt of it happening I might be able to figure things out
Maylow 7 Jun, 2023 @ 4:09pm 
That mod and this asset i meant.
Other, similar train assets did not have problem with Random Train Trailers by the way.
As for now, great to hear you don't have the problem. Maybe the game received another update which fixed things, or maybe something else on my system was indeed the problem.
Maylow 7 Jun, 2023 @ 12:27pm 
@ Acc3ss Violation thanks for testing. I see, maybe so i don't know. When i have time i try that mod and this mod only, with no other mods/assets and see the results.
Thanks again.
Acc3ss Violation  [author] 7 Jun, 2023 @ 10:11am 
@Maylow I've tried to replicate the issue using this asset and the RTT mod, but it seems to work fine. Perhaps another mod is causing the issue?
Maylow 4 Jun, 2023 @ 7:48am 
This asset and Random Train Trailers mod https://sp.zhabite.com/sharedfiles/filedetails/?id=870291141 clash with each other, object not set to instance error is reported. Other trains do not cause this error with that mod afaik. Don't know what causes it. This asset and that mod always worked fine for me, until last update.
TheGreatWolf14 10 Oct, 2021 @ 9:28pm 
any chance you can make it work for Industries? mixed cargo and loaded/unloaded?
joewagner501 20 Feb, 2016 @ 4:21pm 
This just looks like a "normal" train from the real world. Thanks for sharing.
Acc3ss Violation  [author] 10 Nov, 2015 @ 8:04am 
@Emperor ja, dat is wel de bedoeling
Emperor 10 Nov, 2015 @ 12:56am 
Can you also make the NS 1200?
Soviet Sanvich 9 Nov, 2015 @ 3:56pm 
It will be good to see these running around my rail yards.
[TB] NickyZero 9 Nov, 2015 @ 12:41pm 
Nice work :)
SNEAKnl 9 Nov, 2015 @ 9:25am 
subbed :) \o/