There are multiple possible causes for this problem, I'll list some of them.View attachment 26289
I have these options activated, however the enemy pokemon continue to evolve automatically despite having it set to false. What I can do?
_
between words, which would cause a syntax error.setSettings
, if you're not doing this for a specific battle and you want to change the settings globally, please change the settings in the 002_Settings.rb
file instead, because setting them in an event would trigger then only once the event is activated (which might be another cause for the issue) and settings would reset after the player restarts the game.includeNextStages
instead of automaticEvolutions
. automaticEvolutions
makes the plugin not change the stage set in the PBS
in any way, while includeNextStages
would stop evolution in a certain evolutionary stage. For example, imagine the player finds a level 17 Ivysaur set in the PBS while his party is around level 15, if automaticEvolutions
is disabled, the pokemon would still be an Ivysaur, while if includeNextStages
was disabled, it would revert to a Bulbasaur.There are multiple possible causes for this problem, I'll list some of them.
I hope this explanation can help you fix your issue. If you have any questions, please don't hesitate to ask.
- Parameter names seem to be written without the
_
between words, which would cause a syntax error.- I see you change the difficulty before changing settings with
setSettings
, if you're not doing this for a specific battle and you want to change the settings globally, please change the settings in the002_Settings.rb
file instead, because setting them in an event would trigger then only once the event is activated (which might be another cause for the issue) and settings would reset after the player restarts the game.- You might be looking for the functionality of
includeNextStages
instead ofautomaticEvolutions
.automaticEvolutions
makes the plugin not change the stage set in thePBS
in any way, whileincludeNextStages
would stop evolution in a certain evolutionary stage. For example, imagine the player finds a level 17 Ivysaur set in the PBS while his party is around level 15, ifautomaticEvolutions
is disabled, the pokemon would still be an Ivysaur, while ifincludeNextStages
was disabled, it would revert to a Bulbasaur.
Oh, yes, there's no global setting forView attachment 26329
thank you! I did the thing to modify them directly from 002_Settings.rb, however I can't find the variable for updates moves (the others do). Can you tell me if it is somewhere else?
update_moves
, because you'll probably prefer to let the plugin define moves in at least some scenarios, like with wild pokemon, because you can't set their moves manually in the PBS
and it could be weird seeing them using weaker moves when they are already in a higher level. If you are sure you will set move sets for the pokemon of every trainer in your game, you can add this line of code: AutomaticLevelScaling.setTemporarySetting("updateMoves", false)
in the on_trainer_load
EventHandlers at the 004_Event_Handlers.rb
file. It will look like this:# Activates script when a trainer pokemon is created
EventHandlers.add(:on_trainer_load, :automatic_level_scaling,
proc { |trainer|
id = pbGet(LevelScalingSettings::TRAINER_VARIABLE)
next if !trainer || id == 0
AutomaticLevelScaling.difficulty = id
AutomaticLevelScaling.setTemporarySetting("updateMoves", false)
avarage_level = 0
trainer.party.each { |pokemon| avarage_level += pokemon.level }
avarage_level /= trainer.party.length
for pokemon in trainer.party do
AutomaticLevelScaling.setNewLevel(pokemon, pokemon.level - avarage_level)
end
}
)
Hello, thank you for the appreciation. Unfortunately, there is no easy way to make a difficulty as you described in theHello, thanks for this plugin. I love to use it, especially with trainers.
However I would like to make a difficulty level where Pokemons go from level 1 to the maximum level of your strongest Pokemon in your party.
I tried with this but it doesn't work
5 => Difficulty.new(fixed_increase: 0, random_increase: -GameData::GrowthRate.max_level)
Do you know how i could change that?
002_Settings.rb
file because the highest level and the scaled party level are not constant values. However, I found a way to implement this feature in the :on_trainer_load
EventHandlers
at the 004_Event_Handlers.rb
file, here's the code snippet:# Activates script when a trainer pokemon is created
EventHandlers.add(:on_trainer_load, :automatic_level_scaling,
proc { |trainer|
id = pbGet(LevelScalingSettings::TRAINER_VARIABLE)
next if !trainer || id == 0
AutomaticLevelScaling.difficulty = id
if id == 5
LevelScalingSettings::DIFFICULTIES[5].fixed_increase = 0
LevelScalingSettings::DIFFICULTIES[5].random_increase = 0
LevelScalingSettings::DIFFICULTIES[5].fixed_increase = -AutomaticLevelScaling.getScaledLevel
highest_level = 0
$player.party.each { |pokemon|
highest_level = pokemon.level if pokemon.level > highest_level
}
LevelScalingSettings::DIFFICULTIES[5].random_increase = highest_level
end
avarage_level = 0
trainer.party.each { |pokemon| avarage_level += pokemon.level }
avarage_level /= trainer.party.length
for pokemon in trainer.party do
AutomaticLevelScaling.setNewLevel(pokemon, pokemon.level - avarage_level)
end
}
)
002_Settings.rb
, you can leave it in any way you want, because its values are overwritten before each trainer battle.Thank you very much!Hello, thank you for the appreciation. Unfortunately, there is no easy way to make a difficulty as you described in the002_Settings.rb
file because the highest level and the scaled party level are not constant values. However, I found a way to implement this feature in the:on_trainer_load
EventHandlers
at the004_Event_Handlers.rb
file, here's the code snippet:
Just add the highlighted lines to the function in your script version. As for the setting in theRuby:# Activates script when a trainer pokemon is created EventHandlers.add(:on_trainer_load, :automatic_level_scaling, proc { |trainer| id = pbGet(LevelScalingSettings::TRAINER_VARIABLE) next if !trainer || id == 0 AutomaticLevelScaling.difficulty = id if id == 5 LevelScalingSettings::DIFFICULTIES[5].fixed_increase = 0 LevelScalingSettings::DIFFICULTIES[5].random_increase = 0 LevelScalingSettings::DIFFICULTIES[5].fixed_increase = -AutomaticLevelScaling.getScaledLevel highest_level = 0 $player.party.each { |pokemon| highest_level = pokemon.level if pokemon.level > highest_level } LevelScalingSettings::DIFFICULTIES[5].random_increase = highest_level end avarage_level = 0 trainer.party.each { |pokemon| avarage_level += pokemon.level } avarage_level /= trainer.party.length for pokemon in trainer.party do AutomaticLevelScaling.setNewLevel(pokemon, pokemon.level - avarage_level) end } )
002_Settings.rb
, you can leave it in any way you want, because its values are overwritten before each trainer battle.
You can addView attachment 26488I have another question, when creating the pokemon in this way to add the movements. It does not affect the automatic level climber. Do you know why it can be?
AutomaticLevelScaling.setNewLevel(pkmn)
(before teaching the new moves and after creating the new pokemon) to scale it according to the current settings. You could also use AutomaticLevelScaling.getScaledLevel
in the level parameter (like this: Pokemon.new(:SHAYMIN, AutomaticLevelScaling.getScaledLevel)
), but AutomaticLevelScaling.setNewLevel
would also evolve the pokemon and apply other settings.=================
[2024-06-30 00:00:41 -0700]
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]
Exception: RuntimeError
Message: No difficulty with id "[]" was provided in the DIFFICULTIES Hash of Settings.
Backtrace:
[Automatic Level Scaling] 003_Script.rb:33:in `difficulty='
[Automatic Level Scaling] 004_Event_Handlers.rb:11:in `block in <main>'
Event_Handlers:89:in `block in trigger'
Event_Handlers:89:in `each_value'
Event_Handlers:89:in `trigger'
Event_HandlerCollections:63:in `trigger'
Overworld_WildEncounters:449:in `pbGenerateWildPokemon'
Overworld_BattleStarting:412:in `block in generate_foes'
Overworld_BattleStarting:404:in `each'
Overworld_BattleStarting:404:in `generate_foes'
Hello. The trainer side of things works fine, but when a wild encounter tries to load itself I receive this error:
What could I be doing wrong?Code:================= [2024-06-30 00:00:41 -0700] [Pokémon Essentials version 20.1] [v20.1 Hotfixes 1.0.7] Exception: RuntimeError Message: No difficulty with id "[]" was provided in the DIFFICULTIES Hash of Settings. Backtrace: [Automatic Level Scaling] 003_Script.rb:33:in `difficulty=' [Automatic Level Scaling] 004_Event_Handlers.rb:11:in `block in <main>' Event_Handlers:89:in `block in trigger' Event_Handlers:89:in `each_value' Event_Handlers:89:in `trigger' Event_HandlerCollections:63:in `trigger' Overworld_WildEncounters:449:in `pbGenerateWildPokemon' Overworld_BattleStarting:412:in `block in generate_foes' Overworld_BattleStarting:404:in `each' Overworld_BattleStarting:404:in `generate_foes'
Wild difficulty
variable (number 100 by default) is not initiated properly, or its value is changed by some other method. WILD_VARIABLE
setting in the 002_Settings.rb
file. You were right. Changing theThis error usually happens when theWild difficulty
variable (number 100 by default) is not initiated properly, or its value is changed by some other method.
In this case, I believe this variable might be used in another place in your game since its value in the error message is an array. You can use another variable by changing theWILD_VARIABLE
setting in the002_Settings.rb
file.
Maybe another plugin is using this variable too, if you find out this is the case, please tell me which one it is so that I can put a warning on the overview page.
I hope this solves the issue!
Wild difficulty
variable fixed the issue. Thanks! I wasn't able to figure out which plugin might have been causing the issue, but I'll let you know if I ever find it!
- Add the
save_trainer_parties
setting.- Add the
use_map_level_for_wild_pokemon
setting.- Add class overrides, moving methods to the Pokemon class.
- Update documentation.
save_trainer_parties
setting002_Settings.rb
or disable it for a single battle (maybe an important trainer like a rival or gym leader) using AutomaticLevelScaling.setSettings
.use_map_level_for_wild_pokemon
setting005_Class_Overrides.rb
file, overriding the Pokemon class with those methods. I think this will make the plugin easier to customize and use in other places, while also making everything more organized and following object-oriented principles better.Hello! What exactly do you want to add to the the options menu? Difficulties? Please give me some more details so I can help you set it up.hello,
it's possible to add this on Options menu?
Yeah, I want to set difficult plugins like a Screen Size works in Option menu, but I don't know how to set it up.Hello! What exactly do you want to add to the the options menu? Difficulties? Please give me some more details so I can help you set it up.
You can change the options menu in the fileYeah, I want to set difficult plugins like a Screen Size works in Option menu, but I don't know how to set it up.
015_UI_Options.rb
, in the 016_UI
folder. You could add this feature in some different ways. I'll tell you a simple one, but with the downside of not being able to change the difficulty if you're accessing the options menu from the load menu. A more elaborate option would require some extra changes to the way the plugin reads the selected difficulty, which could be hard depending on your coding knowledge. Let me show you the simple way:PokemonSystem
class, add an attr_accessor
to represent the setting, for example, difficulty
. Then, in the initialize
method, initialize the attribute according to the difficulties I explain below. In the end, the class might look like this:class PokemonSystem
attr_accessor :textspeed
attr_accessor :battlescene
attr_accessor :battlestyle
attr_accessor :sendtoboxes
attr_accessor :givenicknames
attr_accessor :frame
attr_accessor :textskin
attr_accessor :screensize
attr_accessor :language
attr_accessor :runstyle
attr_accessor :bgmvolume
attr_accessor :sevolume
attr_accessor :textinput
attr_accessor :difficulty
def initialize
@textspeed = 1 # Text speed (0=slow, 1=medium, 2=fast, 3=instant)
@battlescene = 0 # Battle effects (animations) (0=on, 1=off)
@battlestyle = 0 # Battle style (0=switch, 1=set)
@sendtoboxes = 0 # Send to Boxes (0=manual, 1=automatic)
@givenicknames = 0 # Give nicknames (0=give, 1=don't give)
@frame = 0 # Default window frame (see also Settings::MENU_WINDOWSKINS)
@textskin = 0 # Speech frame
@screensize = (Settings::SCREEN_SCALE * 2).floor - 1 # 0=half size, 1=full size, 2=full-and-a-half size, 3=double size
@language = 0 # Language (see also Settings::LANGUAGES in script PokemonSystem)
@runstyle = 0 # Default movement speed (0=walk, 1=run)
@bgmvolume = 80 # Volume of background music and ME
@sevolume = 100 # Volume of sound effects
@textinput = 0 # Text input mode (0=cursor, 1=keyboard)
@difficulty = 0 # Automatic Level Scaling difficulty id
end
end
MenuHandlers
, you can add one in the same file, and see some other examples. I'll show an example, but you should change it according to your game:MenuHandlers.add(:options_menu, :difficulty, {
"name" => _INTL("Difficulty"),
"order" => 130,
"type" => EnumOption,
"parameters" => [_INTL("Easy"), _INTL("Medium"), _INTL("Hard")],
"description" => _INTL("Choose the difficulty."),
"get_proc" => proc { next $PokemonSystem.difficulty },
"set_proc" => proc { |value, _scene|
next if $game_variables.nil?
$PokemonSystem.difficulty = value
case value
when 0
pbSet(LevelScalingSettings::TRAINER_VARIABLE, 1)
pbSet(LevelScalingSettings::WILD_VARIABLE, 1)
when 1
pbSet(LevelScalingSettings::TRAINER_VARIABLE, 2)
pbSet(LevelScalingSettings::WILD_VARIABLE, 2)
when 2
pbSet(LevelScalingSettings::TRAINER_VARIABLE, 3)
pbSet(LevelScalingSettings::WILD_VARIABLE, 3)
end
}
})
initialize
method. You can add or remove difficulties if you prefer. The important part is changing the pbSet calls according to the difficulty ID from the DIFFICULTIES
hash at the 002_Settings.rb
file. Keep in mind: In this setup, changing only the number in PokemonSystem.difficulty will not change the difficulty by itself.013_UI_Load.rb
file (adding a # at the beginning of the line). Line 285: # cmd_options = -1,
and 298: # commands[cmd_options = commands.length] = _INTL("Options")
. I'd be happy to help you if you have any other questions.