How to increase state chances

masterkof

Veteran
Veteran
Joined
Nov 12, 2013
Messages
42
Reaction score
19
First Language
english
Primarily Uses
I am looking for a plugin that can help me increases chances of applying a states.

Example I got a skill call fire. The fire skill can apply a state "burning" which has 10% chance of occurring.

Lets say I equipped a fire wand.
I need help a plugin that helps me to increase "burning" from 10% chance to 30% chance.
 

Icenick

Veteran
Veteran
Joined
Mar 28, 2012
Messages
275
Reaction score
37
First Language
English
Primarily Uses
Im not sure a plugin but I do something similar for my game. Using Yanfly Skill Core you can do the same. Post-Damage Eval or After Eval.

Code:
var burnchance = 0.1;
if (user.isStateAffected(firewand)) {
var burnchance = 0.3;
}
if (Math.random() < psnchance) {
b.addState(burn);}
You add this to each skill that has a chance to add a state. If you have multiple gear then it might become a problem, havent tested it but I think you can just do:
Code:
var burnchance = 0.1;                     // 10% base chance to burn
if (user.isStateAffected(firewand)) {      // Fire wand equipped using passive states   
var burnchance += 0.2;}                   // Adds 20% chance to var burnchance
if (user.isStateAffected(flamearmor)) {   // Flame armor equipped
var burnchance += 0.3;}                   // Adds 30% chance
if (Math.random() < burnchance) {         // Checks if RNG result is sucessful
b.addState(burn);}                        // 1/10 will burn w/gear will be 6/10
 

masterkof

Veteran
Veteran
Joined
Nov 12, 2013
Messages
42
Reaction score
19
First Language
english
Primarily Uses
Thanks for your help
 

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

Latest Threads

Latest Profile Posts

The more I look at the QPlugins... The more I am amazed at what they can do. Which I'm not going to lie is pretty awkward, because I already consider them far and away the best plugins MV has to offer. :kaoback:
spending a week trying to figure out what was wrong with my font has me DED
504 threads to go upon the time of this post until the forum reaches 100k threads. Thread Dead Redemption. Thready Van Halen. Thread Zeppelin. Doesn't have to be a band or a game
Random thought: Looks like putting in effort in learning a language is like a taboo for most people. :kaoswt2:
Not sure about RPG Maker MZ ; We see a lot of things, but they could have enhanced a lot of things in MV first... We're at the era of updates nowadays, not new products over and over and over :/

Forum statistics

Threads
99,500
Messages
966,126
Members
131,133
Latest member
guuh1
Top