forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
Lucky_Variance 1.0
Forteller/Dark Confidant

Introduction

Hi Guys, this is my first plugin, its suppose to let you use luk(or any other param to alter the way variance works)

What it does is simply lets say your battler has 20 Luck and you want it so for every 5 luck to get +2% variance, then with a skill that has 20% variance you will usually do somewhere between -20% to +20%, now with this plugin it would be  -12%to +20% which would make you hit for more damage on average. Also if you want you can turn off the variance ceiling and allow luck to push beyond the variance cap then with the same stats as before you could have -12% to +28%.

Hopefully that all makes sense

Features

Alter the way variance is calculated based of batter params

Enforce a variance cap or allow the stat to override variance

Screenshots
None

How to Use
Its Plug and Play

although you cannot as of yet rename the file or it will break please be sure to name the plugin Lucky_Variance.js

Demo
Seems like overkill for this plugin
Script

[spoiler]  [/spoiler]

// ------------------------------------------------// Lucky_Variance.js// ------------------------------------------------/*:*Plug and PLay Install****Note do not rename file* @plugindesc Allow LUK to Affect and other Stats to effect variance of skills* @author Dark Condiant** @param Variance_Adjustment* @desc The amount added or subtracted from the variance% before applying it to damage default: (this.subject().luk/5)*2* @default (this.subject().luk/5)*2** @param Variance_Ceiling* @desc Allow Stat to increase damage beyond the variance %?* @default false*/var alias_Variance_Handler = Game_Action.prototype.applyVariance;Game_Action.prototype.applyVariance = function (damage, variance) { alias_Variance_Handler.call(damage, variance); var parameters = PluginManager.parameters('Lucky_Variance'); var Evaltool = eval(parameters['Variance_Adjustment'] || (this.subject().luk/5)*2); var noceiling = String(parameters['Variance_Ceiling'] || "false"); var varint = Math.randomInt(variance* 2); var finder = 0; if (varint <= (varint / 2)+1){ finder+=varint;} else { finder-=varint; finder+=variance; } finder += Evaltool; if(noceiling=="false"){ if(finder>variance) { finder=variance} } var fixer = finder / 100; var pumpfix = damage * fixer; var newdamage = damage ; damage += pumpfix; return damage;};
FAQ

Cant think of anything :o


Credit and Thanks
Dark Confidant

Heartbreak61 -  for helping me fix my 1 major error

Author's Notes
Uhm Again hooray for me actually having something that work lol
 
Last edited by a moderator:

Shaz

Global Moderators
Global Mod
Joined
Mar 2, 2012
Messages
42,203
Reaction score
14,681
First Language
English
Primarily Uses
RMMV
Hi, can you please reformat your post similar to others in this forum, and provide some examples of how the plugin should be used?
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
Hi, can you please reformat your post similar to others in this forum, and provide some examples of how the plugin should be used?
i mostly fixed it i just dont know how to add spoiler tags
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
how to put code in spoiler plz?
 

forteller

Veteran
Veteran
Joined
Dec 2, 2013
Messages
105
Reaction score
19
First Language
English
Primarily Uses
thxs now i just have to figure it out lol
 

NeoPGX

~ King of Cuteness ~
Veteran
Joined
May 15, 2014
Messages
863
Reaction score
187
First Language
English (US)
Primarily Uses
N/A
Terms of use?
 

tale

Volunteer
Veteran
Joined
Dec 16, 2016
Messages
812
Reaction score
1,407
First Language
English
Primarily Uses
N/A
Fixed format. *credit "Forteller/Dark Confidant"
For details: https://forums.rpgmakerweb.com/index.php?threads/allow-luk-to-affect-skill-variance.53500/

Code:
// ------------------------------------------------
// Lucky_Variance.js
// ------------------------------------------------
/*:
* Plug and Play Install
****Note do not rename file
* @plugindesc Allow LUK to Affect and other Stats to effect variance of skills
* @author Dark Condiant
*
* @param Variance_Adjustment
* @desc The amount added or subtracted from the variance% before applying it to damage default: (this.subject().luk/5)*2
* @default (this.subject().luk/5)*2
* @param Variance_Ceiling
* @desc Allow Stat to increase damage beyond the variance %?
* @default false
*/
var alias_Variance_Handler = Game_Action.prototype.applyVariance;
Game_Action.prototype.applyVariance = function(damage, variance) {
    alias_Variance_Handler.call(damage, variance);
    var parameters = PluginManager.parameters('Lucky_Variance');
    var Evaltool = eval(parameters['Variance_Adjustment'] || (this.subject().luk / 5) * 2);
    var noceiling = String(parameters['Variance_Ceiling'] || "false");
    var varint = Math.randomInt(variance * 2);
    var finder = 0;
    if (varint <= (varint / 2) + 1) {
        finder += varint;
    } else {
        finder -= varint;
        finder += variance;
    }
    finder += Evaltool;
    if (noceiling == "false") {
        if (finder > variance) {
            finder = variance
        }
    }
    var fixer = finder / 100;
    var pumpfix = damage * fixer;
    var newdamage = damage;
    damage += pumpfix;
    return damage;
};

dropbox link: https://www.dropbox.com/s/nni8pmtf6m4cyjp/Lucky_Variance.js?dl=1
 

Attachments

  • Lucky_Variance.js
    1.5 KB · Views: 5
Last edited:

Latest Threads

Latest Posts

Latest Profile Posts

Hey everyone! No Studio Blue RPG Maker Critiques Stream today! But you can always check the playlist for old streams you've missed!

I ran out of paper sheets to draw, so I guess I'm forced to do digital for a while now...
x778xt8.jpg

Still haven0t found a colouring style that I like :kaoswt:
woods.pngshop.jpgboss.jpgRoom.png

Mapping is becoming so much easier!
FirestormNeos wrote on Neikoku's profile.
the cat in your profile picture is adorable
Are the default-size "chibi" sprites really a bad thing for a project? I'm not planning to sell my game anyway but I was wondering if they were as hated as some videos seem to claim...

Forum statistics

Threads
111,433
Messages
1,061,097
Members
144,802
Latest member
SummerMom
Top