Enchantment
Scripting with the Enchantment struct.
The Enchantment
struct is a data container that stores enchantment data.
Fields & Properties
itemID
The ID of the item that this enchantment belongs to.
int
public
customObject
A custom object for any purpose.
Object
public
cost
The amount this enchantment will cost.
Currency
public
combineAmount
The amount of times that this enchantment was combined with an identical enchantment (relevant when the enchantment is applied to an enchantable item).
int
public
displayText
The text that will be displayed in the hover details when this enchantment is used on an item.
string
public
combinable
If this enchantment can be combined with an identical enchantment. Enchantments are combined when multiple identical enchantments (enchantments with the same item ID) are applied to a single item.
bool
public
singleValue
The value provided by a single enchantment.
float
public
CombinedValue
The total combined value.
float
public
DisplayTextWithValue
Returns the display text with the combined value prepended to it.
string
public
Creating Enchantments
Last updated