• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
[v12+] Difficulty Modes

Resource [v12+] Difficulty Modes 1.1.1

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
382
-FL- submitted a new resource:

[v12+] Difficulty Modes - Allows an easy way to make difficulty modes like the ones on Key System in B2W2.

This script is for Pokémon Essentials. It allows an easy way to make difficulty modes like the ones on Key System in B2W2.

A difficulty mode may change:
  1. Wild Pokémon levels
  2. Trainer's Pokémon levels
  3. Trainer's skill level
  4. Trainer's money given
  5. Trainer definition (define a different trainer entry in trainers.txt)
  6. Exp received
Tested on Essentials v19.1 and v20.1. More versions (v12) on link. If this script isn't working on latest Essentials version, please...

Read more about this resource...
 
Has anyone tried turning this into an options in the options menu?
 
Has anyone tried turning this into an options in the options menu?
You need an option to change a variable (not directly related to this script). Put the below code in the script or above main:

Way A - Simpler, but won't work a option screen in start menu before save was created.

Ruby:
Expand Collapse Copy
MenuHandlers.add(:options_menu, :difficulty_mode, {
  "name"        => _INTL("Difficulty"),
  "order"       => 50,
  "type"        => EnumOption,
  "parameters"  => [_INTL("Lunatic."), _INTL("Vanilla")],
  "description" => _INTL("Change the difficulty of the game. Try to not change it too often."),
  "get_proc"    => proc { $game_variables ? $game_variables[90] : 0 },
  "set_proc"    => proc { |value, _scene| $game_variables[90] = value if $game_variables}
})

Way B - Works at option screen in start menu, but you need to call script line '$PokemonSystem.refresh_var' in Oak's letture.

Ruby:
Expand Collapse Copy
MenuHandlers.add(:options_menu, :difficulty_mode, {
  "name"        => _INTL("Difficulty"),
  "order"       => 50,
  "type"        => EnumOption,
  "parameters"  => [_INTL("Lunatic."), _INTL("Vanilla")],
  "description" => _INTL("Change the difficulty of the game. Try to not change it too often."),
  "get_proc"    => proc { $game_variables ? $game_variables[90] : $PokemonSystem.difficultyMode },
  "set_proc"    => proc { |value, _scene| 
    $PokemonSystem.difficultyMode = value
    $PokemonSystem.refresh_var
  }
})

class PokemonSystem
  attr_accessor :difficultyMode

  alias :_old_fl_option_var_initialize :initialize
  def initialize
    _old_fl_option_var_initialize
    @difficultyMode = 0
  end

  def refresh_var
    return if !$game_variables
    $game_variables[90] = @difficultyMode
  end
end
 
Heyo, just installed this earlier and it doesn't seem to be working for me. I'll share my code and teams, but it refuses to run any other than the "hard" one (which is the default difficulty)
#-------------------------------
[LEADER_Koga,Koga,1]
LoseText = That was a clear display of your swiftness, trainer... I am defeated.
Pokemon = WOOPER,10
Form = 1
Moves = MUDSHOT,TOXIC
AbilityIndex = 1
IVs = 15,15,15,15,15,15
EVs = 32,0,0,0,0,0
Pokemon = KOFFING,12
Moves = CLEARSMOG,STOCKPILE
AbilityIndex = 0
Item = ORANBERRY
IVs = 15,15,15,15,15,15
EVs = 0,0,0,0,0,32

#-------------------------------
[LEADER_Koga,Koga,101]
LoseText = MED: That was a clear display of your swiftness, trainer... I am defeated.
Pokemon = WOOPER,10
Form = 1
Moves = MUDSHOT,TOXIC
AbilityIndex = 1
IVs = 10,10,10,10,10,10
Pokemon = KOFFING,12
Moves = CLEARSMOG,STOCKPILE
AbilityIndex = 0
Item = ORANBERRY
IVs = 10,10,10,10,10,10
#-------------------------------
[LEADER_Koga,Koga,201]
LoseText = EASY: That was a clear display of your swiftness, trainer... I am defeated.
Pokemon = WOOPER,10
Form = 1
Moves = MUDSHOT,TOXIC
AbilityIndex = 1
Pokemon = KOFFING,12
Moves = CLEARSMOG,STOCKPILE
AbilityIndex = 0



# The code stuff from your plugin
VARIABLE=84

def self.current_mode
return nil if DifficultyModes::VARIABLE<=0
difficulty_hash={}

hard_mode = Difficulty.new
hard_mode.id_jump = 0
hard_mode.skill_proc = proc{|skill_level,trainer|
next 100
}
difficulty_hash[1] = hard_mode

