Assigning Data - Exit-9B/InventoryInjector GitHub Wiki

Each rule has an assign section that specifies the data to assign to the objects corresponding to the rule's match specification.

Rules are evaluated in 2 passes. The first pass is for assigning informational data. Because SkyUI already has built-in logic for associating data with icons, its icon processing functions are re-run when data is changed. Then, the second pass is run for assigning icon data. This makes it possible to override SkyUI's icon selections.

Informational Data

subType

This is a special field used by SkyUI to assign icons as well as the description in the TYPE column (subTypeDisplay). I4 allows you to assign this field in order to automatically set the corresponding values in the other fields. The possible values depend on whether the formType is Armor, Ammo, Weapon, SoulGem, Potion, Book, or MiscItem.

Armor

  • Head
  • Hair
  • LongHair
  • Body
  • Forearms
  • Hands
  • Shield
  • Calves
  • Feet
  • Circlet
  • Amulet
  • Ears
  • Ring
  • Tail

Ammo

  • Arrow
  • Bolt

Weapon

  • Melee
  • Sword
  • Dagger
  • WarAxe
  • Mace
  • Greatsword
  • Battleaxe
  • Warhammer
  • Bow
  • Crossbow
  • Staff
  • Pickaxe
  • WoodAxe

Soul Gem

  • None
  • Petty
  • Lesser
  • Common
  • Greater
  • Grand
  • Azura

Potion

  • Health
  • HealRate
  • HealRateMult
  • Magicka
  • MagickaRate
  • MagickaRateMult
  • Stamina
  • StaminaRate
  • StaminaRateMult
  • FireResist
  • ElectricResist
  • FrostResist
  • Potion
  • Drink
  • Food
  • Poison

Book

  • SpellTome
  • Note
  • Recipe

Misc Item

  • Gem
  • DragonClaw
  • Artifact
  • Leather
  • LeatherStrips
  • Hide
  • Remains
  • Ingot
  • Tool
  • ChildrensClothes
  • Toy
  • Firewood
  • Fastener
  • WeaponRack
  • Shelf
  • Furniture
  • Exterior
  • Container
  • HousePart
  • Clutter
  • Lockpick
  • Gold

subTypeDisplay

This field corresponds to the TYPE column in the UI.

Example:

"assign": {
  "subTypeDisplay": "$Backpack"
}

weightClass

This field is used by SkyUI to assign icons as well as the CLASS column (weightClassDisplay) for the Armor formType. I4 allows you to assign this field in order to automatically set the corresponding values in the other fields.

Values:

  • Light
  • Heavy
  • Clothing
  • Jewelry
  • Other

Example:

"assign": {
  "subType": "Body",
  "weightClass": "Clothing"
}

Icon Data

The supported fields for icons are:

  • iconSource - Path to a SWF movie in the Interface directory containing icons. The default source is skyui/icons_item_psychosteve.swf. An icon movie should have a labeled frame in the timeline where each icon is visible.
  • iconLabel - A frame label corresponding to the icon that should be displayed.
  • iconColor - A hexcode for a color that should be used for the icon.

Example:

"customData": {
  "iconSource": "I4IconAddon/icons.swf",
  "iconLabel": "clothing_backpack",
  "iconColor": "#EDDA87"
}