Difference between revisions of "Armor Script"

178 bytes added ,  16:25, 7 June 2018
imported>CraftySentinel
(→‎SKSE Member Functions: Should now contain all SKSE functions upto 1.06.16, re-arranged to mimic Definitions within source.)
imported>Quindraco
 
(5 intermediate revisions by 4 users not shown)
Line 1: Line 1:
[[Category:Scripting]]
'''Extends:''' [[Form Script]]
[[Category:Papyrus]]
[[Category:Script Objects]]
[[Category:SKSE]]
[[Category:SKSE Script Objects]]
 
'''Extends:''' [[Form Script (Papyrus)]]


Script for the manipulation of armor base objects.
Script for the manipulation of armor base objects.
Line 14: Line 8:
</source>
</source>


== Properties ==
== Member Functions ==
None
 
== Special Edition Exclusive Functions ==
 
'''Float [[GetWarmthRating - Armor|GetWarmthRating]]()'''
*Obtains the total "warmth rating" for the armor


== SKSE Properties ==
== SKSE Properties ==
*[[Slot Masks - Armor|List of Slot Masks]]
*[[Slot Masks - Armor|List of Slot Masks]]


== Global Functions ==
None


== SKSE Global Functions ==
== SKSE Global Functions ==


{|class="wikitable" width =100%
:'''Int [[GetMaskForSlot - Armor|GetMaskForSlot]](Int ''slot'')'''
!style="text-align:left;"|Function
:*Returns the slotmask for a single slot.
!style="text-align:left;"|Description
|-
|[[GetMaskForSlot - Armor|Int '''GetMaskForSlot'''(Int ''slot'')]]
|Returns the slotmask for a single slot.
|-
 
|}


== Member Functions ==
None


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


