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

Discussion in 'Javascript/Plugin Support' started by AdamSakuru, Feb 10, 2018.

  1. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    First Language:
    English
    Primarily Uses:
    N/A
    #1
  2. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    751
    First Language:
    English
    @AdamSakuru Yeah, open plugin file in notepad or something:
    Replace this code lines:
    with this:
     
    #2
  3. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    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.
     

    Attached Files:

    Last edited: Feb 10, 2018
    #3
  4. Isabella Ava

    Isabella Ava Veteran Veteran

    Messages:
    636
    Likes Received:
    751
    First Language:
    English
    @AdamSakuru oh, i see. My mistake :p
    replace by this new one:
     
    #4
  5. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    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.
     

    Attached Files:

    #5
  6. AdamSakuru

    AdamSakuru StudioDaeera Veteran

    Messages:
    314
    Likes Received:
    168
    Location:
    Calgary, Alberta.
    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 (![142133723].contains(skillId)) {
               
    this._victorySkills.push(skillId);
           }
       }
       
    Yanfly.VA.Game_Actor_learnSkill.call(thisskillId);
    };
    Just put this in its own plugin and place it below everything else.
     
    #6

Share This Page