Adventure Backpacks API Documentation
Updated a year agoAdventureBackpacksAPI
Contents
ABAPI type
Namespace
AdventureBackpacks.API
Summary
Adventure Backpacks API. Be sure to include the AdventureBackpacksAPI.dll as a dependency to your project.
CanOpenBackpack(player) method
Summary
Determines if the player is capable of currently opening the equipped backpack.
Returns
true or false
Parameters
Name | Type | Description |
---|---|---|
player | Player | Player, usually Player.m_localPlayer |
GetActiveBackpackStatusEffects() method
Summary
Retrieves the current Active Backpack StatusEffects running in the local players game.
Returns
HashSet of Status Effects.
Parameters
This method has no parameters.
GetBackpack(itemData) method
Summary
Returns Backpack object of the provided itemData. Operates similarly to a TryGet but with a nullable type.
Returns
Nullable Backpack Object. Check HasValue.
Parameters
Name | Type | Description |
---|---|---|
itemData | ItemDrop.ItemData | ItemDrop.ItemData object |
GetEquippedBackpack(player) method
Summary
Returns a Backpack object if the provided Player is currently wearing a backpack.
Returns
Nullable Backpack Object
Parameters
Name | Type | Description |
---|---|---|
player | Player | Player, usually Player.m_localPlayer |
IsBackpack(itemData) method
Summary
When provided with an ItemData object, will detect whether the Item is an Adventure Backpack or not.
Returns
true or false
Parameters
Name | Type | Description |
---|---|---|
itemData | ItemDrop.ItemData | This is the ItemDrop.ItemData object of the item. |
IsBackpackEquipped(player) method
Summary
Determines if the Player provided is currently wearing a backpack.
Returns
true or false
Parameters
Name | Type | Description |
---|---|---|
player | Player | Player, usually Player.m_localPlayer |
IsLoaded() method
Summary
Notifies if the ABAPI is active or not.
Returns
true of false
Parameters
This method has no parameters.
IsThisBackpackEquipped(player,itemData) method
Summary
Determines if the player provided is wearing the item provided and that it's a backpack.
Returns
true or false. If item provided is not a backpack, will return false.
Parameters
Name | Type | Description |
---|---|---|
player | Player | Player, usually Player.m_localPlayer |
itemData | ItemDrop.ItemData | Any ItemData |
OpenBackpack(player,gui) method
Summary
Method to activate the backpack on the local player's GUI and open it. Use in conjunction with CanOpenBackpack()
Parameters
Name | Type | Description |
---|---|---|
player | Player | Player, usually Player.m_localPlayer |
gui | InventoryGui | The instance of InventoryGui |
Backpack type
Namespace
AdventureBackpacks.API.ABAPI
Summary
Instanced Backpack Information
Definition constants
Summary
Definition of the Backpack item
Inventory constants
Summary
Inventory object of the configured backpack
ItemData constants
Summary
ItemData representative of the Backpack
Name constants
Summary
Backpack Name
BackpackBiomes type
Namespace
AdventureBackpacks.API
Summary
This is a Flags enum for determining Backpack Biomes. This is not representative of Heightmap.Biomes.
BlackForest constants
Summary
Black Forest Backpack Effects
Meadows constants
Summary
Meadows Backpack Effects
Mistlands constants
Summary
Mistlands Backpack Effects
Mountains constants
Summary
Mountains Backpack Effects
Necromancy constants
Summary
Special Biome configured for Cheb's Necromancy
None constants
Summary
None, no backpack effects are applied.
Plains constants
Summary
Plains Backpack Effects
Swamp constants
Summary
Swamp Backpack Effects
BackpackDefinition type
Namespace
AdventureBackpacks.API.ABAPI
Summary
Backpack Definition Settings
AssetFolderName constants
Summary
Folder containing the Asset Bundle
AssetName constants
Summary
Asset Bundle Name
BackpackBiome constants
Summary
Provides the configured biomes settings applied to the backpack.
BackpackSizeByQuality constants
Summary
Dictionary of Vector2's that contain the x and y sizing of the backpack at each Quality level' Dictionary key is the Item's Quality level. Dictionary value is the Vector2 object.
CarryBonus constants
Summary
Provides the additional carry weight bonus applied to backpacks.
EnableFreezing constants
Summary
Provides whether the wearer of the backpack will freeze or not.
ItemName constants
Summary
Item Name of the Backpack. Use the $_name localize token.
PrefabName constants
Summary
Prefab Name of the Backpack Asset
SpeedMod constants
Summary
Provides the Speed Modification that is applied on the backpack.
WeightMultiplier constants
Summary
Provides the configured weight multiplier that reduces the weight of the items in the backpack.
DropTarget type
Namespace
AdventureBackpacks.API.ABAPI
Summary
Configuration of Drop Target
Chance constants
Summary
Configured Drop Chance
Creature constants
Summary
Prefab name of creature
Max constants
Summary
Maximum number of items that can drop.
Min constants
Summary
Min number of items that can drop.