Status
Not open for further replies.

Seshua

Warper
Member
Joined
Aug 26, 2021
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
So I've been trying to google search this for the past hour to no avail.
I found this > https://forums.rpgmakerweb.com/index.php?threads/place-variable-in-skill-name.59464/ < post from 2016 but it didn't really explain how they fixed/solved the problem.

My issue is similar, I have a skill, its a basic skill like 'Attack'. I'm using various plugins such as YEP Core plugins + action seq packs + weapons unleased (to replace basic 'Attack' skill), amoung others that are irrelevant. My skill has a variable linked to it, that goes up by 1 every time its used. When it reaches 3 it adds a state that makes it deal more damage. This is all well and good, What I need is a way to display the variable in the Skill's name so the player knows what charge it's currently on.

Sorry If this is posted in the wrong section.
 

MisterFu

Villager
Member
Joined
Nov 7, 2018
Messages
19
Reaction score
6
First Language
German
Primarily Uses
RMMV
Make a new Plugin with following content:

JavaScript:
Window_SkillList.prototype.drawItem = function(index) {
    var skill = this._data[index];
    if (skill) {
        skill.name = this.convertEscapeCharacters(skill.name);
        var costWidth = this.costWidth();
        var rect = this.itemRect(index);
        rect.width -= this.textPadding();
        this.changePaintOpacity(this.isEnabled(skill));
        this.drawItemName(skill, rect.x, rect.y, rect.width - costWidth);
        this.drawSkillCost(skill, rect.x, rect.y, rect.width);
        this.changePaintOpacity(1);
    }
};

The only change of this function is line 4. Be sure to place this plugin below all other plugins, which affect any window.

Note: I've not tested this code. But it should work.

Edit: Of course, you have to add the variable to the name in the database. E.g.: Skill name \v[id]
id has to be replaced with the variables ID.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
4,930
Reaction score
3,131
First Language
English
Primarily Uses
RMMV
I'm not sure what you searched for...but I Googled "RPG Maker MV escape code skill description" and found this:

It probably does basically what Mister Fu suggested, but it does it everywhere, so you can use any escape codes in your item descriptions, skills, actor profiles, whatever.
 

Seshua

Warper
Member
Joined
Aug 26, 2021
Messages
2
Reaction score
0
First Language
English
Primarily Uses
RMMV
Make a new Plugin with following content:

JavaScript:
Window_SkillList.prototype.drawItem = function(index) {
    var skill = this._data[index];
    if (skill) {
        skill.name = this.convertEscapeCharacters(skill.name);
        var costWidth = this.costWidth();
        var rect = this.itemRect(index);
        rect.width -= this.textPadding();
        this.changePaintOpacity(this.isEnabled(skill));
        this.drawItemName(skill, rect.x, rect.y, rect.width - costWidth);
        this.drawSkillCost(skill, rect.x, rect.y, rect.width);
        this.changePaintOpacity(1);
    }
};

The only change of this function is line 4. Be sure to place this plugin below all other plugins, which affect any window.

Note: I've not tested this code. But it should work.

Edit: Of course, you have to add the variable to the name in the database. E.g.: Skill name \v[id]
id has to be replaced with the variables ID.
Thankyou for the script. So it works for non basic skills E.g.: Skills like MAGIC, or SPECIAL where you open up a sub menu to select a skill, but I'm using YEP Weapon unleashed plugin to replace the basic 'Attack' skill with a custom one that i've made. I tried putting my \v[x] on that skill but it just shows the escape code. Not sure if this would require some extra code to work with YEP Weapon unleashed. If you need screen shots or any other info please advise. Thankyou again for the help.

I'm not sure what you searched for...but I Googled "RPG Maker MV escape code skill description" and found this:

It probably does basically what Mister Fu suggested, but it does it everywhere, so you can use any escape codes in your item descriptions, skills, actor profiles, whatever.
Awesome! This is exactly what I needed. I know it says something about this on the webpage but just for clarity for anyone else that uses this. in the Skill name or where ever you have to type it like this " \*\v[x] " for variables at least.

@ATT_Turan When i googled i was searching for "rpg maker mv variable in skill name" first link was the one in the OP.
 

slimmmeiske2

Little Red Riding Hood
Global Mod
Joined
Sep 6, 2012
Messages
9,832
Reaction score
6,253
First Language
Dutch
Primarily Uses
RMXP

This thread is being closed, due to being solved. If for some reason you would like this thread re-opened, please report this post and leave a message why. Thank you.

 
Status
Not open for further replies.

Latest Threads

Latest Posts

Latest Profile Posts

Camping inside a hidden cave.
LzSHByh.jpg
I don’t believe in astrology. I’m a Sagittarius and we’re skeptical.
senary_concept_art.png
The concept art for the sprite of Senary, a major character in my upcoming (as-of-yet-unnamed) project. She is known as the Timelord because she can "stop time" by making eye contact with a person; Paralyzing them for a short period of time through a type of hypnosis. Tell me what you think about her. I'm thinking of changing the color of her coat.

Forum statistics

Threads
124,368
Messages
1,163,128
Members
163,167
Latest member
kingfathom
Top