Temporarily disable EXP from enemies

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
78
Reaction score
2
First Language
Italian
Primarily Uses
RMVXA
I want to make a function called "Safe mode". You can turn it on wherever you want in emergency situations. I want to make this mode to:
- make the party immortal (already did, with status)
- disable (until the switch is on) gained exp and gold from enemies.

Can you help me to do the second part?
 

Andar

Veteran
Veteran
Joined
Mar 5, 2013
Messages
31,813
Reaction score
7,885
First Language
German
Primarily Uses
RMMV
the exp is easy - just look at the death state, that also reduces exp gain to zero.

gold drop to zero needs either a script, or you'll have to get tricky with drops by setting the gold on all enemies to zero and add the gold later indirectly.
 

Sparky89

Game Designer
Veteran
Joined
Dec 18, 2019
Messages
246
Reaction score
109
First Language
English
Primarily Uses
RMMV
Can you not just make a copy of that monster and put EXP and GOLD to 0 ? or am i reading your question incorrectly?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,820
Reaction score
623
First Language
English
Primarily Uses
RMVXA
Something like this?
Ruby:
module BattleManager
  def self.process_victory
    play_battle_end_me
    replay_bgm_and_bgs
    $game_message.add(sprintf(Vocab::Victory, $game_party.name))
    if $game_switches[1] == true
      display_exp
      gain_gold
      gain_drop_items
      gain_exp
    end
    wait_for_message
    SceneManager.return
    battle_end(0)
    return true
  end
end
Not sure if the check against game_switches will work inside BattleManager
 
Last edited:

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
78
Reaction score
2
First Language
Italian
Primarily Uses
RMVXA
Something like this?
Ruby:
module BattleManager
  def self.process_victory
    play_battle_end_me
    replay_bgm_and_bgs
    $game_message.add(sprintf(Vocab::Victory, $game_party.name))
    if $game_switches[1] == true
      display_exp
      gain_gold
      gain_drop_items
      gain_exp
    end
    SceneManager.return
    battle_end(0)
    return true
  end
end
Not sure if the check against game_switches will work inside BattleManager


I tried this code and nothing changed.
What you exactly did? If game switch is on gain gold, exp, items and else?
I think the solution is if game switch is if switch is on do not gain gold.
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,820
Reaction score
623
First Language
English
Primarily Uses
RMVXA
Do you have switch 1 on? or did you change the number?
 

Roninator2

Gamer
Veteran
Joined
May 22, 2016
Messages
2,820
Reaction score
623
First Language
English
Primarily Uses
RMVXA
So it is written in a way that if switch 72 is on it will process normally. if switch 72 is off it will not process what is inside the if statement.
I also just added a wait as it did not do that otherwise.
 

Ina00

Veteran
Veteran
Joined
Oct 10, 2020
Messages
78
Reaction score
2
First Language
Italian
Primarily Uses
RMVXA
So it is written in a way that if switch 72 is on it will process normally. if switch 72 is off it will not process what is inside the if statement.
I also just added a wait as it did not do that otherwise.

Oh ok i'll retry
 

Latest Threads

Latest Profile Posts

"Man is made by his belief. As he believes, so he is."-Krishna
FastFood in my country is neither fast nor cheap like it's expected to be, but people still buy a lot of it. I don't want to imagine how much of it people would eat if it was.
Started finishing up my bosses and characters...I don't know how long...but its going to take long...

I ended up needing to do a chapter one world map remake. It's still WIP but coming along nicely. =D
Stream will be live shortly! I will be beginning a play-through of Resident Evil 4! Feel free to drop by!

Forum statistics

Threads
107,753
Messages
1,031,900
Members
139,898
Latest member
Karuu
Top