- Joined
- Sep 9, 2020
- Messages
- 20
- Reaction score
- 9
- First Language
- English
- Primarily Uses
- RMMZ
Hello All!
So I've done a little research and am aware that this question is asked at least once every couple years across the different iterations of the game. I have done pretty well in incorporating DnD-like mechanics, formulas, etc. into RPG Maker MZ either through Plug-ins, self teaching, videos and all that. I nailed down a formula to have DND style combat with dice rolls after doing some tweaks to an article I found online. The end formula for DND style combat:
if (b.def <= Math.randomInt(20)+1+a.agi+a.mdf) {Math.randomInt(a.atk)+1+a.agi} else {0}
Explanation: b.def being enemy defense (AC); the d20 roll, agi representing str/dex; mdf being actors proficiency bonus (i know this sounds silly but it works), atk being the weapons attack while the actors have none (i.e.sword giving 8 attack to represent 1d8). The attack or spell is set to Certain hit, 100 percent success, and 0 variance to bypass RPG Maker Hit Rate and Evasion calculation and make it as pure dice roll as able.
Anyway, I am hoping to use the above formula to do skill checks in events but I am not literate in java enough to make that on my own. Some idea's I've seen floating around include: making skills into variables and doing conditional branches if the numbers are high enough by having choices that the player decides which actor gets to make the attempt based on their variable. That just seems like a killer amount of work to set up and I feel there may be a better way.
Is there a way I can use my above formula but change it up just a bit, for example:
if (TARGET NUMBER <= Math.randomInt(20)+1+SKILL MODIFIER+a.mdf(PROFICIENCY BONUS)) {succeed} else {fail}
The thing is I wouldn't know where to put that or what to use specifically to make it work. Any help from you guys would be GREATLY appreciated.
Thank You!
-SoCalAshez
So I've done a little research and am aware that this question is asked at least once every couple years across the different iterations of the game. I have done pretty well in incorporating DnD-like mechanics, formulas, etc. into RPG Maker MZ either through Plug-ins, self teaching, videos and all that. I nailed down a formula to have DND style combat with dice rolls after doing some tweaks to an article I found online. The end formula for DND style combat:
if (b.def <= Math.randomInt(20)+1+a.agi+a.mdf) {Math.randomInt(a.atk)+1+a.agi} else {0}
Explanation: b.def being enemy defense (AC); the d20 roll, agi representing str/dex; mdf being actors proficiency bonus (i know this sounds silly but it works), atk being the weapons attack while the actors have none (i.e.sword giving 8 attack to represent 1d8). The attack or spell is set to Certain hit, 100 percent success, and 0 variance to bypass RPG Maker Hit Rate and Evasion calculation and make it as pure dice roll as able.
Anyway, I am hoping to use the above formula to do skill checks in events but I am not literate in java enough to make that on my own. Some idea's I've seen floating around include: making skills into variables and doing conditional branches if the numbers are high enough by having choices that the player decides which actor gets to make the attempt based on their variable. That just seems like a killer amount of work to set up and I feel there may be a better way.
Is there a way I can use my above formula but change it up just a bit, for example:
if (TARGET NUMBER <= Math.randomInt(20)+1+SKILL MODIFIER+a.mdf(PROFICIENCY BONUS)) {succeed} else {fail}
The thing is I wouldn't know where to put that or what to use specifically to make it work. Any help from you guys would be GREATLY appreciated.
Thank You!
-SoCalAshez



