Re: Moounts and more Mounts

From: Daniel Koepke (
Date: 12/14/96

On Fri, 13 Dec 1996, The Dark One wrote:

> Okay gentlemen  (women?) talk to me about mounts...

Rather demanding, now, aren't we? :P

> a) Let me start with the prerequisit: could you post a snipit?

Oooff.  Let me start with a suggestion: write it yourself...

> b) Okay a mount is a mob and not a special object

Yes.  A mount is probably also tame enough to ride.  Perhaps, then,
a MOB_MOUNTABLE flag and AFF_TAMED flag are in order, as well as a
"tame" skill.

> c) Advantage of mounts is that it can :
> 		1) Carry things for you
> 		2) Use ITS move points and not YOURS
>                    when you mount and ride it.
>                 3) Gives an advantage in combat when
>                    you are mouted, BUT can also get
>                    damaged (killed?)

For the first one, just make it so you can "give" to the mount and then
"get" from the mount, as if it's inventory were a container; for #2, just
check if they are mounted, and if so, take the movements from the mob
instead of the player.

As for #3, a bit more complicated.  I did it via a "mounted combat"
skill.  By default, you were poor in "mounted combat," and thus it was
a bit troublesome to fight from horse back.  Above 75% got rewards
like being able to keep their horse in the fight, instead of it
bolting, and being able to use the horse to inflict damage (kicking,
etc.)  Your combatee would have a chance of hitting your horse instead
of you, or they could focus on the horse and get you thrown.

> d) mount can get spooked in combat and run (with or without a rider)

Determining when the mount gets spooked is the only problem here.  If
the mount is completely tame (eg., a warhorse), they won't bolt.  If,
however, the horse is less courageous, they can bolt at just about any
time.  Sometimes they'll throw a rider then bolt.

> e) can throw a rider

Bucking a rider is easy.  It's like dismounting, except with a different
message and a little damage to the (now unseated) rider.

> f) can be stolen (Theives skill "horse steal" :))

Wouldn't this just be walking up, getting on the horse, and running
away with it?

> h) Are all of this items b-f feasible? practical?

Both if you have an hour to spare.

> i) if (!a) 
>    send_to_char("Where would I begin?", victim);

Hm... in char_special_data, add:

  struct char_data *mounted_on;		// whom am I riding?
  struct char_data *mounted_by;		// whom is riding me?

in utils.h:

  #define RIDING(ch)		((ch)->char_specials.mounted_on)
  #define RIDDEN_BY(ch)		((ch)->char_specials.mounted_by)

and SKILL_TAME.  Put in the mount/dismount/tame commands:

  void mount_char(struct char_data *ch, struct char_data *mount) {
    RIDING(ch) = mount;
    RIDDEN_BY(mount) = ch;

    act("You mount $N.", FALSE, ch, 0, mount, TO_CHAR);
    act("$n mounts you.",FALSE, ch, 0, mount, TO_VICT);
    act("$n mounts $N.", FALSE, ch, 0, mount, TO_NOTVICT);

  void dismount_char(struct char_data *ch) {
    RIDING(ch) = NULL;

  ACMD(do_mount) {
    struct char_data *mount;
    char arg[MAX_INPUT_LENGTH];

    one_argument(argument, arg);

    if (!*arg || !(mount = get_char_room_vis(ch, arg))) {
      send_to_char("Mount who?\r\n", ch);

    if (!IS_NPC(mount) && GET_LEVEL(ch) < LVL_IMMORT)
      send_to_char("You can only mount mobiles.\r\n", ch);
    else if (!MOB_FLAGGED(mount, MOB_MOUNTABLE))
      send_to_char("You can't mount that.\r\n", ch);
    else if (!OUTSIDE(ch))
      send_to_char("You can only mount something while outside!\r\n", ch);
    else if (GET_LEVEL(mount) > GET_LEVEL(ch))
      send_to_char("It probably is not be wise to do that...\r\n", ch);
    else if (RIDING(ch))
      send_to_char("You're already riding something.\r\n", ch);
    else if (RIDDEN_BY(mount))
      send_to_char("That is already ridden by someone.\r\n", ch);
    else {
      mount_char(ch, mount);

      if (!AFF_FLAGGED(mount, AFF_TAMED) &&
          GET_SKILL(ch, SKILL_MOUNT) <= number(0, 101)) {
        act("$N rears back suddenly and throws you!",
	    FALSE, ch, 0, mount, TO_CHAR);
        act("You rear back and throw $n off your back!",
            FALSE, ch, 0, mount, TO_VICT);
        act("$N suddenly rears back, throwing $n off $S back.",
	    FALSE, ch, 0, mount, TO_NOTVICT);

        if (GET_LEVEL(ch) < LVL_IMMORT) {
          GET_HIT(ch) -= dice(1,6);

  ACMD(do_dismount) {
    if (!RIDING(ch)) {
      send_to_char("You aren't riding anything.\r\n", ch);

    act("$n dismounts.", TRUE, ch, 0, mount, TO_CHAR);
    act("$n dismounts from you.", FALSE, ch, 0, mount, TO_VICT);
    act("$n dismounts from $N.", TRUE, ch, 0, mount, TO_NOTVICT);

You can write your own "TAME" skill.  Be sure to call dismount_char()
in extract_char() and keep people and their mounts in the same room
via do_simple_move():

  // before the actual char_from_room(), char_to_room()
  if (RIDING(ch) && ch->in_room == RIDING(ch)->in_room)
    riding = same_room = 1;
  else if (RIDDEN_BY(ch) && ch->in_room == RIDDEN_BY(ch)->in_room)
    ridden = same_room = 1;

  // after the move
  if (same_room)
    if (ridden) {
      char_to_room(RIDDEN_BY(ch), ch->in_room);
      act("$n arrives, carrying $N on $s back.", TRUE, ch, 0,
      look_at_room(RIDDEN_BY(ch), 0);
    } else if (riding) {
      char_to_room(RIDING(ch), ch->in_room);
      act("$n arrives, riding on the back of $N.", TRUE, ch, 0,
          RIDING(ch), TO_ROOM);
      look_at_room(RIDING(ch), 0);

...and the like.  I'm willing to make a small patch if requested, but
it'll just be the basics (nothing special like mounted combat, etc.).

Daniel Koepke
Forgive me father, for I am sin.

| Ensure that you have read the CircleMUD Mailing List FAQ: |
|   |

This archive was generated by hypermail 2b30 : 12/18/00 PST