Crash when reading Road/trail/ect Maps

Hey there folks. First post hereabouts, and it comes out of a somewhat blinding fury, trying to get the game working.

So, I tried getting back into the game recently after around…5 months hiatus or so. I pick up a lot of older mods that I was enjoying. For the last two-ish weeks I have been on and off trying to figure out what is causing this bug I keep hitting, and if ANYONE else has encountered it.

When I open up a map to use, there is somewhere around a 80% chance I will suffer a complete lockup of the game. I’ve left the game running, to see if it will work itself out, but even after leaving it for 20+ minutes, it still is stuck infinitely trying to load the details of the road map, or trail map, or damn near any map. I DO think I found the, very strange issue

Here is my mod list for reference that I am using, and my current version is 0.E-6546-g51130a4 (tiles), Build 11076

I have been turning on, and turning Off mods consistently for the last two weeks, (reddit was a slight help in reducing the error bloat to inconsequential stuff at least), and I think I have found the culprit.

Aftershock / Crit = All fine
Aftershock / Cataclysm++ = All Fine
Crit / Cataclysm ++ = All fine

Aftershock / Crit / Cataclysm++ = Consistent Crashes when using Maps

Anyone have some thoughts on this, or know who to ask about this particular form of crash malarky? I’ve been doing so much to get it to run, considering that I used to run all 3 perfectly a few months ago, and others seem to be able to run all three at once. But each time I try and run all 3, I get this Map bug. Even when I reduced it to JUST these three mods.

Hm, where did you get these mods from? It’s possible that there are newer versions of them out there…

Would you mind uploading (Goolge Drive, DropBox, …) a save of a world where this happens more or less regularly, so we can take a look?

One more thing, don’t know if it’s important but it won’t hurt to know; on what operating system do you play (Windows / Mac / Android / Intelligent Fridge / …)?

OS is windows 10

When possible, I always attempted to get the mods from the main source, though some I used CDDA Launcher

Here is a world I have been using to test:

It does seem I forgot I had changed the base world generation a bit to make slightly denser cities, but that should not be a problem. Least I would not think so. I used to use similar settings all the time, and when I do it Un-modded there is no problem.

So, back from a few hours of testing…

First, I actually got the game to freeze with only Aftershock and Cata++ (from GoatGod’s modpack) - although it does happen on fewer occasions.
Second, I also got it once to freeze on world generation with a new character and once while trying to teleport to an adjacent overmap. This tells me that it’s probably something to do with overmap generation.

I think the fastest way to get it to freeze is to mutate the Debug Night Vision, open the [m]ap, move to an overmap ledge, Toggle Fast Scroll and just keep a button pressed until it freezes.

Now, since it froze when I tried to teleport to an already known and fully revealed adjacent overmap, I’m not actually sure what’s going on here…

My debugger tells me it’s stuck on an infinite loop, but not in what function, and it doesn’t seem to be a tight loop, so it’s going to be hard to track…

However, it seems to be a problem introducd in either Aftershock, Cata++ or the base game itself. I’ll try to get it to freeze with just one of these mods after I get some sleep…

1 Like

Alright. Well that Narrows it down at least somewhat, thank you. I knew it was one of those three, and I am glad you managed to Narrow it down all the further.

These shouldn’t be incompatible though should they?

As far as I know, no, there shouldn’t be an incompatibility with these mods…
Though I wonder if they used the same id for one of the overmap tiles and if that screws things up… It’s not going to be an easy task to go through all the files to find if that’s the case.

Oh, well, that was quick… It seems like Aftershock’s the culprit! It just froze on me… (Unless it’s the base game, but I’ve scrolled over 200 overmaps with no problem, so… unlikely.)

Edit:
I also just found out that it’s already up on GitHub:

1 Like

Oh…well thats…Huh. Really? Aftershock is causing the crashes? Well damn. So this was not just some isolated incident. Thanks a lot for helping prove I’m not a madman screaming at nothing though.

1 Like

Yeah, I’m surprised too… But I guess stuff like that can happen everywhere…

Well, at least not in this case :grin: .
But I’m glad I could help find the source of the problem (although it was already known).
I’ll see if I’m able to find a solution after I got some sleep, unless someone’s faster than me.

Looks like no one found the time (or a way) to fix this bug yet (myself included).

However, I can offer a bandaid; it should “fix” the bug (I’ve generated 1400+ overmaps with no problem), but does require some work…:

  • Open up the data/mods/Aftershock folder inside your game folder.
  • Open the region_settings.json file inside it.
  • Remove the following two lines:
"river_scale": 2.0,

