Announcement: Be excellent to each other.


Caravel Forum : DROD RPG Boards : RPG Bugs : Undo hides exploration
New Topic New Poll Post Reply
Poster Message
Someone Else
Level: Smitemaster
Avatar
Rank Points: 2398
Registered: 06-14-2005
IP: Logged
icon Undo hides exploration (+1)  
This is a weird circumstance that probably won't come up a lot:

Loading a save and then undoing before leaving the room causes the map state to be reset to when the save was made (so rooms that have been entered are no longer viewable).
06-19-2025 at 04:42 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
hyperme
Level: Smitemaster
Avatar
Rank Points: 1496
Registered: 06-23-2006
IP: Logged
icon Re: Undo hides exploration (0)  
I haven't been able to reproduce this. Are there any more details you can provide?

____________________________
[Insert witty comment here]
Qzvlkx?
06-23-2025 at 10:58 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 2398
Registered: 06-14-2005
IP: Logged

File: Screenshot 2025-06-23 203537.png (20.3 KB)
Downloaded 236 times.
License: Public Domain
icon Re: Undo hides exploration (+1)  
Well, let's see. I've tried it with different saves. All my saves have the same assertion error I've been getting literally everywhere when loading them - but it doesn't have an assertion error when I quickload a save, so I don't think it's related. For reference, that assertion error is

Assertion error in line 253 of DbPackedVars.cpp: "GetVarValueSize(pszVarName) == sizeof(int64_t)"

It doesn't happen with every save, but it does happen with most of them. In some, it doesn't reset the entire map state. I've only tested in the demo hold. It's not consistent on a room-by-room basis either.

Rooms are variously reset to unknown, location/map icons known, and known but unvisited. Many saves seem to reset to the same (or similar) state.



[Last edited by Someone Else at 06-24-2025 03:38 AM]
06-24-2025 at 03:38 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 2398
Registered: 06-14-2005
IP: Logged

File: Someone Else.drs (3.8 KB)
Downloaded 0 times.
License: Public Domain
icon Re: Undo hides exploration (+1)  
I should have made this save file name more descriptive (it's from the demo hold). Maybe it'll help?
06-24-2025 at 03:39 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 3778
Registered: 07-11-2014
IP: Logged
icon Re: Undo hides exploration (0)  
According to that screenshot, it's the rooms with minimap icons in particular that are disappearing.
06-25-2025 at 11:12 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 3778
Registered: 07-11-2014
IP: Logged
icon Re: Undo hides exploration (+1)  
Given that you also made a bug about the import of a player profile from RPG1 and still seem to be getting the same errors reported there, I'm putting this down to a downstream effect of that.

If you create a brand new profile, can you recreate this bug?
06-25-2025 at 11:14 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
Someone Else
Level: Smitemaster
Avatar
Rank Points: 2398
Registered: 06-14-2005
IP: Logged
icon Re: Undo hides exploration (+1)  
After resolving the settings issue...

I created a new profile, started a new game. In 1E I made a quicksave; entered 2E; reloaded the quicksave. Upon undoing, 2E is no longer on the minimap.

[Last edited by Someone Else at 06-26-2025 03:44 AM]
06-26-2025 at 03:44 AM
View Profile Send Private Message to User Send Email to User Show all user's posts High Scores This architect's holds Quote Reply
mxvladi
Level: Smitemaster
Rank Points: 2508
Registered: 02-11-2008
IP: Logged
icon Re: Undo hides exploration (+2)  
For what it's worth, I can also consistently reproduce the described issue in an official hold. But I can't reproduce it at all in any custom holds I quickly threw in together to test.

For official hold, it happens very consistently to rooms with minimap icons on them, but not limited to them. For example I have a save where I haven't visited 1N 2E or anything beyond that yet, if I reload to it and undo - all the rooms after 1N 2E and 1N 2E itself change appearance on minimap as if they're just marked by level map but not explored.
06-27-2025 at 04:40 AM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 3778
Registered: 07-11-2014
IP: Logged
icon Re: Undo hides exploration (+5)  
Been code-diving into this. Yuck. We refactored how map state is tracked when implementing minimap icons, it used to be a series of booleans, but is now a single enum. Ideally, the room can be in one of 5 states, in the following order of preference:

1) Explored - This means the room is shown in full on the map. Happens when you enter a room, pick up a full reveal map item, or use the script command to add the room to the map fully revealed.
2) Preview - Room is shown full on the map, but dimmed. Implies you have explored the room on a previous playthrough.
3) No Detail - Room is just a faded white square, like when you pick up a normal map item.
4) Invisible - Added due to the minimap icon feature, stating the room still needs to exist for its data, but is not to be drawn on the map yet.
5) Not present - Not a real map state, but listed for completeness. A room that has never been interacted with by this player doesn't show up in any saved games, only in the level data.

