How can i display the skill damage on the skill info? I know i can can use a variable with \V[x] , but how to update the variable when the player gets a damage boost?
Skill damage on skill text
RPG Maker MV SupportMaybe calculating it at the end of each turn would work?
i was thinking about this, but idk how to
there is a bug with a. though, it always use the actor 1
To fix this just replace the usual a. with $gameActors.actor(x).
To fix this just replace the usual a. with $gameActors.actor(x).
sorry, but how am i supposed to save this code in .js?
Spoiler
Code:
[COLOR=rgb(136,0,0)]/*=======================================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! */[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(102,102,0)]([/COLOR][COLOR=rgb(0,0,136)]function[/COLOR][COLOR=rgb(102,102,0)]()[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(102,102,0)]{[/COLOR][COLOR=rgb(0,0,0)] [/COLOR][COLOR=rgb(136,0,0)]//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[/COLOR]
Probably a quote bug because it's been 1 year since it has been posted
/*
=======================================
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 Plugin
var _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
/*
=======================================
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 Plugin
var _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
just create a text file and save it with the extension .js instead of .txt
Original thread: https://forums.rpgmakerweb.com/threads/skill-damage-on-skill-text.70547/