rrcampbell-exe / yarnsworths-tales

A storyline generator for fantasy roleplaying games.
https://rrcampbell-exe.github.io/yarnsworths-tales/
2 stars 0 forks source link

Add cascading rarity to races selection #17

Open rrcampbell-exe opened 3 years ago

rrcampbell-exe commented 3 years ago

Description Currently, odds of receiving an output from uncommonRaces is 1/10, with the likelihood of receiving a given uncommon race being 1/180. This feels disproportionate, as some races like tabaxi, goblins, and hobgoblins are more likely to be encountered than, say, kenku, genasi, and goliatch.

Proposed Solution Sort uncommonRaces further into arrays including rareRaces, epicRaces, and 'legendaryRaces.

Then, if uncommonRaces is chosen in apiRace call, add array item of "" that, if chosen when combing through uncommonRaces then looks into rareRaces, which also features a "" object, with this nesting repeating until reaching the legendaryRaces array.

This will make tabaxi, goblins, and hobgoblins, for example, more likely to appear than 1/180, with races like kenku, genasi, and others less likely to occur.