NGUI: Next-Gen UI kit  3.7.2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Macros
InvBaseItem Class Reference

Inventory System – Base Item. Note that it would be incredibly tedious to create all items by hand, Warcraft style. It's a lot more straightforward to create all items to be of the same level as far as stats go, then specify an appropriate level range for the item where it will appear. Effective item stats can then be calculated by lowering the base stats by an appropriate amount. Add a quality modifier, and you have additional variety, Terraria 1.1 style. More...

Public Types

enum  Slot {
  Slot.None, Slot.Weapon, Slot.Shield, Slot.Body,
  Slot.Shoulders, Slot.Bracers, Slot.Boots, Slot.Trinket,
  Slot._LastDoNotUse
}
 

Public Attributes

int id16
 16-bit item ID, generated by the system. Not to be confused with a 32-bit item ID, which actually contains the ID of the database as its prefix. More...
 
string name
 Name of this item. More...
 
string description
 This item's custom description. More...
 
Slot slot = Slot.None
 Slot that this item belongs to. More...
 
int minItemLevel = 1
 Minimum and maximum allowed level for this item. When random loot gets generated, only items within appropriate level should be considered. More...
 
int maxItemLevel = 50
 
List< InvStatstats = new List<InvStat>()
 And and all base stats this item may have at a maximum level (50). Actual object's stats are calculated based on item's level and quality. More...
 
GameObject attachment
 Game Object that will be created and attached to the specified slot on the body. This should typically be a prefab with a renderer component, such as a sword, a bracer, shield, etc. More...
 
Color color = Color.white
 Object's main material color. More...
 
UIAtlas iconAtlas
 Atlas used for the item's icon. More...
 
string iconName = ""
 Name of the icon's sprite within the atlas. More...
 

Detailed Description

Inventory System – Base Item. Note that it would be incredibly tedious to create all items by hand, Warcraft style. It's a lot more straightforward to create all items to be of the same level as far as stats go, then specify an appropriate level range for the item where it will appear. Effective item stats can then be calculated by lowering the base stats by an appropriate amount. Add a quality modifier, and you have additional variety, Terraria 1.1 style.

Member Enumeration Documentation

Enumerator
None 
Weapon 
Shield 
Body 
Shoulders 
Bracers 
Boots 
Trinket 
_LastDoNotUse 

Member Data Documentation

GameObject InvBaseItem.attachment

Game Object that will be created and attached to the specified slot on the body. This should typically be a prefab with a renderer component, such as a sword, a bracer, shield, etc.

Color InvBaseItem.color = Color.white

Object's main material color.

string InvBaseItem.description

This item's custom description.

UIAtlas InvBaseItem.iconAtlas

Atlas used for the item's icon.

string InvBaseItem.iconName = ""

Name of the icon's sprite within the atlas.

int InvBaseItem.id16

16-bit item ID, generated by the system. Not to be confused with a 32-bit item ID, which actually contains the ID of the database as its prefix.

int InvBaseItem.maxItemLevel = 50
int InvBaseItem.minItemLevel = 1

Minimum and maximum allowed level for this item. When random loot gets generated, only items within appropriate level should be considered.

string InvBaseItem.name

Name of this item.

Slot InvBaseItem.slot = Slot.None

Slot that this item belongs to.

List<InvStat> InvBaseItem.stats = new List<InvStat>()

And and all base stats this item may have at a maximum level (50). Actual object's stats are calculated based on item's level and quality.


The documentation for this class was generated from the following file: