About the Test Commands:
Experimental test commands based on a request. Do not use these if you're unsure what they do.
1) RemoveAllBoundScriptObjects/RemoveBoundObjs: removes all bound Papyrus objects from the given forms
Syntax: RemoveAllBoundScriptObjects FormID (abSilent)
It removes all attached Papyrus script objects from a form. E.g. calling [CF "ObjectReference.Disable"] on a reference afterward would print the line in the console log: "No script object Object Reference is attached to the reference.".
2) ResetAllBoundScriptObjects/ResetBoundObjs: resets all bound Papyrus objects on the given forms
Syntax: ResetAllBoundScriptObjects FormID (abSilent)
Resets all Papyrus script objects bound to a form. It should reset all attached script objects to their default, editor defined state. Calling it should result in the original scripts to get "reattached" and all Const script properties to get reinitialized. Note that if you called RemoveBoundObjs() earlier you may need to call AttachPapyrusScript SomeScript to make the Papyrus VM attach the script object to the form.
(The drawback of using AttachPapyrusScript is that it doesn't reinitialize properties which may result in broken script data if the script has Const properties because they cannot be set at runtime; this is where ResetBoundObjs() could come in handy).
RemoveBoundObjs 598D ---> would remove all script objects from the form with FormID 598D
RemoveBoundObjs "598D 1" ---> would remove all script objects from the form with FormID 598D and would also suppress the feedbacks in the Console log
(The parameter "abSilent" is optional).
3) SetTemporaryReference/SetTempRef: flags a reference as temporary [T]
Syntax: ConsoleRelectedRef.SetTempRef abSetExample ( like FF012345.SetTempRef true )
Calling SetTempRef on an editor placed reference is not recommended.
4) RemoveAllPersistentPromoters/RemovePPs: removes all persistent promoter [PP] forms from the given ref
Syntax: ConsoleRelectedRef.RemovePPs
Calling RemovePPs on an editor persistent [EP] reference is not recommended. It is best to use before deleting a runtime created reference. See below.
5) ReturnFromLatentPapyrusFunc/ReturnFromLatent: returns from a running latent Papyrus stack
Syntax: ReturnFromLatent StackID abReturnValue ( like ReturnFromLatent "2A567C 1" )
It can only return a boolean value, true of false. (Enough to exit the stack).
6) RemoveAllBoundAliasScriptObjects/RemoveAliasBoundObjs: removes all bound Papyrus objects from the specified Alias
Syntax: ConsoleRelectedRef.RemoveAliasBoundObjs QuestID AliasName (abSilent)
( like 59A9.RemoveAliasBoundObjs "2A567C ActiveCompanion 1" ).
The third parameter abSilent is optional. The Papyrus VM should recreate the bound objects for the Alias on a save game load event.
Force remove a runtime created promoted persistent actor / object reference:
Call RemovePPs then SetTempRef to allow the native code to auto clean up a runtime created reference (auto cleanup usually happens OnUnload).
Notes: please treat the test commands as experimental functions. I can't tell how they would affect saves in the long term and I probably won't be able to figure it out either without the appropriate tools which they don't exist yet for Starfield.
The test commands are not included in the default INI. You can enable them with:
bAddCommandSetTempRef=1
bAddCommandReturnFromLatent=1
bAddCommandRemoveAllPersistentPromoters=1
bAddCommandRemoveAllBoundScriptObjects=1
bAddCommandResetAllBoundScriptObjects=1
bAddCommandRemoveAllBoundAliasScriptObjects=1
Call from Papyrus scripts:Function testRemoveBoundObj() global
String sFormIDs = "5986 59A1 59A9 598D 3448"
Debug.ExecuteConsole("RemoveAllBoundScriptObjects \"" + sFormIDs + "\"")
EndFunction
Function testResetBoundObj(ObjectReference Ref1, ObjectReference Ref2) global
String sFormIDs = Utility.IntToHex(Ref1.GetFormID()) + " " + Utility.IntToHex(Ref2.GetFormID())
Debug.ExecuteConsole("ResetAllBoundScriptObjects \"" + sFormIDs + "\"")
EndFunction
Function testSetTempRef(ObjectReference Ref, bool abSet) global
Debug.ExecuteConsole(Utility.IntToHex(Ref.GetFormID()) + ".SetTempRef " + abSet)
EndFunction
7) Infinite Quest Initialization fix:
Bug fix in beta. Do not use it other than testing. Added in v3.3. It is designed to fix a bug that can cause a quest to get stuck in a "Waiting For Stage" forever. The bug appears to be caused by a broken Papyrus latent stack which prevents the native quest manager from advancing the quest to the target Quest Stage, causing it to "wait" for the stage. This fix detects if a quest is being initialized for too long ("too long": see settings below) and: returns from the latent Papyrus function, clears all quest aliases and finally, stops the quest.
The issue is that it currently does not debug a save game completely if the vanilla bug already have corrupted it. So, a previously fixed quest may get broken again (of course this is applicable to quests that were designed to run again). What may retrigger the bug is under investigation. Use bDebugLogging=1 to turn on debug logging and search for "ApplyInfiniteQuestInitFix" to see which quests have pending/running latent calls. For this fix to work, the following Papyrus INI settings must be enabled: bEnableLogging, bEnableTrace, bLoadDebugInformation, bEnableProfiling. (In short, enable Papyrus debug logging).
Currently, this fix has two settings:
bTestFixInfiniteQuestInitialization=1 ( to turn on; off by default )
iTestInfiniteQuestInitializationTimeout=12000
( if a quest is being initialized for more than 12 seconds, the fix tries to shut it down; measured in milliseconds )
Test Commands
-
Total views1.8k