JustChill Posted February 25, 2021 Share Posted February 25, 2021 I recently found something interesting in the "Nehrim.esm" which is the master for the total conversion Nehrim - At Fate's Edge. And I am not sure if this is actually a thing or just some weird stuff. Set DoorReferenceID.HebelBetaetigt to 1So... "DoorReferenceID" is the reference name of a door placed in the world space and "HebelBetaetigt" is a local variable in that door script.It's accessed here from another object script (the script of the lever / Hebel actually). I know that quest variables can be accessed by this syntax Questname.VarNamebut I never heard about this Object Script thing. Yet it appears it seemed to work - functionality wise - in the game. But I wonder if this were able to cause instabilities. I've changed "HebelBetaetigt" to a quest variable now and also changed all instances where "HebelBetaetigt" is used to point to the actual quest variable and not to the one in the Object Script of the door. Still not sure if this was actually necessary?! Does anyone know if this is actually a save thing to do, accessing variables of Object Scripts in that way? Cheers Link to comment Share on other sites More sharing options...
Pellape Posted February 25, 2021 Share Posted February 25, 2021 I do it all the time, changing variables from one script to the other, no matter if it is quests or objects. I mostly do it with my spell scripts really. Like this one: Scn PekAddItemsToSortingDatabaseSPLSCR Begin ScriptEffectFinish Set PekChestSortingQUST.State to 2 Dispel PekAddItemsToSortingDatabaseSPL End Link to comment Share on other sites More sharing options...
JustChill Posted February 25, 2021 Author Share Posted February 25, 2021 "PekChestSortingQUST", but this looks like a questID with that "QUST"-tag. ^^Is "State" really a local variable from an object script which you are changing here or is it a quest variable? I know quest variables are like "hidden" global variables as they can get accessed at any point with the proper syntax. But there is nowhere a documentation to be found about local variables from object scripts being accessed via "ReferenceID.VarName", so I was wondering. ;) Link to comment Share on other sites More sharing options...
qwertyasdfgh Posted February 25, 2021 Share Posted February 25, 2021 Yes, if an object in question is a persistent reference (with it's own EditorID). This is used many times in vanilla game. Link to comment Share on other sites More sharing options...
JustChill Posted February 25, 2021 Author Share Posted February 25, 2021 Thanks, I guess then I can revert it to the old behavior. :smile: Good to know it's used in Oblivion too. Never checked that code to be honest. ^^ Link to comment Share on other sites More sharing options...
Recommended Posts