@DoubleX
If you're still around, could you clarify a couple of things for me.
When you say "all these skills" I assume you mean just the skill in question and the duplicate, not all the skills this enemy has. Is that correct? If that is correct, won't this prevent any other skill from being chosen? If it is every skill the enemy has, that's not a problem, I just need to be clear.
I don't know what you mean by >k1, >k2 etc. What is the k? Does it simply mean that the variable is returning 1, 2 etc? In which case, presumably I start it at k0. Or is k something else entirely?
Thanks, and sorry for being a bit obtuse about this.
1. Yes, all these skills refer to those skills in question and the duplicate.
2. No, my setup won't prevent other skill from being chosen.
It just controls the probability of each of those duplicate skills to be chosen given that exactly least 1 of them will be chosen. For example:
skill duplicate 1, skill duplicate 2, skill duplicate 3, ..., skill duplicate n all have the same rating of 5 and all the other m skills also have the same rating of 5. Now all the other skills aren't excluded by rating or conditions of those duplicate skills although they can still be excluded by their own conditions. Without considering any of those conditions, the probability of picking any duplicate skill would be n / (m + n).
However, if it's given that exactly 1 duplicate skill will be chosen, then my setup will step up to control the probability of each of those duplicate skills to be chosen among all those duplicate skills.
Those kis are used to control the probability of skill duplicate i to be chosen given that exactly 1 of them will be chosen. Mathematically speaking(assuming you know what probability is):
Spoiler
(rand(n) is changed to rand(p) to try to make things less confusing)
Ignoring other skill conditions, under my setup:
The probability of choosing at least 1 duplicate skills, P(n), is n / (m + n)
The probability of choosing skill duplicate i given that at least 1 duplicate skill will be chosen, P(i|n), is:
(p - k1) / p for skill duplicate 1
kn / p for skill duplicate n
(k(i-1) - ki) / p for duplicate skill i
Combining the above, the probability of choosing skill duplicate i, P(i), is:
(p - k1) * n / p * (m + n) for skill duplicate 1
kn * n / p * (m + n) for skill duplicate n
(k(i-1) - ki) * n / p * (m + n) for duplicate skill i
3. The > sign means "greater than", so
Conditional Branch: variable x > ki
Means "If variables x is greater than ki"
I hope you can get the ideas and mathematics behinds my setup. My presentation surely sucks really hard
🙂
Edit: Maybe I should have said earlier that your request and be done via rating alone. For example:
Skill Condition R
Skill Duplicate 1 5
Skill Duplicate 1 5
Skill Duplicate 1 5
Skill Duplicate 2 5
Skill Duplicate 2 5
Skill Duplicate 3 5
Now if given exactly 1 skill duplicate will be chosen, then the probability of skill duplicate 1, 2 and 3 to be chosen is 1 / 2, 1 / 3 and 1 / 6 respectively.
I provided an alternative setup just in case you don't want to do this via rating alone
😀