-
Notifications
You must be signed in to change notification settings - Fork 68
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
Original Arena saved game decoding and import #94
Comments
Here are basics on how Arena handles saved game files, based on testing with a newly created character on a fresh Arena installation: Files modified when saving, where ## is the save number (00, 01, etc.): Files modified when program started: Files modified when loading game: Temporary files that can be created. Deleted on program close: **.64 files remain even after closing the program, but are probably active data being used in the current session. |
NAMES.DAT Saved game names that appear on the load screen. No actual link to the rest of the save data. |
I'll stop here and wait for feedback. I'm trying to keep this organized but I have a feeling it could easily become a mess if we aren't careful. It would probably be good to separate out each type of data to be imported into its own issue. Anyway, I'll wait for your opinion. |
I will describe the save file format in the wiki. |
Yeah, I was about to suggest that. Having the save file format in the wiki would be preferable for long-term records. We can keep this issue here as a reminder. |
I didn't even notice the wiki until now. Good to see Carmina16 has already made a lot of progress. It might be further useful to have individual wiki pages on data elements when there is more information. For example, the valid race ID values. Or just a comment may be enough. The text formatting and journal information (such as the maximum number of lines per journal page) also seem like they could go in the wiki. |
@Carmina16, I'm happy to see so much progress on the wiki, including not just saved game structure but things like travel code! |
I am as well. I'm not sure what the extent of their knowledge is, but they seem to know a lot about Arena's inner-workings. Although I might not have the chance to implement all of those things in the wiki right away, I plan on looking into each one over time. I've still got a lot of renderer stuff and level data I need to work on first. |
I've gathered a bit more info about the spell format (which by the way is also used in the file SPELLS.LST). Referring to the structure in the wiki:
The parameters param0-5 contain three entries, each of which is relative to one of the three possible effects a spell can have (specified in Effects[3]). Valid values for TargetType are:
Values for Element are:
Possible values for Effects:
Different spell effects use different parameters:
What needs further investigation is the meaning and possible values of Flags/SubEffects/AffectedAttr for the different Spell Effects. Hope it's helpful. |
Looks like player coordinates in a level are at offset 0x105C8 in SAVEGAME.xx. First a DWORD that is the X coordinate, then a DWORD that is the Y coordinate. This could be useful for cheating one's way to a particular square in an Arena save. |
Originally in #100
|
This seemed the appropriate place, so I hope this isn't necro posting. I'd just like to leave a caution note about importing original save games into OpenTESArena. The original game has many ways that you can corrupt the save game files which end up causing glitches later on. Simply opening the "SAVE/LOAD" menu before creating a character will introduce glitches into your game. This example will cause the starting date to be the 1st of Morningstar instead of the 1st of Hearthfire as intended. This can cause many glitches and even the 1.06 patch notes recommends against using this option which is part of the NEW GAME option. |
Thanks for the info. It's sometimes reasonable to do sanitizing of data read from the original game if it means more quality of life for the modern engine. From your example though, I can't see how that would break a save if the month was different. Seems like some global variable bug in the original executable that presumably gets saved to the save file. I don't know how artifact quests were implemented originally but that bug would probably not carry over to here. |
If there are known problems with saves from the original game, those could be perhaps be (optionally?) patched if importing them into OpenTESArena. I made created this issue after helping work on Daggerfall Unity. Saves from the original game were useful to have when researching and implementing various game mechanics, so I figured they would also be useful here. Another big reason, though, is because something that happened in both Daggerfall Unity and OpenMW that would be nice to prevent as much as possible: having to worry patch or worry about conflicts with old versions of OpenTESArena-format saves. As in, say, you release OpenTESArena with save/load support (in a unique OpenTESArena format), then later change the way some kind of data is stored in order to more accurately recreate something from the original game, etc. You then have the problem of supporting, or not supporting, the old version's saves. In OpenMW, for example, I've seen "that would change the save format" often come up as an obstacle to why something can't be easily changed. I thought that perhaps, if importing saves from the original game is implemented well, maybe for some time those could be used, perhaps exclusively, for testing/development before releasing OpenTESArena save/load capability "out into the wild", which might minimize the problem of changing save game formats, since it would be somewhat mature/complete already from staying close to the original data format. @afritz1, it's all your call of course, but I'm just letting you know why I kind of wanted to push the idea of importing original saves and opened this issue. |
I don't think it's going to be a problem. Most of the save file is just a dump of internal variables not needed for this engine, so we can easily and safely cherrypick what we actually need. |
@afritz1 @Allofich @Carmina16 |
Regarding the calendar, this page says that the reference sheet included with the game shows a Tamriel-ified Gregorian calendar (which is pretty much what Morrowind and later use), but in the actual game, every month has 30 days and each month begins on Tirdas (Tuesday) the 1st, despite the each month ending on Middas (Wednesday) the 30th. The actual implementation details are probably better suited for the Time & Calendar wiki, but I'll add my two cents for game importing. My understanding is that the game stores time as minutes since the start of the game (12:00 noon, Tirdas, 1st of Hearthfire in the year 3E 389). If we have OpenTESArena use a "fixed" calendar that matches the Arena reference sheet and later games (and I think we should instead of using the broken existing calendar) I would be okay with having the internal minutes since game start stay the same and the cosmetic display change. For instance, I would be okay with 90 days after game start being:
So long as our save import documentation explains that this is happening and that this is cosmetic; no quest deadlines or whatever are being modified because internally they are still being calculated as minutes from game start. |
This may already be in your longer-term plans, but I think it would be very useful for testing and reverse-engineering the original game data to be able to import native save game files from original Arena, as Daggerfall Unity can do with saved games from original Daggerfall.
There are some saved game editors on UESP for Arena, and these are useful for finding out how data is stored in the save files.
The text was updated successfully, but these errors were encountered: