YEP Victory Aftermath Level Up - Omit Specific Skills? [SOLVED]

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
@AdamSakuru Yeah, open plugin file in notepad or something:
Replace this code lines:
Window_VictorySkills.prototype.drawItem = function(index) {

var item = $dataSkills[this._data[index]];

if (!item) return;

var rect = this.itemRect(index);

this.drawItemName(item, rect.x, rect.y, rect.width);
with this:
Window_VictorySkills.prototype.drawItem = function(index) {

var item = $dataSkills[this._data[index]];

if (!item || index == (Skill's ID to omit 1) || index == (Skill's ID to omit 2)) return;

var rect = this.itemRect(index);

this.drawItemName(item, rect.x, rect.y, rect.width);
 

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
171
First Language
English
Primarily Uses
N/A
Okay, so when I put in the edit to the plugin I ran a battle where the actor leveled and learned 2 skills. One of them was in the index and the other wasn't, but the one that was in the index showed up anyways.

I attached the image so you could see, the second skill he learned wasn't supposed to show.

I also tried running it when the actor only learned the skill that wasn't supposed to show up and it still showed up.
 

Attachments

Last edited:

Isabella Ava

Veteran
Veteran
Joined
Sep 13, 2016
Messages
635
Reaction score
756
First Language
English
@AdamSakuru oh, i see. My mistake :p
replace by this new one:
Window_VictorySkills.prototype.drawItem = function(index) {
var item = $dataSkills[this._data[index]];
if (!item) return;

if(item.id != 8) { //add more skill to ignore by this format (item.id != id1 && item.id != id2)

--index;
var rect = this.itemRect(index);

this.drawItemName(item, rect.x, rect.y, rect.width);}
};
 

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
171
First Language
English
Primarily Uses
N/A
Okay, so this one omits the text/icon of the skill showing up, but it still leaves an empty spot in the level up window which looks kinda weird.

In the attached image there are three omitted skills above the one that shows up. There's also one below it.
 

Attachments

AdamSakuru

[Null_Value]
Veteran
Joined
Mar 14, 2014
Messages
314
Reaction score
171
First Language
English
Primarily Uses
N/A
Moderators can close this thread, the problem has been solved. Thanks to Isabella for the help, Waynee95 on the Discord server actually gave me the proper solution:

"no thats not the right solution. instead of trying to not draw some skills, the better approach is to not include those skills in the victory skills list"

PHP:
Game_Actor.prototype.learnSkill = function (skillId) {
   if (!this.isLearnedSkillRaw(skillId) && this._victoryPhase) {
       // Dont show skill 1, 42, 1337 and 23 in victory screen
       if (![1, 42, 1337, 23].contains(skillId)) {
           this._victorySkills.push(skillId);
       }
   }
   Yanfly.VA.Game_Actor_learnSkill.call(this, skillId);
};
Just put this in its own plugin and place it below everything else.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

How many parameters is 'too many'??
Yay, now back in action Happy Christmas time, coming back!






Back in action to develop the indie game that has been long overdue... Final Fallacy. A game that keeps on giving! The development never ends as the developer thinks to be the smart cookie by coming back and beginning by saying... "Oh bother, this indie game has been long overdue..." How could one resist such? No-one c
So I was playing with filters and this looked interesting...

Versus the normal look...

Kind of gives a very different feel. :LZSexcite:
To whom ever person or persons who re-did the DS/DS+ asset packs for MV (as in, they are all 48x48, and not just x2 the pixel scale) .... THANK-YOU!!!!!!!!! XwwwwX

Forum statistics

Threads
105,853
Messages
1,016,986
Members
137,561
Latest member
visploo100
Top