Eli Enemy Class - They now have Levels, Exp, Equipments and Class!

Any idea if it's possible to set levels for individual enemy troop members. Not whole troops. I tried the script calls $gameTroop.members()[memberIndex].levelUp() and $gameTroop.members()[memberIndex].changeLevel(level) But they had no effect.
I can change levels and class for whole troop by using plugin command with -1 troop index. But setting troop index for troops members doesn't seem to work? Does plugin only work for whole troops and not troop members? And yeah I know I haven't replied to your other post when I had an issue with eli-class curves, was really frustrated at the time, and haven't looked into it again and managed a work around that didn't require the plugin.

My hobby game, spawns enemies with varying levels. So you may get multiple troop members with different levels from encounters. Problem is I don't know how to assign individual levels to each member, only the whole troop. If anyone knows how, or maybe I have a plugin conflict, or maybe i am just doing something wrong.

I use MZ RPGmaker. Thanks.
Any idea if it's possible to set levels for individual enemy troop members. Not whole troops. I tried the script calls $gameTroop.members()[memberIndex].levelUp() and $gameTroop.members()[memberIndex].changeLevel(level) But they had no effect.
I can change levels and class for whole troop by using plugin command with -1 troop index. But setting troop index for troops members doesn't seem to work? Does plugin only work for whole troops and not troop members? And yeah I know I haven't replied to your other post when I had an issue with eli-class curves, was really frustrated at the time, and haven't looked into it again and managed a work around that didn't require the plugin.

My hobby game, spawns enemies with varying levels. So you may get multiple troop members with different levels from encounters. Problem is I don't know how to assign individual levels to each member, only the whole troop. If anyone knows how, or maybe I have a plugin conflict, or maybe i am just doing something wrong.

I use MZ RPGmaker. Thanks.
Hi there!
It is working just fine here, on a battle with two enemies with the same ID:
1672434484910.png


So let's try figure this out, first, pay attention at these details:

1 - Enemies can only have levels, if they have a class. So make sure you attach a class to those enemies:
Spoiler
1672434616092.png

2 - Where you are using these script calls and plugin commands? Because they will only work while you are inside the battle.

3 - There are two types of plugin commands, ones that make changes by Id and ones that make changes by index. Make sure you are using the right one.

4 - If you manage to make all steps unti here, and it is still not working, try disabling your plugins and just let my plugins enabled, then test again. If they work, then it is a compatibility issue. Upload to me a sample project and send me on PM.
1. Classes are assigned via plugin command.
2. All plugin commands are being done in battle.
3. Using only by index plugin command. No tags on monsters.
4. I will try this, and if it still doesn't work I'll make a sample project and see if it still happens there.

Spoiler contains what my eventing looks like, it fires at start of battle. The first part of event works, and changes there class and level, its the second part that does not. I've tried changing levels with troop index set to -1, and it changes levels correctly for whole troop. Is my code correct below?

Spoiler: Event Code
plugin command.png

Thanks again, i'll keep you posted as soon as I have time to re-test everything with all other plugins off, and I'll try making a sample project if it still isn't working right.
1. Classes are assigned via plugin command.
2. All plugin commands are being done in battle.
3. Using only by index plugin command. No tags on monsters.
4. I will try this, and if it still doesn't work I'll make a sample project and see if it still happens there.

Spoiler contains what my eventing looks like, it fires at start of battle. The first part of event works, and changes there class and level, its the second part that does not. I've tried changing levels with troop index set to -1, and it changes levels correctly for whole troop. Is my code correct below?

Spoiler: Event Code

Thanks again, i'll keep you posted as soon as I have time to re-test everything with all other plugins off, and I'll try making a sample project if it still isn't working right.
Try to assign a class via note tag on these enemies too. Then when the battle begins, you can change the class with plugin commands.

Enemies need to have a class note tag to benefit from the class features. If you do not put a class on their note tags, they will not be created with the class features. Therefore, the plugin commands may not work properly.

1672463739738.png


For the second part of the event, try putting some show text commands, just for you to make sure the conditions are being met.
Did some more testing, since I had a moment. I think i figured it out. My enemies are all set to appear mid-battle. Basically i generate, battler images, states, and levels, then have them appear afterwards. Levels dont seem to be applied if enemy is still hidden. Making enemy appear before setting level fixes this. Still means i gotta work around this.

