23 Dec, 2008, Mordis wrote in the 1st comment:
Votes: 0
Hi,

I'm kind of stuck on a problem. As far as I can tell this may be a bug with the Stock Rom Code as I've seen it on a few bug lists however I still have not been able to find a fix for it. I will Use elves as my primary example:

{ 	
"elf", " Elf ", 5, { 100, 125, 100, 120 },
{ "sneak", "hide" },
{ 12, 14, 13, 15, 11 }, { 16, 20, 18, 21, 15 }, SIZE_SMALL
},


As shown above Elves should recieve hide and sneak for free according to any documentation I've found.

Sneak skill in const.c

{
"sneak", { 53, 53, 4, 10 }, { 0, 0, 4, 6},
spell_null, TAR_IGNORE, POS_STANDING,
&gsn_sneak, SLOT( 0), 0, 12,
"", "You no longer feel stealthy.", ""
},


Using this information Elven Mage & Clerics will recieve sneak at level 53 (IMM level), thieves at 4, Warriors at 10. I could hard set the cleric and mage levels to "XX" however this would allow all cleric/mages to pick up these skills which is not what I'm looking for.

I've done my best to google this problem, I've seen it come up on the rom mailing list archives however I'm only able to retrieve the tail end of most of the messages and unable to see the fix if there is one.

Does anyone have any suggestions on how I could accomplish this..I noticed a snippet for "racial skills (Racial.txt) however the implementation notes are not very clear. this doesn't seem to be an issue with custom races as all the skills I'm applying to them are aswell customized. Only the core races.


Any assistance would be great,

Thank you
24 Dec, 2008, David Haley wrote in the 2nd comment:
Votes: 0
I'm not sure what exactly the problem is from your description. Are you saying that hide and sneak are not given for free? Are you saying that the skills are not given out at the levels you listed?
24 Dec, 2008, Mordis wrote in the 3rd comment:
Votes: 0
Hide and Sneak are given out for warriors and thieves, however they are not given for mages and clerics.

essentially what I'm attempting to do is give all Elves these these skills regardless of class. likewise for the other races.

example:

an elf mage will be able to hide, however a Giant mage cannot but will be able bash. Dwarf mage can Berserk etc


I hope that clears it up
24 Dec, 2008, Omega wrote in the 4th comment:
Votes: 0
the rom source will only give skills (even race-set ones) at the levels inwhich they set for a specific class.

for (i = 0; i < 5; i++)	{	    
if (pc_race_table[race].skills[i] == NULL)
break;
group_add(ch,pc_race_table[race].skills[i],FALSE);
}


Now lets look at group_add

group_add gives the learned value of the skill to 1.
Later we see in do_practice, it checks CLASS level to see if it matches.
if it doesn't, you cannot practice the skill.

What you can do:

Change the group_add into a
ch->pcdata->learned[skill_table[skill_lookup(pc_race_table[race].skills[i])]]= 75;


that should give them the skill, but gives a rating of 75.

Alternatively you can add a check into practice to see if it is a racial skill, and if-so, let them practice it right away.

Else-wise, it will just base on class level.

Cheers.
0.0/4