Difference between revisions of "Armor Script"

Jump to navigation Jump to search
551 bytes added ,  14:21, 4 June 2018
imported>Texashokies
(Added a section to clarify that the function was special edition exclusive, as well as moved the function into the section.)
imported>Quindraco
Line 27: Line 27:
== SKSE Member Functions ==
== SKSE Member Functions ==


:'''Int [[GetArmorRating - Armor|GetArmorRating]]()'''
:;Int [[GetArmorRating - Armor|GetArmorRating]]()
:*Returns the armor rating for this armor.
:*Returns the armor rating for this armor.
 
:;Int [[GetArmorRating - Armor|GetAR]]()
:'''Int [[GetArmorRating - Armor|GetAR]]()'''
:*Alias for GetArmorRating().
:*Alias for GetArmorRating().
 
:;[[SetArmorRating - Armor|SetArmorRating]](Int ''armorRating'')
:'''[[SetArmorRating - Armor|SetArmorRating]](Int ''armorRating'')'''
:*Sets the armor rating for this armor to the specified value.
:*Sets the armor rating for this armor to the specified value.
 
:;[[SetArmorRating - Armor|SetAR]](Int ''armorRating'')
:'''[[SetArmorRating - Armor|SetAR]](Int ''armorRating'')'''
:*Alias for SetArmorRating().
:*Alias for SetArmorRating().
 
:;[[ModArmorRating - Armor|ModArmorRating]](Int ''modBy'')
:'''[[ModArmorRating - Armor|ModArmorRating]](Int ''modBy'')'''
:*Modifies the armor rating for this armor by the specified amount.
:*Modifies the armor rating for this armor by the specified amount.
 
:;[[ModArmorRating - Armor|ModAR]](Int ''modBy'')
:'''[[ModArmorRating - Armor|ModAR]](Int ''modBy'')'''
:*Alias for ModArmorRating().
:*Alias for ModArmorRating().
 
:;String [[GetModelPath - Armor|GetModelPath]](Bool ''bFemalePath'')
:'''String [[GetModelPath - Armor|GetModelPath]](Bool ''bFemalePath'')'''
:*Returns the file path for the nif file representing the world model of the armor.
:*Returns the file path for the nif file representing the world model of the armor.
 
:;[[SetModelPath - Armor|SetModelPath]](String ''path'', Bool ''bFemalePath'')
:'''[[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.
:*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'')
:'''String [[GetIconPath - Armor|GetIconPath]](Bool ''bFemalePath'')'''
:*Returns the file path for the nif file representing the icon for the armor in the inventory.
:*Returns the file path for the nif file representing the icon for the armor in the inventory.
 
:;[[SetIconPath - Armor|SetIconPath]](String ''path'', Bool ''bFemalePath'')
:'''[[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.
:*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'')
:'''String [[GetMessageIconPath - Armor|GetMessageIconPath]](Bool ''bFemalePath'')'''
:*Returns the file path for the nif file representing the message icon for the armor.
:*Returns the file path for the nif file representing the message icon for the armor.
 
:;[[SetMessageIconPath - Armor|SetMessageIconPath]](String ''path'', Bool ''bFemalePath'')
:'''[[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.
:*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, 0 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.


:'''Int [[GetWeightClass - Armor|GetWeightClass]]()'''
===Convenience functions that check for a keyword.===
:*Returns the weight class of the armor.


:'''[[SetWeightClass - Armor|SetWeightClass]](Int ''weightClass'')'''
All of these simply check for a keyword - they're one line functions defined as:
:*Sets the weight class of the armor to the specified weight class.


:'''Enchantment [[GetEnchantment - Armor|GetEnchantment]]()'''
  bool Function funcName()
:*Returns the Enchantment associated with the Armor
      return HasKeywordString("RelevantKeyword")
  endFunction


:'''[[SetEnchantment - Armor|SetEnchantment]](Enchantment ''e'')'''
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).
:*Set the Enchantment associated with the Armor


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


[[Category:Scripting]]
[[Category:Scripting]]
Anonymous user

Navigation menu