RPG Maker Forums

I say it everytime "Hopefully this will be simple enough" and it never is, lol. Let's see if today's any different!

My game has a character with the ability to calm and tame animals and what I want is a way for the player to win a battle if the animal tamer calms the enemies down rather than killing them. They do this by afflicting them with a 'Soothed' status, which makes the enemy unable to act for a while (but is removed by damage, so you have to commit to the non-violent approach). Some enemies naturally will be easier to calm than others.

In-game design terms: I want the game to treat Soothed in a similar manner to how Final Fantasy treats Petrify, in that it counts as death if the entire troop is affected.

I thought all I would have to do is edit this in BattleManager:
Code:
  #--------------------------------------------------------------------------
  # * Determine Win/Loss Results
  #--------------------------------------------------------------------------
  def self.judge_win_loss
    if @phase
      return process_abort   if $game_party.members.empty?
      return process_defeat  if $game_party.all_dead?
      return process_victory if $game_troop.all_dead?
      return process_abort   if aborting?
    end
    return false
  end
And change it to this:
Code:
  #--------------------------------------------------------------------------
  # * Determine Win/Loss Results
  #--------------------------------------------------------------------------
  def self.judge_win_loss
    if @phase
      return process_abort   if $game_party.members.empty?
      return process_defeat  if $game_party.all_dead?
      return process_victory if $game_troop.all_dead?
      return process_victory if $game_troop.all_stateaffected(42)?
      return process_abort   if aborting?
    end
    return false
  end
However this resulted in an error stating that the 'aborting' line was missing a colon, which makes no sense because it's not like there was one there already :S I tried moving my new line BELOW aborting but that resutled in a 'expected 'end'' error. Am I simply placing this in the wrong order? Did I write the line wrong (should I remove the word 'all_' or something)?

I would really rather not make this a battle event that I have to copy to every troop, plus there would be no way to earn gold and experience if I did it that way.

Hopefully this is simple T_T I'm so exhausted from trying to fix stuff that should take 5 minutes but takes a whole day instead.

Latest Threads

Latest Profile Posts

Day 9 of giveaways! 8 prizes today :D
He mad, but he cute :kaopride:

Our latest feature is an interview with... me?!

People4_2 (Capelet off and on) added!

Just beat the last of us 2 last night and starting jedi: fallen order right now, both use unreal engine & when I say i knew 80% of jedi's buttons right away because they were the same buttons as TLOU2 its ridiculous, even the same narrow hallway crawl and barely-made-it jump they do. Unreal Engine is just big budget RPG Maker the way they make games nearly identical at its core lol.

Forum statistics

Threads
106,036
Messages
1,018,461
Members
137,821
Latest member
Capterson
Top