About this mod
F4SE based console commands that allows you to transfer items between containers and inventories. Can open containers and count inventory items too.
- Requirements
- Permissions and credits
A simple F4SE based mod that allows you to: 1. remotely open containers, inventories. 2. transfer items between containers, inventories. 3. count specific items in inventories.
Notes: originally, TransferItems was part of my "Directly Moddable Stored Weapons" mod. I decided to upload (an improved version of) it as a separate mod in case anyone's interested. (TransferItems wasn't really belong to a UI mod and mixing different features wasn't a good idea).
Custom Console Commands:
1. Open Container/Inventory:
Syntax: [CQF TRI_Quest OpenInventory InventoryRef]
Description: Opens the inventory of the reference whose RefID is InventoryRef. The RefID of InventoryRef can point to an Actor or a Container.
Example: [CQF TRI_Quest OpenInventory 2F1F] ==> Would open the inventory of Piper.
Example: [CQF TRI_Quest OpenInventory 250FE] ==> Would open the workshop container of Sanctuary Hills.
2. Count Specific Items in Inventory:
Syntax: [CQF TRI_Quest OpenInventory GetItemCount InventoryRef Item]
Description: Counts Items in the inventory of the reference whose RefID is InventoryRef. The RefID of InventoryRef can point to an Actor or a Container. Item can be a RefID or a BaseID of an inventory item.
Example: [CQF TRI_Quest GetItemCount 14 EEBED] ==> Would count how many Fragmentation Grenades (whose BaseID is EEBED) the Player (whose RefID is 14) has.
3. Transfer Items from one inventory to another:
Syntax: [CQF TRI_Quest TransferItems ObjectType SourceInventoryRef TargetInventoryRef CustomForm CustomFormCount]
Description: Transfers all items from SourceInventoryRef to TargetInventoryRef based on ObjectType. Optionally, instead of / in addition to the ObjectType based transfer, it can transfer a CustomForm (number of CustomForms to be transferred can be set by CustomFormCount).
Parameter descriptions:
[ObjectType] ==> Can be an integer. Each ObjectType (like weapon, armor, chems, etc.) has an index. Valid indexes: [1] ==> Weapons; [2] ==> Armors; [3] ==> Drinks; [4] ==> Chems; [5] ==> Junk; [6] ==> Ammo. [0] ==> no ObjectType, means it would only transfer CustomForm (if CustomForm was specified).
[SourceInventoryRef] ==> RefID of the source inventory (actor, container).
[TargetInventoryRef] ==> RefID of the target inventory (actor, container).
[CustomForm] ==> Optional. Can be BaseID or RefID of an object.
[CustomFormCount] ==> Optional. Can be an integer. Determines how many CustomForm will be transferred. If CustomForm is a BaseID and CustomFormCount wasn't specified or it was but with a value less than 0, TransferItems would transfer all instances of CustomForm.
Examples:
Example: [CQF TRI_Quest TransferItems 2 14 2F1F EEBED 3] ==> Would transfer all Armors from the Player's inventory to Piper's inventory. Also, it would transfer 3 Fragmentation Grenades too.
Explanation: Would transfer all Armors (because ObjectType = 2) from the Player's inventory (SourceInventoryRef = 14 which is the RefID of the Player) to Piper's inventory (TargetInventoryRef = 2F1F which is the RefID of Piper). Also, it would transfer 3 (CustomFormCount = 3) Fragmentation Grenades (CustomForm = EEBED which is their BaseID) too ("too" because ObjectType is not 0).
Example: [CQF TRI_Quest TransferItems 5 14 250FE] ==> Would transfer all junk items from the Player's inventory to Sanctuary Hills' workshop container.
Explanation: 5 = ObjectType (junk items), 14 = SourceInventoryRef (Player's RefID), 250FE = TargetInventoryRef (RefID of Sanctuary Hills' workshop container).
Example: [CQF TRI_Quest TransferItems 0 250FE 14 4822 -1] ==> Would transfer all 10mm Pistols from Sanctuary Hills' workshop container to the Player's inventory.
Explanation: 0 = no ObjectType (TransferItems can only transfer CustomForm), 250FE = SourceInventoryRef (RefID of Sanctuary Hills' workshop container), 14 = (Player's RefID), 4822 = CustomForm (4822 is the BaseID of 10mm Pistols), -1 = CustomFormCount (if less than 0, TransferItems transfers every CustomForm it finds in SourceInventoryRef).
Requirements:
F4SE.