I don't think I understand how to use probability1 and probability2 correctly despite messing with this engine for so long.

In game example SPWI620 (Conjure Fire Elemental)

There is a 60% chance that a 12-Hit-Dice elemental appears, a 35% chance that a 16-Hit-Dice elemental appears, and a 5% chance that a 24-Hit-Dice elemental appears.

This spell implements above quoted chance like this:

1. probability1 = 60, probability2 = 0

2. probability1 = 95, probability2 = 61

3. probability1 = 100, parobability2 = 96

How exactly those values have been calculated? (mathematical formula would be useful) I have far more complicated probabilities to implement (simulating dice roll for opcode 67, which doesn't support rolls, on top of already 3 different chances to start summoning in the first place). I don't think I can do it when I'm struggling to understand such easy example. Thanks in advance.

edit: wait a second don't tell me it's a matter of using this formula:

% chance = probability1 - probability2 + 1

**Edited by K4thos, 06 August 2018 - 05:38 AM.**