Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Chest / Loot system #5

Open
AdrianSchneble opened this issue Oct 25, 2017 · 1 comment
Open

Chest / Loot system #5

AdrianSchneble opened this issue Oct 25, 2017 · 1 comment
Assignees
Labels

Comments

@AdrianSchneble
Copy link
Owner

We're gonna be needing some sort of algorithm that decides which items etc. can be found in chests or dropped from bosses.

Hence, post any ideas on how to do so as a reply to this issue.

@AdrianSchneble
Copy link
Owner Author

AdrianSchneble commented Oct 25, 2017

Chest loot

depending on the current progress in the dungeon, i.e. how far inside you are, there are calculated probabilities for certain item "classes" (see down below).
Upon either generating or opening a chest (yet to be decided), one of these classes is randomly chosen. Depending on the balancing, there might also be more than one item in a chest - in that case, the process is simply repeated for the second item.

Once an item class has been chosen, an item will be chosen from the respective loot table. For simplicity, items in these loot tables will all have the same probability.

Item classes (the % is a possible distribution on level 1, the -/=/+ indicates whether the probability for this class decreases, increases or stays the same upon further advancing into the dungeon (i.e. > level 1):

  • basic items (30%, --)
  • advanced items (10%, +)
  • theme-dependent items (15%, +)
  • gold (25%, =)
    • gold amount will increase on higher levels
  • consumables (20%, =)
    • consumables will be more powerful (i.e. stronger health potions) or more numerous on higher levels

Example for a loot calculation:

A chest on level 1 is discovered. It's contents are calculated as follows:

  • probability calculation: generate number between 0 and 100 => e.g. a "23" is generated => this corresponds to item class "basic items".
    • from the basic items loot table, an item is randomly chosen => e.g. the player receives a shortsword

I hope my ideas came across clearly. If there are any question, feel free to ask.

//edit: Monster drops could be calculated similarly, with an additional item class specific for the monster. Possibly also with fewer classes than chests, i.e. monsters might only drop gold, consumables or their specific loot.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants