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,971
Reaction score
3,157
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,841
Reaction score
6,257
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

Can you recognize where this area is from? :kaocry:
Mq9QM3h.png
For those with up to 9 elements of magic; how do you structure your database. By element? Or by what is offensive vs supportive spells?
would anyone here be interested in rough concept art for the main protagonist of my game that might get changed later? :kaoswt2:
I guess I have no idea how to properly upload a custom font lmao. The menu fonts are too damn small.

Font_Size.PNG

Forum statistics

Threads
124,437
Messages
1,163,650
Members
163,255
Latest member
Bohnez
Top