Prompt and regen
AI generated art

Prompt and regen

In this devblog, we talk about customizing the prompt, and about regeneration of stat pools.

Players of Tales of Zalanthas will be able to customize their prompt. For those who are familiar with ArmageddonMUD, there will be a similar style and set of options for players to use.

Prompt

Pools and Options

Characters in Tales of Zalanthas will have a similar set of stat pools as the old game:

  • hps: Your health points, or hit points. How much physical damage you can take before becoming mortally wounded or dead.
  • stun: Stun points are a representation of your mental consciousness. The loss of all your stun points will result in a character being rendered unconscious.
  • stamina: Stamina represents a character's physical reserves, and is greatly affected by someone's endurance score. Activities such as movement and combat will consume stamina
  • focus: Focus points are a representation of a character's ability to use psionics, or the Way. As someone actively uses psionics, or maintains psionic abilities, their focus points will drain. The loss of focus points will result in a character being unable to use psionics for a little while.
  • mana: Some magicks and magick classes will use mana to power their spells. For those individuals, casting spells will deplete mana.

The prompt command will have options to display your current and/or maximum in each of these stat pools. These are set by the following options:

  • %h for current HP, or %H for max HP
  • %m for current mana, or %M for max mana
  • %v for current stamina, or %V for max stamina
  • %t for current stun, or %T for max stun
  • %f for current focus, or %F for max focus

Other options will be available for various aspects or states of a character:

  • %e for your current encumbrance, as a phrase such as "heavily encumbered"
  • %p for your position, such as standing, sitting, or resting
  • %s for your movement speed, such as walking or running.
  • %a for your combat stance, such as neutral or offensive
  • %o for your emotion, such as happiness or anger (more info in a future devblog about this)
  • %n for your name
  • %r for the name of the room you're currently in
  • %c for the time of day, such as dawn or high sun
  • %l for a room's light level, such as darkness, dim, or lit

Health Bars

Using an Evennia contrib for health bars, a character can have a rudimentary bar representing each of the stat pools.

Two styles:

or

There are both presets or customizable options for these bars:

  • %{hbar} for hps, or %{hbar1} for a labeled bar
  • %{mbar} for mana, or %{mbar1} for a labeled bar
  • %{vbar} for stamina, or %{vbar1} for a labeled bar
  • %{tbar} for stun, or %{tbar1} for a labeled bar
  • %{fbar} for focus, or %{fbar1} for a labeled bar
  • %{ebar} for encumbrance bar, or %{ebar1} for a labeled bar

Presets

There will be a handful of presets for players who don't want to spend the time and effort to create a custom prompt.

  • default -> H:%h, S:%v, T:%t, F:%f, %s>
  • preset1 -> %h/%Hh %v/%Vv %t/%Ts %m/%Mm %f/%Ff, ENC:%e, %p, %s>
  • preset2 -> %n@%r>
  • preset3 -> %{hbarl} %{tbarl} %{vbarl} %{fbarl} %{ebarl} %s>
  • preset4 -> HPS:%{hbar} STU:%{tbar} STA:%{vbar} MAN:%{mbar} FOC:%{fbar} ENC:%{ebar} %s>

Mudlet and GMCP

I've written a couple of Mudlet-style scripts that use the GMCP protocol to send the various stat pools to a client.

Style 1:

Style 2:

** Once our website goes live, we'll have these scripts and instructions to use them, as downloads for anyone.

Regen

Regeneration, or regen, is when a character's stat pools increase over time back to full, after things like taking damage, or moving, or casting spells. This is handled by a global script that runs every 6 seconds. The following parameters will modify the chance:

  • Position:
State Modifier
Sitting +1
Resting +3
Sleeping +5
  • Weather condition:
Condition Modifier
Blowing Sand -1
Sandstorm -2
Severe Sandstorm -3
  • Sector:
