0 of 0

File information

Last updated

Original upload

Created by

ThirdEyeSqueegee

Uploaded by

ThirdEye3301

Virus scan

Safe to use

About this mod

Add/remove items and leveled lists to/from containers at runtime à la SPID

Requirements
Permissions and credits
Changelogs
Container Item Distributor

Add/remove items and leveled lists to/from containers at runtime à la SPID. Uses distributions defined in _CID.ini files found in the root folders of mods, similar to other distributors.

NOTE: A container is any object whose inventory can be accessed by the player--this includes chests, end tables, NPCs, etc.

When reporting bugs, please make sure you enable debug logging in ContainerItemDistributor.ini, replicate the bug, and post the debug log along with your report.

Usage
_CID.ini files consist of key-value pairs where the key is the FormID and Plugin Name OR EditorID of the container to distribute to and the value is a Distribution String.

Distribution String:
  • <DISTR> := <identifier>|<count>[|<location>][@<location_keyword>][?<chance>]
    • Tokens in brackets are optional
  • <identifier> := FormID~PluginName OR EditorID
    • FormID~PluginName example: 0x3301~Skyrim.esm
  • <count> := a natural number
  • <location> := FormID~PluginName OR EditorID (optional)
  • <location_keyword> := FormID~PluginName OR EditorID (optional)
  • <chance> := a natural number (optional, defaults to 100 if not specified)

NOTE:
  • An optional <location> token can be used to skip containers whose current location doesn't match the given location
  • An optional <location_keyword> token can be used to skip containers whose current location doesn't have the given keyword

Distribution strings can be used to define ADD, REMOVE, and REMOVE ALL statements:

ADD syntax:
  • <ADD> := <DISTR>
    • Example: 0x9e2af~Skyrim.esm|50
    • Example: 0x9e2af~Skyrim.esm|50?50 will add 50 Spell Tomes of Healing with 50% probability to all instances of the given container
    • Example: 0x9e2af~Skyrim.esm|50|RiftenMistveilKeepLocation?50 will add 50 Spell Tomes of Healing with 50% probability to all instances of the given container that are in RiftenMistveilKeepLocation

REMOVE syntax:
  • <REMOVE> := -<DISTR>
    • A leading - identifies a REMOVE statement
    • Example: -BearCavePelt|50
    • Example: -BearCavePelt|50@LocTypeStore?75 will remove 50 BearCavePelt from all instances of the given container with 75% probability if their current location has the LocTypeStore keyword

REMOVE ALL syntax:
  • <REMOVE ALL> := -<identifier>[|location][@location_keyword][?<chance>]
    • Excluding a count will cause CID to remove all of the given item from all instances of the given container
    • Example: -BearCavePelt

INI Syntax:
  • <identifier> = <ADD>
  • <identifier> = <REMOVE>
  • <identifier> = <REMOVE ALL>

Where <identifier> to the left of the equals sign is the FormID and Plugin Name or EditorID of the container to distribute to. Note that you may specify both base containers as well as container references on the left side of the equals sign.

Further notes:
  • REMOVE and REMOVE ALL statements do not work with leveled lists, as leveled lists are resolved and their items added to containers while loading into the game. As a workaround, you may supply REMOVE or REMOVE ALL statements for items found in the leveled lists you'd like to remove
  • _CID.ini files must begin with [General] at the top of the file
  • Comma-separated lists of values are not supported. Please provide only one value per key (you may include multiple instances of the same key to distribute different items to the same container)

Source code: GitHub

Built with CommonLibSSE NG. Should work for all versions of Skyrim (SE, AE, and VR).

Compatibility
  • Compatible with everything
  • Always safe to install/update/uninstall

Check out my other mods

Credits
  • powerofthree for powerofthree
  • CharmedBaryon, fudgyduff, and everyone involved in Skyrim reverse engineering
  • colinswrath for fielding my dumbass questions about SKSE development
  • Skyrim RE Discord server for helping with all sorts of stuff