canary/data/scripts/actions/items
LeoTK 1efd58f6c4
feat(reward-bags): rebalance drop weights and add multi-open test mode (#3915)
Reward-bag drops are now controlled with per-item weights, allowing finer
difficulty tuning per reward entry while preserving legacy chance fields.

What changed:
- Implement weighted selection per item inside reward bags.
- Keep backward compatibility with legacy `chance` definitions and emit a
  one-time warning when legacy format is used.
- Add admin test mode to simulate multiple openings from a single bag open,
  with aggregated console output for drop distribution validation.
- Improve item delivery flow:
  - try backpack first;
  - fallback to store inbox when inventory cannot receive the reward;
  - improve logs and player-facing messages for no-room/inbox delivery cases.

Why:
- Gives better control over real drop difficulty for each individual item.
- Enables fast balancing/verification of target rates through repeatable
  simulations without manual open spam.
2026-05-09 11:01:15 -03:00
..
anniversary_balloons.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
anniversary_reward_boxes.lua refactor: anniversary reward boxes to core (#2356) 2024-03-02 09:54:10 -03:00
banana_chocolate_shake.lua refactor: jean pierre foods (#2320) 2024-02-27 14:10:41 -03:00
bed_modification_kits.lua fix: imbuement shrine and time guardian script errors (#2877) 2024-12-31 15:19:26 -03:00
bladespark_figurine.lua enhancement: add functionality to items used to obtain the second familiar (#3662) 2025-08-27 10:53:57 -03:00
blessed_steak.lua refactor: jean pierre foods (#2320) 2024-02-27 14:10:41 -03:00
blessing_charms.lua refactor: move blessing bytes to cpp (#3064) 2024-11-13 00:02:48 -03:00
blueberry_bush.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
blueberry_cupcake.lua feat: cupcakes (#2537) 2024-04-17 17:42:23 -03:00
carrot_cake.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
change_gold.lua refactor: change coins path and improvements (#2232) 2024-02-14 17:00:11 +00:00
check_bless.lua refactor: move blessing bytes to cpp (#3064) 2024-11-13 00:02:48 -03:00
christmas_bundle.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
clay_lump.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
cobra_flask.lua perf: remove unnecessary event callbacks (#3076) 2024-11-08 01:44:09 -03:00
coconut_shrimp_bake.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
costume_bags.lua refactor: costume bags to core (#2333) 2024-02-29 14:07:36 -03:00
cup_of_molten_gold.lua fix: improve quest logic and world data (#3907) 2026-04-28 20:44:52 -03:00
decay_to.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
demonic_candy_ball.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
die.lua refactor: die to core and add missing achievement (#2387) 2024-03-06 17:04:27 -03:00
dolls.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
exercise_training_weapons.lua fix: deplete the clicked exercise weapon, not the first in inventory (#3918) 2026-05-04 08:23:42 -03:00
explosive_present.lua fix: explosive present id (#2389) 2024-03-06 17:44:43 -03:00
ferumbras_amulet.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
ferumbras_mana_keg.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
fiery_horseshoe.lua feat: fiery horseshoe action to add mount to player (#3781) 2026-01-11 09:28:43 -03:00
filled_jalapeno_peppers.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
fireworks_rocket.lua refactor: fireworks rocket to core and fix kegs path (#2337) 2024-02-29 13:57:25 -03:00
foods.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
garlic_bread.lua fix: garlic bread itemId (#2359) 2024-03-02 17:12:25 -03:00
glooth_bag.lua improve: glooth bag (#2275) 2024-02-20 16:48:44 +00:00
gold_converter.lua refactor: change coins path and improvements (#2232) 2024-02-14 17:00:11 +00:00
hireling_foods.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
hireling_lamp.lua fix: small adjustments and corrections to the core (#2524) 2024-06-04 22:17:28 -03:00
hydra_tongue_salad.lua refactor: jean pierre foods (#2320) 2024-02-27 14:10:41 -03:00
ladder_up.lua fix: disable ladder effect and add support for all ladders (#3114) 2024-11-13 15:35:53 -03:00
lemon_cupcake.lua feat: cupcakes (#2537) 2024-04-17 17:42:23 -03:00
lottery_ticket.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
magic_gold_converter.lua refactor: change coins path and improvements (#2232) 2024-02-14 17:00:11 +00:00
mossmasher_figurine.lua enhancement: add functionality to items used to obtain the second familiar (#3662) 2025-08-27 10:53:57 -03:00
muck_remover.lua improvement: change muck remover to core and add missing achievement (#2282) 2024-02-21 03:38:11 +00:00
music_box.lua chore: mount items to core (#2252) 2024-02-16 19:51:39 +00:00
northern_fishburger.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
party_hat.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
party_trumpet.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
piggy_bank.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
pot_of_blackjack.lua refactor: jean pierre foods (#2320) 2024-02-27 14:10:41 -03:00
potions.lua feat: add Way of the Monk quest and monk-related content (#3794) 2026-02-12 23:03:25 -03:00
premium_scroll.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
reward_bags.lua feat(reward-bags): rebalance drop weights and add multi-open test mode (#3915) 2026-05-09 11:01:15 -03:00
roasted_dragon_wings.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
roasted_meat.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
rotworm_stew.lua refactor: jean pierre foods (#2320) 2024-02-27 14:10:41 -03:00
rust_remover.lua chore: improvements in rust remove and add to the core folder (#2280) 2024-02-21 03:43:47 +00:00
sandscourge_figurine.lua enhancement: add functionality to items used to obtain the second familiar (#3662) 2025-08-27 10:53:57 -03:00
scroll_of_ascension.lua fix: scroll of ascension effect and timer (#2348) 2024-03-01 16:04:35 -03:00
snowbash_figurine.lua enhancement: add functionality to items used to obtain the second familiar (#3662) 2025-08-27 10:53:57 -03:00
spellbook.lua chore: moving spellbook into place (#2214) 2024-02-15 01:59:21 +00:00
spiritual_horseshoe.lua fix: spirit of purity mount (#3661) 2025-08-27 10:53:31 -03:00
store_coins.lua refactor: centralize storage store coins/wheel scrolls to the core (#2284) 2024-02-22 18:03:59 +00:00
strawberry_cupcake.lua feat: cupcakes (#2537) 2024-04-17 17:42:23 -03:00
surprise_bags.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
surprise_music_box.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
sweet_mangonaise_elixir.lua refactor: jean pierre foods (#2320) 2024-02-27 14:10:41 -03:00
sweetheart_ring.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
tropical_fried_terrorbird.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
usable_afflicted_outfit_items.lua chore: move addon items to core (#2254) 2024-02-18 19:26:48 +00:00
usable_mount_items.lua feat: azzilon (#3634) 2025-08-20 14:08:33 -03:00
usable_outfit_items.lua feat: azzilon (#3634) 2025-08-20 14:08:33 -03:00
usable_phantasmal_jade_items.lua fix: item usage mechanics to obtain Phantasmal Jade (#3112) 2024-11-21 16:12:29 -03:00
veggie_casserole.lua feat: implement player food tracking & Lua binding (#3851) 2026-03-12 04:05:23 -03:00
vessels.lua enhance and refactor: multiple scripts for better functionality (#3007) 2024-11-13 00:38:54 -03:00
voodoo_doll.lua refactor: voodoo doll to core and added achievement (#2385) 2024-03-06 16:03:41 -03:00
water_pipe.lua chore: adjusting file locations (#2798) 2024-08-19 11:13:05 -03:00
wheel_scrolls.lua perf: wheel (#3157) 2025-01-10 08:29:14 -03:00