QfG: formulae

Since there is not much progress with REing the engine, here I’d like to at least document some formulae from the gameplay mechanics. I realize that most of them are probably well-known already but maybe I’ll cover at least a couple of new ones.

Here I capitalise character traits/skills just to make them more noticeable (and the usual D&D shortenings make me think about completely different things).

Some derived characteristics:

  • maximum stamina is an average of Agility and Vitality stats;
  • maximum mana is (Intelligence + 2*Magic)/3;
  • maximum weight is (Strength + 80) * 30;
  • spell strength is calculated as (Magic * 2 + spell_skill) / 15

As a rule, spending some points on an action also rises some stat by a fraction e.g. spending 13 points of mana on casting a spell would raise Intelligence by 1 and Magic by 3.

  • in case of a damage taken, Vitality is increased by 1/8th of damage value;
  • on healing Vitality is increases by 1/8th of healing points (1000 for healing potion, 100 for pills)—but those are halved in case you’re poisoned;
  • casting a spell raises Intelligence stat by 1/8th of mana points used and Magic stat by 1/4th of mana points;
  • using stamina increases Vitality by 1/8th of used points;
  • looks like mana regenerates at a rate of one point every 5 hours;
  • looks like on winning some event (e.g. freeing a village in the Rite of Conquest) Intelligence stat will be raised by triple the score awarded for such deed (and tenfold for network game events);
  • being overloaded seems to use the excess weight difference clipped to a range 384..1536 quarks and that state takes excess_weight/128 stamina points and raises Strength by 2;
  • swimming (without an amulet) take 51 stamina points and gives 1 Vitality point.

Resting (most formulae here use nights_rested as the base unit, which is 12 in-game hours):

  • stamina is recovered by the following formula: (Agility+Vitality)/2 * nights_rested * 8;
  • health recovery rate is set as (Strength+2*Vitality)/3;
  • recovered health points, correspondingly, are recovery_rate * nights_rested;
  • mana is replenished as (Intelligence+2*Magic)/3 * nights_rested.

Action requiring skill checks work as following:

  1. check whether the skill is present at all;
  2. in case skill threshold is not given, generate a random one in 100..500 range;
  3. get acting skill value (i.e. modified by some amulets or charms) and add a bonus/penalty value (I’ve seen a negative one used with Acrobatics and positive one used with Swimming);
  4. get action base points (400 for Agility, Defence, Magic or Stealth; 200 for Offence, Throwing or Swimming; 100 for everything else);
  5. subtract ((threshold * 3) / (base * 2) + 1) stamina points (unless it’s a Luck check);
  6. for Magic, Climbing, Acrobatics, Throwing, Stealth, Lock-picking, Pickpocket or Swimming add another random bonus (in range 0..50) to the skill value if luck check succeeds;
  7. update skill-dependent values (no matter if the skill check passed or not);
  8. return the skill value being not lower than the threshold.

And here are the skill update rules (the values here are not to be directly added to a hero characteristic but rather used as explained below):

  • Offence: update Strength by 20, Agility by 12, Offence by 20;
  • Defence: update Agility by 20, Intelligence by 6, Defence by 30;
  • Stealth: update Agility by 20, Intelligence by 6, Stealth by 40;
  • Climbing: update Strength by 20, Vitality by 15, Climbing by 40;
  • Swimming: update Strength by 20, Vitality by 15, Swimming by 40;
  • Acrobatics: update Strength by 15, Agility by 25, Vitality by 8, Acrobatics by 40;
  • Throwing: update Agility by 30, Strength by 15, Throwing by 40;
  • Lock-picking: update Agility by 25, Intelligence by 10, Lock-picking by 100;
  • Pickpocketing: update Agility by 25, Intelligence by 10, Pickpocketing by 60;
  • Magic: advance Magic by 20;
  • Luck: advance Luck by 30;
  • (all others as well as spell skills are supposed to be raised by 40).

If you wonder what actions those may be, dagger throwing in Dead Parrot Inn games has a Throwing check with threshold 350, taking a hit updates Defence, reading a spell scroll checks Magic skill with threshold 100.

So, what to do with those “skill update” events? Nothing if the skill is zero of course but let’s review more interesting cases. First of all, the value is doubled. One twentieth of the (already doubled) value is added to your score but besides that:

  • Throwing simply subtracts one stamina point;
  • Vitality is not updated when the hero is poisoned;
  • the bonus value is added to the special persistent “skill XP” variable;
  • while “skill XP” is no less than current skill value, subtract current skill value from “skill XP” and add random 0..5 points to the current skill value;
  • in case of negative “skill XP” value, subtract random 0..5 points from the skill instead.

I can see it as some form of skill levelling. Oh, and of course skill values are limited to 100..500 (or 100..550 for certain skills for certain classes) range.

Well, that’s it for today. Hopefully I’ll get into RGD stuff but that should be about it.

Leave a Reply