and

,
"overmap_lake_settings": { "noise_threshold_lake": 0.12 }
  • Note: Make sure to remove the comma (,) on the line above "overmap_lake_settings" but not the curly brackets (}) in front of that coma.

This also works in already generated worlds (tested and verified). It should not throw an error and it shouldn’t have much effect on the mod itself (item still spawn and work, mod specific map tiles - like the augmentation clinic - do spawn).

2 Likes

Alright. So what exactly do these removals ‘DO’ persay? Do they alter how a Map generates, or what have you?

Yes. To my understanding, the "river_scale": 2.0, doubles the river size (based on the default value of 1.0) and the "noise_threshold_lake": 0.12 does - if I read and tested that right - also (theoretically) double the amount of lakes you can find around the map.

The problem with that (I think) is, the game tries to place at least two streets from any overmap into an other, but can’t place it into lakes/rivers. The more water on the map, the more likely this will fail. So it tries again and again, thus creating an infinite loop.

The easiest solution would probably be to just let it fail, maybe throw a warning or something, after x amount of unsucessful tries… But I’m not sure if that will break something else down the line…

In case you’re uncomfortable with removing stuff, you could also replace the values with the original ones, it would have the same effect:

"river_scale": 1.0
"noise_threshold_lake": 0.25

Already made a pr that should fix the issue with the road infinite loop. So no need to edit the mod if you are fine with waiting for a few days

Sorry, can I just confirm that I am understanding correctly. Aftershock, a mod that I installed for sci-fi reasons, markedly increases the water tiles on the overmap? If this is correct, why on earth?

I just installed it for the first time and started a new world with 16 city size and 0 spacing only to find myself on a little peninsula and surrounded by enormous rivers and lakes. I thought it was just RNG doing it’s weird thing but if it’s a by product of Aftershock messing around with the map settings then I’m less ok with it. There is nothing on the mod which indicates overwriting basic settings like this. And, yes, it crashed my computer several times after trying to read maps. I had to cut the power as it wouldn’t resolve any other way.

[
  {
    "type": "region_overlay",
    "regions": [ "all" ],
    "river_scale": 2.0,
    "city": {
      "shop_radius": 1,
      "shop_sigma": 300,
      "shops": {
        "afs_augmentation_clinic_1": 400,
        "city_block_2": 700,
        "urban_35_hospital": 875,
        "office_tower_large": 800,
        "office_tower_hiddenlab": 800,
        "mall": 700
      }
    },
    "overmap_lake_settings": { "noise_threshold_lake": 0.12 }
  }
]

Aftershock\region_settings.json delete this if you don’t want it to affect the world settings I may consider this default within my compilation or if someone can edit it to normal values ill change it to that, I think I just need to delete "overmap_lake_settings" and "river_scale" to just allow the shops to spawn? I’m not sure how this works

after digging i found out aftershock had a duplicate JSON that does nothing really.
Aftershock\maps\regional_map_settings.json

[
  {
    "type": "region_overlay",
    "regions": [ "all" ]
  }
]

Yes, you understand that correctly. As far as I can tell, that’s the case.

I can’t answer you that one, as I simply don’t know.
Going by GitHub, John_Candlebury made that change in an attempt to “[…] make megacities a bit more interesting to play. It includes a wetter overmap, to expand the navigational (hah) options when playing megacities […]”.

Be aware that deleting the whole file will, as far as I know, also prevent the Augmentation Clinic from spawning. So you’re better off by just removing or overwriting the two values.

1 Like

Yes megacities can be very hard to transverse in some situations, and having more common lakes and rivers adds some more strategic options to how you can approach and loot segments of the cities.

Of course this change is only meainingfull if you play with citisizes 14+

1 Like

fixed apply this to Aftershock\region_settings.json

[
  {
    "type": "region_overlay",
    "regions": [ "all" ],
    "city": {
      "shop_radius": 1,
      "shop_sigma": 300,
      "shops": {
        "afs_augmentation_clinic_1": 400,
        "city_block_2": 700,
        "urban_35_hospital": 875,
        "office_tower_large": 800,
        "office_tower_hiddenlab": 800,
        "mall": 700
      }
    }
  }
]

Thanks Valase - I did change the settings back to standard and I found that link you describe above. It still makes absolutely no sense to me. I wanted a Megacity, instead I’ve got a massive lake with lots of forests and swamps. I don’t have any actual objections to having it as an option in the game but it wasn’t what I ordered. I ordered One Megacity, hold the wilderness and I got Waterworld.

1 Like

how does this make it a water world?


this is a water world.