Difference between revisions of "Race Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
(Added SKSE Member/Global Functions)
imported>CraftySentinel
(Reverted to List)
 
Line 1: Line 1:
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]
'''Extends:''' [[Form Script]]
'''Extends:''' [[Form Script]]


Script for the manipulation of a character's race.
Script for the manipulation of a character's race.


== Definition ==
== Definition ==
Line 12: Line 9:
</source>
</source>


== Properties ==
None


== SKSE Properties ==
== SKSE Properties ==
*[[Race Flags - Race|List of Race Flags]]
*[[Race Flags - Race|List of Race Flags]]


== Global Functions ==
== Global Functions ==
None
None


== Member Functions ==
== Member Functions ==
Line 26: Line 23:
== SKSE Global Functions ==
== SKSE Global Functions ==


{|class="wikitable" width =100%
:'''Int [[GetNumPlayableRaces - Race|GetNumPlayableRaces]]()'''
!style="text-align:left;"|Function
:*Returns the number of playable races.
!style="text-align:left;"|Description
|-


|[[GetNumPlayableRaces - Race|Int '''GetNumPlayableRaces'''()]]
:'''Race [[GetNthPlayableRace - Race|GetNthPlayableRace]](Int ''n'')'''
|Returns the number of playable races.
:*Returns the Nth playable race.
|-


|[[GetNthPlayableRace - Race|Race '''GetNthPlayableRace'''(Int ''n'')]]
:'''Race [[GetRace - Race|GetRace]](String ''editorId'')'''
|Returns the Nth playable race.
:*Returns a race by its editorId name.
|-


|[[GetRace - Race|Race '''GetRace'''(String ''editorId'')]]
|Returns a race by its editorId name.
|-


|}
== SKSE Member Functions ==


== SKSE Member Functions ==
:'''Int [[GetSpellCount - Race|GetSpellCount]]()'''
:*Returns the number of spells for the race.


{|class="wikitable" width =100%
:'''Spell [[GetNthSpell - Race|GetNthSpell]](Int ''n'')'''
!style="text-align:left;"|Function
:*Returns the specified spell from the race.
!style="text-align:left;"|Description
|-


|[[GetSpellCount - Race|Int '''GetSpellCount'''()]]
:'''Bool [[IsRaceFlagSet - Race|IsRaceFlagSet]](Int ''n'')'''
|Returns the number of spells for the race.
:*Returns whether the specified race flag is set.
|-


|[[GetNthSpell - Race|Spell '''GetNthSpell'''(Int ''n'')]]
:'''[[SetRaceFlag - Race|SetRaceFlag]](Int ''n'')'''
|Returns the specified spell from the race.
:*Sets the specified race flag.
|-


|[[IsRaceFlagSet - Race|Bool '''IsRaceFlagSet'''(Int ''n'')]]
:'''[[ClearRaceFlag - Race|ClearRaceFlag]](Int ''n'')'''
|Returns whether the specified race flag is set.
:*Clears the specified race flag.
|-


|[[SetRaceFlag - Race|'''SetRaceFlag'''(Int ''n'')]]
:'''VoiceType [[GetDefaultVoiceType - Race|GetDefaultVoiceType]]()'''
|Sets the specified race flag.
:*Returns the race's default voice type.
|-


|[[ClearRaceFlag - Race|'''ClearRaceFlag'''(Int ''n'')]]
:'''[[SetDefaultVoiceType - Race|SetDefaultVoiceType]](VoiceType ''voice'')'''
|Clears the specified race flag.
:*Sets the race's default voice type.
|-


|[[GetDefaultVoiceType - Race|VoiceType '''GetDefaultVoiceType'''()]]
:'''Armor [[GetSkin - Race|GetSkin]]()'''
|Returns the race's default voice type.
:*Returns the race's skin.
|-


|[[SetDefaultVoiceType - Race|'''SetDefaultVoiceType'''(VoiceType ''voice'')]]
:'''[[SetSkin - Race|SetSkin]](Armor ''skin'')'''
|Sets the race's default voice type.
:*Sets the race's skin.
|-


|[[GetSkin - Race|Armor '''GetSkin'''()]]
:'''Bool [[IsPlayable - Race|IsPlayable]]()'''
|Returns the race's skin.
:*Returns whether the race is playable.
|-


|[[SetSkin - Race|'''SetSkin'''(Armor ''skin'')]]
:'''[[MakePlayable - Race|MakePlayable]]()'''
|Sets the race's skin.
:*Sets the race's playable flag to true.
|-


|[[IsPlayable - Race|Bool '''IsPlayable'''()]]
:'''[[MakeUnPlayable - Race|MakeUnPlayable]]()'''
|Returns whether the race is playable.
:*Clears the race's playable flag.
|-


|[[MakePlayable - Race|'''MakePlayable'''()]]
:'''Bool [[IsChildRace - Race|IsChildRace]]()'''
|Sets the race's playable flag to true.
:*Returns whether this race is a Child race.
|-


|[[MakeUnPlayable - Race|'''MakeUnPlayable'''()]]
:'''[[MakeChildRace - Race|MakeChildRace]]()'''
|Clears the race's playable flag.
:*Sets the race's Child Race flag to true.
|-


|[[IsChildRace - Race|Bool '''IsChildRace'''()]]
:'''[[MakeNonChildRace - Race|MakeNonChildRace]]()'''
|Returns whether this race is a Child race.
:*Clears the race's Child Race flag.
|-


|[[MakeChildRace - Race|'''MakeChildRace'''()]]
:'''Bool [[CanFly - Race|CanFly]]()'''
|Sets the race's Child Race flag to true.
:*Returns whether or not the race can fly.
|-


|[[MakeNonChildRace - Race|'''MakeNonChildRace'''()]]
:'''[[MakeCanFly - Race|MakeCanFly]]()'''
|Clears the race's Child Race flag.
:*Sets the race's Flies flag to true.
|-


|[[CanFly - Race|Bool '''CanFly'''()]]
:'''[[MakeNonFlying - Race|MakeNonFlying]]()'''
|Returns whether or not the race can fly.
:*Clears the race's Flies flag.
|-


|[[MakeCanFly - Race|'''MakeCanFly'''()]]
:'''Bool [[CanSwim - Race|CanSwim]]()'''
|Sets the race's Flies flag to true.
:*Returns whether the race can swim or not.
|-


|[[MakeNonFlying - Race|'''MakeNonFlying'''()]]
:'''[[MakeCanSwim - Race|MakeCanSwim]]()'''
|Clears the race's Flies flag.
:*Sets the race's Swims flag to true.
|-


|[[CanSwim - Race|Bool '''CanSwim'''()]]
:'''[[MakeNonSwimming - Race|MakeNonSwimming]]()'''
|Returns whether the race can swim or not.
:*Clears the race's Swims flag.
|-


|[[MakeCanSwim - Race|'''MakeCanSwim'''()]]
:'''Bool [[CanWalk - Race|CanWalk]]()'''
|Sets the race's Swims flag to true.
:*Returns whether the race can walk or not.
|-


|[[MakeNonSwimming - Race|'''MakeNonSwimming'''()]]
:'''[[MakeCanWalk - Race|MakeCanWalk]]()'''
|Clears the race's Swims flag.
:*Sets the race's Walks flag to true.
|-


|[[CanWalk - Race|Bool '''CanWalk'''()]]
:'''[[MakeNonWalking - Race|MakeNonWalking]]()'''
|Returns whether the race can walk or not.
:*Clears the race's Walks flag.
|-


|[[MakeCanWalk - Race|'''MakeCanWalk'''()]]
:'''Bool [[IsImmobile - Race|IsImmobile]]()'''
|Sets the race's Walks flag to true.
:*Returns whether the race is immobile or not.
|-


|[[MakeNonWalking - Race|'''MakeNonWalking'''()]]
:'''[[MakeImmobile - Race|MakeImmobile]]()'''
|Clears the race's Walks flag.
:*Sets the race's Immobile flag to true.
|-
|[[IsImmobile - Race|Bool '''IsImmobile'''()]]
|Returns whether the race is immobile or not.
|-


|[[MakeImmobile - Race|'''MakeImmobile'''()]]
:'''[[MakeMobile - Race|MakeMobile]]()'''
|Sets the race's Immobile flag to true.
:*Clears the race's Immobile flag.
|-


|[[MakeMobile - Race|'''MakeMobile'''()]]
:'''Bool [[IsNotPushable - Race|IsNotPushable]]()'''
|Clears the race's Immobile flag.
:*Returns whether the race is pushable.
|-


|[[IsNotPushable - Race|Bool '''IsNotPushable'''()]]
:'''[[MakeNotPushable - Race|MakeNotPushable]]()'''
|Returns whether the race is pushable.
:*Sets the race's Not Pushable flag to true.
|-


|[[MakeNotPushable - Race|'''MakeNotPushable'''()]]
:'''[[MakePushable - Race|MakePushable]]()'''
|Sets the race's Not Pushable flag to true.
:*Clears the race's Not Pushable flag.
|-


|[[MakePushable - Race|'''MakePushable'''()]]
:'''Bool [[NoKnockdowns - Race|NoKnockdowns]]()'''
|Clears the race's Not Pushable flag.
:*Returns whether the race can be knocked down or not.
|-


|[[NoKnockdowns - Race|Bool '''NoKnockdowns'''()]]
:'''[[MakeNoKnockdowns - Race|MakeNoKnockdowns]]()'''
|Returns whether the race can be knocked down or not.
:*Sets the race's No Knockdowns flag to true.
|-


|[[MakeNoKnockdowns - Race|'''MakeNoKnockdowns'''()]]
:'''[[ClearNoKnockdowns - Race|ClearNoKnockdowns]]()'''
|Sets the race's No Knockdowns flag to true.
:*Clears the race's No Knockdowns flag.
|-


|[[ClearNoKnockdowns - Race|'''ClearNoKnockdowns'''()]]
:'''Bool [[NoCombatInWater - Race|NoCombatInWater]]()'''
|Clears the race's No Knockdowns flag.
:*Returns whether the race can fight while swimming or not.
|-


|[[NoCombatInWater - Race|Bool '''NoCombatInWater'''()]]
:'''[[SetNoCombatInWater - Race|SetNoCombatInWater]]()'''
|Returns whether the race can fight while swimming or not.
:*Sets the race's No Combat In Water flag to true.
|-


|[[SetNoCombatInWater - Race|'''SetNoCombatInWater'''()]]
:'''[[ClearNoCombatInWater - Race|ClearNoCombatInWater]]()'''
|Sets the race's No Combat In Water flag to true.
:*Clears the race's No Combat In Water flag.
|-


|[[ClearNoCombatInWater - Race|'''ClearNoCombatInWater'''()]]
:'''Bool [[AvoidsRoads - Race|AvoidsRoads]]()'''
|Clears the race's No Combat In Water flag.
:*Returns whether the race avoids roads or not.
|-


|[[AvoidsRoads - Race|Bool '''AvoidsRoads'''()]]
:'''[[SetAvoidsRoads - Race|SetsAvoidsRoads]]()'''
|Returns whether the race avoids roads or not.
:*Sets the race's Avoids Roads flag to true.
|-


|[[SetAvoidsRoads - Race|'''SetsAvoidsRoads'''()]]
:'''[[ClearsAvoidsRoads - Race|ClearsAvoidsRoads]]()'''
|Sets the race's Avoids Roads flag to true.
:*Clears the race's Avoid Roads flag.
|-


|[[ClearsAvoidsRoads - Race|'''ClearsAvoidsRoads'''()]]
:'''Bool [[AllowPickpocket - Race|AllowPickpocket]]()'''
|Clears the race's Avoid Roads flag.
:*Returns whether the player can be Pickpocket this race.
|-


|[[AllowPickpocket - Race|Bool '''AllowPickpocket'''()]]
:'''[[SetAllowPickpocket - Race|SetAllowPickpocket]]()'''
|Returns whether the player can be Pickpocket this race.
:*Sets the race's Allow Pickpocket flag to true.
|-


|[[SetAllowPickpocket - Race|'''SetAllowPickpocket'''()]]
:'''[[ClearAllowPickpocket - Race|ClearAllowPickpocket]]()'''
|Sets the race's Allow Pickpocket flag to true.
:*Clears the race's Allow Pickpocket flag.
|-


|[[ClearAllowPickpocket - Race|'''ClearAllowPickpocket'''()]]
:'''Bool [[AllowPCDialogue - Race|AllowPCDialogue]]()'''
|Clears the race's Allow Pickpocket flag.
:*Returns whether or not the player is allowed to talk to actors of this race.
|-


|[[AllowPCDialogue - Race|Bool '''AllowPCDialogue'''()]]
:'''[[SetAllowPCDialogue - Race|SetAllowPCDialogue]]()'''
|Returns whether or not the player is allowed to talk to actors of this race.
:*Sets the race's Allow PC Dialogue flag to true.
|-


|[[SetAllowPCDialogue - Race|'''SetAllowPCDialogue'''()]]
:'''[[ClearAllowPCDialogue - Race|ClearAllowPCDialogue]]()'''
|Sets the race's Allow PC Dialogue flag to true.
:*Clears the race's Allow PC Dialogue flag.
|-


|[[ClearAllowPCDialogue - Race|'''ClearAllowPCDialogue'''()]]
:'''Bool [[CantOpenDoors - Race|CantOpenDoors]]()'''
|Clears the race's Allow PC Dialogue flag.
:*Returns whether the race cannot open doors.
|-


|[[CantOpenDoors - Race|Bool '''CantOpenDoors'''()]]
:'''[[SetCantOpenDoors - Race|SetCantOpenDoors]]()'''
|Returns whether the race cannot open doors.
:*Sets the race's Cant Open Doors flag to true.
|-


|[[SetCantOpenDoors - Race|'''SetCantOpenDoors'''()]]
:'''[[ClearCantOpenDoors - Race|ClearCantOpenDoors]]()'''
|Sets the race's Cant Open Doors flag to true.
:*Clears the race's Cant Open Doors flag.
|-


|[[ClearCantOpenDoors - Race|'''ClearCantOpenDoors'''()]]
:'''Bool [[NoShadow - Race|NoShadow]]()'''
|Clears the race's Cant Open Doors flag.
:*Returns whether the race casts a shadow or not.
|-


|[[NoShadow - Race|Bool '''NoShadow'''()]]
:'''[[SetNoShadow - Race|SetNoShadow]]()'''
|Returns whether the race casts a shadow or not.
:*Sets the race's No Shadow flag to true.
|-


|[[SetNoShadow - Race|'''SetNoShadow'''()]]
:'''[[ClearNoShadow - Race|ClearNoShadow]]()'''
|Sets the race's No Shadow flag to true.
:*Clears the race's No Shadow flag.
|-


|[[ClearNoShadow - Race|'''ClearNoShadow'''()]]
|Clears the race's No Shadow flag.
|-
|}