Sector Modifier
Inside +4
City +1
Field 0
Desert -1
Hills 0
Mountains -1
Deep Silt -2
Shallow Silt -1
Air 0
Light Forest +1
Heavy Forest +2
Salt Flats -1
Thornlands 0
Ruins 0
Cavern 0
Road 0
Sewer -1
Grasslands +1

The following table will modify how much someone regenerates, based on either endurance or wisdom:

Score Bonus
16–20 +1
21–23 Random +1 or +2
24+ +2

hps

Start with a base 1 in 10 chance to regenerate a point. Add the Position, Weather, and Sector modifiers to the chance. If the roll on a d10 is equal to or less than the chance, then the character heals 1 point plus their Endurance modifier.

Characters who are mortally wounded ignore all this and have a flat 80% chance to bleed and lose 1 hp, and a 20% chance to heal 1 hp.

Characters who are in a fight, who have a bleed applied to them, or other factors that prevent healing (curses, spells, poison, etc.) will not regenerate hps.

Characters who are below 40% of their max hps will not regenerate unless they sleep.

stun

Start with a base 1 in 10 chance to regenerate a point. Add the Position, Weather, and Sector modifiers to the chance. If the roll on a d10 is equal to or less than the chance, then the character heals 1 point plus their Endurance modifier.

Characters who are in a fight, or have other factors that prevent healing (knocked-out affect, curses, spells, poison, etc.), will not regenerate stun.

stamina

Start with a base 1 in 10 chance to regenerate a point. Add the Position, Weather, and Sector modifiers to the chance. If the roll on a d10 is equal to or less than the chance, then the character heals 1 point plus their Endurance modifier.

Characters who have a food bonus will have additional modifiers (more on that in a later devblog).

Characters who are in a fight, or have other factors that prevent healing (curses, spells, poison, etc.), will not regenerate stamina.

mana

Start with a base 1 in 10 chance to regenerate a point. Add the Position and Sector modifiers to the chance (weather does not affect mana regen, though certain types of mages may be affected as we add them later). If the roll on a d10 is equal to or less than the chance, then the character heals 1 point plus their Wisdom modifier.

Certain factors like curses or spells may prevent mana regeneration, but fighting does not.

focus

Start with a base 1 in 10 chance to regenerate a point. Add the Position and Sector modifiers to the chance (weather does not affect focus regen,). If the roll on a d10 is equal to or less than the chance, then the character heals 1 point plus their Wisdom modifier.

Characters who are in a fight, or have other factors that prevent healing (curses, spells, poison, etc.), will not regenerate focus.

Examples:

  • Amos has a 16 endurance and is resting on the side of the road in good weather. His chance is 1 (base) + 3 (resting) + 0 (sector road) + 0 (weather), for a total of 4/10 chance every 6 seconds to heal 2 (base 1 + endurance modifier) points of health.
  • Talia has a 21 wisdom and is using psionics to talk to a friend remotely. She is sitting in a tavern, so her chance to heal focus points is 1 (base) + 1 (sitting) + 4 (sector inside) for a total of 6/10. With such a high wisdom she'll heal 1 + (random 1 or 2) points, so 2 or 3 each time.
  • Malik is exhausted and out of stamina while wading through ankle-deep silt, and the weather is bad with blowing sand. To regenerate stamina he has a 1 (base) - 1 (shallow silt) - 1 (blowing sand) + 0 (standing) chance, for a total of -1. The lowest chance is always 1/10, so that's what he'll have. His endurance is a 12, so when he does regenerate a stamina point, it will be just 1 at a time.

Limits:

Regardless of factors like position, sector, weather and stat modifiers, there will always be a base 1 / 10 chance to regenerate a point in each stat pool. And the maximum is a 10/ 10 chance each tick of the script.

Conclusion

As we add more features to the game, like poison and additional spells, these may modify regeneration chances, and how much someone regenerates. Certain poisons may stop someone's ability to regenerate stamina, and would be useful as a hunting tool. Or a specific area may naturally increase someone's hps regeneration. Or hot weather may increase a fire mage's mana increases.