  | | | creating new skill type | creating new skill type 2005-01-01 - By moclamoose
Back Hi!
Now Im trying to create an entirely new skill type, called "trade". I know that in tables.c I need to add the proper field here:
int get_skill( char *skilltype ) { if ( !str_cmp( skilltype, "Race" ) ) return SKILL_RACIAL; if ( !str_cmp( skilltype, "Spell" ) ) return SKILL_SPELL; if ( !str_cmp( skilltype, "Skill" ) ) return SKILL_SKILL; if ( !str_cmp( skilltype, "Weapon" ) ) return SKILL_WEAPON; if ( !str_cmp( skilltype, "Tongue" ) ) return SKILL_TONGUE; if ( !str_cmp( skilltype, "Herb" ) ) return SKILL_HERB; return SKILL_UNKNOWN;
but Im not entirely sure all of the other places that I need to add entries. I know to have the skill saved I need to add entries into save.c in fread_char and fwrite_char, where else?
Thanks so much! <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"> <HTML><HEAD> <META http-equiv=Content-Type content="text/html; charset=iso-8859 (See http://iso-8859.ora-code.com)-1"> <META content="MSHTML 6.00.2900.2523" name=GENERATOR> <STYLE></STYLE> </HEAD> <BODY bgColor=#ffffff> <DIV><FONT face=Arial size=2>Hi!</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Now Im trying to create an entirely new skill type , called "trade". I know that in tables.c I need to add the proper field here:</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>int get_skill( char *skilltype )<BR>{<BR> if ( !str_cmp( skilltype, "Race" ) )<BR> return SKILL_RACIAL;<BR> if ( !str_cmp( skilltype, "Spell" ) )<BR> return SKILL_SPELL;<BR> if ( !str_cmp( skilltype, "Skill" ) )<BR> return SKILL_SKILL;<BR> if ( !str_cmp( skilltype, "Weapon" ) )<BR> return SKILL_WEAPON;<BR> if ( !str_cmp( skilltype, "Tongue" ) )<BR> return SKILL_TONGUE;<BR> if ( !str_cmp( skilltype, "Herb" ) )<BR> return SKILL_HERB;<BR> return SKILL_UNKNOWN;</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>but Im not entirely sure all of the other places that I need to add entries. I know to have the skill saved I need to add entries into save.c in fread_char and fwrite_char, where else?</FONT></DIV> <DIV><FONT face=Arial size=2></FONT> </DIV> <DIV><FONT face=Arial size=2>Thanks so much!</FONT></DIV></BODY></HTML>
|
|
 |