Skip to content

Increase randomness when adding from generatorTable

Zarto requested to merge Zarto/gdlenhanced:Fix_Adding_From_Generator into TestServer

Issue:

Items added from a generator Table are only random to the point of entry (first selection from the table). Subsequent selected items to fill out to max are always successive slots as no new random is selected.

Current behavior:

Randomly selects a number (diceRoll). Iterates through list until first item with probability value greater than diceRoll is found. Continues to fill out to Generator's Max/Init value by continuing for loop iteration. Next item selected is the slot immediately following the previous selection as this slot's probability value is also greater than diceRoll.

Proposed Change:

Once we find an item from the table and add to the max allowed by that slot. We should exit the for loop and get another random number to test against the table.

For Reference:

Add From GeneratorTable for 38942 Table

38942_-_Grand_Casino_Chest.json

Edited by Zarto

Merge request reports