How do I set up a loot table?

● ARCHIVED · READ-ONLY
Started by Snarkyfork 5 posts View original ↗
  1. Is there a way to set up various random items in a chest that respawns after a set time? Like for example:

    1 rare item 5% chance
    2 uncommon items 25% chance
    2 common items 75% chance

    and, can I randomize the number of items spawned in a chest? For example, 1-3 uncommon items with a 25% chance or rather.... 3 25% chance rolls that an uncommon item will drop.
  2. use control variable to get a random number and conditional branch to check which number you got for different results.

    yes, that is a long list that will be required doing it this way...
  3. For the most part, this is pretty easy to set up.

    When you open the chest, have a variable set to a random number between 1-100. Follow that by a conditional branch checking if that variable is >25. If true, give the common loot. If false, do another conditional branch checking if it's >5. If true, give the uncommon loot, is false, give the rare loot.

    From there, it's just a matter of deciding how you want your chests to re-stock. There are a ton of different ways you can go about doing this, here's a one way you could do it with only events:

    - If you wanted each one to re-stock independently of one another, you could give each chest a variable. When you open the chest, set the variable to something like 15. Then, whenever you sleep at an inn, make the variable go down one.

    With that said, I'd probably recommend looking into a script for re-stocking. It's perfectly doable with events alone, but can get pretty messy if you have a ton of chests.
  4. @Vis_Mage

    Do you know if any of Yanfly's plugins allow script restocking? I already have most of those plugins set up.
  5. You might be interested in my loot table plugin.
    Check my signature.