• 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!

Implementing supporter/friends system

songxang

Rookie
Member
Joined
Mar 31, 2026
Posts
1
Hello, I had an idea for a game, where you can befriend other trainers and they can join your party as a supporter. When a trainer joins your party, they apply a passive effect during battle or during the overworld. I want to be able to switch out friends and have a max of 3 trainers in the party in addition to the regular pokemon party. Can this system be created in Essentials/PSDK? Similar to partner trainers but they don't have their own pokemon and don't battle. Thanks in advance. I haven't started developing yet but after looking at the Wiki and some tutorials, I wanted to be sure this project would be feasible before starting.
 
Last edited:
Ruby:
Expand Collapse Copy
# Checks if you have a follower event with the given name. 
# Let's say "Aroma Lady Anna" gives +25% Defense to Grass-type Pokémon. You'd use this method to check
# whether she is one of the friends and if so, use the desired effect in damage calculations.
def pbHasFollowerWithName?(event_name = nil)
  return false if !event_name
  return false if !$PokemonGlobal.followers.any?
  $PokemonGlobal.followers.each do |follower|
    return true if follower.name[/#{event_name}/i]
  end
  return false
end

# Returns true if there is room for another friend.
def pbCanActivateNewFollower?(limit=3)
  return $PokemonGlobal.followers.count < limit
end

There is an example follower trainer (May) on Route 3 in Essentials' default maps. For your purposes, you'd put pbCanActivateNewFollower? in a conditional branch and then activate the partner trainer like this:
event = get_character(0)
common_event = 5 # Common event triggered when interacting with the follower
Followers.add(event.id, event.name, common_event)

Overall, your idea is absolutely doable. To continue from here, you'll need to figure out how to change/remove friends and implement the passive effects you want for each person.
 
Back
Top