Making monster events

Started by magic2345, June 28, 2008, 12:13:43 am

Previous topic - Next topic

magic2345

I'm trying to make encounters not random. What I mean is you need to touch the event monster to fight them. But I need to make it so that the enemy's behavior and  character set change according to the average of the party's level. Like if the player is stronger than the monster, the enemy event will mostly run away and have a blue color. Blue means it's weaker, White means it's just right, Red means it's stronger but still killable, Black means it's out of the player's league and purple means it's and event.

How do I make the behavior change according to the party's average level? Any ideas?

Thanks,
"The world is not beautiful, therefore it is." -Kino's Journey

"Hm...What would uncle say?....
Life is like the clouds, it has two sides and a silverlining inbetween...Like a sandwich!! When life is hard, you take a bite out of the silverlining...."
-Zuko
_________________________________
Game I'm currently working on:
Terra Eternity
Story : 1%
Characters : 3%
Mapping : 1%
Graphics : 3%
Scripts : 20%

Aqua

Doing this without RMXP up so... bear with me XD

Common event that's always on, have 1 variable for each actor in the party.  Variable 1 set it to Actor 1's level, Variable 2 set to Actor 2's and so on.  Add all of them and store it in another variable.  Then divide that variable by the number of actors you have.  And there... you have the average level.

Then on the monster event, set the conditions of the first page, the blue one to be, if Variable Average Level is 10 or greater, second page, white one with Variable Average Level is 15 or greater and so on.

Hope you under stand me :P

Blizzard

It can be done simplier if you use a code snipplet in a call script command so you don't have to bother with dynamic calculation of the level.

levels = 0
$game_party.actors.each {|actor|
    levels += actor.level}
$game_variables[ID] =
  levels / $game_party.actors.size


Use a parallel process which changes the color of events all the time. That way when you return from a battle, it will update the colors if your party's average level increased if necessary.
BTW, there is an event command that calls battles. You can also set up enemy actions to have a specific average party level as condition. This option calculates the average level internally, you don't have to worry about it.
Check out Daygames and our games:

King of Booze 2      King of Booze: Never Ever
Drinking Game for Android      Never have I ever for Android
Drinking Game for iOS      Never have I ever for iOS


Quote from: winkioI do not speak to bricks, either as individuals or in wall form.

Quote from: Barney StinsonWhen I get sad, I stop being sad and be awesome instead. True story.

magic2345

Thanks for the little script. Its soo much better than having to event it with 6 characters to calculate but I managed to event 4 characters before checking on the thread.

Quote from: Blizzard on June 28, 2008, 06:51:07 am
Use a parallel process which changes the color of events all the time. That way when you return from a battle, it will update the colors if your party's average level increased if necessary.


I also tried to do that. I put a parallel process on the map and then I made another event that ups my char's level by one. But even though the average level was higher, the event's charset didn't change at all.
This is what I put on the parallel process. (The calculating was done with eventing)

<>Common Event: Calculating Average Party Lv
<>Wait: 10 Frames
"The world is not beautiful, therefore it is." -Kino's Journey

"Hm...What would uncle say?....
Life is like the clouds, it has two sides and a silverlining inbetween...Like a sandwich!! When life is hard, you take a bite out of the silverlining...."
-Zuko
_________________________________
Game I'm currently working on:
Terra Eternity
Story : 1%
Characters : 3%
Mapping : 1%
Graphics : 3%
Scripts : 20%