Background for Starfield

SpaceshipReference


Inheritance Tree

No indexed scripts extend this script.

Structs
Properties
Events
Functions
voidfunctionAddPerk(PerkakPerk, boolabNotify=false)Native

Adds the specified perk to this actor

voidfunctionAddToFaction(FactionakFaction)

Adds this spaceship to a faction at rank 0 if they aren't already in it

boolfunctionCanLandAtMarker(ObjectReferenceakLandingMarker)Native

Tests if the spaceship is allowed to land at the given marker based on the maximum allowed ship size.

intfunctionCheckContrabandStatus(boolabCheckWholeShip=true)Native

Retrieves the ships contraband status. (Only checks ships cargo if abCheckWholeShip is false)
-1 - Below shielded inventory limit
0 - At shielded inventory limit
1 - Above shielded inventory limit

voidfunctionDisableWithGravJump()Native

disable this spaceship with grav jump FX

voidfunctionDisableWithGravJumpNoWait()Native

disable this spaceship with grav jump FX. Does NOT wait for the FX to finish

voidfunctionDisableWithTakeOffOrLanding()Native

disable this spaceship after playing a takeoff or landing animation (whichever is appropriate)

disable this spaceship after playing a takeoff or landing animation (whichever is appropriate). Does NOT wait for the animation to complete

voidfunctionEnablePartRepair(ActorValueaSystemHealth, boolabEnable=true)Native

Enable/disable repairing the spaceship part associated with the given System Health actor value
If no part is specified, all the parts will be affected
pass true to enable repairing the part(s), false to disable it

voidfunctionEvaluatePackage(boolabResetAI=false)Native

evaluate this spaceships packages.

voidfunctionEnableAI(boolabEnable=true, boolabPauseVoice=false)Native

enable or disable the AI for this ship

boolfunctionEnableWithGravJump()Native

enable this spaceship with grav jump FX

boolfunctionEnableWithGravJumpNoWait()Native

enable this spaceship with grav jump FX - does not wait for 3d to load

boolfunctionEnableWithLanding()Native

enable this spaceship and land it at its currently linked landing marker

boolfunctionEnableWithLandingNoWait()Native

enable this spaceship and land it at its currently linked landing marker. Does not wait for the animation to complete or the 3d to load

gets all the combat targets for this spaceship

gets the current combat target

floatfunctionGetContrabandWeight(boolabCheckWholeShip=true)Native

Retrieves the ships contraband weight. (Only checks ships cargo if abCheckWholeShip is false)

FactionfunctionGetCrimeFaction()Native

Get the faction this ship reports crimes to

PackagefunctionGetCurrentPackage()Native

Gets this spaceships's current AI package

Gets all exterior references for this spaceship which are load doors

ObjectReference[]functionGetExteriorRefs(KeywordapKeyword)Native

Gets this spaceship's exterior references filtered by the given keyword

intfunctionGetFactionRank(FactionakFaction)Native

Obtains this spaceship's rank with the specified faction - returns -1 if the spaceship is not a member

intfunctionGetActorFactionReaction(ActorakOtherActor)Native

returns the faction reation to the other actor
0 - Neutral
1 - Enemy
2 - Ally
3 - Friend

Retrieve all the spaceships currently docked with this spaceship

intfunctionGetFactionReaction(SpaceshipReferenceakOther)Native

returns the faction reation to the other spaceship
0 - Neutral
1 - Enemy
2 - Ally
3 - Friend

Retrieve the first spaceship docked with this spaceship, if any

ObjectReferencefunctionGetKiller()Native

get this ship's killer

Gets all exterior references for this spaceship which are ramps

intfunctionGetLevel()Native

get the level of this spaceship

get the base object of this spaceship, either the created one for a leveled ship or the editor saved one for a non leveled ship.

boolfunctionGetNoBleedoutRecovery()Native

get the no bleedout recovery status for this ship

intfunctionGetPartCount(intaiShipPartID)Native

Gets the number of parts of a specific type
valid aiShipPartIDs 0 - Weapons, 1 - Engine, 2 - Shields, 3 - Gravdrive, 4 - Generator

