Jump to content

Safe way to fix regions?


Riamus

Recommended Posts

Version: A21.1

 

Ok, so I made a mistake and accidentally overwrote my generated world with a new one without realizing it.  I loaded into the game and it actually loaded the original map but everything was radiated.  When I exited and reloaded, it gave an error relating to the heightmap and wouldn't load.  That's when I realized I had overwritten the world.  Thankfully, I had a backup.  I replaced the world with the backup and the game works fine.  However, multiple regions (not all) have no trees at all, neither in the wilderness nor on POI.  It appears that everything else is there - ore nodes, bushes, grass, etc.  Just no trees.  And only on some of the regions.

 

So my question is what would be the safest way to refresh the regions to hopefully get back the trees?  I did try chunk reset and it seems to sometimes get back missing trees, but having to do that all over the map would take forever.  I'd rather something that works with the regions if that's possible.  It may be nice driving around without having to dodge trees, but it's really weird looking when you don't have any trees.  I want to be sure not to end up deleting my base or horde base.  My base happens to be at the very edge in one of the regions that doesn't have trees (the region right next to it does have trees, so it looks like there are trees in the same region as the base even though they are a different region.

 

I didn't do a full bug report format for this since it's not a bug report and nothing is wrong with the game itself.

Link to comment
Share on other sites

37 minutes ago, Riamus said:

Version: A21.1

 

Ok, so I made a mistake and accidentally overwrote my generated world with a new one without realizing it.  I loaded into the game and it actually loaded the original map but everything was radiated.  When I exited and reloaded, it gave an error relating to the heightmap and wouldn't load.  That's when I realized I had overwritten the world.  Thankfully, I had a backup.  I replaced the world with the backup and the game works fine.  However, multiple regions (not all) have no trees at all, neither in the wilderness nor on POI.  It appears that everything else is there - ore nodes, bushes, grass, etc.  Just no trees.  And only on some of the regions.

 

So my question is what would be the safest way to refresh the regions to hopefully get back the trees?  I did try chunk reset and it seems to sometimes get back missing trees, but having to do that all over the map would take forever.  I'd rather something that works with the regions if that's possible.  It may be nice driving around without having to dodge trees, but it's really weird looking when you don't have any trees.  I want to be sure not to end up deleting my base or horde base.  My base happens to be at the very edge in one of the regions that doesn't have trees (the region right next to it does have trees, so it looks like there are trees in the same region as the base even though they are a different region.

 

I didn't do a full bug report format for this since it's not a bug report and nothing is wrong with the game itself.

 

Although the command has been tested a lot, it is new but it sounds like you've nothing to lose anyway. I would suggest the "rr" (regionreset) command. It rebuilds the regions using all the various systems set to work together to rebuild it all; in theory, it may help with this. 

image.thumb.png.c18dae8d3d3c5ebf0ae545b9921cde71.png

 

