• The Eevee Expo Game Jam #10 has concluded, congratulations to all participants! Now it's time for the judges to play through the games, and you can play along to vote who deserves the community choice spotlight.
    You can check out the submitted games here!
    Play through the games and provide some feedback to the devs while you're at it!
  • Hi, Guest!
    Some images might be missing as we move away from using embedded images, sorry for the mess!
    From now on, you'll be required to use a third party to host images. You can learn how to add images here, and if your thread is missing images you can request them here.
    Do not use Discord to host any images you post, these links expire quickly!
[v12+] Difficulty Modes

Resource [v12+] Difficulty Modes 1.1.1

-FL-

Pokémon Island Creator
Member
Joined
Aug 28, 2022
Posts
305
-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
44
Has anyone tried turning this into an options in the options menu?
 

-FL-

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