Cassiopeia Papyrus Extender V6.3

Cassiopeia Papyrus Extender

SFSE plugin that expands the capabilities of Papyrus by registering new native functions callable from any mod and script.

In other words, Cassiopeia is a tool for modders to develop scripted mods in ways that weren’t possible for Starfield before and to write scripts more conveniently.

The complete function list can be seen here (Google Drive document) but it is also included in the mod files.

Currently only ~115 new native functions are implemented.
Don’t worry, Garden of Eden SE, my custom script extender for Fallout 4 started with ~80 and now it has ~950. I already have ~200 functions I’d like to test for Cassiopeia, including all the inventory handlers and finder/sorter functions from Garden of Eden. For v1.0, I tried to prioritize those that were either requested or generally have received more attention.

Notes for mod authors: always make sure to test your scripted mod with New Game + (SetStage 24EF9C 2000) when you edit base forms with Cassiopeia because the vanilla game reset manager code is picky.

Requirements:

SFSE
Address Library for SFSE Plugins

Changelog:
Version 6.3
New functions: GetContainerMenuTarget, GetContainerMenuMode, GetContainerMenuSelectedItem, Get3DPosition, PlaySpellEquipSound, EnableAll, DisableAll, SetLoadedAmmoCount, GetVehicleKeyword, RenameOutpost.
Sorted the functions under each form type/category in CassiopeiaPapyrusExtender.psc alphabetically.

Version 6.2
New functions: MoveAllToEditorLocation, MoveAllToPackageLocation, GetEnableStateParent.
Fixes a bug in GetCrowdActors that could cause it to return an empty array.

Version 6.1
Fixes a rare bug in TESFormDeleteEvent that could cause a crash when sending.
New functions: GetLoadedAmmoCount, GetTimeStampAsString, GetPerks, DisableMenuRenderers.
Various code optimizations; TESFormDeleteEvent requires scripts to be previously filtered for the deleted form to receive it (for better performance).

Version 6.0
New functions: GetFormTypeIntAsStr, GetFormTypeStrAsInt, IsInSameSpace, HasAnyVMScript, HasAllVMScripts, UnequipAllThenUpdate3D, GetSpaceshipParts, IsOutpostBeacon, GetPlayerFollowerCount, IsHUDWatchAlertActive, CanPlayerPilotShip, GenerateTimeStamp, IsTimeStampValid, GetElapsedTimeSinceTimeStamp, RenewTimeStamp, GetFileSizeKB, PlacePackInAtCoordinates, PathToPoint, GetAttachToRef, log, log2, log10.
New event: TESFurnitureEvent(Actor akActor, ObjectReference akFurniture, Bool abExiting).

Version 5.0
Added support for Game version 1.15.222 (2025 August update).

Version 4.2
Bug fixes for SetModelVisible and EnableDistanceLOD.
Added: SetFirstPersonModelVisible, AddRefsToRefColl, ReleasePapyrusObjects.

Version 4.1
Fixes a bug in GetMovementState that could cause a crash upon calling it.
Restored events for v1.15.216: ReferenceSet3d, TESObjectLoadedEvent, ActorCellChangeEvent, TESFormDeleteEvent.
Restored function for v1.15.216: SuppressHUDNotifications.
Added new function: NavigateToPlanet.
Added new event: BGSLocationLoadedEvent.

Version 4.0
New native plugin for Game version 1.15.216 (2025 May update).
Many events aren’t available in v4.0 due to the practically countless changes made in v1.15.216 (2025 May update). (Please see the topmost post in the comments section for the most important changes).
The new plugin uses my custom environment (it doesn’t use the Address Library or CommonLibSF).
Added: CalculateJumpHeight, Jump, GetVelocity, GetActorAlpha, ActorFadeOut, ActorFadeIn, OpenTextInputMenu.
New event: TextInputMenu_EndEditText(String sInputText).
Few functions and many events are not available. (Please see CassiopeiaPapyrusExtender.psc and CassiopieaPapyrusEvents.txt for the complete list of available functions and events).

Version 3.2
Added: GetAllRefsLinkedToMe, IsMapMarkerVisibleOnStarMap, GetMapMarkerName, IsNthItemQuestItem, DoesInventoryContainQuestItem, GetNthItemReference, GetWorkshopName.
Removed broken function ClampToGround.

Version 3.1
Fixes a bug in the IsKeyDown() function that could cause it to return false if a key was pressed simultaneously with a control key.
Implemens Biome as native script object type.
Added: GetCurrentBiome.

Version 3.0
Fixes a bug in the GetKeywordsOfItem function that could cause a crash if the inventory item had no keywords.
Fixes a bug in the UnequipNthItem function that could prevent the parameter abPreventEquip from working.
DisableCollision now works with the player ref.
Added: ClampToGround, HasNoCollision, InitHavok, Set3DUpdateFlag, Get3DUpdateFlag, Get3DUpdateFlags, CopyReferenceExtraData.

