VERTICALL 4 SETTLEMENTS API REFERENCE
FormIDs
Settlement Landing Pad (Type 1): 0x1
Settlement Landing Pad (Type 2): 0x41
Settlement Landing Pad (Type 3): 0x43
VertiCall Console (Floor Standing): 0x4
Form acquisition and ObjectReference spawning:; Get Landing Pad form
Form landingPadForm = Game.GetFormFromFile(0x1, "VertiCall4Settlements.esp") as Form
; spawn objectref
SVCL:LandingPad landingPadRef = PlaceAtMe(landingPadForm, 1, true, true, false) as SVCL:LandingPad
; reflink pad to workshop
landingPadRef.SetLinkedRef(<localWorkshopReference>, WorkshopItemKeyword)
; enable pad
landingPadRef.Enable()
; Get Console form
Form consoleForm = Game.GetFormFromFile(0x4, "VertiCall4Settlements.esp") as Form
; spawn objectref
SVCL:VertiCallConsole consoleRef = PlaceAtMe(consoleForm, 1, true, true, false) as SVCL:VertiCallConsole
; reflink console to workshop
consoleRef.SetLinkedRef(<localWorkshopReference>, WorkshopItemKeyword)
; enable
consoleRef.Enable()
Notables:
- You must link pad and console(s) to the same, local workshop before enabling.
- Failure to do so will prevent successful communications between landing pad and console(s) and the system won't work.
- Do not spawn more than one pad per settlement. It is API user's own responsibility to observe this rule. Violating it will cause unsupported confusion.
Landing Pad API
Script Type: SVCL:LandingPad
Read Only Properties available at runtime:
SystemPowered Returns True if this VertiCall pad receives power.
IsOccupied Returns True if a Vertibird sits on this pad (currently always False when pad is unloaded).
IsPersonnelPresent Returns True if Player is standing on this pad.
IsVertibirdReady Returns True if a requested Vertibird is ready on this pad.
IsVFTOperated Returns True if Vertibird Fast Travel (VFT) is available in Player's game.
IsSVCLActive Returns True while a VFT Vertibird from the VertiCall4Settlements mod is active.
IsPickupPad Returns True when the currently active SVCL Vertibird was requested to this pad.
LandingLightsActive Returns True while the pad's landing lights are engaged.
BoardingLightsActive Returns True while the pad's boarding lights are engaged.
IndicatorStatuses Returns a struct with status information for the various VertiCall Console indicators.
Public Functions:
AbortVFT() Aborts a running VertiCall VFT mission. Callable on any pad. Returns true on success.
RequestVFT() Requests a VertiCall VFT Vertibird to the pad this function is called on. Return codes see below.
PrintDebugInfo() Dumps some simple pad stats to Papyrus log.
Do not call any functions prefixed with a _ character from your scripts. These are considered private functions and may change without notice.
It is really unfortunate that Papyrus does not offer the private modifier for functions and properties, but that's just how it is.
RequestVFT() Int return codes (fake enum values available as properties on the SVCL:LandingPad script):
RVRESULT_DISPATCHED = 0 Request succeeded, Vertibird is on it's way to the pad.
RVRESULT_VFTUNAVAIL = -1 VFT not available to player.
RVRESULT_VFTRUNNING = -2 VFT already running, use AbortVFT() to stop the current VertiCall mission first.
RVRESULT_OCCUPIED = -3 The pad you called RequestVFT() on is occupied and the Vertibird would be unable to land there.
RVRESULT_NODISPATCH = -4 The Vertibird cannot be dispatched to the pad. Check Papyrus logs for errors.
RVRESULT_NOPOWER = -5 The Settlement Landing Pad must be powered for RequestVFT() calls to succeed.
Custom Events:
OnIndicatorStatusChange The IndicatorStatuses property has changed. The struct is passed as eventArgs[0].
OnPadDestroyed Notify consoles of pad deletion (scrapping). Receivers must unregister all events immediately.
OnLightsChange LandingLightsActive or BoardingLightsActive properties have changed.
SyncLandingLights Used internally by SVCL:SyncedLandingLight script to synchronize landing lights animations.
IndicatorStatusesInfo Struct members:
Int SystemPower PWR indicator, possible Int value from INDICATORSTATE_* fake enum.
Int VFTOperated OPR indicator, possible Int value from INDICATORSTATE_* fake enum.
Int FlightInProgress FLT indicator, possible Int value from INDICATORSTATE_* fake enum.
Int PadOccupied PAD indicator, possible Int value from INDICATORSTATE_* fake enum.
Int VertibirdDispatched DISP indicator, possible Int value from INDICATORSTATE_* fake enum.
Int VertibirdReady RDY indicator, possible Int value from INDICATORSTATE_* fake enum.
Int ServiceBusy BSY indicator, possible Int value from INDICATORSTATE_* fake enum.
Int Bell Bell, possible Int value from BELL_* fake enum.
INDICATORSTATE_* Fake Int Enum (available as properties on the SVCL:LandingPad script):
INDICATORSTATE_DARK = 0 The indicator is dark.
INDICATORSTATE_STEADY = 1 The indicator is lit.
INDICATORSTATE_BLINKSLOW = 2 The indicator is blinking at a low frequency.
INDICATORSTATE_BLINKFAST = 3 The indicator is blinking at a higher frequency.
BELL_* Fake Int Enum (available as properties on the SVCL:LandingPad script):
BELL_SILENT = 0 Any continuous bell sounds are silenced.
BELL_DING = 1 A single, non-continuous DING sound is produced.
Powering the pad from an external ObjectReference:
theLandingPad.SetLinkedRef(poweredRef, SVCL_PowerSourceLinkKeyword)
If you spawn the pad from script, you may want to power the pad indirectly through another reference. For example, if you spawn the pad on a Sim Settlements 2 plot, you probably want to couple the power state of the pad to the power state of the plot. To do this, reflink the pad to the powered reference (such as the plot) with the SVCL_PowerSourceLinkKeyword. It's best to do this before calling .Enable() on the spawned pad.
0 comments