Explanation of role.c?

G

Guest

Guest
Archived from groups: rec.games.roguelike.nethack (More info?)

I've been working on a new character class, which is intended to be a
warrior/mage hybrid. (It's just for private use, so please no posts about
how new classes have to have something that makes them unique.) For
simplicity's sake, I didn't add them as an entirely new class, but instead
replaced the samurai class and its quest, artifact, etc. by my own class.

However, I've hit a dead end: I can't figure out how to change starting and
maximum levels in #enhance-able skills, and I have no idea what the last
three lines for each class in the roles[]-array mean. Can any of the expert
sourcedivers help me out, or is there a guide to the source where I can hope
to find the information I need?
 
Archived from groups: rec.games.roguelike.nethack (More info?)

"Christoph Starck" <kazaran@gmail.com> writes:
> I've been working on a new character class, which is intended to be a
> warrior/mage hybrid. (It's just for private use, so please no posts about
> how new classes have to have something that makes them unique.) For
> simplicity's sake, I didn't add them as an entirely new class, but instead
> replaced the samurai class and its quest, artifact, etc. by my own class.
>
> However, I've hit a dead end: I can't figure out how to change starting and
> maximum levels in #enhance-able skills

Maximum skill levels are defined in the Skill_X[] arrays in u_init.c.
Starting skill levels are set within skill_init() in weapon.c (and,
for weapon skills, depend on what you're given in your starting
inventory).

> and I have no idea what the last
> three lines for each class in the roles[]-array mean.

The first two of these lines detemine starting and level-gain values
(for low-level and high-level characters) for HP and power, and the
level at which you're considered to become "high-level". See hppw-343.txt
for an example of them being used. The last line gives the role's starting
alignment value, and then values used in determining spell failure rates:
see the "Spell statistics" section of the Role struct in include/you.h
for a key, and spl1-343.txt for tables of how they're used.

> Can any of the expert sourcedivers help me out, or is there a guide
> to the source where I can hope to find the information I need?

There's some guides to the source, but none covering role information
specifically (it's changed a good deal since German Martin wrote his
document).

--
: Dylan O'Donnell http://www.spod-central.org/~psmith/ :
: >LOOK UP CURRY IN GUIDEBOOK :
: 'CURRY: to consume silently and with regret.' :
: -- Dan Schmidt, "For a Change" :
 
Archived from groups: rec.games.roguelike.nethack (More info?)

Dylan O'Donnell wrote:

> Maximum skill levels are defined in the Skill_X[] arrays in u_init.c.
> Starting skill levels are set within skill_init() in weapon.c (and,
> for weapon skills, depend on what you're given in your starting
> inventory).

Thanks for the help!