-
Notifications
You must be signed in to change notification settings - Fork 4.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Isekai #76955
base: master
Are you sure you want to change the base?
Isekai #76955
Conversation
…work on making monsters work while swapping
… added a check to prevent revification when swapping worlds, as that might cause crashes.
…ixed issues with the maps not being properly saved when swapping
… the world swap succeded
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
Also replaces world with dimension for better distinction between the concepts
@@ -71,7 +71,7 @@ int camp_reference::get_distance_from_bounds() const | |||
|
|||
cata_path overmapbuffer::terrain_filename( const point_abs_om &p ) | |||
{ | |||
return PATH_INFO::world_base_save_path_path() / string_format( "o.%d.%d", p.x(), p.y() ); | |||
return PATH_INFO::current_dimension_save_path_path() / string_format( "o.%d.%d", p.x(), p.y() ); | |||
} | |||
|
|||
cata_path overmapbuffer::player_filename( const point_abs_om &p ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
also add dimension stuff here
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Aha, thanks, I missed that the "player" part was all "seen" data, need to wrap up the last of those.
Just checking in with progress, turns out master.gsav is messy in several ways. |
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.