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!