TransactionSystem

Documents the TransactionSystem class and its functions.

NOT DOCUMENTED

We currently don't have information on how these functions work. They are being documented here for visibility.

Invoking TransactionSystem

To invoke the transaction system, use the following Global function:

ts = Game.GetTransactionSystem()

Sub-functions

AddItemToSlot

AddItemToSlot(obj : ref:GameObject, slotID : TweakDBID, itemID : ItemID, optional highPriority : Bool, optional itemObject : wref:ItemObject, optional plane : ERenderingPlane, optional keepWorldTransform : Bool, optional ignoreRestrictions : Bool) : Bool;

AddPart

AddPart(obj : ref:GameObject, itemID : ItemID, partItemID : ItemID, optional slotID : TweakDBID) : Bool;

CalculateTemporaryStatsBundle

CalculateTemporaryStatsBundle(obj : ref:GameObject, rootPartID : ItemID, replacementPartID : ItemID, slotIdForReplacement : TweakDBID) : ref:StatsBundleHandler;

CanItemBeActiveInSlot

CanItemBeActiveInSlot(obj : ref:GameObject, slotID : TweakDBID, itemID : ItemID) : Bool;

CanPlaceItemInSlot

CanPlaceItemInSlot(obj : ref:GameObject, slotID : TweakDBID, itemID : ItemID) : Bool;

ChangeItemAppearance

ChangeItemAppearance(obj : ref:GameObject, itemID : ItemID, newAppearanceName : CName, optional useSuffixes : Bool);

ChangeItemToSlot

ChangeItemToSlot(obj : ref:GameObject, newSlotID : TweakDBID, itemID : ItemID) : Bool;

ClearAllSlots

ClearAllSlots(obj : ref:GameObject) : Bool;

CycleActiveItemInSlot

CycleActiveItemInSlot(obj : ref:GameObject, slotID : TweakDBID) : ItemID;

EquipActiveItemInSlot

EquipActiveItemInSlot(obj : ref:GameObject, slotID : TweakDBID, highPriority : Bool) : Bool;

ForcePartInSlot

ForcePartInSlot(obj : ref:GameObject, itemID : ItemID, partItemID : ItemID, slotID : TweakDBID) : Bool;

GetActiveItemInSlot

GetActiveItemInSlot(obj : ref:GameObject, slotID : TweakDBID) : ItemID;

GetAvailableSlotsOnItem

GetAvailableSlotsOnItem(obj : ref:GameObject, itemID : ItemID, out availableSlots : array:TweakDBID);

GetEmptySlotsOnItem

GetEmptySlotsOnItem(obj : ref:GameObject, itemID : ItemID, out emptySlots : array:TweakDBID);

GetItemAppearance

GetItemAppearance(obj : ref:GameObject, itemID : ItemID) : CName;

GetItemData

GetItemData(obj : ref:GameObject, itemID : ItemID) : wref:gameItemData;

GetItemDataByOwnerEntityId

GetItemDataByOwnerEntityId(id : EntityID, itemID : ItemID) : wref:gameItemData;

GetItemInSlot

GetItemInSlot(obj : ref:GameObject, slotID : TweakDBID) : ref:ItemObject;

GetItemInSlotByItemID

GetItemInSlotByItemID(obj : ref:GameObject, itemID : ItemID) : ref:ItemObject;

GetItemList

GetItemList(obj : ref:GameObject, out itemList : array:wref:gameItemData) : Bool;

GetItemListByTag

GetItemListByTag(obj : ref:GameObject, tag : CName, out itemList : array:wref:gameItemData) : Bool;

GetItemListByTags

GetItemListByTags(obj : ref:GameObject, tagList : array:CName, out itemList : array:wref:gameItemData) : Bool;

GetItemQuantity

GetItemQuantity(obj : ref:GameObject, itemID : ItemID) : Int32;

GetItemQuantityByTag

GetItemQuantityByTag(obj : ref:GameObject, tag : CName) : Int32;

GetItemsInstallableInSlot

GetItemsInstallableInSlot(obj : ref:GameObject, itemID : ItemID, slotID : TweakDBID, out installableItems : array:ItemID);

GetNextActiveItemInSlot

GetNextActiveItemInSlot(obj : ref:GameObject, slotID : TweakDBID) : ItemID;

GetNumItems

GetNumItems(obj : ref:GameObject, optional tagFilters : array:CName) : Int32;

GetTotalItemQuantity

GetTotalItemQuantity(obj : ref:GameObject) : Int32;

GetUsedSlotsOnItem

GetUsedSlotsOnItem(obj : ref:GameObject, itemID : ItemID, out used : array:TweakDBID);

GiveItem

GiveItem(obj : ref:GameObject, itemID : ItemID, amount : Int32) : Bool;

GiveItemByItemArrayQuery

GiveItemByItemArrayQuery(obj : ref:GameObject, itemQueryTDBID : TweakDBID, optional seed : Uint64) : Bool;

GiveItemByItemData

GiveItemByItemData(obj : ref:GameObject, itemData : ref:gameItemData) : Bool;

GiveItemByItemQuery

GiveItemByItemQuery(obj : ref:GameObject, itemQueryTDBID : TweakDBID, optional amount : Uint32, optional seed : Uint64, optional telemetryLogSource : String) : Bool;

GiveItemByTDBID

