Difference between revisions of "Modding/Inventory"

From SDG Wiki
Jump to: navigation, search
Line 1: Line 1:
 
{{Ambox/Documentation}}
 
{{Ambox/Documentation}}
  
[[/Item Menu Builders]]
+
The '''Inventory''' composes of anything to do with items from their use to their storage.
 +
 
 +
=== Custom Item Data ===
 +
 
 +
Information about items and their stats are stored in UInventoryItemDataAssets. To create a custom item based on an existing item type would you create an instance of an item data asset in the content browser:
 +
 
 +
[[File:UE4Editor_2018-03-06_16-00-54.png]]
 +
 
 +
Which class you pick is based on what type of item you want to create. For example to create a backpack you would use UWearableInventoryItemDataAsset. If you can't find the class you're looking for you can open an existing item data asset similar to the one you want and view its type.
 +
 
 +
=== Custom Item Types ===
 +
 
 +
If the item you want to create is wildly different from anything currently in-game your best bet is to create a subclass of UInventoryItemDataAsset, or the closest existing item class. From there you can add extra information and behavior to your item, and override item data functions.
 +
 
 +
=== Advanced ===
 +
 
 +
* For custom item overlays, context menus or inspectors: [[/Item Menu Builders|Item Menu Builders]]

Revision as of 21:12, 6 March 2018

Template:Ambox/Documentation

The Inventory composes of anything to do with items from their use to their storage.

Custom Item Data

Information about items and their stats are stored in UInventoryItemDataAssets. To create a custom item based on an existing item type would you create an instance of an item data asset in the content browser:

File:UE4Editor 2018-03-06 16-00-54.png

Which class you pick is based on what type of item you want to create. For example to create a backpack you would use UWearableInventoryItemDataAsset. If you can't find the class you're looking for you can open an existing item data asset similar to the one you want and view its type.

Custom Item Types

If the item you want to create is wildly different from anything currently in-game your best bet is to create a subclass of UInventoryItemDataAsset, or the closest existing item class. From there you can add extra information and behavior to your item, and override item data functions.

Advanced