medium_mode = Difficulty.new
medium_mode.id_jump = 100
medium_mode.skill_proc = proc{|skill_level,trainer|
next 64
}
difficulty_hash[2] = medium_mode

easy_mode = Difficulty.new
easy_mode.id_jump = 200
easy_mode.skill_proc = proc{|skill_level,trainer|
next 48
}
difficulty_hash[3] = easy_mode

return difficulty_hash[pbGet(DifficultyModes::VARIABLE)]
end


Any ideas? My plugin list is

Deluxe Battle Kit
Difficulty Modes
Gen 9 Animation Project
Gen 9 Pack Scripts
Level Caps EX
Modular Pokemon Selection
v21.1 Hotfixes


Appreciate any insight on the matter :)
 
Heyo, just installed this earlier and it doesn't seem to be working for me. I'll share my code and teams, but it refuses to run any other than the "hard" one (which is the default difficulty)

Any ideas? My plugin list is

Deluxe Battle Kit
Difficulty Modes
Gen 9 Animation Project
Gen 9 Pack Scripts
Level Caps EX
Modular Pokemon Selection
v21.1 Hotfixes


Appreciate any insight on the matter :)
Did you correctly turned it into a plugin and compiled it? Check if it was mentioned in load message at output window.

I think that other plugins don't interfere, but I aren't 100% sure. Test in a clear Essentials if you wish to make sure.

I tested your code and it is working (the id jump, I didn't checked the other stuff).
 
Last edited:
Did you correctly turned it into a plugin and compiled it? Check if it was mentioned in load message at output window.

I think that other plugins don't interfere, but I aren't 100% sure. Test in a clear Essentials if you wish to make sure.

I tested your code and it is working (the id jump, I didn't checked the other stuff).

I downloaded the files from github, and the folder doesn't properly compile whenever I try. Tried it out on a fresh copy too, nothing.

-> Compiling plugin scripts...done
-> Loaded plugin: v21.1 Hotfixes (ver. 1.0.9)
-> Successfully loaded 1 plugin(s)
 
I downloaded the files from github, and the folder doesn't properly compile whenever I try. Tried it out on a fresh copy too, nothing.

-> Compiling plugin scripts...done
-> Loaded plugin: v21.1 Hotfixes (ver. 1.0.9)
-> Successfully loaded 1 plugin(s)
did you downloaded the folder and put it in Plugin folder right away? or you added a meta.txt (wich ins't provided) and is still not loading? because its not plug 'n play completly
 
did you downloaded the folder and put it in Plugin folder right away? or you added a meta.txt (wich ins't provided) and is still not loading? because its not plug 'n play completly

"To this script works, put it above main OR convert into a plugin." Yeah so in my defense here, these aren't very good instructions IMO. I assumed by "convert into a plugin" this just meant 'hey doofus put this in your plugins folder.' I'd recommend updating this to actually explain what to do with the script. As someone who doesn't know all the ins and outs of Essentials, that would be appreciated.
 
"To this script works, put it above main OR convert into a plugin." Yeah so in my defense here, these aren't very good instructions IMO. I assumed by "convert into a plugin" this just meant 'hey doofus put this in your plugins folder.' I'd recommend updating this to actually explain what to do with the script. As someone who doesn't know all the ins and outs of Essentials, that would be appreciated.
well, this won't be detected whitout a meta.txt file, and FL just assumes that everyone put his scripts above main rather than making them actual plugins

i've got you, just put this inside the folder with the script on a txt file and rename it to meta.txt

Name = Difficulty Modes
Version = 1.1.1
Essentials = 21.1
Credits = FL
 
"To this script works, put it above main OR convert into a plugin." Yeah so in my defense here, these aren't very good instructions IMO. I assumed by "convert into a plugin" this just meant 'hey doofus put this in your plugins folder.' I'd recommend updating this to actually explain what to do with the script. As someone who doesn't know all the ins and outs of Essentials, that would be appreciated.
A valid feedback.

Initially, putting above main is the standard way of installing scripts (and still is, for vanilla RPG Maker XP games). But less and less new users know about how installing standard scripts so I'm partially (and slowly) converting my scripts into this format/plugins.

By the way, Essentials Docs tells about the meta.txt. I assume that anyone unfamiliar with this, like about anything in Essentials, would look into the docs OR put it above main.

and FL just assumes that everyone put his scripts above main rather than making them actual plugins
Put above main or know about how to convert into a plugin/look into the docs.
 
Back
Top