Skill type

Posted by Metsuro on Tue 04 Jul 2006 11:27 PM — 2 posts, 13,019 views.

USA #0
Alright I have added a new skill type, and I am kinda lost on how to do the fread for it...

            if( !strcmp( word, "Skill" ) )

            {
               int sn;
               int value;

               if( preload )
                  word = "End";
               else
               {
                  value = fread_number( fp );
                  if( file_ver < 3 )
                     sn = skill_lookup( fread_word( fp ) );
                  else
                     sn = bsearch_skill_exact( fread_word( fp ), gsn_first_skill, gsn_first_weapon - 1 );
                  if( sn < 0 )
                     bug( "%s", "Fread_char: unknown skill." );
                  else
                  {
                     ch->pcdata->learned[sn] = value;
                     /*
                      * Take care of people who have stuff they shouldn't     *
                      * * Assumes class and level were loaded before. -- Altrag *
                      * * Assumes practices are loaded first too now. -- Altrag
                      */
                     if( ch->level < LEVEL_IMMORTAL )
                     {
                        if( skill_table[sn]->skill_level[ch->Class] >= LEVEL_IMMORTAL )
                        {
                           ch->pcdata->learned[sn] = 0;
                           ch->practice++;
                        }
                     }
                  }
                  fMatch = TRUE;
                  break;
               }
            }


thats for just a normal skill, so... what I am lost at is... what I might have to change for the new skill type.
Amended on Tue 04 Jul 2006 11:47 PM by Metsuro
USA #1
Well I gave up on the new types... and I was just wondering how I might make practice display skill types in the order I choose them to be? so I can make like skills spells tongues then like weapons at the end?