Ratio in skill description

Luth

Veteran
Veteran
Joined
Apr 29, 2014
Messages
129
Reaction score
54
First Language
French
Primarily Uses
Hello,

In League Of Legends, each skill deals damage according to a ratio of one of your stat : your Ability Power ("Magic Attack"), your Attack Damage ("Physical Attack"), your Armor, your HP etc., plus a fixed base damage.

Some examples :

Base damage

Ratio

-Annie's Disintegrate deals up to [220 + (80% AP)] magic damage to her target.

-Malphite's Ground Slam deals up to [220 + (30% Armor) + (20% AP)] magic damage to his target.

-Sion's Soul Furnace can shiel him up to [130 + (40% AP) + (10% Max HP)]

Is there a way to show the formula, as it appears in game ?



I usually create a common event where I proceed like this :

Variable 001 (0.8 AP Annie) -> 8*Annie's APVariable 001 (0.8 AP Annie) -> /10Then I just use the \V[n] code in the description's message to show the ratio. But it's boring process, and it doesn't refresh the ratio is I buff myself in battle.

So can someone write a plugin to draw this kind of formula in skill description ? Would be awesome :)

Thanks a lot.
 

Luth

Veteran
Veteran
Joined
Apr 29, 2014
Messages
129
Reaction score
54
First Language
French
Primarily Uses

Nohmaan

Veteran
Veteran
Joined
Jul 7, 2012
Messages
180
Reaction score
49
First Language
English
I would be interested in this functionality as well.  I think the most efficient/best way to accomplish it would be to allow escape codes in the skill description that can pull the actor who own's the skills variables (a.mhp, a.atk, etc.) into a formula.  Usage maybe like below:

Deals 80 (+\formula[(a.atk)]) damage.  

So if a.atk is 15 it would show  Deals 80 (+15) damage.
 
Last edited by a moderator:

Kai Monkey

Veteran
Veteran
Joined
Apr 3, 2012
Messages
166
Reaction score
119
First Language
RGSS3
Primarily Uses
Hey ♫

I took Nohmaan's suggestion and put this together! As always, instructions in the help box!

Code:
/*=======================================TextFormula.js=======================================  /*: * @plugindesc TextFormula * @author Kaimonkey  * @help  * ============================================================================ * Terms and Conditions * ============================================================================  * The plug in may only be used for NONCOMMERCIAL projects. If you wish to * use this plug in in a commercial product, please contact Kaimonkey for a  * licience * * While reasonable effort will be made to fix any faults in the product, the  * product comes "as is", and Kaimonkey is under no legal obligation to do so.    * ============================================================================ * Intro * ============================================================================ * Use the escape code \aform to activate the "actor" formula, for example using * \aform["a.atk * 2 + 10"]   * In a skill's description will show you double the user's attack + 10. * Using the escape code in times were the user isn't clear (Such as in a  * normal message box, or from a store) will result in the leader being * used instead. *  * Use the escape code \form to activate the standard formula, for example * \form["v[1]*100 + 15"] * Will return the first variable, times by 100, added to 15! */ (function() { //Start Pluginvar _kmky_convertAlias = Window_Base.prototype.convertEscapeCharacters;Window_Base.prototype.convertEscapeCharacters = function(text) {   text = _kmky_convertAlias.call(this, text);   text = text.replace(/\x1baform\[".*?"\]/gi, function() {    if(SceneManager._scene.actor===undefined)        var a = $gameParty.leader();         else{    var a = SceneManager._scene.actor();   }         var form = arguments[0].split("[\"")[1].split("\"]")[0];         return eval(form);   }.bind(this));       text = text.replace(/\x1bform\[".*?"\]/gi, function() {     var v = $gameVariables._data;         var form = arguments[0].split("[\"")[1].split("\"]")[0];         return eval(form);   }.bind(this));   return text;}; })(); //Close Plugin
 

I hope it works for you, and help's to lighten you're work load!

 

/Kai
 
Last edited by a moderator:

Luth

Veteran
Veteran
Joined
Apr 29, 2014
Messages
129
Reaction score
54
First Language
French
Primarily Uses
Awesome, dude ! Thanks a lot for this :) But is it possible to round the result up ? I got a decimal...

If you can't there is no problem about it :)

PS : You should post it in the Plugin Release section if you didn't so far, would help a lot of people !

Love you !
 

Kai Monkey

Veteran
Veteran
Joined
Apr 3, 2012
Messages
166
Reaction score
119
First Language
RGSS3
Primarily Uses
Use 

\aform["Math.floor(a.atk/2)"]
Math.floor means "round down"
 

Luth

Veteran
Veteran
Joined
Apr 29, 2014
Messages
129
Reaction score
54
First Language
French
Primarily Uses
Thanks a lot :)
 

gotnovicks

Veteran
Veteran
Joined
Feb 15, 2015
Messages
76
Reaction score
9
First Language
Portuguese
Primarily Uses
N/A
Kai Monkey, you are awesome!!!!!!

I was looking for this script! Thanks!

And thanks Luth for asking for it heheh
 

Targaryen

Veteran
Veteran
Joined
Oct 23, 2015
Messages
51
Reaction score
11
First Language
Spanish
Primarily Uses
I found a bug... When I have 2 or more actors with the same skill, on the battle the formula just show the first actor damage.
 

Kai Monkey

Veteran
Veteran
Joined
Apr 3, 2012
Messages
166
Reaction score
119
First Language
RGSS3
Primarily Uses
Ah, yes, I realised this will not work in the battle menu, I will post a fix when I have time 
 

Alistair

Treasure Hunter
Veteran
Joined
Jun 15, 2014
Messages
283
Reaction score
196
First Language
English
Primarily Uses
RMMV
Something similar was discussed in this thread. Maybe try the code snippet from there in the meantime.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,040
Messages
1,018,472
Members
137,822
Latest member
madelbylz
Top