In the Skyrim Console, how can I reference an object that is not in the cell that I currently am in

the-elder-scrolls-v-skyrim

In the Skyrim Console, how can I reference an object that is not in the cell that I currently am in?

For example, if I am in BronzeWaterCave and type:

"000c76c9".additem 000669A5 5

It will add 5 leeks (000669A5) to the Dwemer chest (000c76c9) in the cave.
However, if I am outside of BronzeWaterCave the same commands will result in:

Syntax error. Invalid reference '000c76c9' (only object references and reference variables are allowed in this context).

This is a purely academic inquiry; I am not trying to accomplish anything.

I just noticed that if I type 000EEC5F".additem 000669A5 5, the corpse of Sinderion (RefID 000EEC5F) in Blackreach would gain 5 leeks, no matter where I was located in the game. He clearly didn't exist in my cell. I have many different restarts of Sykrim with totally different characters, but in all the games, the RefID for the Dwemer chest in BronzeWaterCave is always 000c76c9. I assumed it got assigned that when the Bethesda developer plopped it in the cave during game construction. I assumed its RefID was unique within the game, but maybe that RefID is only unique within a cell. Sinderion's is clearly unique within the game.

I was just wondering if you could uniquely reference a PRID from another cell by somehow preferencing it, for example (and I can assure you this doesn't work):
prid BronzeWaterCave.000c76c9.

Best Answer

You can't.
As Roddy insinuates, these objects are (in all likelihood) not yet parsed by the engine, so individually spawned items for all practical purposes do not exist.

The Creation Engine (and the Gamebryo engine before it) works with FormIDs, which are unique identifiers for every single entity in-game, and consist of:

  • BaseIDs: unique identifiers used for the 'blueprints' of items, preexisting in the game files.
  • RefIDs: unique identifiers used for a specific unique item (a copy or clone) in-game, generated or called at run-time.

To demonstrate: you can spawn a generic item using BaseID, and, upon spawning, it will have a RefID. Spawn a quantity of 100, and they will all have the same BaseID, but a unique RefID, probably with an incremental value (and if you were to reload and spawn another object with a different BaseID, they might spawn with the same RefIDs as the other objects).

Spawning the BaseID of a unique NPC or a unique quest item will create a copy, or clone, potentially causing bugs, as they can both be referenced by the engine, which assumes there is a single entity with that identifier, which is especially hazardous when referenced in scripts (during quests, for example). Unique in-game items have a fixed BaseID and FormID.

"Specifically placed creatures or items" can also have unique RefIDs source.

Even when items have a unique RefID, they can only be addressed when they're loaded in the engine (which is not necessarily loaded on-screen: e.g. the RefIDs of companions, being tied to the player through scripting, will be loaded in the engine even when off-screen (and possibly when dismissed) since they are part of your saved game files).

This is why you cannot address it through the in-game console when it's not loaded in the engine.

This applies to your Dwemer chest as well: even though its RefID is apparently unique, since your player character has no direct connection with it, it isn't loaded when your PC is outside of the cell it's located in.
I think you can change this by placing items from your inventory in it: as these items (and other changes you have caused in an area) will remain in place for at least three in-game days, its RefID will likely be embedded into your saved game, but this is pure speculation.

Lastly, note that prid is a console command that will simply allow you to keep referencing the same RefID for subsequent commands.
If 000c76c9 is indeed the unique RefID of that Dwarven chest in Bronze Water Cave, prid 000c76c9 (or prid c76c9, or prid "000c76c9") should work (and there wouldn't be need for stating its location, since it's unique).