Card generation is mathematically flawed
NeunEinser opened this issue ยท 0 comments
The way card generation deals with items with multiple categories is flawed.
The way the card is generated is, that first the category is picked an then the item, but only the currrent selected category is removed from the pool.
When the game then later picks a category where an item that has been selected already as part of another category, the next category is picked until the picked category is valid. This leads to doubling (or multiplying) of the weight of certain arbitrary (but not random!) category. This is bad.
Furthermore, the actual weight of items in multiple categories is hard to calculate without the full context and artificiality reduced by the amount of categories within each categories.
To fix these issues, I intend to pre-calculate weights independently from categories when initializing items, or considering #72, whenever active item tags change.