[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  SMAUG
. -> [Folder]  SMAUG coding
. . -> [Subject]  Coding skills [BEGINNER]

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Coding skills [BEGINNER]
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Posted by Aeri   (2 posts)  [Biography] bio
Date Thu 15 Nov 2012 07:46 AM (UTC)  quote  ]
Message
Sounds like the player doing the command 'prac' still has the tongue as a skill.

if( skill->type != lasttype )
{
if( !cnt )
send_to_pager( " (none)\r\n", ch );
else if( col % 3 != 0 )
send_to_pager( "\r\n", ch );
set_pager_color( AT_MAGIC, ch );
pager_printf_color( ch,
" ----------------------------------&C%ss&B----------------------------------\r\n",
skill_tname[skill->type] );
col = cnt = 0;
}
lasttype = skill->type;


See, it looks for the lasttype which is assigned by skill->table. If you have a skill set to a character which type had been removed from the table (because you removed it), it not going to know how to view it, so it defaults to the first in the list, unknown. You can see this when it does a pager_printf_color.

Short answer fix: remove the tongues from the skills.dat.

If you want to keep the functionality but don't want them to be shown, incorporate an 'if' statement that checks skill->type against SKILL_TONGUE.

Hope this helps.
[Go to top] top

Posted by Mopop   (115 posts)  [Biography] bio
Date Wed 11 Apr 2012 06:15 AM (UTC)  quote  ]
Message
Okay I removed all the instances of find_tongue and skill_tongue. Now when I type prac It's set into the unknown section. I just want it removed from the prac list, it's not important but it's just an ascetic thing to get me back into the swing of coding.
[Go to top] top

Posted by Mopop   (115 posts)  [Biography] bio
Date Wed 11 Apr 2012 02:45 AM (UTC)  quote  ]
Message
Where exactly would one go to just remove it from the prac list? Instead of just trying to eradicate it from code just having it so the player knows that it doesn't exist.

Im assuming I'll need to brush up on arrays since its been two years of not coding, oh boy.

On a scale of 1-10 how difficult would it be just to remove languages from the stock code (smaugfuss 1.9)
[Go to top] top

Posted by Fiendish   USA  (851 posts)  [Biography] bio   Global Moderator
Date Tue 10 Apr 2012 01:13 PM (UTC)  quote  ]

Amended on Tue 10 Apr 2012 01:18 PM (UTC) by Fiendish

Message
It would be nice if you put a more relevant subject on this thread. Something like "Removing Tongues from game and practice list".

Quote:
(We deleted the word 'Tongues'.)

Now, the tongues are still there in the skill list, but the heading is "Herbs".


I'm curious what happens with Disease now. You can't usually just erase an item from an array like that. You'll index off the end and horrible things will happen.

http://aardwolfclientpackage.googlecode.com/
[Go to top] top

Posted by Helsing   (1 post)  [Biography] bio
Date Tue 10 Apr 2012 06:55 AM (UTC)  quote  ]
Message
Hello! We are a couple of friends learning as we go with the SmaugFUSS 1.9 codebase.
What we would like to do is remove the "Tongues" from the practice list (and the game), so that there is only one language. The first thing we have tried is going into the tables.c file, and we found this line:

const char *skill_tname[] = { "unknown", "Spell", "Skill", "Weapon", ["Tongues",] "Herb", "Racial", "Disease" };

(We deleted the word 'Tongues'.)

Now, the tongues are still there in the skill list, but the heading is "Herbs". While it was not completely unforeseen, the task of actually removing the Tongues from the game is daunting indeed...any help would be much appreciated, at the very least as to the true nature of the scope of this task. Actual coding help would be cool, too...like I said, this is a learning project. :)
[Go to top] 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.


1,266 views.

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]