Hmmm, something else odd happens, if I set enemy to appear, but another enemy existed before it. The enemy i set to appear becomes the next Enemy index avaiblable?, even if it's supposed to be Index 1. But in the game, is still being referenced as enemy 1, but levels where applied to different index instead? Not sure will test more later. Out of time for tonight. I'll probably try recreating in a sample project and keep it super simple to try and narrow down what excatly is happening... Just confusing me at the moment and it's 1am after work where I'm at. Thanks again.

So I made a sample project. Was able to reproduce the bug I mentioned. Seems something wonky is going on with Appear mid-battle, and also plugin is not respecting Troop index correctly with said mechanic. Instead it seems to re-order them based on when they appear on screen? My best guess. Here's the download link for sample project. Sample Project Download.

Sometimes it also throws an error for referencing a non-existing troop index. Which should not happen when troop is set to 8 members I would think? "I'm assuming its because it's not counting the troop members that are still hidden." Hopefully I uploaded the file correctly, if there's an offical way to do it, I don't know how, I just threw it in a compressed rar, and uploaded it to mediafire. If there's a better way let me know, and I'll do that instead.
So I made a sample project. Was able to reproduce the bug I mentioned. Seems something wonky is going on with Appear mid-battle, and also plugin is not respecting Troop index correctly with said mechanic. Instead it seems to re-order them based on when they appear on screen? My best guess. Here's the download link for sample project. Sample Project Download.

Sometimes it also throws an error for referencing a non-existing troop index. Which should not happen when troop is set to 8 members I would think? "I'm assuming its because it's not counting the troop members that are still hidden." Hopefully I uploaded the file correctly, if there's an offical way to do it, I don't know how, I just threw it in a compressed rar, and uploaded it to mediafire. If there's a better way let me know, and I'll do that instead.
Hi there!

I downloaded it, but I need the project, not the game deployed. With the project, I can access the Dev tolls, and see how you setup the battle, enemies, note tags, plugin commands, etc.

So I will wait for you to send me the project, instead of the game deployed.
I've replaced the last download link with a new file. Should just replace the old file, use same previous link. I grabbed it from project folder this time, my bad. So I also tested some more when I had more proper time. I made 2 sets of enemy with, and without enemy class tags. The ones without tags get assigned a class after they appear. This results in errors occurring sometimes. "My theory being that plugin index is somehow not matching internal game index? If I set plugin command change class to index -1, then no error occurs on blanks2 without tags."

The first set of enemies have the tags, and are correct class always and haven't had an error.

Both sets of enemies refuse to change level via plugin cmd, or script cmd though. Not sure why this is. Maybe its user error or something else, tis very frustrating.

Spoiler: Error that occurs when assigning class to enemy that appeared mid way through battle.
Sample Bug.png
I've replaced the last download link with a new file. Should just replace the old file, use same previous link. I grabbed it from project folder this time, my bad. So I also tested some more when I had more proper time. I made 2 sets of enemy with, and without enemy class tags. The ones without tags get assigned a class after they appear. This results in errors occurring sometimes. "My theory being that plugin index is somehow not matching internal game index? If I set plugin command change class to index -1, then no error occurs on blanks2 without tags."

The first set of enemies have the tags, and are correct class always and haven't had an error.

Both sets of enemies refuse to change level via plugin cmd, or script cmd though. Not sure why this is. Maybe its user error or something else, tis very frustrating.

Spoiler: Error that occurs when assigning class to enemy that appeared mid way through battle.
Ok! I'm taking a look at it right now, here is what I can see:
Spoiler: spoiler
1672781768637.png

First of all, I tested the event the way you set it up. But for better debug everything, I removed the conditional branches, and just run the event on the start of the battle.

1 - You are setting the index wrong. On the editor, "#1 Blank" means troop member 0.
When you are dealing with ID of Enemy, Actors, Equips etc, ID always start at 1.
But when you are dealing with INDEX, they always start at 0.


That is probably why you are getting this error "cannot read property class of undefined", because you are pointing to an index that does not exist.

So, the first enemy on your troop, has index 0.
The second enemy on your troop, has index 1.
etc...

