Skip to content

Conversation

Ilwyd
Copy link
Contributor

@Ilwyd Ilwyd commented Aug 11, 2025

This is a WIP PR to add summoning followers to the game. This is intended to just the be basics of having followers and then in a future PR things like familiar combat, scroll effects, etc can be added.

  • Using pouches to spawn familiars
  • Dropping / spawning pets
  • Familiar details tab
    • Familiar chathead
    • Familiar name
    • Correct chathead animations
    • Familiar timer
      • Dismiss familiar on time running out
    • Call
    • Dismiss
    • Renew familiar
  • Pet details tab
    • Pet chathead
    • Pet name
    • Correct chathead animations
    • Pet hunger (maybe)
    • Pet age (maybe)
    • Dismiss, call pet buttons
  • Summoning orb right-click menu
    • Select left-click option menu
    • Dismiss
    • Call
    • Renew
  • Saving follower details on logout
  • Spawning follower again on login

Known Bugs:

  • The cast option for every familiar you've summoned in your session shows in the right click menu for the summoning orb
  • Logging out with a familiar breaks the summoning orb on summoning a new familiar on your next log in

var accountName: String = "",
var passwordHash: String = "",
val body: BodyParts = BodyParts(),
var follower: NPC? = null,
Copy link
Owner

@GregHib GregHib Aug 12, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Variables can be used for this, a custom var storing the follower id will be needed, it's also better to store the npc index and look-up the NPC rather than store the NPC directly to prevent accidentally using (and the garbage collector not being able to delete) npcs that no-longer exist
e.g.

var Player.follower: NPC?
    get() {
        val index = this["follower_index", -1]
        get<NPCS>.get(index)
    }
    set(value) {
        this["follower_index"] = value.index
    }

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, I was planning on changing this. Wrote that quickly just so I could get the dismiss button working.

One problem I'm having with this approach is that index is -1 for a tick, so I can't immediately set follower when the npc is added. I can queue it, not sure if that's the correct approach though.

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm yeah that's a good point, using the world queue for that should be fine just make sure the name is unique

@DavidMBusey
Copy link

This is sick.

@Ilwyd
Copy link
Contributor Author

Ilwyd commented Sep 5, 2025

This is sick.

Thanks, slowly working my way through it when I have the time 😅

@Ilwyd Ilwyd force-pushed the summoning-followers branch from 3acfb65 to ece4665 Compare September 14, 2025 15:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants