User Tools

Site Tools


dev_todo:companions

Companions

The idea is originally ERACC's. Mostly. I think. Yeah, I kind of corrupted it beyond recognition, but he still gets credit. – LaloMartins

A companion is akin to a pet, but more permanent. It's a friendly monster, “owned” by a player. Different from pets, they:

  • ignore the “killpets” command
  • are able to stay in one place if you tell them to, not following you either in the map you are or to a new map
  • to follow you to a new map, have to actually use the exit (this one is still open to argument)
  • aren't summoned by spells; the weaker ones can be bought, the more powerful ones are quest rewards
  • gain experience and level up; they will also use equipmet you give them if you tell them so (and they have the body for it)

You can give orders to your companions. For that purpose, each one should have an unique name. You then use a command, like:

  • order stay silver: tells your companion silver to stop following you
  • order follow: tells all your “active” companions to follow you (or come to you if they're far)
  • order stay .: tells all your companions in the same map as you to stay
  • order stay silver bob: tells silver and bob to stay
  • order apply (large morningstar) bob: tells bob to equip (or unequip) the large morningstar you gave him
  • order drop (large morningstar) bob: tells bob to drop his large morningstar

The logic for following (or coming to you) can't be too complicated. I'd say they'll follow you one map away at most; if the map they're on has an exit to the map you're in, they'll go to that exit, use it, then go to you.

Flags

These “modifiers” apply to any kind of companion.

Carriable

Companions you can carry on you. It may refer to really small ones (like killer bees), or magical companions that “become” a small object when you don't need them. The UI for that is that you give the companion an order (“return”), and it becomes an object on your inventory. By dropping this object, it becomes the companion again.

Large

These won't follow you trough exits if the map you're on is outdoors and the one on the other side isn't. We may later on add a flag or some other way to signal that large companions should be allowed in a map (or trough an exit). To be used basically to keep horses out of shops…

  • Possibly use the new movement types instead of the “outdoor” flag? Then update the archetypes. Mounts and transports are a few of the examples that where given for what can be done with the new movement types.

Flavours

Companions come in a few “flavours” (subtypes, internally):

Fighting companions

These behave just like pets (following your current petmode), and will work together with any pets you do have. Like for pets, if a fighting companion summons a pet, that will be *your* pet.

If they are set up to pick up objects and they pick up something expendable (like a scroll, book, potion), they will hold it for you rather than using it, unless you tell them otherwise.

Not too sure yet how to handle movement. They may swap places with you like a pet, or maybe just not block your movement.

Mounts, simple

These are basically transports, but they will only allow you, your companions, and your party colleagues to “board”, besides the added benefits of allowing you to call it to you.

These don't block movement by default, even if you're mounted. (So running into you won't attack you, but someone can still attack you explicitly.)

Mounts, special

Like simple mounts, but they never follow you. If you dismount and walk away from it more than a few squares, it will roam away; when you want it again, you have to call it. This is meant for super-high-level mounts, like tamed dragons or pegasi.

Messengers

Non-fighting; but you can tell it to go to another player, up to one map away (using the same logic as they use for following you). The companion will tell you once it gets there, and then you can order it to, for example, drop an item for the other player, or pick something up and come back to you.

Guardians?

Just a wild idea, for permadeth servers. They're non-fighting normally (maybe even always carriable), but if you die, they pick up your corpse, try to find a safe spot, and become combative. The idea being that they'd keep the corpse safe until your partymates can rescue it. Good ones should be really hard to find though.

Other ideas

I suppose companions could also have scripts, so they would accept custom orders. For example, order foobar silver would tell you “silver gives you a puzzled look” if he doesn't have an orders script, but if he does, the script could parse that order and do something special.

  • You can already register arbratary commands with python scripts and plugins. You may want to use that as a reference for the syntax, for the sake of consistancy.
dev_todo/companions.txt · Last modified: 2006/09/16 21:21 (external edit)