MesmerSign
Villager
- Xy$
- 0.00
Hi there, you beautiful people!
I hope this hasn't been asked yet and I just missed it.
I'd like to make happen the following;
If X<Y; success
X = random number between 0-99
Y = (A/(A+B)) * 100
A = relevant Parameter (ATT, DEF, MAT, etc...) of the character as #1 in the formation
B = the difficulty value of the act
For example, if a character with DEF 50 would be trying to make a DEF-check against the difficulty of 100;
Y = (50/(50+100)) * 100 = (50/150) * 100 = 33.33333... ergo
if X<34, success
My question is, how should I go about making that?
I'm already tracking the ID of the character in #1 as a part of my system managing outfit graphic updates.
Also, how do I ensure numbers like 1/3 are rounded to full numbers when presenting them to the player? I'm thinking the whole shebang is probably best to build using the Script... -event command, but I'm a bit lacking in my Programmer skill tree.
Thanks yous!
I hope this hasn't been asked yet and I just missed it.
I'd like to make happen the following;
If X<Y; success
X = random number between 0-99
Y = (A/(A+B)) * 100
A = relevant Parameter (ATT, DEF, MAT, etc...) of the character as #1 in the formation
B = the difficulty value of the act
For example, if a character with DEF 50 would be trying to make a DEF-check against the difficulty of 100;
Y = (50/(50+100)) * 100 = (50/150) * 100 = 33.33333... ergo
if X<34, success
My question is, how should I go about making that?
I'm already tracking the ID of the character in #1 as a part of my system managing outfit graphic updates.
Also, how do I ensure numbers like 1/3 are rounded to full numbers when presenting them to the player? I'm thinking the whole shebang is probably best to build using the Script... -event command, but I'm a bit lacking in my Programmer skill tree.
Thanks yous!