== Events ==
== Events ==
None
None
[[Category:Scripting]]
[[Category:Papyrus]]
[[Category:Script Objects]]

Latest revision as of 21:52, 2 February 2014

Extends: Form Script

Script for the manipulation of a character's race.


Definition[edit | edit source]

ScriptName Race extends Form


SKSE Properties[edit | edit source]


Global Functions[edit | edit source]

None


Member Functions[edit | edit source]

None

SKSE Global Functions[edit | edit source]

Int GetNumPlayableRaces()
  • Returns the number of playable races.
Race GetNthPlayableRace(Int n)
  • Returns the Nth playable race.
Race GetRace(String editorId)
  • Returns a race by its editorId name.


SKSE Member Functions[edit | edit source]

Int GetSpellCount()
  • Returns the number of spells for the race.
Spell GetNthSpell(Int n)
  • Returns the specified spell from the race.
Bool IsRaceFlagSet(Int n)
  • Returns whether the specified race flag is set.
SetRaceFlag(Int n)
  • Sets the specified race flag.
ClearRaceFlag(Int n)
  • Clears the specified race flag.
VoiceType GetDefaultVoiceType()
  • Returns the race's default voice type.
SetDefaultVoiceType(VoiceType voice)
  • Sets the race's default voice type.
Armor GetSkin()
  • Returns the race's skin.