intfunctionGetPartPower(intaiShipPartID, intaiShipPartIndex)Native

Gets the amount of power allocated to a given part
valid aiShipPartIDs 0 - Weapons, 1 - Engine, 2 - Shields, 3 - Gravdrive, 4 - Generator

floatfunctionGetShipMaxCargoWeight()Native

Gets the spaceships maximum weight capacity by summing normal and shielded cargo capacity.

WeaponfunctionGetWeaponGroupBaseObject(ActorValueaWeaponGroupSystemHealth)Native

Returns the weapon associated with a weapon group part

boolfunctionHasPerk(PerkakPerk)Native

Checks to see if this speaceship has the given Perk

boolfunctionInstantDock(ObjectReferenceakTarget)Native

Instantly docks the spaceship with a target which can be another ship or a docking port

voidfunctionInstantUndock()Native

Instantly undocks a spaceship

boolfunctionIsAIEnabled()Native

Returns whether this spaceship's AI is enabled.

boolfunctionIsAlarmed()Native

Returns if this spaceship is alarmed or not

boolfunctionIsAlerted()Native

Returns if this spaceship is alerted or not

boolfunctionIsDead()Native

check if this spaceship is dead

boolfunctionIsDetectedBy(SpaceshipReferenceakOther)Native

Returns if this spaceship is detected by the other one

boolfunctionIsDocked()Native

Get whether this spaceship is currently docked

boolfunctionIsDockedWith(SpaceshipReferenceakTarget)Native

Get whether this spaceship is currently docked with a given target

boolfunctionIsDockedAsChild()Native

Get whether this spaceship is docked as a child

boolfunctionIsEssential(boolabIncludeActors=true)Native

get if this spaceship is considered essential
Included actors are anyone in the ship's interior or exterior

boolfunctionIsGhost()Native

check if the ship is set to be a ghost

boolfunctionIsHostileToSpaceship(SpaceshipReferenceakSpaceship)Native

Is this spaceship hostile to another spaceship?

boolfunctionIsInCombat()Native

check if the ship is in combat.

boolfunctionIsInFaction(FactionakFaction)Native

Checks to see if this spaceship is a member of the specified faction

boolfunctionIsInScene()Native

check if this spaceship is in a scene

boolfunctionIsLanded()Native

check if this spaceship is landed

boolfunctionIsProtected(boolabIncludeActors=true)Native

get if this spaceship is considered protected
Included actors are anyone in the ship's interior or exterior

boolfunctionIsRampDown()Native

check if this spaceship's ramp is connected to the surrounding navmesh yet

voidfunctionKill(SpaceshipReferenceakKiller=NONE)Native

kill this ship with akKiller as the source of the kill

voidfunctionKillEssential(SpaceshipReferenceakKiller=NONE)Native

kill this ship with akKiller as the source of the kill even if the ship or any on board actors are essential.

voidfunctionKillSilent(SpaceshipReferenceakKiller=NONE)Native

kill this ship with akKiller as the source of the kill but do not generate story events

voidfunctionModFactionRank(FactionakFaction, intaiAmount)Native

modifies the faction rank by the given amount

voidfunctionMoveToPackageLocation()Native

Pop this spaceship to the initial location for a package.

voidfunctionOpenInventory()Native

Opens this ship's inventory.

voidfunctionLockPowerAllocation(intaiShipPartID, intaiShipPartIndex, boolabLock=true)Native

Lock the power allocation of a specific part to keep the AI from modifying it
valid aiShipPartIDs 0 - Weapons, 1 - Engine, 2 - Shields, 3 - Gravdrive, 4 - Generator
pass -1 to aiShipPartIndex to lock/unlock the power of all the parts of the specified type
This will also keep the AI from repairing a damaged part

intfunctionPathToReference(ObjectReferenceaTarget, floatafNormalizedSpeed, floatafNormalizedRotationSpeed, floatafTargetRadius=-1, boolabHardRadius=false)Native

Make the spaceship attempt to path to a reference, latent version
Note: this method doesn't return until the goal is reached or pathing
failed or was interrupted (by another request for instance)
Return values (see Actor for PathingResult properties):
0 - Success
1 - Failure
2 - Stopped
3 - Cleared
4 - Timeout

