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,764
Reaction score
7,866
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
108
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,803
Reaction score
616
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,803
Reaction score
616
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,803
Reaction score
616
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
 

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

When the Map Generator throws in the assets in the most dumbest way possible - your path is blocked :D

I went to sleep at 3 am because of my anxiety. Set up my alarm for 7 am so that I could have sasagues for breakfast and do morning routine before lessons starts at 8 am. I knew I wouldn't be able to sleep even after my lessons finished because I have to visit my grandparents today I was sad bc I was really tired. Thats when I realised. My lesson starts at 9 am. I could get one extra hour of sleep if I didnt forget it

Forum statistics

Threads
107,556
Messages
1,030,528
Members
139,672
Latest member
WDRS
Top