Re: [NEWBIE] Adding new classes..

From: Thomas Arp (t_arp@stofanet.dk)
Date: 09/22/02


From: "Peter d" <death_comes_to_all@HOTMAIL.COM>
> well.. it's not actually about adding the classes, is it possible to
remove
> all the saves and thaco from class.c?i find it very time consuming making
> 100 levels per class per save/thaco..

*chuckles*
That's what happens when you make the level change, and don't think
it through thoroughly first. Don't be alarmed, though.
What you want is to change the hitroll system. As it is, it's
geared towards a 30 level spread, with low thac0s
(thats's a 0 - zero - inthere) reserved for warriors of high level.
 What you need is to 'spread' them further.
Here's what you do:
Find out what each class will start at at level 1 (say thac0 20)
and what they end with at level 100 - alternatively, what level
they reach thac0=1. Now calculate the delta value

(Starting Thac0 - ending Thac0) / 100

An example could be a thief:
(20 - 6) / 100 = 0.14

Alternatively, calculated on the base of what level the class
reaches Thac0=1, the calculation looks like:

(20 - 1) / (levels to reach 1)
For a warrior who hits 1 at level 76, this ends up as

(20 - 1) / 76 = -0.25

now, put it all in a function instead of a table:

int thaco(int chclass, int level) {
  float mult;
  switch (chclass) {
    case CLASS_WARRIOR: mult = 0.25;break;
    case CLASS_THIEF  : mult = 0.14;break;
    default: mult = -1; log("error"); break;
  }

  return (MAX(1,(int) 20 - mult * level));
}

> i haven't even realized what thaco is for.. is it like natural hitroll?

Yes. It means 'To Hit AC 0', thus the zero. It is the base number you have
to roll above on a 20-sided dice to hit a creature with AC 0.

Example:
Monster AC 0, player Thac0 12 -> player has 8/20 = 40% chance to hit.
Monster AC 8, player Thac0 12 -> player has 16/20 = 80% chance to hit.
Monster AC -8, player Thac0 12 -> player has 1/20 = 5% chance to hit.

hitroll bonuses are applied before rolling the dice.

> i don't mean remove them completely.. just from class.c.
There aren't any reasons for moving them to another file.
Just get rid of the long 'switch' statements.

Welcor

--
   +---------------------------------------------------------------+
   | FAQ: http://qsilver.queensu.ca/~fletchra/Circle/list-faq.html |
   | Archives: http://post.queensu.ca/listserv/wwwarch/circle.html |
   | Newbie List:  http://groups.yahoo.com/group/circle-newbies/   |
   +---------------------------------------------------------------+



This archive was generated by hypermail 2b30 : 06/25/03 PDT