To protect your bases, put a land claim down (although a vehicle or bedroll will protect it too, land claim is to be sure and cover a larger area -- don't forget to increase the radius and count to help). The natural "rr" command will ignore chunks that are protected (e.g. land claim). May have a play with the other options if that doesn't fix everything. Just don't forget to make a backup :)

Link to comment
Share on other sites

On 10/11/2023 at 1:42 AM, Jugginator said:

 

Although the command has been tested a lot, it is new but it sounds like you've nothing to lose anyway. I would suggest the "rr" (regionreset) command. It rebuilds the regions using all the various systems set to work together to rebuild it all; in theory, it may help with this. 

image.thumb.png.c18dae8d3d3c5ebf0ae545b9921cde71.png

 

To protect your bases, put a land claim down (although a vehicle or bedroll will protect it too, land claim is to be sure and cover a larger area -- don't forget to increase the radius and count to help). The natural "rr" command will ignore chunks that are protected (e.g. land claim). May have a play with the other options if that doesn't fix everything. Just don't forget to make a backup :)

Thanks.  I tried this and it worked a little.  The town near my base has trees again, but there are regions that still don't.  I've tried going into those regions and running it even though it says rr will do all regions and I've tried using the coordinates, but for whatever reason, those regions aren't adding back the trees.  I'll just have to live with it.  This at least got me trees near my base, which is a plus.

Edited by Riamus (see edit history)
Link to comment
Share on other sites

Interesting. Currently we're investigating a world deco generation issue not being done properly (can cause weird things like a cactus inside a tree), and this kind of sounds like a symptom of that investigation. Sorry, but at the moment I don't have any thoughts on a solution for that part :/. If I come up with something while looking at the whole thing I'll come back and let you know.

Link to comment
Share on other sites

On 10/11/2023 at 1:42 AM, Jugginator said:

 

Although the command has been tested a lot, it is new but it sounds like you've nothing to lose anyway. I would suggest the "rr" (regionreset) command. It rebuilds the regions using all the various systems set to work together to rebuild it all; in theory, it may help with this. 

image.thumb.png.c18dae8d3d3c5ebf0ae545b9921cde71.png

 

To protect your bases, put a land claim down (although a vehicle or bedroll will protect it too, land claim is to be sure and cover a larger area -- don't forget to increase the radius and count to help). The natural "rr" command will ignore chunks that are protected (e.g. land claim). May have a play with the other options if that doesn't fix everything. Just don't forget to make a backup :)

Is "rr" supposed to reset any blocks that may have been damaged/destroyed? I tried to fix a giant hole I made in the road but it didn't seem to do anything (cant use reset poi since it's a RWG tile)

Link to comment
Share on other sites

9 hours ago, Jugginator said:

Interesting. Currently we're investigating a world deco generation issue not being done properly (can cause weird things like a cactus inside a tree), and this kind of sounds like a symptom of that investigation. Sorry, but at the moment I don't have any thoughts on a solution for that part :/. If I come up with something while looking at the whole thing I'll come back and let you know.

Just a note... I think I realized what did and didn't get corrected with using rr.  Any POI (prefabs/tiles) got fixed.  But as far as I can tell, no wilderness areas were fixed.  This is still a really big improvement because towns looks really weird without trees.  The wilderness isn't quite as big of a deal.  I still have enough regions with trees to have plenty of wood, so it's not a problem.

 

And again, this is caused by a mistake on my part (overwriting my world with a different one).  So what I'm seeing could be entirely unrelated to the deco issue you're working on.

 

Just for reference (I think I mentioned in the OP as well), here are the steps that led to my issue with trees:

 

  1. Have a world and active save on that world.
  2. Overwrite the world with a different world.
  3. Load into the world.
    1. This got me radiation everywhere but I actually seemed to have my original world somehow... at least my base was in the same location related to the trader across the road.
  4. Exit the game.
  5. Try loading into the game multiple times - each time got an error (below) and wouldn't load all the way into the game.
    1. IndexOutOfRangeException: Index was outside the bounds of the array.
        at HeightMapUtils.LoadHeightMapRAW (System.String _filePath, System.Int32 w, System.Int32 h, System.Single _fac, System.Int32 _clampHeight) [0x0007d] in <d7dcfa4979674f179c13273f8b30b551>:0 
        at ChunkProviderGenerateWorldFromRaw.loadDTM (System.String _dtmFilename) [0x00017] in <d7dcfa4979674f179c13273f8b30b551>:0 
        at ChunkProviderGenerateWorldFromRaw+<Init>d__16.MoveNext () [0x00391] in <d7dcfa4979674f179c13273f8b30b551>:0 
        at UnityEngine.SetupCoroutine.InvokeMoveNext (System.Collections.IEnumerator enumerator, System.IntPtr returnValueAddress) [0x00026] in <4bba812690714c578170328b4ec178d0>:0 
  6. Exit the game.
  7. Overwrite the world with an original backup of the world.
  8. Make a backup of the save for the world.
  9. Load into the world.
  10. Noticed there were missing trees.
  11. Attempted to use "cr" to reset the chunks with missing trees (I didn't realize it was entire regions at the time) and accidentally delete my base because I didn't have a land claim on it.
  12. Exit the game.
  13. Overwrite my save with the backup save (thankfully I had made it).
  14. Load into the game.
  15. Everything back to normal except still no trees in certain regions and POI.

After that, I posted this topic and then tried rr, rr u, and rr [x] [z].  This resulted in POI (prefabs/tiles) having trees again but didn't help with the wilderness regions that were missing trees.

 

The error was obviously caused by an incorrect heightmap and is not at all unexpected.  The lack of trees is odd, though.  They are obviously tied to the save and I didn't have a backup of the save prior to overwriting my world, so I couldn't recover that.  I might have thought the trees got mixed up due to a different biome layout, but all other foliage and ores and stuff still match with the biomes, so that isn't the case.

Link to comment
Share on other sites

2 hours ago, NekoPawtato said:

Do you have chunk reset enabled? Was thinking maybe set the reset to 10 days and then skip ahead 10 days in game so it resets everything except protected areas then turn the setting back off

I don't and I don't want to skip time as that can cause problems of its own.  I could enable it and play through until it triggers, but the most noticeable area is near by base and so will just keep getting reset from being in the area.  I can live with it.  It isn't game breaking in any way.  It just looks weird.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...