Enemy Levels

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English



Do you want your enemies to have levels like actors?

You could use levels as a way to determine their difficulty level compared to the actor's current level. For example, if your actor is currently level 10 and the enemy is level 20, you might use a red font to draw the enemy's name to indicate that it is dangerous.

Levels themselves do not mean much on their, for they are just a number. They become more powerful once you use other plugins that make use of them.

For example, a plugin that you can use is Enemy Classes, which allows you to assign classes to enemies. Using both plugins, you can now set up parameters curves based on the enemy's level, as well as the skills they can use based on the level.
 

More information and downloads available at HimeWorks
 
Last edited by a moderator:

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
625
Reaction score
343
First Language
English
Primarily Uses
N/A
You've been slinging plugins like crazy! Nice to see this one.

With this plugin available, is there a way I can use a command to check for enemy levels? I'm thinking about using this with Yanfly Enemy AI to restrict skills based on enemy level.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
You've been slinging plugins like crazy! Nice to see this one.

With this plugin available, is there a way I can use a command to check for enemy levels? I'm thinking about using this with Yanfly Enemy AI to restrict skills based on enemy level.
A quick skim through yanfly's instruction, I think `user` references the enemy.

So you should be able to say

Code:
user.level()
Which returns the enemy's current level.
 
Last edited by a moderator:

CyndaBytes

Creator and Destroyer of Worlds
Veteran
Joined
Aug 3, 2015
Messages
89
Reaction score
41
First Language
Italian
Primarily Uses
Nice!

A question:
a.level or b.level work for enemies in battle formula?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
Nice!


A question:


a.level or b.level work for enemies in battle formula?
Oops, I forgot that was how you access level for actors.


I've updated the plugin to make it the same way to access for both actors and enemies


It will say Nov 26. If not, refresh browser in case it caches javascript.
 

Fox536

Veteran
Veteran
Joined
Nov 5, 2015
Messages
173
Reaction score
60
Primarily Uses
Hey so does this have any way to set the level for enemies by a map note or is it a per enemy level?

I'd like to use this in combination with your enemy classes plugin to have leveled enemies, so that certain zones are certaint levels. But if this is setup per enemy note data then I'll go with another plugin.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
You can use a variable for the enemy's level and then set the variable when you enter a map.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
Plugin has been updated to v1.2

You can now display the enemy's level in its name during battle.

In the plugin parameters there is an option to specify a "formatted string" for the name.

By default it is

Code:
%1 Lv %2
Which will look like this in-game
Code:
Slime Lv 5
 

Fox536

Veteran
Veteran
Joined
Nov 5, 2015
Messages
173
Reaction score
60
Primarily Uses
You can use a variable for the enemy's level and then set the variable when you enter a map.
oh I see, I tested it, and came up with something to get what I was aiming for, thanks as always good work :)
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
Hime, is there a reason why this formula would error?

