MZ Help with a NRP and VSMA plugin conflict!!!

Hey

So I've been using two plugins in my MZ project. The first is Enemy Actor by VSMA:
Which basically replaces enemies with SV actor sprites. Great and simple plugin, one of the first ones I got.

The second is NRP's Learn Skill plugin:
Which adds a Learn Skill list to your game. The actors gain Skill Points from defeating enemies and leveling up, and can spend them to learn skills. This one was more complex, but I've started to get the hang of it.

The trouble is that NRP's plugin is now coming up with an error code which I've determined only comes up if there are enemies that are using VSMA's plugin.
When a battle finishes, this error comes up:
nrperror.png


Through testing, I've discovered the following:
1. The error only occurs when the Switch that determines whether actors can currently gain SP from defeating individual enemies is turned on.
2. It doesn't occur if the battle just has static enemies, only if there are sv animated enemies in the troop.
3. Actors can still can SP from leveling up without issue.

From that, I tentatively concluded that something in VSMA's is conflicting with the part of NRP's that determines how much SP is gained from individual enemies. But I don't have any idea how to fix it.

Can anyone help me with this? I really don't want to lose either plugin.

If it helps, I also have this error log. I only just discovered this feature today, so I don't if there's anything else that I need to show or not:
nrplog.png
Hi there!

Putting the error log was very helpful! Always put it when you encounter an error on your game 🙂

Now, as I can see on both plugins, the problem is that NRP plugin puts the Skill Points on the Game_Enemy class, which is used as the default RPG Maker enemy.
But, the VSMA plugin, does not use the Game_Enemy class as the enemy. It uses a new one,
Game_EnemyActor, that inherists from Game_Battler.

As so the function "skillPoint" does not exist on the Game_EnemyActor. Therefore, throws an error.
I just did a quick look, don't know if it will work. I believe you could try one of these approaches and see if it will work.

1 - Faster, but not so sure if it will work. Open the VSMA plugin with any text editor, go to the line 87, or find the line with "class Game_EnemyActor extends Game_Battler{"
Replace Game_Battler with Game_Enemy.

2 - On the VSMA plugin, add the function on the Game_EnemyActor:

JavaScript:
skillPoint() {
    const a = this; // eval参照用

    let skillPoint = 0;

    // 設定値が存在する場合
    const metaSkillPoint = this.enemy().meta.SkillPoint;

    if (metaSkillPoint != undefined) {
        skillPoint = eval(metaSkillPoint);

    // 既定値が存在する場合
    } else if (pDefaultEnemySkillPoint != undefined) {
        skillPoint = eval(pDefaultEnemySkillPoint);
    }

    // rateを乗算する。
    const rate = this.enemy().meta.SkillPointRate;
    if (rate != undefined) {
        skillPoint = Math.round(skillPoint * rate / 100);
    }
    return skillPoint;
}

1760912598628.png


See if any of them will work. My intention was not to just avoid the crash, but also make them compatible. Although I just did a quick look into it.
Hi there!

Putting the error log was very helpful! Always put it when you encounter an error on your game 🙂

Now, as I can see on both plugins, the problem is that NRP plugin puts the Skill Points on the Game_Enemy class, which is used as the default RPG Maker enemy.
But, the VSMA plugin, does not use the Game_Enemy class as the enemy. It uses a new one,
Game_EnemyActor, that inherists from Game_Battler.

As so the function "skillPoint" does not exist on the Game_EnemyActor. Therefore, throws an error.
I just did a quick look, don't know if it will work. I believe you could try one of these approaches and see if it will work.

1 - Faster, but not so sure if it will work. Open the VSMA plugin with any text editor, go to the line 87, or find the line with "class Game_EnemyActor extends Game_Battler{"
Replace Game_Battler with Game_Enemy.

2 - On the VSMA plugin, add the function on the Game_EnemyActor:

JavaScript:
skillPoint() {
    const a = this; // eval参照用

    let skillPoint = 0;

    // 設定値が存在する場合
    const metaSkillPoint = this.enemy().meta.SkillPoint;

    if (metaSkillPoint != undefined) {
        skillPoint = eval(metaSkillPoint);

    // 既定値が存在する場合
    } else if (pDefaultEnemySkillPoint != undefined) {
        skillPoint = eval(pDefaultEnemySkillPoint);
    }

    // rateを乗算する。
    const rate = this.enemy().meta.SkillPointRate;
    if (rate != undefined) {
        skillPoint = Math.round(skillPoint * rate / 100);
    }
    return skillPoint;
}

View attachment 351564

See if any of them will work. My intention was not to just avoid the crash, but also make them compatible. Although I just did a quick look into it.
Hi, sorry for late reply. My computer basically killed itself before I had the chance and I've only just got it working again (msi series, cooked motherboard and keyboard).

Anyway, I tried both of those and I got an error code when I tried starting a battle. I've attached the devlogs for both (first for 1, second for 2). It was the 'Cannot read property 'enemy' of undefined' error.

The good news is that I have found a possible workaround.

See, the plugin has a feature where you can increase a actor's Skill Points via an event. So what I've done is on all my troop events, I've created a page for each enemy, which triggers when that enemy's HP hits 0%. The event increases the SP of all party members by 1 (or whatever number I need it to). Three enemies killed, everyone gets 3 SP, one boss killed, everyone gets 10, etc. etc.
It's tedious to do that with all my troops, but so far it seems to be working.
I'm just wondering if it will work with more complex fights and multiple events, or if there's a situation where enemies can revive (although I don't think my game calls for that feature).

It's a possible solution, at least, if the initial problem remains unsolvable.
Hi there!
I usually don't do this... but since I started, if you could upload that same project to me replicating the issue, I can take a look into it 🙂

Original thread: https://forums.rpgmakerweb.com/threads/help-with-a-nrp-and-vsma-plugin-conflict.180616/