Envision, Create, Share

Welcome to HBGames, a leading amateur game development forum and Discord server. All are welcome, and amongst our ranks you will find experts in their field from all aspects of video game design and development.

HELP: Common Event: Auto-Level Enemies

Listen, I'm setting up a common event that automatically adjusts all enemies stats, based on all party stat averages multiplied by all enemy stat averages, divided by a modifier, blah blah, multiplied by enemy rank

Main Boss = 25
Sub-Boss = 20
Master = 15
Slave = 10
Lackey = 5

Divided by 100
Enemy Type X Game Difficulty

That's all done with the common event^^^

Then you can set the character's stats based on all that, using the Enemy Type list above, so it looks like this (Set up at the beginning of battle within a troop event page)...

Common Event: Auto-Level Enemies
Monster[1] HP + [v/Main Boss]
Monster[2] HP + [v/Sub-Boss]
Monster[3] HP + [v/Sub-Boss]
Common Event: Auto-Level (Zero Out Variables)

This auto-adjusts all enemy stats based on calculations made with the common event/troop event page...


ONLY PROBLEM: Sure, I can change HP, SP and status of a monster... but how can I change a monster's attributes within a battle? Stuff like Str, Dex, Agl, Int and the such...?

I just realised there's no event tabs for these >.<

Believe me, I've searched long and hard through help files, can't find it, thats why I'm asking ya'll!
 
There is no function to adjust an individual monster's attributes. Mostly because they don't exist. The battle formulas access the "base_str", which are attributes of the game_data object (The single database 'enemy' that acts as a template for each enemy that gets created in battle.) You need to leave the base attributes as a baseline for your formula. So, to do what you're describing, you'd have to edit the Game_Enemy class to include str, dex, agi & int attributes, then all of the battle formulas that look at "str" to return a value based on your formula.

Or, you could compromise & create multiple copies of each monster with varying attributes, and just start a battle with the appropriate one based on the party's attributes.

Either way, it's a bunch of work.

Maybe someone with more battle scripting EXP will chime in.

Be Well
 

khmp

Sponsor

$game_troop.enemies will get you the array of Game_Enemy's currently fighting.

In adjusting the enemy stats in the Common Event where you go about adjusting the stats use 'Script...'

Code:
if $game_troop.enemies != []
  for enemy in $game_troop.enemies
    next if enemy == nil
    enemy.str = new_value
    enemy.dex = new_value
    enemy.agi = new_value
    enemy.int = new_value
  end
end

I think that should work.

Good luck with it Kain Nobel! :thumb:
 

Thank you for viewing

HBGames is a leading amateur video game development forum and Discord server open to all ability levels. Feel free to have a nosey around!

Discord

Join our growing and active Discord server to discuss all aspects of game making in a relaxed environment. Join Us

Content

  • Our Games
  • Games in Development
  • Emoji by Twemoji.
    Top