2 - I don't know where did you are taking those HP numbers from the enemies.
I guess, you are expecting that, when they change level with plugin commands or script calls, they also will change their current hp.
But what does happen, is that they only change their Max HP.
And so, you are doing a wrong comparison. You are stating on the Message Window, that the enemy has life 500 and their actual life is 100. But:
  • 500 = MAX HP.
  • 100 = Current HP.
If you compare 500 with their MAX HP, you will see that they are correctly.
Spoiler
1672782571115.png

1672782669505.png

1672782249001.png

You need to recover them, so they can fill their HP to it's maximum.
(But about that, I think I can also can add a new argument on the plugin command with that option.)

The class id 20, that you are using on enemies, starts with 100 hp. And that is why they all have 100 HP.
Ah, my regular game does recover enemies, and I forgot to put that in the project I made for you. which makes me feel a tad stupid. As for the index numbers for enemies, that is new information, and probably the user error i was making all along. I think you solved my issue with just that honestly. I'll try applying changes to my game and see if problem persists, but otherwise I think you solved it. Thanks a lot, hope you had a good new years.

Version 5.2.0 - 01/09/2022(MZ)​

  • Add a new argument that lets you choose if you want to apply a recover all on the enemy when changing their levels with the plugin command.
I'll be grabbing the new version. Awesome work! No issues here since you helped me.
Is it possible to change reward exp from a defeated enemy based on their level? Like a formula?
Is it possible to change reward exp from a defeated enemy based on their level? Like a formula?
Not with this plugin.
But maybe this one can help you:
Thanks for this! Balancing enemies became less difficult.

Suggestion though. Can you also add a notetag <ClassName: >? So that we can know what class the enemy is at one glance.
Thanks for this! Balancing enemies became less difficult.

Suggestion though. Can you also add a notetag <ClassName: >? So that we can know what class the enemy is at one glance.
Do you mean, visually show the enemy class in the game? Or are you talking about showing it on the notefield of the database?
Do you mean, visually show the enemy class in the game? Or are you talking about showing it on the notefield of the database?
I think the question was to be able to use the notetag with the ID or the name of the class - a number of the Yanfly/VS plugins that are related to classes and skills work that way.
This is a great plugin! I'm using in my project and it fit like a glove! Thanks a lot!
The plugin works great. Unfortunately, this has conflicts using Visustella's Battle AI Plugin when I use enemy skills on auto battle actors.

Screenshot 2025-01-14 094458.png


The workaround I've found is removing this.meetsActionLevelCondition(action) inside the Game_Enemy.prototype.meetsCondition. But I don't have any idea what this will break as I'm only using initial level and class id notetags.
The plugin works great. Unfortunately, this has conflicts using Visustella's Battle AI Plugin when I use enemy skills on auto battle actors.

View attachment 328884

The workaround I've found is removing this.meetsActionLevelCondition(action) inside the Game_Enemy.prototype.meetsCondition. But I don't have any idea what this will break as I'm only using initial level and class id notetags.
My guess is that Visu plugin is somehow using Game_Actor or another Game Object instead of Game_Enemy. And that is why "this.meetsActionLevelCondition(action)" is not a function, because it does not exist on the Game Actor.

Removing that, will make Enemies don't check if they have the proper level to use a skill. If you set the plugin parameter "Action Pattern Mode" to default, then you don't have to worry about that, you can keep using it with the changes you made.

Otherwise, try add that lines to the plugin:
JavaScript:
Game_Actor.prototype.meetsActionLevelCondition = function(){
    return true
}

Like that:

1736904327624.png
My guess is that Visu plugin is somehow using Game_Actor or another Game Object instead of Game_Enemy. And that is why "this.meetsActionLevelCondition(action)" is not a function, because it does not exist on the Game Actor.

Removing that, will make Enemies don't check if they have the proper level to use a skill. If you set the plugin parameter "Action Pattern Mode" to default, then you don't have to worry about that, you can keep using it with the changes you made.

Otherwise, try add that lines to the plugin:
JavaScript:
Game_Actor.prototype.meetsActionLevelCondition = function(){
    return true
}

Like that:

View attachment 328962
This solves the issue. I don't have to remove the code anymore. Thanks!

Original thread: https://forums.rpgmakerweb.com/threads/eli-enemy-class-they-now-have-levels-exp-equipments-and-class.135724/