SetSkin(Armor skin)
  • Sets the race's skin.
Bool IsPlayable()
  • Returns whether the race is playable.
MakePlayable()
  • Sets the race's playable flag to true.
MakeUnPlayable()
  • Clears the race's playable flag.
Bool IsChildRace()
  • Returns whether this race is a Child race.
MakeChildRace()
  • Sets the race's Child Race flag to true.
MakeNonChildRace()
  • Clears the race's Child Race flag.
Bool CanFly()
  • Returns whether or not the race can fly.
MakeCanFly()
  • Sets the race's Flies flag to true.
MakeNonFlying()
  • Clears the race's Flies flag.
Bool CanSwim()
  • Returns whether the race can swim or not.
MakeCanSwim()
  • Sets the race's Swims flag to true.
MakeNonSwimming()
  • Clears the race's Swims flag.
Bool CanWalk()
  • Returns whether the race can walk or not.
MakeCanWalk()
  • Sets the race's Walks flag to true.
MakeNonWalking()
  • Clears the race's Walks flag.
Bool IsImmobile()
  • Returns whether the race is immobile or not.
MakeImmobile()
  • Sets the race's Immobile flag to true.
MakeMobile()
  • Clears the race's Immobile flag.
Bool IsNotPushable()
  • Returns whether the race is pushable.
