### Get Installed Resources Example Source: https://papyrus.bellcube.dev/skyrimse/script/paper_sksefunctions/function/getinstalledresources Demonstrates how to call the GetInstalledResources function with an empty string array and store the result. ```Papyrus string[] myStringArray__asStrings string[] returnedValue = PAPER_SKSEFunctions.GetInstalledResources(myStringArray__asStrings) ``` -------------------------------- ### Start Object Profiling (Commented Example) Source: https://papyrus.bellcube.dev/fallout4/script/form/function/startobjectprofiling This example demonstrates how to start profiling a specific object. Ensure that profiling is enabled in the game's INI file and that this is not a release build. ```Papyrus ; Starts profiling the slow object SlowObject.StartObjectProfiling() ``` -------------------------------- ### Get Installed Light Plugins Array Source: https://papyrus.bellcube.dev/fallout4/script/game/function/getinstalledlightplugins This is a basic example demonstrating how to call Game.GetInstalledLightPlugins() and store the returned array of PluginInfo objects. ```Papyrus Game:PluginInfo[] returnedValue = Game.GetInstalledLightPlugins() ``` -------------------------------- ### Get Installed Plugins Array Source: https://papyrus.bellcube.dev/fallout4/script/game/function/getinstalledplugins A basic example demonstrating how to call Game.GetInstalledPlugins() and store the returned array of PluginInfo objects. ```Papyrus Game:PluginInfo[] returnedValue = Game.GetInstalledPlugins() ``` -------------------------------- ### Basic OnSetup Event Example Source: https://papyrus.bellcube.dev/skyrimse/script/skyrimplatformconnection/event/onsetup This example demonstrates receiving the OnSetup event and logging a debug message. It's useful for verifying connection establishment. ```Papyrus Scriptname MyCoolScript extends SkyrimPlatformConnection event OnSetup() Debug.trace("Event received - OnSetup") endEvent ``` -------------------------------- ### Get Race Starting Magicka Example Source: https://papyrus.bellcube.dev/skyrimse/script/libfire/function/getracestartingmagicka Demonstrates how to call the GetRaceStartingMagicka function to retrieve the starting magicka for a specified race. ```Papyrus Race myRace__akRace float returnedValue = LibFire.GetRaceStartingMagicka(myRace__akRace) ``` -------------------------------- ### OnInit Event with State Transition Source: https://papyrus.bellcube.dev/starfield/script/scriptobject/event/oninit Example demonstrating the OnInit event to initialize a script and transition to a 'waiting' state, followed by handling a timer event within that state. ```script ; This is within the "empty" state EVENT onInit() ; This event will run once, when the script is initialized StartTimer(5) gotoState ("waiting") endEVENT STATE waiting EVENT onTimer(int aiTimerID) Debug.Trace("5 second timer expired!") endEVENT endSTATE ``` -------------------------------- ### Get Vendor Start Hour Example Source: https://papyrus.bellcube.dev/skyrimse/script/faction/function/getvendorstarthour Demonstrates how to call the GetVendorStartHour function on a faction object to retrieve the vendor's starting hour. ```Papyrus int returnedValue = myFaction__toCallFunctionOn.GetVendorStartHour() ``` -------------------------------- ### Get Blue Component of Player's Hair Color Source: https://papyrus.bellcube.dev/skyrimse/script/colorform/function/getblue This example demonstrates how to get the blue component of the player's hair color. It requires SKSE to be installed. ```Papyrus ActorBase pActorBase = Game.GetPlayer().GetActorBase() ColorForm color = pActorBase.GetHairColor() int blue = color.GetBlue() Debug.Trace("The amount of blue in the players hair is " + blue) endif ``` -------------------------------- ### LaunchAmmo Example Source: https://papyrus.bellcube.dev/skyrimse/script/andr_papyrusfunctions/function/launchammo Demonstrates how to call the LaunchAmmo function with all parameters. Ensure all variables are properly initialized before calling. ```Papyrus Actor myActor__akCaster Ammo myAmmo__akAmmo Weapon myWeapon__akWeapon string myString__sNodeName ObjectReference myObjectReference__akTarget Projectile myProjectile__akProjectile ObjectReference myObjectReference__OriginSecondRef ANDR_PapyrusFunctions.LaunchAmmo(myActor__akCaster, myAmmo__akAmmo, myWeapon__akWeapon, myString__sNodeName, myObjectReference__akTarget, myProjectile__akProjectile, myObjectReference__OriginSecondRef) ``` -------------------------------- ### TopicInfo OnBegin Event Example Source: https://papyrus.bellcube.dev/fallout4/script/topicinfo/event/onbegin This example demonstrates how to use the OnBegin event to log a message when a topic info starts, including the speaker reference. ```Papyrus Event OnBegin(ObjectReference akSpeakerRef, bool abHasBeenSaid) Debug.Trace("Topic info is being said by " + akSpeakerRef) endEvent ``` -------------------------------- ### OnPackageStart Event Example Source: https://papyrus.bellcube.dev/fallout4/script/activemagiceffect/event/onpackagestart This script demonstrates how to receive and log the OnPackageStart event, accessing the new package object. ```Papyrus Scriptname MyCoolScript extends ActiveMagicEffect event OnPackageStart(Package akNewPackage) Debug.trace("Event received - OnPackageStart: akNewPackage = " + akNewPackage) endEvent ``` -------------------------------- ### GetFormNamesFromList Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbmiscfunctions/function/getformnamesfromlist Demonstrates how to use the GetFormNamesFromList function to get the names of forms from a FormList. Ensure SKSE is installed. ```javascript FormList myFormList__akList string[] returnedValue = DbMiscFunctions.GetFormNamesFromList(myFormList__akList) ``` -------------------------------- ### OnInit Event Example Source: https://papyrus.bellcube.dev/skyrimse/script/ski_questbase/event/oninit A basic example demonstrating how to receive and log the OnInit event in a custom SKI_QuestBase script. ```Papyrus Scriptname MyCoolScript extends SKI_QuestBase event OnInit() Debug.trace("Event received - OnInit") endEvent ``` -------------------------------- ### Get Number of Actors in High Process Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/getnumactorsinhigh Call this function to get the current count of actors in the high process. No specific setup is required beyond having the PO3 SKSE Functions installed. ```Papyrus int returnedValue = PO3_SKSEFunctions.GetNumActorsInHigh() ``` -------------------------------- ### Auto-Generated OnPackageStart Example Source: https://papyrus.bellcube.dev/fallout4/script/actor/event/onpackagestart An auto-generated example demonstrating how to receive and log the OnPackageStart event within a custom script extending the Actor class. ```Papyrus Scriptname MyCoolScript extends Actor event OnPackageStart(Package akNewPackage) Debug.trace("Event received - OnPackageStart: akNewPackage = " + akNewPackage) endEvent ``` -------------------------------- ### SetItemEquipmentModeRace Example Source: https://papyrus.bellcube.dev/skyrimse/script/ied/function/setitemequipmentmoderace This example demonstrates how to call the SetItemEquipmentModeRace function with all its parameters. Ensure all variables are properly declared and initialized before calling. ```script Race myRace__akRace string myString__asPlugin string myString__asName bool myBool__abIsFemale bool myBool__abEquipmentMode bool myBool__abIgnoreRaceEquipTypes bool myBool__abDisableIfEquipped bool returnedValue = IED.SetItemEquipmentModeRace(myRace__akRace, myString__asPlugin, myString__asName, myBool__abIsFemale, myBool__abEquipmentMode, myBool__abIgnoreRaceEquipTypes, myBool__abDisableIfEquipped) ``` -------------------------------- ### Get Green Component of Player's Hair Color Source: https://papyrus.bellcube.dev/skyrimse/script/colorform/function/getgreen This example demonstrates how to get the player's hair color and then extract the green component. Ensure SKSE is installed for this function to work. ```Papyrus ActorBase pActorBase = Game.GetPlayer().GetActorBase() ColorForm color = pActorBase.GetHairColor() int green = color.GetGreen() Debug.Trace("The amount of green in the players hair is " + green) endif ``` -------------------------------- ### Get Actor Names Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbmiscfunctions/function/getactornames Demonstrates how to use the GetActorNames function to retrieve actor names. Ensure SKSE is installed. ```Skyrim Script Actor[] myActorArray__akArray string[] returnedValue = DbMiscFunctions.GetActorNames(myActorArray__akArray) ``` -------------------------------- ### Generic SetOutfit Example Source: https://papyrus.bellcube.dev/fallout4/script/actorbase/function/setoutfit A generic example demonstrating how to call the SetOutfit function with variables for outfit and sleep status. ```UnrealScript Outfit myOutfit__akOutfit bool myBool__abSleepOutfit myActorBase__toCallFunctionOn.SetOutfit(myOutfit__akOutfit, myBool__abSleepOutfit) ``` -------------------------------- ### Get CLib Version Source: https://papyrus.bellcube.dev/skyrimse/script/clib/function/cgetversion This snippet shows how to call the clib.cGetVersion function to retrieve the version of the CLib library. No specific requirements or setup are needed beyond having CLib installed. ```SkyrimScript int returnedValue = clib.cGetVersion() ``` -------------------------------- ### CreateItemActor Example Source: https://papyrus.bellcube.dev/skyrimse/script/ied/function/createitemactor Demonstrates how to call the CreateItemActor function with all its parameters. Ensure all variables are properly initialized before calling. ```Papyrus Actor myActor__akActor string myString__asPlugin string myString__asName bool myBool__abIsFemale Form myForm__akForm bool myBool__abIsInventoryForm string myString__asNode bool returnedValue = IED.CreateItemActor(myActor__akActor, myString__asPlugin, myString__asName, myBool__abIsFemale, myForm__akForm, myBool__abIsInventoryForm, myString__asNode) ``` -------------------------------- ### Auto-Generated OnStart Event Example Source: https://papyrus.bellcube.dev/fallout4/script/package/event/onstart An auto-generated example of the OnStart event, showing how to receive and log the actor parameter when a package script begins. ```Papyrus Scriptname MyCoolScript extends Package event OnStart(Actor akActor) Debug.trace("Event received - OnStart: akActor = " + akActor) endEvent ``` -------------------------------- ### Get ESP Version Source: https://papyrus.bellcube.dev/skyrimse/script/sheson_dyndolod_plugin/function/getespversion This example demonstrates how to call the GetESPVersion function to retrieve the version of an ESP plugin. No specific setup is required beyond having the SHESON_DynDOLOD_Plugin script available. ```Papyrus int returnedValue = SHESON_DynDOLOD_Plugin.GetESPVersion() ``` -------------------------------- ### Find Next Whitespace Character in String Source: https://papyrus.bellcube.dev/skyrimse/script/dbmiscfunctions/function/findnextwhitespacecharinstring/index This example demonstrates how to use the FindNextWhiteSpaceCharInString function to get the index of the next whitespace character in a given string, starting from a specified index. ```Papyrus string myString__s int myInt__startIndex string returnedValue = DbMiscFunctions.FindNextWhiteSpaceCharInString(myString__s, myInt__startIndex) ``` -------------------------------- ### OnTrapHitStart Event Example Source: https://papyrus.bellcube.dev/fallout4/script/activemagiceffect/event/ontraphitstart An example script demonstrating how to receive and log data from the OnTrapHitStart event. ```Papyrus Scriptname MyCoolScript extends ActiveMagicEffect event OnTrapHitStart(ObjectReference akTarget, float afXVel, float afYVel, float afZVel, float afXPos, float afYPos, float afZPos, int aeMaterial, bool abInitialHit, int aeMotionType) Debug.trace("Event received - OnTrapHitStart: akTarget = " + akTarget + " afXVel = " + afXVel + " afYVel = " + afYVel + " afZVel = " + afZVel + " afXPos = " + afXPos + " afYPos = " + afYPos + " afZPos = " + afZPos + " aeMaterial = " + aeMaterial + " abInitialHit = " + abInitialHit + " aeMotionType = " + aeMotionType) endEvent ``` -------------------------------- ### StartCombat Function Example Source: https://papyrus.bellcube.dev/starfield/script/spaceshipreference/function/startcombat Demonstrates how to call the StartCombat function with a target spaceship reference and a boolean preference. ```SpaceshipReference SpaceshipReference mySpaceshipReference__akTarget bool myBool__abPreferTarget mySpaceshipReference__toCallFunctionOn.StartCombat(mySpaceshipReference__akTarget, myBool__abPreferTarget) ``` -------------------------------- ### Count String Values by Prefix Source: https://papyrus.bellcube.dev/skyrimse/script/storageutil/function/countstringvalueprefix This example demonstrates how to use the CountStringValuePrefix function to get the count of strings starting with a specific prefix. Ensure the prefix key is properly initialized. ```Skyrim Script string myString__PrefixKey int returnedValue = StorageUtil.CountStringValuePrefix(myString__PrefixKey) ``` -------------------------------- ### Get Mod Name Example Source: https://papyrus.bellcube.dev/skyrimse/script/clib/function/cgetmodname Demonstrates how to use clib.cGetModName to retrieve a mod's name using its string, integer, and Form variable representations. Ensure SKSE is installed for this function to work. ```Papyrus string myString__hexForm int myInt__decForm Form myForm__formVar string returnedValue = clib.cGetModName(myString__hexForm, myInt__decForm, myForm__formVar) ``` -------------------------------- ### OnInit Event Handler Source: https://papyrus.bellcube.dev/skyrimse/script/skyrimplatformconnection/event/oninit This example shows how to implement the OnInit event to log a message when the connection is initialized. ```Papyrus Scriptname MyCoolScript extends SkyrimPlatformConnection event OnInit() Debug.trace("Event received - OnInit") endEvent ``` -------------------------------- ### Get Lowest Relationship Rank Example Source: https://papyrus.bellcube.dev/fallout4/script/actor/function/getlowestrelationshiprank This example demonstrates how to get the lowest relationship rank for a specific actor, 'Alice'. ```Papyrus ; Get Alice's lowest relationship rank int worstRelationship = Alice.GetLowestRelationshipRank() ``` -------------------------------- ### Example: Handling OnOptionInputOpen Event Source: https://papyrus.bellcube.dev/skyrimse/script/ski_configbase/event/onoptioninputopen This example demonstrates how to extend SKI_ConfigBase and implement the OnOptionInputOpen event to log the selected option ID. ```Papyrus Scriptname MyCoolScript extends SKI_ConfigBase event OnOptionInputOpen(int a_option) Debug.trace("Event received - OnOptionInputOpen: a_option = " + a_option) endEvent ``` -------------------------------- ### GetVolume Example Source: https://papyrus.bellcube.dev/fallout4/script/lighthouse2/function/getvolume Demonstrates how to call the GetVolume function with a sound ID and store the returned volume. ```Fallout 4 Script int myInt__aiSoundID float returnedValue = Lighthouse2.GetVolume(myInt__aiSoundID) ``` -------------------------------- ### Get Furniture Using Example Source: https://papyrus.bellcube.dev/starfield/script/actor/function/getfurnitureusing This example demonstrates how to call the GetFurnitureUsing function on an actor ObjectReference to get the furniture they are currently interacting with. ```Papyrus ObjectReference returnedValue = myActor__toCallFunctionOn.GetFurnitureUsing() ``` -------------------------------- ### Get Workshop Resource Damage (Example) Source: https://papyrus.bellcube.dev/fallout4/script/objectreference/function/getworkshopresourcedamage This example demonstrates how to get the total damage for the 'Food' resource on a Workshop reference named 'SanctuaryWorkshopRef'. ```Papyrus ; What's the total amount of Food damage on all food producers in SanctuaryWorkshopRef? float allDamage = SanctuaryWorkshopRef.GetWorkshopResourceDamage( Food ) ``` -------------------------------- ### ExportFile Function Example Source: https://papyrus.bellcube.dev/skyrimse/script/storageutil/function/exportfile Demonstrates how to call the StorageUtil.ExportFile function with all its parameters. Ensure variables are declared and initialized before calling. ```script string myString__fileName string myString__restrictKey int myInt__restrictType Form myForm__restrictForm bool myBool__restrictGlobal bool myBool__keyContains bool myBool__append bool returnedValue = StorageUtil.ExportFile(myString__fileName, myString__restrictKey, myInt__restrictType, myForm__restrictForm, myBool__restrictGlobal, myBool__keyContains, myBool__append) ``` -------------------------------- ### Get Vendor Faction Container Example Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/getvendorfactioncontainer This example demonstrates how to get the vendor chest reference for a specific faction. Ensure the faction variable is properly initialized. ```PO3_SKSEFunctions Faction myFaction__akVendorFaction ObjectReference returnedValue = PO3_SKSEFunctions.GetVendorFactionContainer(myFaction__akVendorFaction) ``` -------------------------------- ### OnInit Event with Timer and State Transition Source: https://papyrus.bellcube.dev/fallout4/script/scriptobject/event/oninit Demonstrates using OnInit to start a timer and transition to a 'waiting' state. The script then handles the timer event within the new state. ```Papyrus EVENT onInit() ; This event will run once, when the script is initialized StartTimer(5) gotoState ("waiting") endEVENT STATE waiting EVENT onTimer(int aiTimerID) Debug.Trace("5 second timer expired!") endEVENT endSTATE ``` -------------------------------- ### Get Actor Value Example Source: https://papyrus.bellcube.dev/skyrimse/script/actorvalueinfo/function/getcurrentvalue This example demonstrates how to get the current value of an actor's actor value. Ensure an Actor object is initialized before calling this function. ```Papyrus Actor myActor__akActor float returnedValue = myActorValueInfo__toCallFunctionOn.GetCurrentValue(myActor__akActor) ``` -------------------------------- ### fetchAddInt Example Usage Source: https://papyrus.bellcube.dev/skyrimse/script/jatomic/function/fetchaddint An example demonstrating how to call the fetchAddInt function with various parameters and store the returned previous value. ```papyrus int myInt__object string myString__path int myInt__value int myInt__initialValue bool myBool__createMissingKeys int myInt__onErrorReturn int returnedValue = JAtomic.fetchAddInt(myInt__object, myString__path, myInt__value, myInt__initialValue, myBool__createMissingKeys, myInt__onErrorReturn) ``` -------------------------------- ### FileStringListSet Example Source: https://papyrus.bellcube.dev/skyrimse/script/storageutil/function/filestringlistset Demonstrates how to call the FileStringListSet function with string and integer parameters. Ensure the variables are declared and initialized before use. ```script string myString__KeyName int myInt__index string myString__value string returnedValue = StorageUtil.FileStringListSet(myString__KeyName, myInt__index, myString__value) ``` -------------------------------- ### Check if Plugins are Installed Source: https://papyrus.bellcube.dev/skyrimse/script/clib/function/carepluginsinstalled This example demonstrates how to use the cArePluginsInstalled function to check if a list of plugins is installed. Ensure you have SKSE installed. ```Papyrus string[] myStringArray__listOfPlugins bool[] returnedValue = clib.cArePluginsInstalled(myStringArray__listOfPlugins) ``` -------------------------------- ### SetIniBool Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbinifunctions/function/setinibool Demonstrates how to call the SetIniBool function with all its parameters. The bForce parameter can be used to add the key if it does not exist. ```script string myString__sFilePath string myString__sSection string myString__sKey bool myBool__Value bool myBool__bForce bool returnedValue = DbIniFunctions.SetIniBool(myString__sFilePath, myString__sSection, myString__sKey, myBool__Value, myBool__bForce) ``` -------------------------------- ### Get Saturation Function Example Source: https://papyrus.bellcube.dev/skyrimse/script/colorform/function/getsaturation An example demonstrating how to call the GetSaturation function on a ColorForm object. ```Papyrus float returnedValue = myColorForm__toCallFunctionOn.GetSaturation() ``` -------------------------------- ### PlaceAtMe with all parameters Source: https://papyrus.bellcube.dev/fallout4/script/objectreference/function/placeatme Demonstrates the use of the PlaceAtMe function with all its optional parameters for creating and placing references. This is useful for advanced control over spawned objects. ```Papyrus Form myForm__akFormToPlace int myInt__aiCount bool myBool__abForcePersist bool myBool__abInitiallyDisabled bool myBool__abDeleteWhenAble ObjectReference returnedValue = myObjectReference__toCallFunctionOn.PlaceAtMe(myForm__akFormToPlace, myInt__aiCount, myBool__abForcePersist, myBool__abInitiallyDisabled, myBool__abDeleteWhenAble) ``` -------------------------------- ### Get Race Starting Stamina Source: https://papyrus.bellcube.dev/skyrimse/script/libfire/function/getracestartingstamina Retrieves the starting stamina for a specified race using the LibFire script. ```Papyrus Race myRace__akRace float returnedValue = LibFire.GetRaceStartingStamina(myRace__akRace) ``` -------------------------------- ### Full SkyMessage.Show Example with All Parameters Source: https://papyrus.bellcube.dev/skyrimse/script/skymessage/function/show An example demonstrating the usage of the SkyMessage.Show function with all its parameters, including body text, multiple button names, index retrieval, wait interval, and timeout. ```SkyrimScript string myString__bodyText string myString__button1 string myString__button2 string myString__button3 string myString__button4 string myString__button5 string myString__button6 string myString__button7 string myString__button8 string myString__button9 string myString__button10 bool myBool__getIndex float myFloat__waitInterval float myFloat__timeoutSeconds string returnedValue = SkyMessage.Show(myString__bodyText, myString__button1, myString__button2, myString__button3, myString__button4, myString__button5, myString__button6, myString__button7, myString__button8, myString__button9, myString__button10, myBool__getIndex, myFloat__waitInterval, myFloat__timeoutSeconds) ``` -------------------------------- ### Copy String Array Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbmiscfunctions/function/copystringarray This example demonstrates how to use the CopyStringArray function. It requires SKSE to be installed. ```Papyrus string[] myStringArray__akArray string[] returnedValue = DbMiscFunctions.CopyStringArray(myStringArray__akArray) ``` -------------------------------- ### Get Result Quantity Example Source: https://papyrus.bellcube.dev/skyrimse/script/constructibleobject/function/getresultquantity A general example demonstrating how to call the GetResultQuantity function on a ConstructibleObject variable. ```Papyrus int returnedValue = myConstructibleObject__toCallFunctionOn.GetResultQuantity() ``` -------------------------------- ### TryToStartCombat Example Source: https://papyrus.bellcube.dev/starfield/script/objectreference/function/trytostartcombat Initiates combat with a target, optionally setting it as preferred. Ensure the calling object is a spaceship or actor and the target is valid. ```script ObjectReference myObjectReference__akTarget bool myBool__abPreferredTarget bool returnedValue = myObjectReference__toCallFunctionOn.TryToStartCombat(myObjectReference__akTarget, myBool__abPreferredTarget) ``` -------------------------------- ### Get ActorBase Height Example Source: https://papyrus.bellcube.dev/skyrimse/script/actorbase/function/getheight A basic example demonstrating how to call the GetHeight function on an ActorBase instance. ```Papyrus float returnedValue = myActorBase__toCallFunctionOn.GetHeight() ``` -------------------------------- ### SetKey Example Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/setkey Demonstrates how to use the SetKey function with an object reference and a key. Ensure the object reference and key are properly initialized before calling. ```Papyrus ObjectReference myObjectReference__akRef Key myKey__akKey PO3_SKSEFunctions.SetKey(myObjectReference__akRef, myKey__akKey) ``` -------------------------------- ### Auto-Generated Example: Get Projectile Override Source: https://papyrus.bellcube.dev/fallout4/script/instancedata/function/getprojectileoverride An auto-generated example demonstrating how to call InstanceData.GetProjectileOverride with an owner object. ```script InstanceData:Owner myInstanceData_Owner__akOwner Projectile returnedValue = InstanceData.GetProjectileOverride(myInstanceData_Owner__akOwner) ``` -------------------------------- ### Basic OnSit Event Example Source: https://papyrus.bellcube.dev/fallout4/script/actor/event/onsit A simple example demonstrating how to log a message when the OnSit event is triggered, including the furniture reference. ```Papyrus Event OnSit(ObjectReference akFurniture) Debug.Trace("We just sat on " + akFurniture) endEvent ``` -------------------------------- ### Auto-Generated Example with All Parameters Source: https://papyrus.bellcube.dev/skyrimse/script/message/function/show An auto-generated example showcasing the Show function with all nine float parameters. This demonstrates how to pass values for each potential substitution spot. ```Papyrus float myFloat__afArg1 float myFloat__afArg2 float myFloat__afArg3 float myFloat__afArg4 float myFloat__afArg5 float myFloat__afArg6 float myFloat__afArg7 float myFloat__afArg8 float myFloat__afArg9 int returnedValue = myMessage__toCallFunctionOn.Show(myFloat__afArg1, myFloat__afArg2, myFloat__afArg3, myFloat__afArg4, myFloat__afArg5, myFloat__afArg6, myFloat__afArg7, myFloat__afArg8, myFloat__afArg9) ``` -------------------------------- ### OnEffectStart Event Example Source: https://papyrus.bellcube.dev/fallout4/script/activemagiceffect/event/oneffectstart A basic example of the OnEffectStart event, logging the target actor when the effect starts. ```Papyrus Event OnEffectStart(Actor akTarget, Actor akCaster) Debug.Trace("Magic effect was started on " + akTarget) endEvent ``` -------------------------------- ### Get Highest Relationship Rank Example Source: https://papyrus.bellcube.dev/skyrimse/script/actor/function/gethighestrelationshiprank Demonstrates how to get the highest relationship rank for a specific actor. ```Papyrus int bestRelationship = Alice.GetHighestRelationshipRank() ``` -------------------------------- ### OnConfigInit Event Example Source: https://papyrus.bellcube.dev/skyrimse/script/ski_configbase/event/onconfiginit This example shows how to extend SKI_ConfigBase and implement the OnConfigInit event to log a message when the event is received. ```Papyrus Scriptname MyCoolScript extends SKI_ConfigBase event OnConfigInit() Debug.trace("Event received - OnConfigInit") endEvent ``` -------------------------------- ### Get Form Mod Name Example Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/getformmodname This example demonstrates how to use the GetFormModName function to retrieve the mod name associated with a form. The 'abLastModified' parameter can be used to get the last modified mod instead of the original mod. ```PO3_SKSEFunctions Form myForm__akForm bool myBool__abLastModified string returnedValue = PO3_SKSEFunctions.GetFormModName(myForm__akForm, myBool__abLastModified) ``` -------------------------------- ### SetItemEquipmentModeNPC Example Source: https://papyrus.bellcube.dev/skyrimse/script/ied/function/setitemequipmentmodenpc Demonstrates how to call the SetItemEquipmentModeNPC function with all parameters. Ensure all variables are properly initialized before calling. ```Skyrim Script ActorBase myActorBase__akActorBase string myString__asPlugin string myString__asName bool myBool__abIsFemale bool myBool__abEquipmentMode bool myBool__abIgnoreRaceEquipTypes bool myBool__abDisableIfEquipped bool returnedValue = IED.SetItemEquipmentModeNPC(myActorBase__akActorBase, myString__asPlugin, myString__asName, myBool__abIsFemale, myBool__abEquipmentMode, myBool__abIgnoreRaceEquipTypes, myBool__abDisableIfEquipped) ``` -------------------------------- ### InstantCastToActors Example Source: https://papyrus.bellcube.dev/skyrimse/script/trash_function/function/instantcasttoactors Demonstrates how to call the InstantCastToActors function with all parameters. Ensure all variables are properly initialized before use. ```Papyrus ObjectReference myObjectReference___Caster Form myForm___Spell float myFloat___Radius bool myBool___BlameCaster bool myBool___CastToCaster ObjectReference myObjectReference___Center Form[] returnedValue = Trash_Function.InstantCastToActors(myObjectReference___Caster, myForm___Spell, myFloat___Radius, myBool___BlameCaster, myBool___CastToCaster, myObjectReference___Center) ``` -------------------------------- ### GetPscFunctionDefinitionsFromFile Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbmiscfunctions/function/getpscfunctiondefinitionsfromfile This example demonstrates how to call the GetPscFunctionDefinitionsFromFile function with specified file path, divider, and start index. ```Papyrus string myString__SourceFilePath string myString__Divider int myInt__StartIndex string returnedValue = DbMiscFunctions.GetPscFunctionDefinitionsFromFile(myString__SourceFilePath, myString__Divider, myInt__StartIndex) ``` -------------------------------- ### Get Hair Color - Auto-Generated Example Source: https://papyrus.bellcube.dev/skyrimse/script/actorbase/function/gethaircolor A basic example demonstrating how to call the GetHairColor function on an ActorBase object. ```Papyrus ColorForm returnedValue = myActorBase__toCallFunctionOn.GetHairColor() ``` -------------------------------- ### Full Parameter Example for PlaceActorAtMe Source: https://papyrus.bellcube.dev/starfield/script/objectreference/function/placeactoratme Demonstrates the usage of the PlaceActorAtMe function with all its parameters. This is useful for understanding how to control actor spawning with detailed configurations. ```Papyrus ActorBase myActorBase__akActorToPlace int myInt__aiLevelMod Location myLocation__akEncLoc bool myBool__abForcePersist bool myBool__abInitiallyDisabled bool myBool__abDeleteWhenAble float[] myFloatArray__akOffsetValues bool myBool__abSnapOffsetToNavmesh Actor returnedValue = myObjectReference__toCallFunctionOn.PlaceActorAtMe(myActorBase__akActorToPlace, myInt__aiLevelMod, myLocation__akEncLoc, myBool__abForcePersist, myBool__abInitiallyDisabled, myBool__abDeleteWhenAble, myFloatArray__akOffsetValues, myBool__abSnapOffsetToNavmesh) ``` -------------------------------- ### Generic Registration Example Source: https://papyrus.bellcube.dev/fallout4/script/scriptobject/function/registerformagiceffectapplyevent An auto-generated example demonstrating the function call with placeholder variables for all parameters. This illustrates the function signature and expected types. ```script ScriptObject myScriptObject__akTarget ScriptObject myScriptObject__akCasterFilter Form myForm__akEffectFilter bool myBool__abMatch myScriptObject__toCallFunctionOn.RegisterForMagicEffectApplyEvent(myScriptObject__akTarget, myScriptObject__akCasterFilter, myForm__akEffectFilter, myBool__abMatch) ``` -------------------------------- ### Get Heading Angle Auto-Generated Example Source: https://papyrus.bellcube.dev/fallout4/script/objectreference/function/getheadingangle An auto-generated example showing the basic usage of GetHeadingAngle with placeholder variables. ```Papyrus ObjectReference myObjectReference__akOther float returnedValue = myObjectReference__toCallFunctionOn.GetHeadingAngle(myObjectReference__akOther) ``` -------------------------------- ### Get Mod Count Source: https://papyrus.bellcube.dev/skyrimse/script/game/function/getmodcount A simple example to get the total number of active mods. This function requires SKSE. ```Papyrus int returnedValue = Game.GetModCount() ``` -------------------------------- ### Launch Arrow Example Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/launcharrow This example demonstrates how to call the LaunchArrow function with all its parameters. Ensure all variables are properly initialized before calling. ```Papyrus Actor myActor__akActor Ammo myAmmo__akAmmo Weapon myWeapon__akWeapon string myString__asNodeName int myInt__aiSource ObjectReference myObjectReference__akTarget Potion myPotion__akPoison PO3_SKSEFunctions.LaunchArrow(myActor__akActor, myAmmo__akAmmo, myWeapon__akWeapon, myString__asNodeName, myInt__aiSource, myObjectReference__akTarget, myPotion__akPoison) ``` -------------------------------- ### Get Precipitation Type Example Source: https://papyrus.bellcube.dev/fallout4/script/lighthouse/function/getprecipitationtype Demonstrates how to call the Lighthouse.GetPrecipitationType function to get the precipitation type from a Weather object. ```Papyrus Weather myWeather__akWeather string returnedValue = Lighthouse.GetPrecipitationType(myWeather__akWeather) ``` -------------------------------- ### GetAllSpells Example Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/getallspells Demonstrates how to call the GetAllSpells function with optional keyword and playability filters. Ensure Keyword and bool variables are properly initialized before use. ```papyrus Keyword[] myKeywordArray__akKeywords bool myBool__abIsPlayable Spell[] returnedValue = PO3_SKSEFunctions.GetAllSpells(myKeywordArray__akKeywords, myBool__abIsPlayable) ``` -------------------------------- ### Example Script with OnBeginState Source: https://papyrus.bellcube.dev/fallout4/script/scriptobject/event/onbeginstate Demonstrates how to use the OnBeginState event within a script's state definition to log the transition and the previous state. ```Papyrus State Running Event OnBeginState(string asOldState) Debug.Trace("Entered the running state from the " + asOldState + " state!") EndEvent EndState ``` -------------------------------- ### Get Dragon Distance Example Source: https://papyrus.bellcube.dev/skyrimse/script/sheson_dyndolod_plugin/function/getdragondistance This example demonstrates how to call the GetDragonDistance native global function and store its return value. ```Papyrus float returnedValue = SHESON_DynDOLOD_Plugin.GetDragonDistance() ``` -------------------------------- ### Get Alias by Name Example Source: https://papyrus.bellcube.dev/skyrimse/script/quest/function/getaliasbyname A basic example demonstrating how to call the GetAliasByName function to retrieve an alias associated with a quest. ```Papyrus string myString__name Alias returnedValue = myQuest__toCallFunctionOn.GetAliasByName(myString__name) ``` -------------------------------- ### functionPostStartUpTimes Source: https://papyrus.bellcube.dev/fallout4/script/utility Sends the game's start-up times to the tests website. ```APIDOC ## functionPostStartUpTimes ### Description Sends the start up times to the tests website. ### Method NativeGlobalDebugOnly ``` -------------------------------- ### clib.cIfInt Example Source: https://papyrus.bellcube.dev/skyrimse/script/clib/function/cifint Demonstrates how to call the clib.cIfInt function with two integer variables and store the result. ```Skyrim Script int myInt__this int myInt__that int returnedValue = clib.cIfInt(myInt__this, myInt__that) ``` -------------------------------- ### Get Potion Effect Durations (Auto-Generated Example) Source: https://papyrus.bellcube.dev/skyrimse/script/potion/function/geteffectdurations An auto-generated example demonstrating how to call the GetEffectDurations function on a potion object. ```Papyrus int[] returnedValue = myPotion__toCallFunctionOn.GetEffectDurations() ``` -------------------------------- ### Get Number of Items (Auto-Generated Example) Source: https://papyrus.bellcube.dev/skyrimse/script/objectreference/function/getnumitems A basic example showing how to call GetNumItems on an ObjectReference variable. SKSE is required. ```Papyrus int returnedValue = myObjectReference__toCallFunctionOn.GetNumItems() ``` -------------------------------- ### SetItemEquipmentModeActor Example Source: https://papyrus.bellcube.dev/skyrimse/script/ied/function/setitemequipmentmodeactor This example demonstrates how to call the SetItemEquipmentModeActor function with all its parameters. Ensure all variables are properly initialized before calling. ```javascript Actor myActor__akActor string myString__asPlugin string myString__asName bool myBool__abIsFemale bool myBool__abEquipmentMode bool myBool__abIgnoreRaceEquipTypes bool myBool__abDisableIfEquipped bool returnedValue = IED.SetItemEquipmentModeActor(myActor__akActor, myString__asPlugin, myString__asName, myBool__abIsFemale, myBool__abEquipmentMode, myBool__abIgnoreRaceEquipTypes, myBool__abDisableIfEquipped) ``` -------------------------------- ### Get Projectile Explosion Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbsksefunctions/function/getprojectileexplosion This example demonstrates how to call the GetProjectileExplosion function with a projectile reference and store the returned explosion. ```Papyrus ObjectReference myObjectReference__projectileRef Explosion returnedValue = DbSkseFunctions.GetProjectileExplosion(myObjectReference__projectileRef) ``` -------------------------------- ### Auto-Generated Example of InputEnableLayer.Create() Source: https://papyrus.bellcube.dev/starfield/script/inputenablelayer/function/create Demonstrates the creation of an input enable layer and assignment to a variable. Ensure proper disposal to manage this limited resource. ```Papyrus InputEnableLayer returnedValue = InputEnableLayer.Create() ``` -------------------------------- ### Auto-Generated OnGetUp Event Example Source: https://papyrus.bellcube.dev/fallout4/script/actor/event/ongetup A sample script demonstrating how to receive and log the OnGetUp event, including the furniture reference. ```Papyrus Scriptname MyCoolScript extends Actor event OnGetUp(ObjectReference akFurniture) Debug.trace("Event received - OnGetUp: akFurniture = " + akFurniture) endEvent ``` -------------------------------- ### Get Shout Multiplier Example Source: https://papyrus.bellcube.dev/skyrimse/script/combatstyle/function/getshoutmult This example demonstrates how to call the GetShoutMult() function on a CombatStyle object to retrieve its shout multiplier. ```Papyrus float returnedValue = myCombatStyle__toCallFunctionOn.GetShoutMult() ``` -------------------------------- ### Get Red Component of a ColorForm Source: https://papyrus.bellcube.dev/skyrimse/script/colorform/function/getred A basic example showing how to call the GetRed function on a ColorForm object. This is an auto-generated example. ```Papyrus int returnedValue = myColorForm__toCallFunctionOn.GetRed() ``` -------------------------------- ### PrintStringKeysToFile Example Source: https://papyrus.bellcube.dev/skyrimse/script/dbmiscfunctions/function/printstringkeystofile Demonstrates how to call the PrintStringKeysToFile function with all parameters. Ensure that the file paths are correctly set and that SKSE and PapyrusUtil are installed. ```Papyrus string myString__FilePathToSearch string myString__FilePathToPrintTo string myString__StartKey string myString__EndKey string myString__FinishedMsg bool returnedValue = DbMiscFunctions.PrintStringKeysToFile(myString__FilePathToSearch, myString__FilePathToPrintTo, myString__StartKey, myString__EndKey, myString__FinishedMsg) ``` -------------------------------- ### Auto-Generated Example: Open Inventory Source: https://papyrus.bellcube.dev/fallout4/script/actor/function/openinventory A generic example demonstrating how to call the OpenInventory function with a boolean variable for the 'abForceOpen' parameter. ```Papyrus bool myBool__abForceOpen myActor__toCallFunctionOn.OpenInventory(myBool__abForceOpen) ``` -------------------------------- ### Get First Owned Object Example Source: https://papyrus.bellcube.dev/fallout4/script/refcollectionalias/function/getfirstownedobject This is an auto-generated example showing the general usage of GetFirstOwnedObject with a placeholder actor and alias. ```Papyrus Actor myActor__actorOwner ObjectReference returnedValue = myRefCollectionAlias__toCallFunctionOn.GetFirstOwnedObject(myActor__actorOwner) ``` -------------------------------- ### Get Inventory Items Example Source: https://papyrus.bellcube.dev/fallout4/script/objectreference/function/getinventoryitems A basic example showing how to call GetInventoryItems on an ObjectReference and store the returned array of forms. ```Papyrus Form[] returnedValue = myObjectReference__toCallFunctionOn.GetInventoryItems() ``` -------------------------------- ### GetPropertyBool Example Source: https://papyrus.bellcube.dev/skyrimse/script/nioverride/function/getpropertybool Demonstrates how to call the GetPropertyBool function with all required parameters. Ensure all variables are properly initialized before calling. ```Papyrus ObjectReference myObjectReference__ref bool myBool__firstPerson Armor myArmor__arm ArmorAddon myArmorAddon__addon string myString__node int myInt__key int myInt__index bool returnedValue = NiOverride.GetPropertyBool(myObjectReference__ref, myBool__firstPerson, myArmor__arm, myArmorAddon__addon, myString__node, myInt__key, myInt__index) ``` -------------------------------- ### Auto-Generated Get Base Object Example Source: https://papyrus.bellcube.dev/fallout4/script/objectreference/function/getbaseobject A general example showing how to call GetBaseObject() on an ObjectReference and store the returned Form. ```Papyrus Form returnedValue = myObjectReference__toCallFunctionOn.GetBaseObject() ``` -------------------------------- ### Instant Docking Example Source: https://papyrus.bellcube.dev/starfield/script/spaceshipreference/function/instantdock This example demonstrates how to call the InstantDock function to dock a spaceship with a target object reference. Ensure the target object reference is valid before calling the function. ```Papyrus ObjectReference myObjectReference__akTarget bool returnedValue = mySpaceshipReference__toCallFunctionOn.InstantDock(myObjectReference__akTarget) ``` -------------------------------- ### InstanceData.GetMaxRange Example Source: https://papyrus.bellcube.dev/fallout4/script/instancedata/function/getmaxrange Demonstrates how to call the InstanceData.GetMaxRange function to get the maximum range for an owner. This is an auto-generated example. ```Fallout 4 Script InstanceData:Owner myInstanceData_Owner__akOwner float returnedValue = InstanceData.GetMaxRange(myInstanceData_Owner__akOwner) ``` -------------------------------- ### SetParticleColorKeyData Example Source: https://papyrus.bellcube.dev/skyrimse/script/po3_sksefunctions/function/setparticlecolorkeydata Demonstrates how to call the SetParticleColorKeyData function with example variables. Ensure all variables are properly initialized before calling. ```Papyrus EffectShader myEffectShader__akEffectShader int myInt__aiColorKey int[] myIntArray__aiRGB float myFloat__afAlpha float myFloat__afTime PO3_SKSEFunctions.SetParticleColorKeyData(myEffectShader__akEffectShader, myInt__aiColorKey, myIntArray__aiRGB, myFloat__afAlpha, myFloat__afTime) ``` -------------------------------- ### ApplyPerkEntryPoint Function Example Source: https://papyrus.bellcube.dev/skyrimse/script/perkentrypointextender/function/applyperkentrypoint Example demonstrating how to call the ApplyPerkEntryPoint function with all parameters. Ensure all variables are properly initialized before calling. ```Papyrus Actor myActor__target string myString__entry_point Form[] myFormArray__args string myString__category int myInt__channel int myInt__handle PerkEntryPointExtender.ApplyPerkEntryPoint(myActor__target, myString__entry_point, myFormArray__args, myString__category, myInt__channel, myInt__handle) ``` -------------------------------- ### Get Crit Multiplier Example Source: https://papyrus.bellcube.dev/fallout4/script/instancedata/function/getcritmultiplier This auto-generated example demonstrates how to call the GetCritMultiplier function and store the returned float value. ```Papyrus InstanceData:Owner myInstanceData_Owner__akOwner float returnedValue = InstanceData.GetCritMultiplier(myInstanceData_Owner__akOwner) ``` -------------------------------- ### Basic OnPackageStart Event Source: https://papyrus.bellcube.dev/fallout4/script/actor/event/onpackagestart Logs a message to the debug trace when an actor starts a new package. This is a fundamental example of how to use the event. ```Papyrus Event OnPackageStart(Package akNewPackage) Debug.Trace("We just started running the " + akNewPackage + " package") endEvent ``` -------------------------------- ### Auto-Generated Example: Get Constructible Components Source: https://papyrus.bellcube.dev/fallout4/script/constructibleobject/function/getconstructiblecomponents A basic example demonstrating the call to the GetConstructibleComponents function and storing the returned value. ```Papyrus ConstructibleObject:ConstructibleComponent[] returnedValue = myConstructibleObject__toCallFunctionOn.GetConstructibleComponents() ```