voidfunctionRemoveFromAllFactions()Native

remove the ship from the all factions

voidfunctionRemoveFromFaction(FactionakFaction)Native

remove the ship from the given faction

voidfunctionRemovePerk(PerkakPerk)Native

Removes the specified perk from this spaceship

voidfunctionSendAssaultAlarm()Native

Has this spaceship behave as if assaulted

voidfunctionSendPiracyAlarm()Native

Have the ship behave as if pirated

voidfunctionSendSmugglingAlarm(boolabCheckWholeShip=true)Native

Have this spaceship behave as if they detected the player smuggling

voidfunctionSetAlert(boolabAlerted=true)Native

Sets the spaceship in an alerted state

voidfunctionSetAttackShipOnSight(boolabAttackOnSight=true)Native

Sets this ship to be attacked by all other ships on sight

voidfunctionSetAvoidPlayer(boolabAvoid=true)Native

Tells pathing to avoid the player (which it already does by default) or not (for use in scenes where the player is meant to be an incorporeal observer).

voidfunctionSetCombatStyle(CombatStyleakCombatStyle)Native

Sets the combatstyle for this spaceship

voidfunctionSetCrimeFaction(FactionakFaction)Native

Sets the faction this spaceship reports crimes to

voidfunctionSetEssential(boolabEssential)Native

set if this spaceship is considered essential

voidfunctionSetFactionRank(FactionakFaction, intaiRank)Native

Sets this spaceship's rank with the specified faction

voidfunctionSetGhost(boolabIsGhost=true)Native

sets if this spaceship is a ghost

voidfunctionSetNoBleedoutRecovery(boolabBleedoutRecoveryNotAllowed=true)Native

set the no bleedout recovery status for this ship; pass true to prevent recovery

voidfunctionSetNotShowOnStealthMeter(boolabNotShow=true)Native

Sets this spaceship to not effect the detection level on the stealth meter if they are not hostile to the player

voidfunctionSetPartPower(intaiShipPartID, intaiShipPartIndex, intaiPower)Native

Sets the amount of power allocated to a given part
valid aiShipPartIDs 0 - Weapons, 1 - Engine, 2 - Shields, 3 - Gravdrive, 4 - Generator
specify -1 for the aiShipPartIndex to set the power of all the parts of the specified type (such as weapons)

voidfunctionSetPlayerResistingArrest()Native

Sets the player as resisting arrest from this spaceships's faction

voidfunctionSetProtected(boolabProtected)Native

set if this spaceship is considered protected

voidfunctionShowBarterMenu()Native

Opens the Barter menu

voidfunctionStartCombat(SpaceshipReferenceakTarget, boolabPreferTarget=false)Native

start combat with the given target

voidfunctionStopCombat()Native

stops combat for this spaceship

voidfunctionStopCombatAlarm()Native

Stops all combat and alarms against this spaceship

voidfunctionTakeOff()Native

Force this spaceship to takeoff immediately (if it isn't in space)

voidfunctionSetForwardVelocity(floataVelocity)Native

Set the forward velocity of the ship as a percentage of max speed(0-1)

voidfunctionSetUnconscious(boolaUnconscious)Native

Set the autopilot of the ship unonscious or conscious

voidfunctionSetIgnoreFriendlyHits(boolaIgnoreFriendlyHits)Native

Set the ship to ignore friendly hits

floatfunctionGetGravJumpRange()Native

Gets the spaceships current max grav jump range in light years

Get this ship's reactor class keyword

scornett
Is the ship's exterior load door inaccessible? (Checks the state of the first door found, if there are multiple.)

voidfunctionSetExteriorLoadDoorInaccessible(boolabInaccessible=true)

scornett
Sets the ship's exterior load door(s) inaccessible.

boolfunctionIsLandingDeckClear()

scornett
Are there any actors on the ship's exterior landing deck? (That is, any actors in the trigger encompassing the landing deck and ramp?) (Checks the state of the first deck found, if there are multiple.)

Some data provided by the Fallout 4 Creation Kit Wiki. Licensed under the Creative Commons Attribution-Share Alike 4.0 license.