MakeNotPushable()
  • Sets the race's Not Pushable flag to true.
MakePushable()
  • Clears the race's Not Pushable flag.
Bool NoKnockdowns()
  • Returns whether the race can be knocked down or not.
MakeNoKnockdowns()
  • Sets the race's No Knockdowns flag to true.
ClearNoKnockdowns()
  • Clears the race's No Knockdowns flag.
Bool NoCombatInWater()
  • Returns whether the race can fight while swimming or not.
SetNoCombatInWater()
  • Sets the race's No Combat In Water flag to true.
ClearNoCombatInWater()
  • Clears the race's No Combat In Water flag.
Bool AvoidsRoads()
  • Returns whether the race avoids roads or not.
SetsAvoidsRoads()
  • Sets the race's Avoids Roads flag to true.
ClearsAvoidsRoads()
  • Clears the race's Avoid Roads flag.
Bool AllowPickpocket()
  • Returns whether the player can be Pickpocket this race.
SetAllowPickpocket()
  • Sets the race's Allow Pickpocket flag to true.
ClearAllowPickpocket()
  • Clears the race's Allow Pickpocket flag.
Bool AllowPCDialogue()
  • Returns whether or not the player is allowed to talk to actors of this race.
SetAllowPCDialogue()
  • Sets the race's Allow PC Dialogue flag to true.
ClearAllowPCDialogue()
  • Clears the race's Allow PC Dialogue flag.
Bool CantOpenDoors()
  • Returns whether the race cannot open doors.
SetCantOpenDoors()
  • Sets the race's Cant Open Doors flag to true.
ClearCantOpenDoors()
  • Clears the race's Cant Open Doors flag.
Bool NoShadow()
  • Returns whether the race casts a shadow or not.
SetNoShadow()
  • Sets the race's No Shadow flag to true.
ClearNoShadow()
  • Clears the race's No Shadow flag.


Events[edit | edit source]

None