• 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.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
[v12+] Difficulty Modes

Resource [v12+] Difficulty Modes 1.1.1

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
308
-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...
 

A¹¹

Novice
Member
Joined
Oct 24, 2021
Posts
45
Has anyone tried turning this into an options in the options menu?
 

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
308
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
 
Back
Top