About this mod
An SKSE Plugin, which adds functions related to inventories to papyrus.
- Requirements
- Permissions and credits
- Changelogs
- Donations
This is an SKSE Plugin, which adds new native functions to papyrus.
Requirements:
-SKSE 1.7.0 or newer
Added Functions:
Related to inventorys:
- GetNumItemsWithKeyword(ObjectReference objRef, Keyword key)
- GetNthFormWithKeyword(ObjectReference objRef, Keyword key, int KeywordIndex)
- GetTotalNumItemsWithKeyword(ObjectReference objRef, Keyword key)
- GetTotalNumItems(ObjectReference objRef)
Related to poisons:
- Worn_PoisonWeapon(Actor akActor, int handSlot, Potion poison, int Charges)
- Worn_IsWeaponPoisoned(Actor akActor, int handSlot)
- Worn_GetPoison(Actor akActor, int handSlot)
- Worn_GetPoisonCharges(Actor akActor, int handSlot)
- Worn_SetPoisonCharges(Actor akActor, int handSlot, int Charges = 1)
- SetPoisonCharges(ObjectReference objRef, int Charges = 1)
- PoisonWeapon(ObjectReference objRef, Potion poison, int Charges)
- GetPoison(ObjectReference objRef)
- SetPoisonCharge(ObjectReference objRef, int Charges)
- IsWeaponPoisoned(ObjectReference objRef)
Example code:
import _Q2C_Functions
ObjectReference Property PlayerRef Auto
Keyword Property VendorItemPotion Auto
Function ReWeightPotions()
int PotionIndex = GetNumItemsWithKeyword(PlayerRef, VendorItemPotion)
While(PotionIndex > 0)
PotionIndex -= 1
Form potion = GetNthFormWithKeyword(PlayerRef, VendorItemPotion, PotionIndex)
potion.SetWeight(0.0)
endWhile
endFunction
Feel free to package this plugin with your own mods and use it for your own projects.
Please just mention me in a footnote somewhere.
All Credits are going to the SKSE Team!