Hiding display icons of specfic states

esilin

Villager
Member
Joined
Feb 9, 2014
Messages
10
Reaction score
1
First Language
English
Primarily Uses
In rpg maker mv, state icon is showing like below.



I want to hide some specific state icons by notetag in states.
At first I thought adjusting priority but all buff were showed irrelevantly.
And I tried using empty icon but empty icon was showed for a moment, in state-round display.
(Yeah, as you know, at least two states, they were circulated in a short time)


But I had no knowledge... I tried and found relative scripts in rpg_object.js
(only my thought. i don't know all of this well)


Game_BattlerBase.prototype.buffIcons = function() {
var icons = [];
for (var i = 0; i < this._buffs.length; i++) {
if (this._buffs !== 0) {
icons.push(this.buffIconIndex(this._buffs, i));
}
}
return icons;
};



I wish to control this with <Hidden State> of specific state note.

I want to make lots of passive skill but display screen is so messy. (see below)





Could you help me out of the diffculty?
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
803
Reaction score
350
First Language
English
Primarily Uses
N/A
Hi there!

Firstly, I can't see any of the images you posted, so I kinda had to guess as to what you wanted to see (or NOT see) from your descriptions.

Secondly, you were almost spot on with your guess of what to edit.
Unless you wanted to edit buff icons out instead of or with regular state icons.

Here's the snippet that should allow what you want:

Code:
Game_BattlerBase.prototype.stateIcons = function() {
    return this.states().map(function(state) {
        if (!state.meta.hideIcon) return state.iconIndex;
    }).filter(function(iconIndex) {
        return iconIndex > 0;
    });
};
You only need to tag the "invisible" states with <hideIcon> and they won't show as icons at all.
Note that if you want to do this with the de/buff icons, it'll require a bit more work and a formal plugin since buffs don't have note fields in the database.

Hope this helps!

EDIT: Oh! And just in case, I don't recommend directly editing the default plugin code.
You should make your own JS file for this change and add it in via the plugin manager.
If you don't know how to do that, let me know and I'll try to walk you thru it.
 

esilin

Villager
Member
Joined
Feb 9, 2014
Messages
10
Reaction score
1
First Language
English
Primarily Uses
Thank Goodness!

Code:
/*:
 * @plugindesc adjust visibility of icons.
 * @author Maliki79
 *
 * @help
 *
 *
 * To hide icon, Insert <hideIcon> in the state note
 *
 *
 */

Game_BattlerBase.prototype.stateIcons = function() {
    return this.states().map(function(state) {
        if (!state.meta.hideIcon) return state.iconIndex;
    }).filter(function(iconIndex) {
        return iconIndex > 0;
    });
};
I add this scripts as new JS file and it works well~!
I'm grateful for the help you have given me.
(Also I didn't use buff/debuff fuctions but thank your suggestion)
 

Nanaya

Veteran
Veteran
Joined
Jun 5, 2016
Messages
76
Reaction score
18
First Language
French
Primarily Uses
RMMV
Waouw!
Awesome plugin, thanks.
Yet, how would make it work with Yanfly's "In Battle Status". Indeed, I'd like to hide "special" state I'm using to "sort" character. For exemple, certain state like racial one, or from where there are from. Etc.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
803
Reaction score
350
First Language
English
Primarily Uses
N/A
As the snippet I made for for the default engine, I'm not sure. I'd have to look and see what other edits woukd need to be made.
 

Nanaya

Veteran
Veteran
Joined
Jun 5, 2016
Messages
76
Reaction score
18
First Language
French
Primarily Uses
RMMV
Alright, I'll wait or try to figure out an another solution.
 

Maliki79

Veteran
Veteran
Joined
Mar 13, 2012
Messages
803
Reaction score
350
First Language
English
Primarily Uses
N/A
I updated the plugin.
Try it and see if it works.

 

Nanaya

Veteran
Veteran
Joined
Jun 5, 2016
Messages
76
Reaction score
18
First Language
French
Primarily Uses
RMMV
Sorry for the late reply (I was debbuging my game). It works pretty fine, thank you.
Putting the two notetag removed the state, like if it was 100% normal and healthy to have it. Perfect.
Any term of use for it?
 

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

Latest Threads

Latest Profile Posts

Don't forget, aspiring writers: Personality isn't what your characters do, it is WHY they do it.
Hello! I would like to know if there are any pluggings or any way to customize how battles look?
I was thinking that when you start the battle for it to appear the eyes of your characters and opponents sorta like Ace Attorney.
Sadly I don't know how that would be possible so I would be needing help! If you can help me in any way I would really apreciate it!
The biggest debate we need to complete on which is better, Waffles or Pancakes?
rux
How is it going? :D
Day 9 of giveaways! 8 prizes today :D

Forum statistics

Threads
106,051
Messages
1,018,549
Members
137,836
Latest member
T62352536256t362
Top