Zorkaz Posted September 28 Share Posted September 28 Reason: I'm playing Fallout London. In order to use the Creation Kit I have to use a "stripped" version of the Fallout4.esm where tons of records have been deleted. So obviously I don't want to use my savegames with the stripped Fallout4.esm but someday it will happen if I'm not cautious enough. What I want to do: I wanted to make a quest that checks if an object exists, e.g. check if Captain Zao is in the Yangtze location (Which is totally empty in the stripped Fallout4.esm thus warning me on start that I'm using the wrong .esm) When I do it via quest however Captain Zao is always in the Yangtze location since both the location and Zao get carried over into my new .esp. How can I check remotely on something like this without making the objects active? Link to comment Share on other sites More sharing options...
NeinGaming Posted September 28 Share Posted September 28 Do any of the various papyrus extensions have a function to check the filesize of a local file? If yes, since your stripped fallout4.esm isn't likely to change often, you could just pop a warning when it's N bytes big, where N is the size of your stripped .esm. Failing that, start fallout via a little batch file that does that check, and pauses until you press a key if it's the stripped .esm. Link to comment Share on other sites More sharing options...
RaidersClamoring Posted September 28 Share Posted September 28 You could call Game.GetFormFromFile(<ID>, "Fallout4.esm") and see if the result is None. To run this automatically throughout your save, inject it into the player using 'PRID 14; APS "MyScriptPath:MyScript" ' once. Extend ObjectReference or Actor and set to run the function OnInit. Have the result displayed using Debug.MessageBox("Was it none? " + result == None) Link to comment Share on other sites More sharing options...
Zorkaz Posted September 29 Author Share Posted September 29 Thank you both. I wrote a .bat just as NeinGaming suggested and linked it to the script extender, https://www.nexusmods.com/fallout4london/mods/561 Link to comment Share on other sites More sharing options...
SKKmods Posted September 29 Share Posted September 29 Just one fYI on the GetFormFromFile method ... if running against in game OBJECT REFERENCE it must be PERSITENT else it will return none unless it happens to be in the loaded uGrids around the player. Most Objects in ESM are not persistent (quests find 'em via LocRefType) for memory load. Link to comment Share on other sites More sharing options...
RaidersClamoring Posted September 29 Share Posted September 29 2 hours ago, SKKmods said: Just one fYI on the GetFormFromFile method ... if running against in game OBJECT REFERENCE it must be PERSITENT else it will return none unless it happens to be in the loaded uGrids around the player. Most Objects in ESM are not persistent (quests find 'em via LocRefType) for memory load. Does this mean that simply being an editor (static id) ref is not enough to qualify as a persistent ref? Link to comment Share on other sites More sharing options...
SKKmods Posted September 29 Share Posted September 29 Having a placed ObjectReference ID does not make it persistent in memory so referenceable when unloaded. ESM placed ObjectReferences default to nonpersistent, ESP default to persistent. Placed ObjectReferences in ESM files can be forced persistent by (a) add to a FormList or (b) make them a papyrus script property or (c) put them in a quest reference alias or (d) make them a LinkedRef parent. Selecting a object in the console will show if it is persistent via the [P] or [PP] suffix. Using LocRefType keyword is a workaround to be addressable and avoid persistence, BUT the LocRefType keyword must be added at design time so the object is added to the location record. Adding a LocRefType to a non persistent placed object in runtime script does not seem to make the object addressable. Link to comment Share on other sites More sharing options...
Zorkaz Posted September 30 Author Share Posted September 30 Of course persistence in ESMs, it would never have worked. Link to comment Share on other sites More sharing options...
RaidersClamoring Posted October 3 Share Posted October 3 On 9/30/2024 at 7:07 PM, Zorkaz said: Of course persistence in ESMs, it would never have worked. The GetFormFromFile code would have worked for finding out whether a Form existed in the loaded Fallout4.esm, at all. You mentioned records being completely deleted from the esm. As for Refs that are loaded in, it wouldn't be checking for that. Link to comment Share on other sites More sharing options...
Zorkaz Posted October 3 Author Share Posted October 3 Well as far as I understand it's mostly records in the vanilla cells that are completely empty. E.g. Zao exists, but nothing in the submarine cell. Link to comment Share on other sites More sharing options...
Recommended Posts