How do I make ( sometimes large )loot tables for when the enemy dies or when you open a chest?

0 favourites
  • 2 posts
From the Asset Store
Perfect, complete, easy to use to use, out-of-the-box inventory system
  • Hello! I want to make a loot table for let's say a "boar", how do I make some items more likely to be dropped (If any at all!). Do I use functions? How do I add weight to an item? Thanks for the help.

  • Try Construct 3

    Develop games in your browser. Powerful, performant & highly capable.

    Try Now Construct 3 users don't see these ads
  • There are many approaches. It would be important to know how you design your game. Are there different quality levels (normal, rare, magical ...)? Do you use a sprite with different animations for an item type or for each item an extra sprite? What about the enemies and containers?

    Here I have a very simple variant for a still effective drop system. It uses no arrays or dictionaries, but many instance variables. To increase the drop chance of an item within a quality level, you can enter it several times in the list. However, I do not know if there is a limit for a string variable. At some point and for even more accuracy, an array might be needed. But then it gets far more complex and the code much longer.

    1drv.ms/u/s!Ap_-qxoGKbDchALxLOyU3rOHQuJD

    Edit: You should think carefully which objects you are packing into a family! It would be possible to put all enemies and containers into one family and assign them the necessary instance variables. When calling the function, you then select the correct object via the UID. It is always a pain changing everything afterwards.

Jump to:
Active Users
There are 1 visitors browsing this topic (0 users and 1 guests)