UESP Forums

Discuss the uesp.net site and Elder Scrolls topics.
* FAQ    * Search
* Register    * Login
It is currently Mon Sep 09, 2024 8:45 pm

Loading

All times are UTC

Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 29 posts ]  Go to page 1, 2  Next
Author Message
 Post subject: Skyrim save format questions
PostPosted: Wed Nov 23, 2011 5:06 am 
Offline
Layman
Layman

Joined: Wed Nov 23, 2011 4:23 am
Posts: 1
ES Games: morrowind, oblivion, skyrim
Platform: pc, xbox
UESPoints: 0
So I'm working on a tool to unspend skill points and I've been looking at http://www.uesp.net/wiki/Tes5Mod:Save_File_Format to get started with understanding the save file format. I've noticed some discrepancies in the information I've found there, but don't want to go start editing the wiki without at least verifying some of the things I've found.

The Header Size was said to be a ushort, but I've found that it's actually a uint32. I should note that I'm working with a PC version of the save file, so I'm not sure if there may be a difference between that and the Xbox 360 version which the wiki says it was documented from.


Thanks for the help.

Brian


Last edited by wbrian on Sat Nov 26, 2011 2:42 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Nov 26, 2011 1:38 pm 
Offline
Warder
Warder
User avatar

Joined: Sat Apr 23, 2011 8:50 pm
Posts: 589
ES Games: Daggerfall, Oblivion, Shivering Isles, Skyrim
Platform: PC
Status: AFK since 2011
UESPoints: 0
Anyone know how to find your created items? I haven't been able to find it like I was in Oblivion...

_________________
I'm on a rollercoaster that only goes up
Chaos the N'wah wrote:
TRAMPY!

Founding member of the Weasel Forums Universe


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Nov 26, 2011 11:18 pm 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
I have been slowly documenting the Skyrim save format on the wiki from personal research (as I did for Oblivion). If you have any questions about the format I'll answer them to the best of my ability.

@TheNightFather What in particular about created items?


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sun Nov 27, 2011 12:11 am 
Offline
Journeyman
Journeyman
User avatar

Joined: Sat Sep 17, 2011 7:30 pm
Posts: 240
Location: Canada
ES Games: Morrowind, Oblivion, Skyrim
Platform: Xbox 360, PC
Other Profiles: BurningSuitcase
UESPoints: 0
There is no difference in the file formats for Xbox360 and PC. Todd Howard has confirmed this himself when he was asked if Skyrim was going to have mod capabilities for consoles. He replied that it's something they'd like to do, and it's something that they could've done a long time ago with Oblivion. In fact, he even said that you could take a mod and stick it right onto your Xbox and it would work the same. The only issue was that Microsoft doesn't want people putting stuff onto their consoles, (essentially a security issue).

_________________
"Defy me, and you will know what it is to stand against a god." - Vivec
The Grand List Of Console Role Playing Game Clichés


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sun Nov 27, 2011 12:22 am 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
You're correct about the save file format not being different, but non-save files do have differences between platforms (endian difference).


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sun Nov 27, 2011 12:26 am 
Offline
Journeyman
Journeyman
User avatar

Joined: Sat Sep 17, 2011 7:30 pm
Posts: 240
Location: Canada
ES Games: Morrowind, Oblivion, Skyrim
Platform: Xbox 360, PC
Other Profiles: BurningSuitcase
UESPoints: 0
Well I know that what Todd Howard said was that the PC and Xbox360 versions are able to be modded the same way. So that means that enough of the files are the same for it to work.

_________________
"Defy me, and you will know what it is to stand against a god." - Vivec
The Grand List Of Console Role Playing Game Clichés


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sun Nov 27, 2011 12:31 am 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
From personal research Skyrim is set up to load data in either endian as long as it can reasonably detect it which platform it was created for.


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Fri Dec 02, 2011 3:02 am 
Offline
Associate
Associate

