Difference between revisions of "Race Script"

From the CreationKit Wiki
Jump to navigation Jump to search
imported>CraftySentinel
m (→‎SKSE Member Functions: Formatting Change)
imported>CraftySentinel
(Reverted to List)
 
(One intermediate revision by the same user not shown)
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 ==
None
None
== SKSE Global Functions ==
:'''Int [[GetNumPlayableRaces - Race|GetNumPlayableRaces]]()'''
:*Returns the number of playable races.
:'''Race [[GetNthPlayableRace - Race|GetNthPlayableRace]](Int ''n'')'''
:*Returns the Nth playable race.
:'''Race [[GetRace - Race|GetRace]](String ''editorId'')'''
:*Returns a race by its editorId name.


== SKSE Member Functions ==
== SKSE Member Functions ==


{|class="wikitable" width =100%
:'''Int [[GetSpellCount - Race|GetSpellCount]]()'''
!style="text-align:left;"|Function
:*Returns the number of spells for the race.
!style="text-align:left;"|Description
 
|-
:'''Spell [[GetNthSpell - Race|GetNthSpell]](Int ''n'')'''
|[[GetSpellCount - Race|Int '''GetSpellCount'''()]]
:*Returns the specified spell from the race.
|Returns the number of spells for the race.
 
|-
:'''Bool [[IsRaceFlagSet - Race|IsRaceFlagSet]](Int ''n'')'''
:*Returns whether the specified race flag is set.
 
:'''[[SetRaceFlag - Race|SetRaceFlag]](Int ''n'')'''
:*Sets the specified race flag.
 
:'''[[ClearRaceFlag - Race|ClearRaceFlag]](Int ''n'')'''
:*Clears the specified race flag.
 
:'''VoiceType [[GetDefaultVoiceType - Race|GetDefaultVoiceType]]()'''
:*Returns the race's default voice type.
 
:'''[[SetDefaultVoiceType - Race|SetDefaultVoiceType]](VoiceType ''voice'')'''
:*Sets the race's default voice type.
 
:'''Armor [[GetSkin - Race|GetSkin]]()'''
:*Returns the race's skin.
 
:'''[[SetSkin - Race|SetSkin]](Armor ''skin'')'''
:*Sets the race's skin.
 
:'''Bool [[IsPlayable - Race|IsPlayable]]()'''
:*Returns whether the race is playable.


|[[GetNthSpell - Race|Spell '''GetNthSpell'''(Int ''n'')]]
:'''[[MakePlayable - Race|MakePlayable]]()'''
|Returns the specified spell from the race.
:*Sets the race's playable flag to true.
|-


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


|[[SetRaceFlag - Race|'''SetRaceFlag'''(Int ''n'')]]
:'''Bool [[IsChildRace - Race|IsChildRace]]()'''
|Sets the specified race flag.
:*Returns whether this race is a Child race.
|-


|[[ClearRaceFlag - Race|'''ClearRaceFlag'''(Int ''n'')]]
:'''[[MakeChildRace - Race|MakeChildRace]]()'''
|Clears the specified race flag.
:*Sets the race's Child Race flag to true.
|-


|[[GetDefaultVoiceType - Race|VoiceType '''GetDefaultVoiceType'''()]]
:'''[[MakeNonChildRace - Race|MakeNonChildRace]]()'''
|Returns the race's default voice type.
:*Clears the race's Child Race flag.
|-


|[[SetDefaultVoiceType - Race|'''SetDefaultVoiceType'''(VoiceType ''voice'')]]
:'''Bool [[CanFly - Race|CanFly]]()'''
|Sets the race's default voice type.
:*Returns whether or not the race can fly.
|-


|[[GetNumPlayableRaces - Race|Int '''GetNumPlayableRaces'''()]]
:'''[[MakeCanFly - Race|MakeCanFly]]()'''
|Returns the number of playable races.
:*Sets the race's Flies flag to true.
|-


|[[GetNthPlayableRace - Race|Race '''GetNthPlayableRace'''(Int ''n'')]]
:'''[[MakeNonFlying - Race|MakeNonFlying]]()'''
|Returns the Nth playable race.
:*Clears the race's Flies flag.
|-


|[[GetRace - Race|Race '''GetRace'''(String ''editorId'')]]
:'''Bool [[CanSwim - Race|CanSwim]]()'''
|Returns a race by its editorId name.
:*Returns whether the race can swim or not.
|-
 
:'''[[MakeCanSwim - Race|MakeCanSwim]]()'''
:*Sets the race's Swims flag to true.
 
:'''[[MakeNonSwimming - Race|MakeNonSwimming]]()'''
:*Clears the race's Swims flag.
 
:'''Bool [[CanWalk - Race|CanWalk]]()'''
:*Returns whether the race can walk or not.
 
:'''[[MakeCanWalk - Race|MakeCanWalk]]()'''
:*Sets the race's Walks flag to true.
 
:'''[[MakeNonWalking - Race|MakeNonWalking]]()'''
:*Clears the race's Walks flag.
 
:'''Bool [[IsImmobile - Race|IsImmobile]]()'''
:*Returns whether the race is immobile or not.
 
:'''[[MakeImmobile - Race|MakeImmobile]]()'''
:*Sets the race's Immobile flag to true.
 
:'''[[MakeMobile - Race|MakeMobile]]()'''
:*Clears the race's Immobile flag.
 
:'''Bool [[IsNotPushable - Race|IsNotPushable]]()'''
:*Returns whether the race is pushable.
 
:'''[[MakeNotPushable - Race|MakeNotPushable]]()'''
:*Sets the race's Not Pushable flag to true.
 
:'''[[MakePushable - Race|MakePushable]]()'''
:*Clears the race's Not Pushable flag.
 
:'''Bool [[NoKnockdowns - Race|NoKnockdowns]]()'''
:*Returns whether the race can be knocked down or not.
 
:'''[[MakeNoKnockdowns - Race|MakeNoKnockdowns]]()'''
:*Sets the race's No Knockdowns flag to true.
 
:'''[[ClearNoKnockdowns - Race|ClearNoKnockdowns]]()'''
:*Clears the race's No Knockdowns flag.
 
:'''Bool [[NoCombatInWater - Race|NoCombatInWater]]()'''
:*Returns whether the race can fight while swimming or not.
 
:'''[[SetNoCombatInWater - Race|SetNoCombatInWater]]()'''
:*Sets the race's No Combat In Water flag to true.
 
:'''[[ClearNoCombatInWater - Race|ClearNoCombatInWater]]()'''
:*Clears the race's No Combat In Water flag.
 
:'''Bool [[AvoidsRoads - Race|AvoidsRoads]]()'''
:*Returns whether the race avoids roads or not.
 
:'''[[SetAvoidsRoads - Race|SetsAvoidsRoads]]()'''
:*Sets the race's Avoids Roads flag to true.
 
:'''[[ClearsAvoidsRoads - Race|ClearsAvoidsRoads]]()'''
:*Clears the race's Avoid Roads flag.
 
:'''Bool [[AllowPickpocket - Race|AllowPickpocket]]()'''
:*Returns whether the player can be Pickpocket this race.
 
:'''[[SetAllowPickpocket - Race|SetAllowPickpocket]]()'''
:*Sets the race's Allow Pickpocket flag to true.
 
:'''[[ClearAllowPickpocket - Race|ClearAllowPickpocket]]()'''
:*Clears the race's Allow Pickpocket flag.
 
:'''Bool [[AllowPCDialogue - Race|AllowPCDialogue]]()'''
:*Returns whether or not the player is allowed to talk to actors of this race.
 
:'''[[SetAllowPCDialogue - Race|SetAllowPCDialogue]]()'''
:*Sets the race's Allow PC Dialogue flag to true.
 
:'''[[ClearAllowPCDialogue - Race|ClearAllowPCDialogue]]()'''
:*Clears the race's Allow PC Dialogue flag.
 
:'''Bool [[CantOpenDoors - Race|CantOpenDoors]]()'''
:*Returns whether the race cannot open doors.
 
:'''[[SetCantOpenDoors - Race|SetCantOpenDoors]]()'''
:*Sets the race's Cant Open Doors flag to true.
 
:'''[[ClearCantOpenDoors - Race|ClearCantOpenDoors]]()'''
:*Clears the race's Cant Open Doors flag.
 
:'''Bool [[NoShadow - Race|NoShadow]]()'''
:*Returns whether the race casts a shadow or not.
 
:'''[[SetNoShadow - Race|SetNoShadow]]()'''
:*Sets the race's No Shadow flag to true.
 
:'''[[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 22: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