Enemy Levels

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English



This script allows you to assign levels to enemies. The level of an enemy is determined when you encounter the enemy.


The level is specified as a formula, which means you can define two types of levels:


1. Static level. This means the enemy's level never changes throughout the game. For example, a slime might always be level 1 no matter what.


2. Dynamic level. This means the enemy's level relies on data that may change throughout the game. For example, you can bind an enemy's level to a game variable so that its level changes whenever you change the variable.


Enemy levels on their own don't do anything, but with combined with enemy classes and other scripts, it can add a lot of customization options.


In addition to setting enemy levels, this script provides a number of other enemy level related functionality, such as changing levels during battle and setting max/min enemy levels.


Get it at Hime Works!
 
Last edited by a moderator:

Selchar

Veteran
Veteran
Joined
Dec 28, 2012
Messages
299
Reaction score
81
First Language
English
Primarily Uses
Interesting, oh, looking through the code there are some small mistakes.

On Lines 130, 143, and 156 you have t=$game_switches, which is already covered by s=$game_switches.  That and according to the instructions they should probably be t=$game_troop instead.

I don't see that problem in your other enemy/formula scripts so no problems in those thankfully, but thought you should know ^^
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Thanks, the first one was me typing and not reading what I typed and the others were a result of copy-pasting.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Not sure why such a script does not have more comments. Makes it harder for a newbie like me to go through it and get the extra help. So I wanted to add say level 1 bat and level 5 and 10 and 15 and so forth. I added the simple <enemy level: 50> and I was hoping to fight a level 50 bat. Well it was a level 50 bat but none of its stats went up. At this part I kept reading the comments but was pretty confused. Being newer to RPG Maker I tried looking for an example game in the thread but I could not find one.

Any help would be wonderful. 
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
It isn't obvious in the post, but you need to use something like Enemy Classes (http://www.himeworks.com/2013/11/16/enemy-class/) if you want to set up stat curves.
Thanks so much it works really well. I guess I will have to learn how to balance my game a bit more. I tried basic setting actor to 50 with a good weapon vs 50 slime and its class to just default values and got owned a lot haha.

Is there a way to do the class/level through event call only and not through enemy comments? Right now I use the roaming feature of mobs on the map through the event. So rather then having to create say 5 different slime enemies it would be sort of nice if I could just set it through the event and nothing in their comments maybe beside class if that is a must.

I will have to try your other scripts as well I hear you have a gold/exp one as well :)
 

ninjalex

Veteran
Veteran
Joined
Aug 15, 2012
Messages
252
Reaction score
55
First Language
English
Primarily Uses
Looks great!
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Is there a way to do the class/level through event call only and not through enemy comments? Right now I use the roaming feature of mobs on the map through the event. So rather then having to create say 5 different slime enemies it would be sort of nice if I could just set it through the event and nothing in their comments maybe beside class if that is a must.
Yes, enemy levels can be adjusted dynamically during battle using script calls.


Check the section called "Adjusting Levels" in the usage section for more details.


Similarly, enemy classes can also be changed. It is described in the usage section for that script as well.
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thanks :) I tried this:

Got this when I went into combat:

 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Oh, I didn't add support for that.


The script call is assumed to be used during battle (eg: in the troop event).


But that is a common use case, so I'll add that some point.
 

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Oh, I didn't add support for that.

The script call is assumed to be used during battle (eg: in the troop event).

But that is a common use case, so I'll add that some point.
Ahhh, Thanks. Yeah I was hoping to built it right into the event so I did not need to touch the database as much. My friend and I are working on this and end up syncing with dropbox or more like merging by hand but through dropbox. So we work on different maps and such but everytime we both touch the database its a bit of a pain so we try hard to keep everything in the event level.

Thanks for the information and sorry for getting back so late. Just got back home from my Birthday :)
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
Well, one workaround is to set a variable outside of battle, and then have the troop read the variable on turn 0 and then make the script call.


This may be preferable over setting the level outside of battle.
 
Last edited by a moderator:

Kane Hart

Elmlor.com
Veteran
Joined
Jun 27, 2014
Messages
656
Reaction score
166
First Language
English
Thanks I will give that a try :)
 

DarthVollis

Moogle Master
Veteran
Joined
May 5, 2012
Messages
409
Reaction score
85
First Language
English
Primarily Uses
I am using an ABS and enemies levels. Can you make it where the levels can be modified outside of battle? 
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
How do you assign levels to enemies on the map? Because this was designed with the default battle system in mind assuming enemies are organized in a troop.
 
Last edited by a moderator:

DarthVollis

Moogle Master
Veteran
Joined
May 5, 2012
Messages
409
Reaction score
85
First Language
English
Primarily Uses
They are not. They are taken straight from the database. I am using the Pearl ABS and to make an enemy you set it up in the database and tag the event with something like this in the event named. <enemy 34> That will use the information from the 34th enemy in the database. The levels appear on the name of the enemy after I set it up in the note box.
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
From what you're saying, I would likely need to know how the enemies are set up in order to reference them so that I can actually change the level.


I can't just change the database enemy's level directly because that will either affect every enemy, or won't affect existing enemies.


If you want an add-on made for pearl ABS you can create a demo with everything set up (preferably a minimal setup so I don't need to spend much time downloading it)
 

Tsukihime

Veteran
Veteran
Joined
Jun 30, 2012
Messages
8,564
Reaction score
3,846
First Language
English
The enemies are just thrown into an array, which makes it less convenient for updating.


The first problem I see is this

@enemy = Game_Enemy.new(0, $1.to_i) if event.name =~ /<enemy: (.*)>/iAll enemies have the same index. There is nothing distinguishing one enemy from another, which means you have basically no way to reference a specific enemy.
In order to change this, the script would need to be changed so that a unique ID is used for each enemy. An event ID can be used, but this becomes an issue if you start having dynamic spawning, where random ID's are assigned to enemies.


Unfortunately adding enemies to the map is not written modularly so I need to overwrite a lot of logic just to add this change.


Here's the patch


http://www.himeworks.com/2014/07/13/enemy-levels-pearl-abs-patch/
 
Last edited by a moderator:

ThatguyIsHere

Warper
Member
Joined
Jun 10, 2017
Messages
1
Reaction score
0
First Language
engils
Primarily Uses
RMVXA
so would the enemy's level be the same as the player
 

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

Latest Threads

Latest Posts

Latest Profile Posts

Couple hours of work. Might use in my game as a secret find or something. Not sure. Fancy though no? :D
Holy stink, where have I been? Well, I started my temporary job this week. So less time to spend on game design... :(
Cartoonier cloud cover that better fits the art style, as well as (slightly) improved blending/fading... fading clouds when there are larger patterns is still somewhat abrupt for some reason.
Do you Find Tilesetting or Looking for Tilesets/Plugins more fun? Personally I like making my tileset for my Game (Cretaceous Park TM) xD
How many parameters is 'too many'??

Forum statistics

Threads
105,865
Messages
1,017,059
Members
137,574
Latest member
nikisknight
Top