Skip to content

Instantly share code, notes, and snippets.

@Scrivener07
Created August 27, 2018 02:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Scrivener07/0b90463cd177c5f78c9d97712b08a500 to your computer and use it in GitHub Desktop.
Save Scrivener07/0b90463cd177c5f78c9d97712b08a500 to your computer and use it in GitHub Desktop.
papyrus-lang (VS Code Extension)
Add completion and validation for string constants for special functions such as SetState, GetPropertyValue, etc.
Can you get me a list of the functions that only take specific strings and/or only string literals? I know FindStruct is one I haven't listed yet.
Main categories, I think:
Which functions have rules as a language construct. Like, FindStruct's arg simply can't be a value that isn't the name of a member of that struct type. (Also we might want to just hide that when we know the array isn't a struct type. Also, does FindStruct work for script objects, or only actual structs?)
Which ones can actually be anything, but we can infer what strings to show for autocomplete suggestions.
Which function arguments can only be a string literals.
Function arguments which just happen to have specific constant values that work on Fallout 4 specifically, but are not declared anywhere in a script.
#### Category 1
Which functions have rules as a language construct.
* [Array.Add](https://www.creationkit.com/fallout4/index.php?title=Add_-_Array)
* [Array.Insert](https://www.creationkit.com/fallout4/index.php?title=Insert_-_Array)
* [Array.Find](https://www.creationkit.com/fallout4/index.php?title=Find_-_Array)
* [Array.RFind](https://www.creationkit.com/fallout4/index.php?title=RFind_-_Array)
* [Array.FindStruct](https://www.creationkit.com/fallout4/index.php?title=FindStruct_-_Array)
* [Array.RFindStruct](https://www.creationkit.com/fallout4/index.php?title=RFindStruct_-_Array)
#### Category 2
Which ones can actually be anything, but we can infer what strings to show for autocomplete suggestions.
* [ScriptObject.GotoState](https://www.creationkit.com/fallout4/index.php?title=GotoState_-_ScriptObject)
* [ScriptObject.CastAs](https://www.creationkit.com/fallout4/index.php?title=CastAs_-_ScriptObject)
* [ScriptObject.CallFunction](https://www.creationkit.com/fallout4/index.php?title=CallFunction_-_ScriptObject)
* [ScriptObject.CallFunctionNoWait](https://www.creationkit.com/fallout4/index.php?title=CallFunctionNoWait_-_ScriptObject)
* [ScriptObject.GetPropertyValue](https://www.creationkit.com/fallout4/index.php?title=GetPropertyValue_-_ScriptObject)
* [ScriptObject.SendCustomEvent](https://www.creationkit.com/fallout4/index.php?title=SendCustomEvent_-_ScriptObject)
* [ScriptObject.SetPropertyValue](https://www.creationkit.com/fallout4/index.php?title=SetPropertyValue_-_ScriptObject)
* [ScriptObject.SetPropertyValueNoWait](https://www.creationkit.com/fallout4/index.php?title=SetPropertyValueNoWait_-_ScriptObject)
* [Debug.StartScriptProfiling](https://www.creationkit.com/fallout4/index.php?title=StartScriptProfiling_-_Debug)
* [Debug.StartStackRootProfiling](https://www.creationkit.com/fallout4/index.php?title=StartStackRootProfiling_-_Debug)
* [Debug.StopScriptProfiling](https://www.creationkit.com/fallout4/index.php?title=StopScriptProfiling_-_Debug)
* [Debug.StopStackRootProfiling](https://www.creationkit.com/fallout4/index.php?title=StopStackRootProfiling_-_Debug)
* [Debug.TraceSelf](https://www.creationkit.com/fallout4/index.php?title=TraceSelf_-_Debug)
* [Utility.CallGlobalFunction](https://www.creationkit.com/fallout4/index.php?title=CallGlobalFunction_-_Utility)
* [Utility.CallGlobalFunctionNoWait](https://www.creationkit.com/fallout4/index.php?title=CallGlobalFunctionNoWait_-_Utility)
#### Category 3
Which function arguments can only be a string literals.
* [ScriptObject.RegisterForRemoteEvent](https://www.creationkit.com/fallout4/index.php?title=RegisterForRemoteEvent_-_ScriptObject)
* [ScriptObject.UnregisterForRemoteEvent](https://www.creationkit.com/fallout4/index.php?title=UnregisterForRemoteEvent_-_ScriptObject)
* [ScriptObject.RegisterForCustomEvent](https://www.creationkit.com/fallout4/index.php?title=RegisterForCustomEvent_-_ScriptObject)
* [ScriptObject.UnregisterForCustomEvent](https://www.creationkit.com/fallout4/index.php?title=UnregisterForCustomEvent_-_ScriptObject)
#### Category 4
Function arguments which just happen to have specific constant values that work on Fallout 4 specifically, but are not declared anywhere in a script.
* [ScriptObject.RegisterForMenuOpenCloseEvent](https://www.creationkit.com/fallout4/index.php?title=RegisterForMenuOpenCloseEvent_-_ScriptObject)
* [ScriptObject.UnregisterForMenuOpenCloseEvent](https://www.creationkit.com/fallout4/index.php?title=UnregisterForMenuOpenCloseEvent_-_ScriptObject)
* [ScriptObject.RegisterForTrackedStatsEvent](https://www.creationkit.com/fallout4/index.php?title=RegisterForTrackedStatsEvent_-_ScriptObject)
* [ScriptObject.UnregisterForTrackedStatsEvent](https://www.creationkit.com/fallout4/index.php?title=UnregisterForTrackedStatsEvent_-_ScriptObject)
* [Actor.Dismember](https://www.creationkit.com/fallout4/index.php?title=Dismember_-_Actor)
* [Actor.IsDismembered](https://www.creationkit.com/fallout4/index.php?title=IsDismembered_-_Actor)
* [Game.IncrementStat](https://www.creationkit.com/fallout4/index.php?title=IncrementStat_-_Game)
* [Game.QueryStat](https://www.creationkit.com/fallout4/index.php?title=QueryStat_-_Game)
* [Game.StartTitleSequence](https://www.creationkit.com/fallout4/index.php?title=StartTitleSequence_-_Game)
* [Game.ShowPipboyBootSequence](https://www.creationkit.com/fallout4/index.php?title=ShowPipboyBootSequence_-_Game)
#### Category 2.1
These take string file paths or name which *may* be infered for autocompeletion. I made a seperate category because this may be out of scope for this issue.
* [Game.GetFormFromFile](https://www.creationkit.com/fallout4/index.php?title=GetFormFromFile_-_Game)
* [Game.IsPluginInstalled](https://www.creationkit.com/fallout4/index.php?title=IsPluginInstalled_-_Game)
* [Game.PlayBink](https://www.creationkit.com/fallout4/index.php?title=PlayBink_-_Game)
* [Game.RequestModel](https://www.creationkit.com/fallout4/index.php?title=RequestModel_-_Game)
* [Game.ShowPerkVaultBoyOnHUD](https://www.creationkit.com/fallout4/index.php?title=ShowPerkVaultBoyOnHUD_-_Game)
#### Other Lists
[Cheat Sheets](https://www.creationkit.com/fallout4/index.php?title=Category:Cheat_Sheets)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment