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.

Enemy (Monster) Capture & Random Level Encounters

I'm in a bit of a pickle... I've been creating a "Pokemon" clone for a little while now, and although I'm an intermediate script editor, I fail at scripting from scratch and have no idea where to begin with a capture system...
I also have an issue with how I'm going to go about spawning random level monsters... :-/

My idea is maybe calling the monsters from the heroes-list... The monsters start at hero #5 and end at hero #255. The enemy encounters will spawn a random level monster off the area monster list. (Maybe defined in an event on the map?) The capture script could use global variables (MonCap1, MonCap2, etc.)...

Beyond that, I have no clue... I'm open to ANYTHING that will work, aside from creating 99 (lvls) monsters for each monster. ':|

I would greatly appreciate any help/attempt at these scripts, and although I have nothing to offer in return, you will MOST DEFIANTLY receive complete credit for the scripts and a big spot in the game credits.

THANX~ Seph
 
I created a script a while ago which made enemies get their stats from the actors. I also combined it with my transformation script which allowed me to transform into enemies directly.
I've edited it a bit so it works more like I think you want it to:
Code:
class Game_Enemy < Game_Battler
  
  def get_stats
    for i in 5...$data_actors.size
      if $game_actors[i].name == self.name
        return $game_actors[i].stats
      end
    end
    return [1, 0, 1, 1, 1, 1]
  end
  
  def base_maxhp
    return get_stats[0]
  end
  
  def base_maxsp
    return get_stats[1]
  end
  
  def base_str
    return get_stats[2]
  end
  
  def base_dex
    return get_stats[3]
  end
  
  def base_agi
    return get_stats[4]
  end
  
  def base_int
    return get_stats[5]
  end
  
end

class Game_Actor < Game_Battler
  
  def stats
    return [self.base_maxhp, self.base_maxsp, self.base_str, self.base_dex, self.base_agi, self.base_int]
  end
  
end
Just name the actor the samething as the enemy, if two have the same name let me know and I can make it id based or something. You can change the actor's levels to increase the level of the enemy (well the stats).
Hope that helps.
 
Sorry I missed a bit of code (the section in game_actor):
Code:
class Game_Enemy < Game_Battler
  
  def get_stats
    for i in 5...$data_actors.size
      if $game_actors[i].name == self.name
        return $game_actors[i].stats
      end
    end
    return [1, 0, 1, 1, 1, 1]
  end
  
  def base_maxhp
    return get_stats[0]
  end
  
  def base_maxsp
    return get_stats[1]
  end
  
  def base_str
    return get_stats[2]
  end
  
  def base_dex
    return get_stats[3]
  end
  
  def base_agi
    return get_stats[4]
  end
  
  def base_int
    return get_stats[5]
  end
  
end

class Game_Actor < Game_Battler
  
  def stats
    return [self.base_maxhp, self.base_maxsp, self.base_str, self.base_dex, self.base_agi, self.base_int]
  end
  
end
 
hey Fomar0153, That script you posted earlier, what exactilly is it? when you say Transformation does this meen you transform into the enemy? Im not sure if your familiar with Pokemon or the Games but there is one called Ditto. He transforms into the pokemon he is battling. Is this pretty much the same or am I completely off?
 
I said I combined it with my transformation script, combined you can have a ditto effect being as enemies are defined in the actors section of the database and my transformations script allows actors to transform into eachother.
 

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