GiveItemByTDBID(obj : ref:GameObject, tdbID : TweakDBID, amount : Int32) : Bool;

GiveItems

GiveItems(obj : ref:GameObject, itemList : array:ItemModParams) : Bool;

GiveMoney

GiveMoney(source : ref:GameObject, target : ref:GameObject, amount : Int32, currency : CName) : Bool;

GivePreviewItemByItemData

GivePreviewItemByItemData(obj : ref:GameObject, itemData : ref:gameItemData) : Bool;

HasItem

HasItem(obj : ref:GameObject, itemID : ItemID) : Bool;

HasItemDataInSlot

HasItemDataInSlot(obj : ref:GameObject, slotID : TweakDBID, itemID : ItemID) : Bool;

HasItemInAnySlot

HasItemInAnySlot(obj : ref:GameObject, itemID : ItemID) : Bool;

HasItemInSlot

HasItemInSlot(obj : ref:GameObject, slotID : TweakDBID, itemID : ItemID) : Bool;

HasTag

HasTag(obj : ref:GameObject, tag : CName, itemID : ItemID) : Bool;

InitializeSlots

InitializeSlots(obj : ref:GameObject, out slotIDList : array:TweakDBID) : Bool;

IsSlotEmpty

IsSlotEmpty(obj : ref:GameObject, slotID : TweakDBID) : Bool;

IsSlotEmptySpawningItem

IsSlotEmptySpawningItem(obj : ref:GameObject, slotID : TweakDBID) : Bool;

MatchVisualTag

MatchVisualTag(entity : ref:Entity, tag : CName, optional matchUsingDefaultAppearance : Bool) : Bool;

OnItemAddedToEquipmentSlot

OnItemAddedToEquipmentSlot(owner : ref:GameObject, itemID : ItemID) : Bool;

OnItemRemovedFromEquipmentSlot

OnItemRemovedFromEquipmentSlot(owner : ref:GameObject, itemID : ItemID) : Bool;

PrefetchItemAppearance

PrefetchItemAppearance(obj : ref:GameObject, itemID : ItemID, newAppearanceName : CName);

RefreshAttachment

RefreshAttachment(obj : ref:GameObject, out slotID : TweakDBID, optional keepWorldTransform : Bool);

RegisterAttachmentSlotListener

RegisterAttachmentSlotListener(owner : ref:GameObject, callback : ref:AttachmentSlotsScriptCallback) : ref:AttachmentSlotsScriptListener;

RegisterInventoryListener

RegisterInventoryListener(owner : ref:GameObject, callback : ref:InventoryScriptCallback) : ref:InventoryScriptListener;

ReinitializeStatsOnEntityItems

ReinitializeStatsOnEntityItems(obj : ref:GameObject);

ReleaseItem

ReleaseItem(owner : ref:GameObject, item : wref:ItemObject) : Bool;

RemoveAllItems

RemoveAllItems(obj : ref:GameObject) : Bool;

RemoveItem

RemoveItem(obj : ref:GameObject, itemID : ItemID, amount : Int32) : Bool;

RemoveItemByTDBID

RemoveItemByTDBID(obj : ref:GameObject, tdbID : TweakDBID, amount : Int32) : Bool;

RemoveItemFromAnySlot

RemoveItemFromAnySlot(obj : ref:GameObject, itemID : ItemID, optional shouldDestroyEntity : Bool, optional keepWorldTransform : Bool) : Bool;

RemoveItemFromSlot

RemoveItemFromSlot(obj : ref:GameObject, slotID : TweakDBID, optional shouldDestroyEntity : Bool, optional keepWorldTransform : Bool, optional skipSendAnimEquipEvents : Bool) : Bool;

RemoveMoney

RemoveMoney(obj : ref:GameObject, amount : Int32, currency : CName) : Bool;

RemovePart

RemovePart(obj : ref:GameObject, itemID : ItemID, slotID : TweakDBID, optional shouldUpdateEntity : Bool) : ItemID;

ResetItemAppearance

ResetItemAppearance(obj : ref:GameObject, itemID : ItemID);

SellItem

SellItem(seller : ref:GameObject, buyer : ref:GameObject, itemID : ItemID, amount : Int32, currency : CName, optional price : Int32) : Bool;

SellItemStrict

SellItemStrict(seller : ref:GameObject, buyer : ref:GameObject, itemID : ItemID, amount : Int32, currency : CName, optional price : Int32) : Bool;

SetActiveItemInSlot

SetActiveItemInSlot(obj : ref:GameObject, slotID : TweakDBID, itemID : ItemID) : Bool;

TakeItem

TakeItem(newOwner : ref:GameObject, itemToLoot : wref:ItemObject) : Bool;

ThrowItem

ThrowItem(owner : ref:GameObject, item : wref:GameObject, setUpAndLaunchEvent : ref:gameprojectileSetUpAndLaunchEvent) : Bool;

TransferAllItems

TransferAllItems(source : ref:GameObject, target : ref:GameObject) : Bool;

TransferItem

TransferItem(source : ref:GameObject, target : ref:GameObject, itemID : ItemID, amount : Int32) : Bool;

UnregisterAttachmentSlotListener

UnregisterAttachmentSlotListener(owner : ref:GameObject, listener : ref:AttachmentSlotsScriptListener);

UnregisterInventoryListener

UnregisterInventoryListener(owner : ref:GameObject, listener : ref:InventoryScriptListener);

Last updated