Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ ROM ➜ Running the server ➜ Race based skills, guidance/help needed. (long)

Race based skills, guidance/help needed. (long)

It is now over 60 days since the last post. This thread is closed.     Refresh page


Posted by Krypt   (9 posts)  Bio
Date Fri 17 Feb 2006 12:28 AM (UTC)
Message
I know this was asked quite a bit on the ROM mailing list years back but I wasnt able to find much help rooting through the old digests other than the tail end of various discussions. Bascially what I want to do is take the skills I list in const.c in the race table *ie elves sneak/hide, giants bash etc* and not just have it class specific. So an elf that is a mage still gets sneak etc. Or a giant mage still gets bash if someone decided to pick such a combo. LOL. I still want them though to have to practice these skills, they just get them free like was intended in stock as far as classes are concerned and still start with 1% proficiency just like anyone else..perhaps 40% like the weapon of choice which was what i tried...

I know from what I read I need to insert something in the nanny in comm.c and add another field or check to the various tables in const.c. Race and/or skills/spells table/s.
But from there on I'm not much having any success.
_______________________________________________


what I have already tried with no success, from what Ive read on the old ROM digest list
in the nanny function under,
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 );

I added,

}
for ( i = 0; i < 5; i++ )
{
if ( pc_race_table[race].skills[i] == NULL )
break;
skill_add( ch, pc_race_table[race].skills[i] );
}
group_add( ch, "rom basics", FALSE );
sprintf( buf, "Your Faerie Godmother waves her wand and {BPOOF{x! You turn into a %s.\n\r", pc_race_table[race].name );
send_to_char( buf, ch );

(i kept the faerie godmother bit just for giggles)

and in skill.c added
void skill_add( CHAR_DATA *ch, const char *name )
{
int sn;

sn = skill_lookup(name);

if (ch->pcdata->learned[sn] == 1)
{
ch->pcdata->learned[sn] = 40;
}
return;
}
and then modified my skill/spell tables with a FALSE, before the SLOT() and replaced this FALSE with a TRUE for those skills I wanted to be given to a certain race regardless of class. using stock, something like

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

Anyhow be appreciated if someone could steer me in the right direction. Side note it did compile although skills didnt get applied and mana costs were in the 500 plus range now for spells LOL. I'm pretty sure I need the extra entry in the tables, that much i feel Ive done right LOL but definitely willing to go about it any other way as well whichever is easiest.
Top

Posted by Krypt   (9 posts)  Bio
Date Reply #1 on Mon 18 Apr 2011 03:45 AM (UTC)

Amended on Mon 18 Apr 2011 04:07 AM (UTC) by Nick Gammon

Message
I gave up on this not long after i posted for help.
That said I recently downloaded rom 2.4b6 again and modified it some, added a lot of races/class, area's, spell's, skills etc, colour and olc, note system, for the kids to play with on the home network. Great way to help them work on reading without them knowing thats what they are doing :)yeah i know sneaky :)

anyhow I'm trying to again make skills that carry over to a given race regardless of class. I saw on a different forum
someone mentioned the nanny function,


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);	
         }



and to replace the group_add to


ch->pcdata->learned[skill_table[skill_lookup(pc_race_table[race].skills[i])]]= 75;



which i did, unfortunately when i try to compile i get an error, pointing to that specific line.
Was wondering if anyone has a somewhat simple way for me to do this? or could walk me through (Racial skills)

Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #2 on Mon 18 Apr 2011 04:08 AM (UTC)
Message
What error?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by Krypt   (9 posts)  Bio
Date Reply #3 on Mon 18 Apr 2011 05:24 AM (UTC)
Message
array subscript is not an integer
Top

Posted by Nick Gammon   Australia  (23,133 posts)  Bio   Forum Administrator
Date Reply #4 on Mon 18 Apr 2011 11:20 PM (UTC)
Message
I don't understand that replacement code. There are about 3 subscripts there. You need to break that up a bit and work out which one it is referring to.

For example,


skill_lookup(pc_race_table[race].skills[i])


is a subscript, so does that return an integer?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


19,064 views.

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.