I'm aware that this plugin checks for a Pkmn's height, then if the map you're in has encounters or not, and based on this, decides to show or not follower.
So I'm outside, with a small Pkmn following me. I go in a house, the Pkmn follows me normally. I switch, put a tall Pkmn following me, and the follower disappears, as it should. Then I save the game, restart, and I get this error:
[Pokémon Essentials version 20.1]
[v20.1 Hotfixes 1.0.7]
Exception: NoMethodError
Message: undefined method `encounter_possible_here?' for nil:NilClass
Backtrace:
[Following Pokemon EX] 004_Disappearing.rb:24:in `block in <main>'
[Following Pokemon EX] Compatibility.rb:61:in `block in trigger_2'
[Following Pokemon EX] Compatibility.rb:60:in `each_value'
[Following Pokemon EX] Compatibility.rb:60:in `trigger_2'
[Following Pokemon EX] Compatibility.rb:73:in `trigger_2'
[Following Pokemon EX] Internal Commands.rb:29:in `refresh_internal'
[Following Pokemon EX] Event_Sprite Commands.rb:57:in `refresh'
[Following Pokemon EX] Event Sprite.rb:23:in `block in <main>'
035:Event_Handlers:89:in `block in trigger'
035:Event_Handlers:89:in `each_value'
I definitely have it defined:
def encounter_possible_here?
return true if $PokemonGlobal.surfing
terrain_tag = $game_map.terrain_tag($game_player.x, $game_player.y)
return false if terrain_tag.ice
return true if has_cave_encounters? # i.e. this map is a cave
return true if has_land_encounters? && terrain_tag.land_wild_encounters
return false
end
Line 91 of Overworld_WildEncounters.
And the line:
next false if (height / 10.0) > 3.0 && !$PokemonEncounters.encounter_possible_here?
in EventHandlers.add(:following_pkmn_appear, :height, proc { |pkmn|
is where the issue is, according to the error.
If I comment out #&& !$PokemonEncounters.encounter_possible_here? does completely "fix" the error for me. But this would mean that a tall follower could not be possible in caves in such, which isn't too bad.
I really don't see what the issue could be.
Is this just a me problem? Is it a glitch in the matrix?