4
\$\begingroup\$

For The Elder Scrolls V: Skyrim, I'm looking for a way to read the player's inventory without having to go into the game to do it.

I've scoured the pages from the UESP wiki on save file format but I couldn't find where the player's inventory is, even after writing a crude REFR change form reader. The wiki has a lot of information on many structures, but none are clearly identified as the player's inventory.

So, does anyone know where the inventory (RefID and count) is in the savegame file?

\$\endgroup\$
  • \$\begingroup\$ As this doesn't appear to relate to game development, it probably belongs on Arqade \$\endgroup\$ – bcrist Sep 22 '16 at 0:13
  • 5
    \$\begingroup\$ Modding-related question is allowed here :) \$\endgroup\$ – Vaillancourt Sep 22 '16 at 0:15
  • \$\begingroup\$ "without having to go into the game" doesn't sound like a mod to me... \$\endgroup\$ – bcrist Sep 22 '16 at 0:16
  • 5
    \$\begingroup\$ Wanting to know the location of some data in a game's save format seems, to me, modding-related enough to be on-topic here. Whether or not the resulting program will run while the game is also running doesn't seem like a particularly good reason to disqualify a question, especially as it would preclude asking about the development or extension of modding tools at all. That said, anybody who feels like it should be off-topic should vote as such. As of now this question has zero close votes. \$\endgroup\$ – Josh Sep 22 '16 at 0:34
  • 2
    \$\begingroup\$ @bcrist I already asked this on Arqade. It was put on hold "because it belongs to game dev". \$\endgroup\$ – Ronan Paixão Sep 22 '16 at 0:42
1
\$\begingroup\$

Late to the party, but it is in the change forms. More specifically, it's an ACHR record (type = 1) in the change forms. Unfortunately, the change forms for ACHR records aren't documented at all on UESP.

Back when Skyrim was released, I released an alchemy tool like what you're wanting to do. I wanted to do what you're doing, but I ran into the same brick wall that you are - information about the inventory wasn't available. Now I'm working with FO4 doing something that similarly needs to read the inventory. What I've decided to do is place a stipulation that the items I'm looking for can NOT be in an actor's inventory (player or NPC) -- they can be in any other kind of inventory. With that stipulation, you can read the change records and figure out what the player has moved (thus assuming ownership) by reading the REFR records like you've already done. It's hackish, but it should work for your purposes, I believe.

Better for your purposes might be adding a special type of container via a mod, and have the player put their ingredients in it. Then you can search for your container's RefID (or BaseID), and read the REFR for it.

\$\endgroup\$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.