Version 2.9
Added: GetDisplayNameOfItem, GetDisplayNameOfAllItemsInStack, GetKeywordsOfItem, GetArmorAddonsOfArmorItem, EquipNthItem, UnequipNthItem, IsNthItemEquipped, IsNthItemEquipStateLocked, GetItemStackCount, GetInventoryItemCount, PrintInventoryToFile, RemoveNthItem, DropNthItem, SuppressHUDNotifications.
Implemens ArmorAddon as native script object type.
Added new parameter abMatchInventoryList to GetInventoryItems.
Moved GetInventoryItems and GetEquippedInventoryItems to the Inventory Utils category in CassiopeiaPapyrusExtender.psc.

Version 2.8
Added: GetCellLoaded, HasVehicleKeyword, HasVehicleSeatKeyword, IsFloating, GetHandscannerScanDistance, StopMovement, GetMovementState, ForcePathFailure, GetObjectBounds, GetCrowdActors, DisableCollision.
Fixes a bug that could prevent GetLoadedCells() from returning certain loaded Cells.

Version 2.7
Added: SetEyeTarget, ClearEyeTracking, SetEyeTrackingActive, GetHeadTrackTarget, GetSpeakingAnimArchetype, GetAnimFaceArchetypeEditorDefined, SetFaceAnimArchetype, GetFormsByEditorID, GetFormDescription, GetFormEditorID, GetDontLoopEmotionsIndex, GetWorkshopItemKeyword, GetWorkshopKeyword, IsWorkshopItem, GetAllTopicInfos, GetNumTopicInfos, GetAllTopicsByOwnerQuest, GetLastSaidTopicInfo, GetNthResponseText, GetNthResponseAnimFaceArchetype, GetLastSaidTopicInfoAnimArchetypeKeyword.

Version 2.6
Added: PromoteReference, DemoteReference, IsPersistencePromotedBy, IsPathing, CalculateTemplateForLeveledActor, ChangeActorProcessLevel, UpdateReference3D, GetDistanceFromCelestialBody, GetDistanceGalacticLightYears, GetUsesLeveledTemplate.
New event: OnPlayerPlotRoute(ObjectReference akHomeshipRef, Int aeFailedPlotReason, Int aiJumps, Float afShipGravJumpRange, Float afDistance, Float afCargoWeight, Float afCargoCapacity, Float afFuelConsumption, Float afMaxFuel)

Version 2.5
Fixes a bug that could cause GetAppearanceSource(Actor akActor) to return None if akActor wasn’t a leveled actor
Added: OpenMenu, CloseMenu, DumpMenuFlags
Fixed a few typos in CassiopeiaPapyrusExtender.psc

Version 2.4
Fixes a bug that could cause certain non “main control map” BSInputEvent Control Names to be incorrectly sent. E.g. “WeaponReadyReload” was sent if the same key was bound to Container Menu’s “Take all” whose actual Control Name is “XButton” and upon pressing the key while Container Menu was open Cassiopeia should’ve sent “XButton”. (This bug was introduced in v2.3 (yesterday update) due to an oversight).
Fixes a bug that could cause certain “Windows window switching control keys” like the Win key (opens Start Menu) to be considered as continuously pressed after getting released because the native event couldn’t be sent with bPressed = false as the key was actually released while the game wasn’t actually receiving the keyboard input.
Added: BSInputEventEx(Int aiKeyCode, String asControlName, String asMainControlName, String asFriendlyName, bool bPressed, Float afHeldTime, int aiDeviceIndex, int aiKeyMask, int aiEventIndex, int aiPressedKeysCount, float fElapsedTimeSinceLastInput)

Version 2.3
Mostly redesigned BSInputEvent; now it can send mouse button and mouse wheel movement events ( see the .psc for details )
Fixes a bug that could prevent BSInputEvent to be sent for a key if another key was previously pressed and was being held
Fixes a bug that could cause BSInputEvent to incorrectly send the name of the Right Alt key
Added: DumpControlMapInfo, IsControlDown, GetHoldTimeByKeyCode, GetHoldTimeByControlName, GetControlNameByKeyCode, GetKeyNameByKeyCode, GetCharAt, SubStr, EraseStr, FindStr, MergeStr, SplitStr, ReplaceStr
Moved IsKeyDown from the Utility section in CassiopeiaPapyrusExtender.psc to the Input section where the other Input functions are

Version 2.2
Added: GetUTHourPerLocalDay, GetUTHourPerLocalHour, GetGameDate, GetActorReference, CreateReferencesAtCoordinates, EnableDistantLOD, GetReferenceBounds, GetAliases, GetAliasName, GetAliasIndex, SetAS3Variable, GetAllFormsMapSize, PrintAllFormsMapToFile

Credits:

LarannKiar

Share mod:

Leave a Reply

Your email address will not be published. Required fields are marked *