Cataclysm-DDA icon indicating copy to clipboard operation
Cataclysm-DDA copied to clipboard

Isekai

Open kevingranade opened this issue 1 year ago • 1 comments

Summary

Features "Load other worlds/dimensions and move player to them and back."

Purpose of change

This is a continuation of #76692 I made some somewhat extensive requests for cleanups and the author isn't feeling it, so I took it on. The larger context is this is a key piece something we've wanted for a very long time, a completely separate set of save files representing an entirely different world the player can visit. This piece sets the stage for further development by allowing the player to transit to an arbitrary new world that is generated in the same way as the existing game world. The new world and the old world are both persistent and the player can move back and forth, well, using debug features anyway.

Describe the solution

This injects some new logic into the save path handling code to support the idea of different "dimensions" that can co-exist in the same world directory. It also adds some code to safely unload the current world and load the new world, generating it as necessary.

Describe alternatives you've considered

There's a lot more pieces of this, but as long as we can proceed step-wise without breaking existing content, I think that's the way to go. We're definitely going to want some hooks to inject entirely different mapgen so that the visited world can be different in specific ways, but that can wait for later.

Testing

Open the debug menu -> Game... -> Activate EOC -> EOC_dimension_swap_test -> type whatever into the prompt The game should show a different area than you were in previously, but one consistent with normal mapgen, and the map view should likewise show a small area around you that is different but typical. Revisiting the above menu and typing 'default' at the prompt should return you to the same place where you departed from, unless you moved around in which case you're translated by the distance moved. i.e. coordinates map to each other in a 1:1 way. Monsters should be swapped out, items shouldn't carry over, vehicles should be replaced, map memory, etc.

kevingranade avatar Oct 11 '24 00:10 kevingranade

Just checking in with progress, turns out master.gsav is messy in several ways. Some of it needs to be split out to be per-dimension and some of it needs to be augmented to be dimension aware. For example weather needs an independent instance per save, overmapgen state (tracking which specials have spawned) needs separate per-dimension state, but missions should be global and dimension aware, if you have a mission that says go to X/Y, it needs to be go to X/Y/nether or X/Y/earth.

kevingranade avatar Oct 16 '24 21:10 kevingranade

Hi, is this abondoned?

martinrhan avatar Aug 07 '25 10:08 martinrhan

Hi, is this abondoned?

hoping to unkill it soon

Blueflowerss avatar Sep 15 '25 13:09 Blueflowerss

Obsoleted by #82924

kevingranade avatar Sep 18 '25 18:09 kevingranade