{|class="wikitable" width =100%
:;Int [[GetArmorRating - Armor|GetArmorRating]]()
!style="text-align:left;"|Function
:*Returns the armor rating for this armor.
!style="text-align:left;"|Description
:;Int [[GetArmorRating - Armor|GetAR]]()
|-
:*Alias for GetArmorRating().
|[[GetArmorRating - Armor|Int '''GetArmorRating'''()]]
:;[[SetArmorRating - Armor|SetArmorRating]](Int ''armorRating'')
|Returns the armor rating for this armor.
:*Sets the armor rating for this armor to the specified value.
|-
:;[[SetArmorRating - Armor|SetAR]](Int ''armorRating'')
:*Alias for SetArmorRating().
:;[[ModArmorRating - Armor|ModArmorRating]](Int ''modBy'')
:*Modifies the armor rating for this armor by the specified amount.
:;[[ModArmorRating - Armor|ModAR]](Int ''modBy'')
:*Alias for ModArmorRating().
:;String [[GetModelPath - Armor|GetModelPath]](Bool ''bFemalePath'')
:*Returns the file path for the nif file representing the world model of the armor.
:;[[SetModelPath - Armor|SetModelPath]](String ''path'', Bool ''bFemalePath'')
:*Sets the file path for the nif file representing the world model of the armor to the specified path.
:;String [[GetIconPath - Armor|GetIconPath]](Bool ''bFemalePath'')
:*Returns the file path for the nif file representing the icon for the armor in the inventory.
:;[[SetIconPath - Armor|SetIconPath]](String ''path'', Bool ''bFemalePath'')
:*Sets the file path for the nif file representing the icon for the armor in the inventory to the specified path.
:;String [[GetMessageIconPath - Armor|GetMessageIconPath]](Bool ''bFemalePath'')
:*Returns the file path for the nif file representing the message icon for the armor.
:;[[SetMessageIconPath - Armor|SetMessageIconPath]](String ''path'', Bool ''bFemalePath'')
:*Sets the file path for the nif file representing the message icon for the armor to the specified path.
:;Int [[GetWeightClass - Armor|GetWeightClass]]()
:*Returns the weight class of the armor: 0 for Light, 1 for Heavy, 2 for None.
:;[[SetWeightClass - Armor|SetWeightClass]](Int ''weightClass'')
:*Sets the weight class of the armor to the specified weight class.
:;Enchantment [[GetEnchantment - Armor|GetEnchantment]]()
:*Returns the Enchantment associated with the Armor
:;[[SetEnchantment - Armor|SetEnchantment]](Enchantment ''e'')
:*Set the Enchantment associated with the Armor
:;Int [[GetSlotMask - Armor|GetSlotMask]]()
:*Returns the slot mask for the armor.
:;[[SetSlotMask - Armor|SetSlotMask]](Int ''slotMask'')
:*Sets the slot mask for the armor.
:;Int [[AddSlotToMask - Armor|AddSlotToMask]](Int ''slotMask'')
:*Adds the specified slotmask to the armor and returns the new slot mask for the armor.
:;Int [[RemoveSlotFromMask - Armor|RemoveSlotFromMask]](Int ''slotMask'')
:*Removes the specified slotmask from the armor and returns the new slot mask for the armor.
:;Int [[GetNumArmorAddons - Armor|GetNumArmorAddons]]()
:*Returns the number of armor addons for this armor.
:;ArmorAddon [[GetNthArmorAddon - Armor|GetNthArmorAddon]](Int ''n'')
:*Returns the nth armor addon for this armor.


|[[GetArmorRating - Armor|Int '''GetAR'''()]]
===Convenience functions that check for a keyword.===
|Alias for GetArmorRating().
|-


|[[SetArmorRating - Armor|'''SetArmorRating'''(Int ''armorRating'')]]
All of these simply check for a keyword - they're one line functions defined as:
|Sets the armor rating for this armor to the specified value.
|-


|[[SetArmorRating - Armor|'''SetAR'''(Int ''armorRating'')]]
  bool Function funcName()
|Alias for SetArmorRating().
      return HasKeywordString("RelevantKeyword")
|-
  endFunction


|[[ModArmorRating - Armor|'''ModArmorRating'''(Int ''modBy'')]]
As a result, you can fill in your own for "missing" convenience functions (such as IsClothingNecklace for Amulets/Necklaces, and IsClothingCirclet for Circlets) by writing your own with the appropriate keywords (ClothingNecklace and ClothingCirclet, respectively).  As another result, these ''do not'' use the above functions (for example, IsLightArmor and IsHeavyArmor, unlike the GetWeightClass function above, ''check for a keyword'', rather than actually checking the underlying armor form's armor skill).  
|Modifies the armor rating for this armor by the specified amount.
|-


|[[ModArmorRating - Armor|'''ModAR'''(Int ''modBy'')]]
:;Bool [[IsLightArmor - Armor|IsLightArmor]]()
|Alias for ModArmorRating().
:*Is this light armor?
|-
:;Bool [[IsHeavyArmor - Armor|IsHeavyArmor]]()
:*Is this heavy armor?
:;Bool [[IsClothing - Armor|IsClothing]]()
:*Is this clothing?
:;Bool [[IsBoots - Armor|IsBoots]]()
:*Are these boots?
:;Bool [[IsCuirass - Armor|IsCuirass]]()
:*Is this a cuirass?
:;Bool [[IsGauntlets - Armor|IsGauntlets]]()
:*Are these gauntlets?
:;Bool [[IsHelmet - Armor|IsHelmet]]()
:*Is this a helmet?
:;Bool [[IsShield - Armor|IsShield]]()
:*Is this a shield?
:;Bool [[IsJewelry - Armor|IsJewelry]]()
:*Is this a piece of jewelry?
:;Bool [[IsClothingHead - Armor|IsClothingHead]]()
:*Is this a hat/circlet?
:;Bool [[IsClothingBody - Armor|IsClothingBody]]()
:*Is this a shirt/pants/dress?
:;Bool [[IsClothingFeet - Armor|IsClothingFeet]]()
:*Are these shoes?
:;Bool [[IsClothingHands - Armor|IsClothingHands]]()
:*Are these gloves?
:;Bool [[IsClothingRing - Armor|IsClothingRing]]()
:*Is this a ring?
:;Bool [[IsClothingRich - Armor|IsClothingRich]]()
:*Is this rich clothing?
:;Bool [[IsClothingPoor - Armor|IsClothingPoor]]()
:*Is this poor clothing?


|[[GetModelPath - Armor|String '''GetModelPath'''(Bool ''bFemalePath'')]]
[[Category:Scripting]]
|Returns the file path for the nif file representing the world model of the armor.
[[Category:Papyrus]]
|-
[[Category:Script Objects]]
 
[[Category:SKSE]]
|[[SetModelPath - Armor|'''SetModelPath'''(String ''path'', Bool ''bFemalePath'')]]
[[Category:SKSE Script Objects]]
|Sets the file path for the nif file representing the world model of the armor to the specified path.
|-
 
|[[GetIconPath - Armor|String '''GetIconPath'''(Bool ''bFemalePath'')]]
|Returns the file path for the nif file representing the icon for the armor in the inventory.
|-
 
|[[SetIconPath - Armor|'''SetIconPath'''(String ''path'', Bool ''bFemalePath'')]]
|Sets the file path for the nif file representing the icon for the armor in the inventory to the specified path.
|-
 
|[[GetMessageIconPath - Armor|String '''GetMessageIconPath'''(Bool ''bFemalePath'')]]
|Returns the file path for the nif file representing the message icon for the armor.
|-
 
|[[SetMessageIconPath - Armor|'''SetMessageIconPath'''(String ''path'', Bool ''bFemalePath'')]]
|Sets the file path for the nif file representing the message icon for the armor to the specified path.
|-
 
|[[GetWeightClass - Armor|Int '''GetWeightClass'''()]]
|Returns the weight class of the armor.
|-
 
|[[SetWeightClass - Armor|'''SetWeightClass'''(Int ''weightClass'')]]
|Sets the weight class of the armor to the specified weight class.
|-
 
|[[GetEnchantment - Armor|Enchantment '''GetEnchantment'''()]]
|Returns the Enchantment associated with the Armor
|-
 
|[[SetEnchantment - Armor|'''SetEnchantment'''(Enchantment ''e'')]]
|Set the Enchantment associated with the Armor
|-
 
|[[IsLightArmor - Armor|Bool '''IsLightArmor'''()]]
|Is this light armor?
|-
 
|[[IsHeavyArmor - Armor|Bool '''IsHeavyArmor'''()]]
|Is this heavy armor?
|-
 
|[[IsClothing - Armor|Bool '''IsClothing'''()]]
|Is this clothing?
|-
 
|[[IsBoots - Armor|Bool '''IsBoots'''()]]
|Are these boots?
|-
 
|[[IsCuirass - Armor|Bool '''IsCuirass'''()]]
|Is this a cuirass?
|-
 
|[[IsGauntlets - Armor|Bool '''IsGauntlets'''()]]
|Are these gauntlets?
|-
 
|[[IsHelmet - Armor|Bool '''IsHelmet'''()]]
|Is this a helmet?
|-
 
|[[IsShield - Armor|Bool '''IsShield'''()]]
|Is this a shield?
|-
 
|[[IsJewelry - Armor|Bool '''IsJewelry'''()]]
|Is this a piece of jewelry?
|-
 
|[[IsClothingHead - Armor|Bool '''IsClothingHead'''()]]
|Is this a hat/circlet?
|-
 
|[[IsClothingBody - Armor|Bool '''IsClothingBody'''()]]
|Is this a shirt/pants/dress?
|-
 
|[[IsClothingFeet - Armor|Bool '''IsClothingFeet'''()]]
|Are these shoes?
|-
 
|[[IsClothingHands - Armor|Bool '''IsClothingHands'''()]]
|Are these gloves?
|-
 
|[[IsClothingRing - Armor|Bool '''IsClothingRing'''()]]
|Is this a ring?
|-
 
|[[IsClothingRich - Armor|Bool '''IsClothingRich'''()]]
|Is this rich clothing?
|-
 
|[[IsClothingPoor - Armor|Bool '''IsClothingPoor'''()]]
|Is this poor clothing?
|-
 
|[[GetSlotMask - Armor|Int '''GetSlotMask'''()]]
|Returns the slot mask for the armor.
|-
 
|[[SetSlotMask - Armor|'''SetSlotMask'''(Int ''slotMask'')]]
|Sets the slot mask for the armor.
|-
 
|[[AddSlotToMask - Armor|Int '''AddSlotToMask'''(Int ''slotMask'')]]
|Adds the specified slotmask to the armor and returns the new slot mask for the armor.
|-
 
|[[RemoveSlotFromMask - Armor|Int '''RemoveSlotFromMask'''(Int ''slotMask'')]]
|Removes the specified slotmask from the armor and returns the new slot mask for the armor.
|-
 
|[[GetMaskForSlot - Armor|Int '''GetMaskForSlot'''(Int ''slot'')]]
|Calculates and Returns the Slot Mask value for the specified slot.
|-
 
|[[GetNumArmorAddons - Armor|Int '''GetNumArmorAddons'''()]]
|Returns the number of armor addons for this armor.
|-
 
|[[GetNthArmorAddon - Armor|ArmorAddon '''GetNthArmorAddon'''(Int ''n'')]]
|Returns the nth armor addon for this armor.
|-
 
|}
 
== Events ==
None
Anonymous user