Joined: Mon May 22, 2006 12:35 pm
Posts: 16
Location: Winchester, MA
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
I don't seem to have endian problems. I seem to go wrong after reading the screen shot. The dimensions I get for a PC screen short are 192x64 (which seems a bit odd), and after reading 192x64x3 bytes, I don't see a form version of 57. Anyone else got working code for the PC that can read it following the spec?
(My code is in Java. I'm happy to share if there is interest.)


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Fri Dec 02, 2011 3:24 am 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
That resolution is odd but on the PC the preview image size is based on the resolution when the save was made.

Please doublecheck your code against the latest version of the Save File Format page.


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Fri Dec 02, 2011 4:28 pm 
Offline
Associate
Associate

Joined: Mon May 22, 2006 12:35 pm
Posts: 16
Location: Winchester, MA
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
:oops: Went through a hex dump byte by byte and found a bug in my byte -> int routine. Doh. How embarrassing.
Sorry for the noise. (And many thanks Rick for your work documenting the format!)


Top
 Profile  
 
 Post subject: Skyrim-Savegame Parser C# implementation
PostPosted: Fri Dec 02, 2011 7:21 pm 
Offline
Layman
Layman

Joined: Fri Dec 02, 2011 6:42 pm
Posts: 3
ES Games: Oblivion, Skyrim
Platform: PC
UESPoints: 0
Hi guyz,

i wrote a Skyrim-Savegame Parser in C# implementing the file format description provided by Rick, which it like to share.
Btw: Great research job, mate! How did u do that? Are u a matrix operator as professional, who sees blonds and brunettes in binary code rolling over the screen?

My program reads until the misc stats, as they are the point of my interest.
It exports the stats data from multiple savegames into csv or xml. You can watch the stats in the in-game menu, but i was missing them in steam, where only the achievements are listet. But this was not enough for a solid comparison from my savegames to those of my friends. With the exported statsdata i am planning to create a gameplay history, where you can see the evolution of your skyrim avatar - visualized in graphs.

Unfortunately it seems that i am not authorized to post the links to the sourcecode nor can i see how to put an attachment to this post... any advice?

Till then write me a PM if u'd like to get the program or code.


Top
 Profile  
 
 Post subject: CVS anyone?
PostPosted: Fri Dec 02, 2011 11:54 pm 
Offline
Associate
Associate

Joined: Mon May 22, 2006 12:35 pm
Posts: 16
Location: Winchester, MA
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
I've got a CVS server that I'm storing my Java code on that I could open up. Would that work for you? Would it work for anyone else?


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Dec 03, 2011 4:09 pm 
Offline
Layman
Layman

Joined: Tue Nov 29, 2011 4:49 pm
Posts: 6
ES Games: Oblivion, Skyrim
Platform: PC
UESPoints: 0
@Rick (or anyone really): Do you have a .hsl (hex workshop structure file) or anything similar of the current structure, as it's understood, that you wouldn't mind sharing? I'm just not wanting to "re-create the wheel" if it's not needed.


Top
 Profile  
 
 Post subject: Re: CVS anyone?
PostPosted: Sun Dec 04, 2011 7:18 am 
Offline
Layman
Layman

Joined: Fri Dec 02, 2011 6:42 pm
Posts: 3
ES Games: Oblivion, Skyrim
Platform: PC
UESPoints: 0
jjaquinta wrote:
I've got a CVS server that I'm storing my Java code on that I could open up. Would that work for you? Would it work for anyone else?


I will upload it there but how do u get the URL to the public when we're not authorized to publish it here?


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Tue Dec 06, 2011 2:50 am 
Offline
Layman
Layman

Joined: Tue Dec 06, 2011 2:44 am
Posts: 1
UESPoints: 0
Quote:
I've got a CVS server that I'm storing my Java code on that I could open up. Would that work for you? Would it work for anyone else?


A publicly accessible CVS-server would be nice (maybe that a Github project would be easier for collaborative efforts, but that assumes Git-familiarity of course...).


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Tue Dec 06, 2011 9:35 pm 
Offline
Layman
Layman

Joined: Fri Dec 02, 2011 6:42 pm
Posts: 3
ES Games: Oblivion, Skyrim
Platform: PC
UESPoints: 0
github was a great idea, thx mhermans.

i just created an account and uploaded my two projects:

- SkyrimCharacterParser (C#) to parse savegames for character stats

- SkyrimCharacterAnalyzer (Java) to create nice reports

Just search for these projects in github.

Have a look at the sample report i created, on my github-page kewl-deus github com look for /SkyrimCharacterAnalyzer/samplereport/index.html


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Thu Dec 08, 2011 2:07 pm 
Offline
Layman
Layman

Joined: Thu Dec 08, 2011 1:59 pm
Posts: 2
ES Games: Oblivion, Morrowind
Platform: PC
UESPoints: 0
First of all, thanks for the fantastic resource! I've been having great fun getting a parser working for the Skyrim savegame format. I have however come across a couple of problems, I was wondering you might be able to shed some light on.

My parser successfully extracts the Global Vars (easy bit!), various Global Data structures and the Change Forms data (including uncompressing compressed data), and I've managed to find what I think are the player NPC_ and ACHR structures (based on NPC_.changeFormID=7 and ACHR.changeFormID=14) however getting any useful data from the resulting data within this data is proving to be rather difficult, even when I go on the structures you've kindly provided (http://www.uesp.net/wiki/Tes5Mod:Mod_File_Format/NPC for example).

Within the aformentioned structure (NPC), sub records are mentioned. Can I assume these are instances of Change Form objects - and can I also assume they are identified by their RefID? Just looking for a bit of clarification, that's all.

As a next progress mark, I've been trying to extract the players current X/Y/Z position from their ACHR instance. While I've managed to find the offset in my specific save file, the leading data (as expected) is not the same length between all save files, so to get this data reliably I need to figure out how to parse the leading data structures.

Any pointers you could give me would be greatly appreciated :) If it's too much to ask, don't worry. I've had great fun already getting this far!

p.s. below are a couple of hex dumps of the two data sets I've extracted for the player from the NPC and ACHR Change Form objects

NPC_player.bin: hexpaste dot com/ypvNJ7KW
ACHR_player.bin: hexpaste dot com/z3Pu49KE


Last edited by Seidr on Thu Dec 08, 2011 2:10 pm, edited 1 time in total.

Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Thu Dec 08, 2011 2:10 pm 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
The change flags on a change form indicate what data has changed and how you parse the change data. I've not looked at this data yet and you won't be able to reliably read that data without knowing exactly how to read it.


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Thu Dec 08, 2011 2:12 pm 
Offline
Layman
Layman

Joined: Thu Dec 08, 2011 1:59 pm
Posts: 2
ES Games: Oblivion, Morrowind
Platform: PC
UESPoints: 0
Ahh ok, that's cool. I did notice a lot of the definitions were missing. If I manage to figure out any of the data I'm looking at, I'll certainly dump it here.

Oh, and thanks for all your hard work :)


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sun Dec 11, 2011 10:09 pm 
Offline
Layman
Layman

Joined: Sun Dec 11, 2011 9:56 pm
Posts: 1
ES Games: Oblivion,Morrowind, Skyrim
Platform: PC
UESPoints: 0
I too, started a small project to read/write TES savefiles. It's very basic so far, but I put it up on github anyway. I've used the wiki pages by Rick to read TES4 and TES5 with a couple of python scipts.

git://github.com/bjowi/essedit.git


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Dec 17, 2011 4:00 am 
Offline
Initiate
Initiate

Joined: Sat Dec 17, 2011 1:48 am
Posts: 32
ES Games: Skyrim
Platform: PC
UESPoints: 0
Can someone tell me how vsval types work? http://uesp.net/wiki/Tes5Mod:File_Format_Conventions says the last 2 bits tell you the size of the the value, but how can you look at the last 2 bits if you don't know what the size is? You have to know the size to look at the last 2 bits, but you can't tell the size without looking at the last 2 bits. I must not be understanding it correctly.


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Dec 17, 2011 4:11 am 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
Read the first byte. Determine size, read the rest of the bytes.


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Dec 17, 2011 4:32 am 
Offline
Initiate
Initiate

Joined: Sat Dec 17, 2011 1:48 am
Posts: 32
ES Games: Skyrim
Platform: PC
UESPoints: 0
It says:

value <= 0x40000000 becomes uint32, (value << 2) | 2

if value is a uint32 then value << 2 | 2 wouldn't that put the 2 in the 4th byte not the 1st?


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Dec 17, 2011 4:55 am 
Offline
Layman
Layman

Joined: Sat Nov 26, 2011 11:14 pm
Posts: 7
ES Games: Morrowind, Oblivion, Skyrim
Platform: PC
UESPoints: 0
No, it's stored as little-endian.


Top
 Profile  
 
 Post subject: Re: Skyrim save format questions
PostPosted: Sat Dec 17, 2011 5:16 am 
Offline
Initiate
Initiate

Joined: Sat Dec 17, 2011 1:48 am
Posts: 32
ES Games: Skyrim
Platform: PC
UESPoints: 0
Oh, I hate endians. I never do much coding where I care about endian at all.
So peek the first byte so position in the stream doesn't move, determine the size, then read in the right type. Got it.
Thanks.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic This topic is locked, you cannot edit posts or make further replies.  [ 29 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  

Sponsored Links

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group