• 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.
  • Reminder: AI-generated content is not allowed on the forums per the Rules and Regulations. Please contact us if you have any questions!
Following Pokemon EX

Resource Following Pokemon EX 2.5.1

the game gives a error but doesn't fully crash when tryign to switch pokemon crash errros
i added htis chat gpt patch and it worked somehow xd

#===============================================================================
# FOLLOWER SAFETY GUARD (Essentials 21.1 safe)
# Prevents crashes during Pokémon switching / party updates
#===============================================================================
module FollowingPkmn
#-------------------------------------------------------------
# Simple internal lock (no aliasing, no switches)
#-------------------------------------------------------------
def self.locked
@locked ||= false
end
def self.lock
@locked = true
end
def self.unlock
@locked = false
end
#-------------------------------------------------------------
# SAFE STATE CHECK
#-------------------------------------------------------------
def self.safe_state?
return false if !$player
return false if !$player.party
return false if @locked
return false if [imath]game_temp &&[/imath]game_temp.in_battle
return true
end
#-------------------------------------------------------------
# SAFE WRAPPERS (NO aliasing)
#-------------------------------------------------------------
def self.get_pokemon
return nil if !safe_state?
return $player.first_able_pokemon rescue nil
end
def self.get_event
return nil if !safe_state?
return nil if !$game_map
return $game_map.events.values.find { |e| e&.name&.include?("Follower") } rescue nil
end
def self.get_data
return nil if !safe_state?
return nil
end
end
 
What I'd like to see would be:
1. Ability to toggle on and off your Pokémon
2. Quickly cycle through party with keys
3. Ability to customize keybinds (how it is done with the current port would suffice)
4. Put Pokémon in ball when you heal it at Poké Center and put it back out if the player has the setting set as such
5. Pokémon not teleporting around when walking over bridges or going onto water
 
i added htis chat gpt patch and it worked somehow xd

#===============================================================================
# FOLLOWER SAFETY GUARD (Essentials 21.1 safe)
# Prevents crashes during Pokémon switching / party updates
#===============================================================================
module FollowingPkmn
#-------------------------------------------------------------
# Simple internal lock (no aliasing, no switches)
#-------------------------------------------------------------
def self.locked
@locked ||= false
end
def self.lock
@locked = true
end
def self.unlock
@locked = false
end
#-------------------------------------------------------------
# SAFE STATE CHECK
#-------------------------------------------------------------
def self.safe_state?
return false if !$player
return false if !$player.party
return false if @locked
return false if [imath]game_temp &&[/imath]game_temp.in_battle
return true
end
#-------------------------------------------------------------
# SAFE WRAPPERS (NO aliasing)
#-------------------------------------------------------------
def self.get_pokemon
return nil if !safe_state?
return $player.first_able_pokemon rescue nil
end
def self.get_event
return nil if !safe_state?
return nil if !$game_map
return $game_map.events.values.find { |e| e&.name&.include?("Follower") } rescue nil
end
def self.get_data
return nil if !safe_state?
return nil
end
end
now items arent working im confused?
 
Back
Top