CreateItemEffect ​
Inherits: Effect < DatabaseResource < Resource
Creates items and adds them to target entity's inventory or drops them in the world
Properties ​
int | item_id | 0 |
int | quantity | 1 |
bool | validate_item_exists | true |
int | item_level | 0 |
Methods ​
void | specific_effect_logic( effect_instance: EffectInstance ) |
void | create_item( effect_instance: EffectInstance ) |
void | on_stack_reapply( effect_instance: EffectInstance, old_stack_count: int, new_stack_count: int ) |
String | get_editor_description() |
String | get_effect_description() |
bool | is_item_valid() |
void | set_item( new_item_id: int, new_quantity: int = 1 ) |
bool | is_one_off_application() |
Property descriptions ​
Item Configuration
int item_id = 0 ​
Item ID to create (0 = no item)
int quantity = 1 ​
Quantity to create (must be positive)
Target
bool validate_item_exists = true ​
Whether to validate that the item ID exists in the database
int item_level = 0 ​
For an item that is generated (it rolls or scales): its item level. 0 = the level of the entity that gets it
Method descriptions ​
void specific_effect_logic( effect_instance: EffectInstance ) ​
What the effect does to its target when it is applied.
void create_item( effect_instance: EffectInstance ) ​
Makes the item and puts it in the bag of the target, or drops it in the world.
void on_stack_reapply( effect_instance: EffectInstance, old_stack_count: int, new_stack_count: int ) ​
Handle effect-specific stacking logic
String get_editor_description() ​
A short text for the effect editor that says what the effect does.
String get_effect_description() ​
The text of the effect for tooltips, with its values filled in.
bool is_item_valid() ​
Check if the configured item ID exists in the database
void set_item( new_item_id: int, new_quantity: int = 1 ) ​
Set the item and quantity
bool is_one_off_application() ​
What this effect does it does once, when it is applied: a loaded save does not do it again