-
Notifications
You must be signed in to change notification settings - Fork 229
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
TotK - restore destructible rocks #399
Comments
I haven't found any entry in the master editor which restores rocks. I even created a save game prior to destroying a wall, and one right afterwards, and compared them for differences. there were differences, but I couldn't undo the rock wall damage with the editor. there may be a way but i'm not sure how it's tracked. |
I did the same test and I couldn't find the things in the master editor, either. The master editor only shows stuff whose "hashes" are known. Those are listed in the .csv in the root of the TotK folder of this repo. find the correct hash for the start of the destructible rock data, or its address in the save file, and the format can be worked out and the values can be shown and edited in the master editor. Maybe I'll get it stuck into my head one day that I'll figure this out, and work on it. Until then, I'll keep waiting. |
You won't find these in the Master Editor, as they are not variables. In TOTK, things like specific enemies defeated, Addison signposts, obtained depths' pristine weapons and probably even destroyable rocks are stored in the MetaData block, which is usually stored at the end of the savegame file. I wish I had time to work on an editor for this :-( |
What you said was helpful. I'm going to crack into the existing code for the addison posts and pristine weapons on the load page and see if I can figure out how to parse the metadata block. |
The idea would be to do an editor that allows to add or remove things to the metadata. This map has most of the objects and their ids documented. |
what does "hash" mean in this context? It's not a location in the save file, is it a magic word to look for in the file? |
what are the IDs for the one-time-destructible rocks? I can't seem to figure that out. MergedActorD100 seems to be it, but i'm not confident, and I wonder if this name is not used only for this purpose. ¯\_(ツ)_/¯ |
Thank you for this editor, by the way, @marcrobledo. This is fun. |
Try to search |
I found the hash you mentioned via a hex editor, but I'm not sure where to go next. I've reverse-engineered file formats before, so I'm not completely useless here.
Are you saying that checking (or unchecking) these in the master editor will turn these rocks back on?
I found the hash in a hex editor, as mentioned, but I don't know the width of the value that comes after it. Endianness messes me up after I don't think about it for a while. I found My hex editor shows the next 8 bytes as Can you give me a short clue about what I'm doing wrong? I don't need a tutorial or anything, just some idea about how to read the value after the Edit: I figured some of it out. The pointer is 32-bit and in this case it's |
I didn't say the MetaData contains the bits you are looking for. I said probably ;-) The next four bytes after the MetaData hash is the offset to the MetaData. MetaData is just a list of Uid64 (specific killed enemies, Addison fixed posts, etc). You can see the Uid64 for every game actor in the map I posted. But as I said, I can't confirm that MetaData contains the broken rocks. Could be it's just a boolean you can edit in the Master Editor. Have you tried to edit those Chances are, they are just in a boolean array. If that's the case, then I could easily add a button to restore/destroy all rocks. |
That's enough of a clue for me. I should be able to tell you if the rock data is there or not with a bit of time. |
oh, yes I've tried unchecking all the boxes in the master editor for I did use the browser JS console to do the unchecking of all those checkboxes, though, maybe that prevented it from actually making the changes. I didn't think of that until just now. |
Yeah, that's probably what happened. |
ok so do I need to click several thousand checkboxes, or is there a better way? 🙃 |
You could use jQuery (well, Cash in this case) for that: |
OK, I found a single node in the object map, then I found it in the editor. That single node in the map is 1024 checkboxes in your editor. It took 5+ seconds to check each box, if I searched only for I checked every unchecked box which was a part of that object, and it made no difference in-game. I also unchecked all 1024 of these, which also made no difference in-game. I'm doing something wrong, or this isn't how these rocks get restored. Later, after work, I will load up a new save file and see which of the 1024 checkboxes are checked and unchecked for this same OID and see what it shows. |
That didn't work as the events were not attached with Cash, so the trigger doesn't do anything. Try this:
or this if you want to check them all:
Never said this was going to work ;-) Still, I don't know why are you taking this route. It would be much easier to do a binary comparation between two savegame files with a bunch of rocks destroyed in-game. |
I'll get there. I'll be able to see what changed, but knowing that won't help me understand the data format so I can change them all. I can't find the few object IDs I looked up for these things in the save file at all, which confuses me, as well. Could be LE to BE conversion, or vice versa, I don't know, yet. |
These 1024 checkboxes per
Because you mentioned that this data was (at least partially) exposed in the Master Editor. Maybe what is needed is already there. You probably already know, but I don't. I'm trying to save you time by testing things (and failing horribly, lol). I've never seen a file format with this many magic numbers and pointers to data structures. This must be a game save file convention or something. Most file formats that I've looked into have been plain TLV formats with a single magic number. This save file format is filled with magic numbers, called "hashes" here, followed by pointers or offsets to the real data, which is very odd, to me. These things seem like obfuscation, to me, because these things are certainly getting in my way of understanding how this file is laid out. If I spoke JavaScript I would have a much better time understanding how this is working, but I don't. Like I said, I'll get there. |
Internally, all Anyway, those As of the file format... Data in BOTW and TOTK is saved in a hash table :-) It's not obfuscation, since they could have just encrypted everything for security purposes and they didn't, it's all plain data. Indeed, TOTK savegame file is much simpler than BOTW's. |
I am a weirdo and I very much enjoy destroying those one-time destructible rock found in caves.
Without starting a new save, I want to find all of those things and destroy them all again.
I can't read JavaScript very well, so I don't know if your data structure can see those rocks or modify them, but if it can, please offer a button which restores those things, and another to remove them all as if they have all been destroyed.
Many thanks.
The text was updated successfully, but these errors were encountered: