How to calculate success based on party stats?

elpsychic

Villager
Member
Joined
Sep 27, 2016
Messages
10
Reaction score
0
First Language
English
Primarily Uses
I am trying to create ingame missions where the player can send party members but I am finding difficult to figure out what calculates success for a mission.

However, I am having trouble figuring out how to access the specific party members stats or if this correct way to do this algorithm.

I am thinking doing something like this:
Very Easy Missions: Overall combat stats and 100 being guaranteed success.
A beginner party member can be have a total combat stats: of 20
So I believe doing something that will calculates the partyMembers in the mission.

Barebones Example:
(1/100)*(playercombatstat) = Percentage of success of the mission

Then do:
double d = Math.random();
if (d < 0.75)
// Success
else
// Failure
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
29,230
Reaction score
6,775
First Language
German
Primarily Uses
RMMV
what you need is the control variable command - you don't even need a script line for something this simple.

the game data option of the control variable command can be used to load any actor parameter you want, then you can use the same command to calculate the probability and use the random option to get a random number.
after that simply compare the two variables with a conditional branch.
 

BishoujoHelper

Veteran
Veteran
Joined
May 6, 2017
Messages
54
Reaction score
44
First Language
English
Primarily Uses
RMMV
@Andar is correct for a single actor.
If you're trying to get stats out of the entire party, see my thread here. In my case it was getting the maximum Luck stat of the party and rolling that or less on a d100.
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Who loves the Final Fantasy series?~
Weather and time system twin release. Now with weather icons and possibility to add them in your custom clock!
Kingdom Under Fire: The Crusaders is finally being ported to PC. I loved playing that game on the original Xbox.
A friend told me to stop making nomnom or gulping noise when eating or drinking. Plot twist of my life. I thought people can't hear that!

Forum statistics

Threads
94,411
Messages
920,759
Members
124,208
Latest member
dito11
Top