• 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.
  • The Eevee Expo Game Jam has concluded! 🎉 Head on over to the game jam forum to play through the games.
    Don't forget to come back September 21st to vote for your favorites!
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Resource icon

Resource Automatic Level Scaling 1.6.3

Just a suggestion... Might want to think about ignoring too low leveled Pokemon. I added it on my end because without it, I could break the game. (I.E. at level 30-40, hatching a level 5 egg drop the average level significantly. Get a couple eggs and you can steamroll the game) Think I changed it to ignore eggs and ignore Pokemon that are outside 4 levels of the average range. That way the Pokemon are always close to the players level.
Awesome plugin, though. Definitely seems necessary for "open world" type games where there's not a set route.
 
Hello, love the Plugin i just have a question. Is it possible to disable the automatic evolutions for wild pokemon only? i want their level to be scaled but i dont want them to evolve automatic, i want it on trainers enabled tho. thank you
 
In the plugin there is a script that activates on wild battles to update the level (and thus also the evolution). You can add a line there that sets the temporary rule to disable automatic evolution.
 
Thanks for the Reply, its my first time using Pokemon Essentials and i sadly have no idea where i would have to add that and what to add exactly.
 
In 004_Event_Handlers (inside the plugin folder), it should look something like this:

Ruby:
Expand Collapse Copy
# Activates script when a wild pokemon is created
EventHandlers.add(:on_wild_pokemon_created, :automatic_level_scaling,
  proc { |pokemon|
    id = pbGet(LevelScalingSettings::WILD_VARIABLE)
    next if id == 0
    AutomaticLevelScaling.setTemporarySetting("automaticEvolutions", false)
    AutomaticLevelScaling.difficulty = id
    AutomaticLevelScaling.setNewLevel(pokemon)
  }
)

I only added the "AutomaticLevelScaling.setTemporarySetting("automaticEvolutions", false)" line on an unmodified version of the v1.5.1 file (an outdated one), so check for the rest to see where you have to add it if you happen to have more things added in it. It should be the first bit of code in the file if you didn't add anything.
 
During the process of making Battle Mode for my fan game, I have run into another minor problem, that is only a problem in the context of my fan game's Battle Mode. I need to modify the Scaler's handling of auto evolving opponent Pokémon, so if an opponent Pokémon is holding the Eviolite item, it will stay at the evolution stage that is set in the PBS. Meaning if an opponent Pokémon is set to be Onix, it will stay an Onix as its level is scaled, when holding the Eviolite.

I need this modification, because I do not want to micromanage every occurrence, of a competitive opponent Pokémon's Eviolite set being sabotaged, as a result of the Automatic Level Scaling indirectly cancelling out the Eviolite's effect, because it's needs a Pokémon to not be fully evolved, in order for it's Def and Sp.Def boost to kick in.

Screenshots that help illustrate the minor problem I am trying to solve:

eN5POA7.jpeg

r7Lb3jn.jpeg

mFFIOJE.jpeg

ZDwvXy9.jpeg
 
Well, the code for scaling the trainer's pokemon loads a pokemon and makes all checks and scaling and all that before sending them out. You could edit that to add a line that checks if a pokemon has the evolite equiped and if it has, to disable automatic evolution (it has to go before the line that changes the level) and enable it again right after the level scaling (since the temporal settings don't discriminate pokemon within the same battle).

Another option is to disable the "next stage" configuration and have in the PBS all the pokemon in the teams be in the last evolutionary stage you want them to be. In the onix/steelix case, for example, if you define an onix in a team it will remain an onix regardless of their level or whether or not you have the automatic evolution setting enabled. But if you define it as a steelix it will be turned into a onix if their level isn't high enough and it will remain a steelix otherwise.
 
Last edited:
During the process of making Battle Mode for my fan game, I have run into another minor problem, that is only a problem in the context of my fan game's Battle Mode. I need to modify the Scaler's handling of auto evolving opponent Pokémon, so if an opponent Pokémon is holding the Eviolite item, it will stay at the evolution stage that is set in the PBS. Meaning if an opponent Pokémon is set to be Onix, it will stay an Onix as its level is scaled, when holding the Eviolite.

I need this modification, because I do not want to micromanage every occurrence, of a competitive opponent Pokémon's Eviolite set being sabotaged, as a result of the Automatic Level Scaling indirectly cancelling out the Eviolite's effect, because it's needs a Pokémon to not be fully evolved, in order for it's Def and Sp.Def boost to kick in.

Screenshots that help illustrate the minor problem I am trying to solve:

eN5POA7.jpeg

r7Lb3jn.jpeg

mFFIOJE.jpeg

ZDwvXy9.jpeg
Both of LinKazemine's suggestions should work well. Another option is to modify the conditions in the scale method in 005_Class_Overrides.rb, like this:

Ruby:
Expand Collapse Copy
  def scale(new_level = nil)
    new_level = AutomaticLevelScaling.getScaledLevel if new_level.nil?
    new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
    return if !AutomaticLevelScaling.shouldScaleLevel?(self.level, new_level)

    self.level = new_level
    self.scaleEvolutionStage if AutomaticLevelScaling.settings[:automatic_evolutions] && self.item != :EVIOLITE
    self.calc_stats
    self.reset_moves if AutomaticLevelScaling.settings[:update_moves]
  end
 
Both of LinKazemine's suggestions should work well. Another option is to modify the conditions in the scale method in 005_Class_Overrides.rb, like this:

Ruby:
Expand Collapse Copy
  def scale(new_level = nil)
    new_level = AutomaticLevelScaling.getScaledLevel if new_level.nil?
    new_level = new_level.clamp(1, GameData::GrowthRate.max_level)
    return if !AutomaticLevelScaling.shouldScaleLevel?(self.level, new_level)

    self.level = new_level
    self.scaleEvolutionStage if AutomaticLevelScaling.settings[:automatic_evolutions] && self.item != :EVIOLITE
    self.calc_stats
    self.reset_moves if AutomaticLevelScaling.settings[:update_moves]
  end
Thank you for your help. The Eviolite check fixed the minor problem for the context of my fan game project, in exactly the way I want. Now I can craft teams using the Eviolite item without trouble.
 
Back
Top