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
170
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
170
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
170
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 Profile Posts

On the plus side, if all this rioting sparks another Covid outbreak... I will have a whole lot of time to work on my game. Not exactly how I wanted to get that time, but hey I'm a glass is half full... of RM kind of guy. :LZSwink:
A video once in a while won't hurt.
Have a craving for a Nesquik milkshake. No idea why. Haven't had one since I was a kid. lol. I remember them kinda tasting nice, but also leaving a lot of nasty powder at the bottom of the cup.
The more I think about it, the weirdest part of going to work post-virus will probably be getting used to seeing my coworkers' mouths again. :LZYshock:
I think one of my weirdest realizations is that my speed of game development would probably be about the same if I *didn't* work a full-time manual labor job.

Forum statistics

Threads
98,059
Messages
948,974
Members
129,340
Latest member
guangdi
Top