<enemy level: 1 + Math.randomInt(v[4]) + v[3] + v[2] />ReferenceError: v is not defined    at eval (eval at <anonymous> (file:///X:/SkyDrive/_RMMV%20Projects/Projects/Prequel%20Project/js/plugins/HIME_EnemyLevels.js:179:12), <anonymous>:1:28)While this seems to work fine:

<enemy level: 1 + Math.randomInt($gameVariables.value(4)) + $gameVariables.value(3) + $gameVariables.value(2) />Also... Once the level is set, it seems to be set for all battlers that happen to be the same enemy type. Is this intentional? (Its not how the VXAce version worked)
 

Neo Soul Gamer

Veteran
Veteran
Joined
Aug 10, 2012
Messages
625
Reaction score
343
First Language
English
Primarily Uses
N/A
I'm curious as to how we would set an enemy level to the average level of the current party in battle. 
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
Hime, is there a reason why this formula would error?

<enemy level: 1 + Math.randomInt(v[4]) + v[3] + v[2] />ReferenceError: v is not defined    at eval (eval at <anonymous> (file:///X:/SkyDrive/_RMMV%20Projects/Projects/Prequel%20Project/js/plugins/HIME_EnemyLevels.js:179:12), <anonymous>:1:28)While this seems to work fine:
Code:
<enemy level: 1 + Math.randomInt($gameVariables.value(4)) + $gameVariables.value(3) + $gameVariables.value(2) />
Game_Variables uses .value to access specific variables. It doesn't implement an array-access notation like v[4].

You'll have to use .value(4) for things like that.

Also... Once the level is set, it seems to be set for all battlers that happen to be the same enemy type. Is this intentional? (Its not how the VXAce version worked)
I'm pretty sure this is how I designed my enemy levels script for Ace.

In the database, you have a Slime.

If you add 3 slime to the troop, that's just instances of the same slime.

If you would like to give them random levels you would need to provide that as part of the level formula.

I'm curious as to how we would set an enemy level to the average level of the current party in battle.
You can use the variable approach, where you specify the level of the enemy as a variable, and then you update that variable with the average level of the current party.

I believe this is the most versatile approach, as you can then determine what the levels are for each area, each event, and so on.
 

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
Game_Variables uses .value to access specific variables. It doesn't implement an array-access notation like v[4].

You'll have to use .value(4) for things like that.
edit: I should have included them last night when I posted the question. I was on my way to bed at the moment and didn't think about it.

Sorry if I ambushed you. I understand that writing so many different plugins can often result in not remembering what you chose to implement in any particular one of them.

(I apologize!)

Here are your instructions...

== Usage ==Note-tag enemies with <enemy level: FORMULA />Where the formula is any valid javascript formula that evaluates to anumber.For example, you could write numbers <enemy level: 23 />Or you could include the game variables, using the formula variable `v`: <enemy level: 5 + v[3] * 4 />Which means the enemy's level is equal to 5 plus the value ofvariable 3 multiplied by 4. This can be used to set up dynamic levelsbased on things like difficulty.
I'm pretty sure this is how I designed my enemy levels script for Ace.

In the database, you have a Slime.

If you add 3 slime to the troop, that's just instances of the same slime.

If you would like to give them random levels you would need to provide that as part of the level formula.
I'm sorry if I am being rude, but the formula I provided above is using a randomization in the level formula.

It works as it is. The enemy levels do randomize. However, the level is the same for each enemy of the same type.

If you have 3 of the same enemy type, they will always be the same level as each other.

edit:

In the VXAce version, any randomization applied to each member individually. In other words, you could have Lv3, Lv4, Lv5, etc... of the same enemy in a troop. The way this works now, if the formula says Level 5, all enemies of that type are Level 5. Next battle, if the formula says Level 3, then all of them are Level 3... Etc...
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
Oh, I forgot to update my plugin usage lol the ruby syntax is still there.

If you're referring to this formula:

<enemy level: 5 + v.value(3) * 4 />There is no randomness. Variable 3 is a fixed value.If you wanted randomness, you would have to specify that you want a random number:

<enemy level: 5 + Math.floor(Math.random() * (v.value(3) - v.value(4)) + v.value(4)) />Assuming value 3 is the range max and 4 is the range min.If you had a plugin that would change variable 3 in between each enemy creation, then that might be the cause.
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
Ok... now I am totally confused. :D (Maybe I am having one of those brain fart days)

Your example:

<enemy level: 5 + Math.floor(Math.random() * (v.value(3) - v.value(4)) + v.value(4)) />My example:

<enemy level: 1 + Math.randomInt($gameVariables.value(4)) + $gameVariables.value(3) + $gameVariables.value(2) />Shouldn't randomInt be accomplishing the same thing?

If you had a plugin that would change variable 3 in between each enemy creation, then that might be the cause.
I'm absolutely positive that gameVariable 4 is only ever set manually before the battle initiates, and it is not touched in any other capacity. So lets say that I set it to 5. Shouldn't the formula I am using, allow for a swing of between 0 and 4 levels for each enemy of the type that has that formula?

Because right now, all enemies of that type are always the same level. Regardless. :) Yes, that level is random for each battle. But not for each individual enemy in that battle.

edit: I should clarify that all enemies are the same type.
 
Last edited by a moderator:

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
OH, ok I thought you were referring specifically to those formulas and wondering why random levels don't work.


I checked the plugin and I'm storing the level with the database enemy, which is why they're always the same.


I've updated the plugin to 1.3 so that the formulas are evaluated per enemy and NOT stored with the database template.
 
Last edited by a moderator:

Roguedeus

It's never too late to procrastinate...
Veteran
Joined
Mar 19, 2013
Messages
527
Reaction score
106
First Language
English
Primarily Uses
N/A
Works great!
 

otonohitoka

Writer and Composer
Member
Joined
Dec 8, 2015
Messages
25
Reaction score
2
First Language
English
Primarily Uses
I also posted on the blog post, but I'm not sure which one gets checked more often. I'll just copy/paste the comment here:

I’m having issues getting the Enemy Levels and Class plugins to work. My battle formula is:
(((((((2 * a.agi/5+2) * a.atk * 50) / b.def) / 50) +2) * a.luk / 10) * (Math.randomInt(39) + 200)) / 238
and it’s not updating anything when I modify the level of the enemy. It’s also not increasing the def of the enemy when I increase the level. I am using Yanfly’s scripts, and I’ve tried it above and below Yanfly’s Battle Core.

Any tips?
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,230
Reaction score
3,072
First Language
English
I also posted on the blog post, but I'm not sure which one gets checked more often. I'll just copy/paste the comment here:


I’m having issues getting the Enemy Levels and Class plugins to work. My battle formula is:


(((((((2 * a.agi/5+2) * a.atk * 50) / b.def) / 50) +2) * a.luk / 10) * (Math.randomInt(39) + 200)) / 238


and it’s not updating anything when I modify the level of the enemy. It’s also not increasing the def of the enemy when I increase the level. I am using Yanfly’s scripts, and I’ve tried it above and below Yanfly’s Battle Core.


Any tips?
Seems like it was a matter of forgetting to turn the plugin on.
 

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

Latest Threads

Latest Posts

Latest Profile Posts

suspended on twitter for calling an ahole an ahole & appealing the tweet; furious at myself for being even slightly upset with my suspension: oh no, you've been temporarily banned from hell. GET OVER IT, me.
how can you download the tiles from a forum post here? HELP
That moment when you post the wrong download link to your game and wonder why it got so few downloads... :mad:
Trying to make it so my map is cleared of "random" events after the player leaves the map... to little success >.< I think I might need to ask help for this.
Had my first interaction with a legit homophobe concerning one of my games today. Tempting to engage, but pointless.

Forum statistics

Threads
94,245
Messages
919,367
Members
123,959
Latest member
CecilGP
Top