Skip to content

Randomized Items

Justin Jacobs edited this page Feb 26, 2026 · 1 revision

Flare will have support for randomized items starting with version 1.15. New items can be created that have random quality, level, and bonuses.

Example

All random items start with a base item. Our example dagger will have a random level, so we use level-scaled values for damage, price, etc. See the Attribute Reference for a description of level_scaled_value.

The key property here is randomizer_def, which will define how the item will be modified.

items/items.txt

[item]
id=1
name=Dagger
quality=normal
item_type=main
equip_flags=melee
icon=96
soundfx=soundfx/inventory/inventory_metal.ogg
gfx=dagger
loot_animation=animations/loot/dagger.txt
level=1
price=200,item_level:200
dmg_min=melee,base:5:15,item_level:3
dmg_max=melee,base:10:15,item_level:3
requires_stat=physical,base:-4:1,item_level:2,min:0
randomizer_def=items/random/example.txt

items/random/example.txt

The randomizer definition is split into two parts: options and bonuses. Options define the quality, level, and number of bonuses. When generating an item, a random roll is done to pick one of the options. Then, if an item has bonuses, they will be randomly selected from the bonuses section.

[option]
chance=100
quality=high
bonus_count=1,1
level_src=hero
level_range=0,0

[option]
chance=5
quality=epic
bonus_count=1,2
level_src=hero
level_range=0,1

[option]
chance=0.5
quality=rare
bonus_count=2,2
level_src=hero
level_range=0,2

[bonuses]
bonus=accuracy,base:10:15,item_level:1:2
bonus=crit,base:1:5
bonus=dmg_fire_min,base:1:5,item_level:1:1
bonus=dmg_fire_max,base:5:10,item_level:1:3
bonus_power_level=7,base:1

Storage

Randomly generated items that exist in a player's inventory or stash are saved in <FLARE SAVE DIRECTORY>/<SAVE PREFIX>/extended_items.txt

Clone this wiki locally