[TIB] Re: Equations for TI-89 RPG


[Prev][Next][Index][Thread]

[TIB] Re: Equations for TI-89 RPG





Matthew:

For "Rogue", I used the following equations, which don't really
apply to attribute-based systems as well, but are easy to code.
These equations were not designed for realism, but for playability
and small size.

First, the player gains Experience by killing monsters:
    Exp = number of experience points
    Experience Level = iPart( cube root of (1 + 2/3 (Exp)) )
so that Level increases slowly with Exp.  Then the player's chance
of a hit increases with his experience level, of course; and I
also decided to make hits more likely as the player's HP decreased.
This means that "epic battles", where the player loses a lot of HP,
become more likely.
    Chance of miss = 1/2 * (1 + (HP/MHP)*(0.05+0.65*e^(-Level/8)) )
Then (on the TI-83, at least), if (rand < Ans), that's a miss, and
if (rand >= Ans), that's a hit.
  Hit damages (which is really what you asked about) are calculated
in "Rogue" just like in D&D, where each weapon type has a damage
die associated with it (daggers are 1d4, swords are 2d5, whatever).
(I don't worry about modifying the damage based on the monster's
armour class, since the player won't really notice anyway.)

  For damage to the player, I do worry about armour class.  A monster's
chance to hit the player is calculated like this:
    Chance of miss = 1 / sqrt(Monster HP)
That means as the player does damage to the monster, the monster gets
more and more disoriented until it can no longer hit the player reliably.
It also means that Dragons with 100 HP will almost always hit the player.
Then damage is calculated as:
    Damage = e^(-AC/8) * MonsterDamage
where MonsterDamage is again a damage-dice roll (2d4, 3d12, whatever).
The first term in the equation is the armour class modifier, where AC
is the player's armour class from 0 (no armour) to around 10 (I think
8 is the highest AC possible in the game at the moment).

If you are really interested in good RPG equations, check out the source
code to some computer RPGs.  I don't think Diablo is open source, but
there are a lot of games out there: Nethack (www.nethack.org), Angband
(www.thangorodrim.net), and, of course, the original Rogue itself
(www.win.tue.nl/~kroisos/rogue/index.html).  I believe all of these
games use the D&D stat system, which has STR, INT, DEX, WIS, CON, and
CHR values, although I'm not sure about Rogue.

Happy hacking!

-Arthur

On Sat, 24 Aug 2002, Listar wrote:

> ti-basic Digest	Sat, 24 Aug 2002	Volume: 02  Issue: 052
> From: "Matthew Waters" <thefishyone@hotmail.com>
> Subject: [TIB] Equasions for TI-89 RPG
> Date: Fri, 23 Aug 2002 19:26:06 -0500
>
> I'm making a version of the original Final Fantasy for the 89, and am having
> a bit of trouble getting good, balanced equasions for calculating DMG, both
> physical and magical, and for both the player and enemies. The stat system
> works the same way as Diablo I, with STR, DEX, VIT, and MAG values. You also
> get 5 points to distribute per lvl up, just like in Diablo.
>
> If anyone has any experience making BASIC RPGs from scratch, please give me
> some input on how to write good equasions.