We want the rooms to always be the best state that we've ever seen them in, with one exception; Explored should only ever be for rooms explored in the current game, we want explored rooms in previous playthroughs to be downgraded to a preview if we've not explored it yet this session.

So how do we even know which rooms we've seen in previous playthroughs? Incredibly, when we load a game, we also load every other saved game the player has for that hold (except highscore demos waiting to be sent to CaravelNet, which is a special type of save game), and loop through every single one, to check for what rooms it has seen, which is crazy!

To make things a little funnier, one of the special "invisible" save games we keep per player per hold is one called ST_PlayerTotal, this is used to keep a tally of all rooms we've explored, so the number can be shown in the bottom-left of the load game (restore) screen. That's right, we have a special saved game whose whole purpose is to keep a record of what rooms we've seen. However we don't store map state in this saved game, just a list of room ids.

So the current system is inefficient, but it works, so what's the issue? The problem for this thread specifically is with undoing.

Undoing room state changes is a little awkward. We need to undo room data for minimaps. They are room data, and we have to be able to undo a script command to change the minimap icon. But what else needs to be undone? For example, if I pick up a normal map item to turn the rest of the level into white squares, then undo, should we undo this? I think there's an argument that the answer is actually no, the minimap is a weird "best of" that persists across game states, once a room is on the map, it should stay there forever (to a maximum of preview state).

Due to the confusing way we currently handle the minimap states, trying to patch the current explored room list with the best states from all other saved games, the bug this thread is about is us "downgrading" room states when undoing to the one for the current game, not the best of all games. So rooms with minimap icons that we haven't explored yet are "Invisible" for the current game state, even though the best of all worlds says it should be a preview. We lose this information when undoing as part of a way to maintain the integrity of the current game state.

This has really all come about because the way this is done is quite confusing. Sadly, the best of all worlds for the minimap isn't solely a front end concern, it affects what rooms we can quick travel to, what rooms we can scroll to when previewing rooms remotely, and what we can click on the map.

What I'm thinking we should do, is make a special save game, or extend the current ST_PlayerTotal, to track the "best of" state for each room in the hold. Every time we update a room state, we can also look at the room state in that saved game, and upgrade it if it's better (except Explored, the special saved game will only ever be Preview). We can load this on a load game and maintain a pointer to it, save it whenever we update it, and every time we actually care about the historical data, we can cross-reference its list, and keep the integrity of the current game room states intact. Don't try to merge the two, when we need to draw the map, just take which ever list has the better state, and use that for drawing.

The problem with this is this is a rework of how we currently do it, and so existing player profiles would suddenly lose sight of all their historical room states. Maybe we could have a special import process for RPG 1 profiles that updates ST_PlayerTotal one time by reading all previous saved games like we currently do, and player profiles imported from the demo beta will just lose it, it was a beta, too bad.

This would have to be done before release though, and time's ticking!

[Last edited by kieranmillar at 06-28-2025 03:11 PM]
06-28-2025 at 03:10 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
kieranmillar
Level: Smitemaster
Rank Points: 3778
Registered: 07-11-2014
IP: Logged
icon Re: Undo hides exploration (+5)  
07-05-2025 at 06:45 PM
View Profile Send Private Message to User Show all user's posts High Scores This architect's holds Quote Reply
New Topic New Poll Post Reply
Caravel Forum : DROD RPG Boards : RPG Bugs : Undo hides exploration
Surf To:


Forum Rules:
Can I post a new topic? No
Can I reply? No
Can I read? Yes
HTML Enabled? No
UBBC Enabled? Yes
Words Filter Enable? No

Contact Us | CaravelGames.com

Powered by: tForum tForumHacks Edition b0.98.9
Originally created by Toan Huynh (Copyright © 2000)
Enhanced by the tForumHacks team and the Caravel team.