Login
User Name:

Password:



Register
Forgot your password?
Vote for Us!
Bug in disarm( )
Nov 12, 2017, 6:54 pm
By GatewaySysop
Bug in will_fall( )
Oct 23, 2017, 1:35 am
By GatewaySysop
Bug in do_zap( ), do_brandish( )
Oct 18, 2017, 1:52 pm
By GatewaySysop
Bug in get_exp_worth( )
Oct 10, 2017, 1:26 am
By GatewaySysop
Bug in do_drag( )
Oct 8, 2017, 12:40 am
By GatewaySysop
LOP Heroes Edition
Author: Vladaar
Submitted by: Vladaar
Heroes sound extras
Author: Vladaar
Submitted by: Vladaar
6Dragons 4.3
Author: Vladaar
Submitted by: Vladaar
Memwatch
Author: Johan Lindh
Submitted by: Vladaar
Beastmaster 6D sound files
Author: Vladaar
Submitted by: Vladaar
Users Online
CommonCrawl, Yahoo!, Google, Bing, DotBot

Members: 0
Guests: 10
Stats
Files
Topics
Posts
Members
Newest Member
476
3,704
19,231
608
LAntorcha
Today's Birthdays
There are no member birthdays today.
Related Links
» SmaugMuds.org » Codebases » SWFOTE FUSS » Question about codecrack's fa...
Forum Rules | Mark all | Recent Posts

Question about codecrack's failure rate
< Newer Topic :: Older Topic >

Pages:<< prev 1 next >>
Post is unread #1 May 27, 2010, 1:38 am   Last edited May 27, 2010, 1:40 am by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

So, I was digging though the code just at random and I'm trying to work out the success and failure rate of codecrack. Well actually all skills that use this statement.
schance = IS_NPC( ch ) ? ch->top_level : ( int )( ch->pcdata->learned[gsn_codecrack] );

This is found on or around line 1175 in slicers.c on the FUSS release.

So maybe my math skills aren't that great but is it saying that if you have the skill codecrack at 100% you'll never fail, and then the alarm statement a little further down is only good for people working to level codecrack?

Any enlightenment on how this chance is getting calculated would be helpful.
ayuri
       
Post is unread #2 May 27, 2010, 6:40 am
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

Yes, if the check is then that a random 1d100 number is less than sChance, if sChance is 100 you will never fail. So unless fuzz is applied somewhere (or a 95% cap on learned or whatever) it seems that you'll eventually get to a point where you never fail.
       
Post is unread #3 May 27, 2010, 9:56 am
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

Hmmm, I'll have to take a look to see if there is a fuzz somewhere. I kinda think there is because I remember engineer's every once in a great while failing to make something when they are all adept.

Thanks David,
ayuri
       
Post is unread #4 May 27, 2010, 1:12 pm   Last edited May 27, 2010, 1:14 pm by ayuri
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

So doing a little more digging, I found in db.c
int number_percent( void )
{
    return (number_mm() % 100)+1;
}

and a little later on it in codecrack we have:

   x = number_percent(  );
   if( ship->alarm == 1 )
      x = x * 2;
   if( x > schance * 2 || !checkdata || ( !ship ) )


So, I'm going to call this one out as a bug, or someone wanted to make it easy sauce for slicers.

**EDIT I should point out I have yet to find any sort of 95% success rate anywhere. Someone with more hands on knowledge of this code care to enlighten?

ayuri
       
Post is unread #5 May 27, 2010, 1:21 pm
Go to the top of the page
Go to the bottom of the page

David Haley
Sorcerer
GroupMembers
Posts903
JoinedJan 29, 2007

   x = number_percent(  );
   if( ship->alarm == 1 )
      x = x * 2;
   if( x > schance * 2 || !checkdata || ( !ship ) )


Yeah, if schance is 100, it becomes 200, so it's still impossible to fail -- if schance is 100.

In plain FUSS, it looks like skills are capped only by the class adept level. However, it looks like skills are created by default with adept maxed at 95.

What's the skill table look like here for codecrack?

I mean, if you think about it, if your chance of success is 100%, then, by definition, you never fail.
It's just that you should arguably never have 100% chance of success or be able to execute things utterly perfectly every single time.
       
Post is unread #6 May 27, 2010, 2:34 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

Yeah, adept is at a 100% cap in fote.

ayuri
       
Post is unread #7 May 27, 2010, 2:41 pm
Go to the top of the page
Go to the bottom of the page

ayuri
Magician
GroupMembers
Posts239
JoinedJun 13, 2008

I should have pointed out that this is in skills.c around line 1237.

if( ch->pcdata->learned[sn] == 100 )   /* fully learned! */
      {
         gain = 50 * sklvl;
         set_char_color( AT_WHITE, ch );
         ch_printf( ch, "You are now an adept of %s!  You gain %d bonus experience!\r\n", skill_table[sn]->name, gain );
      }
      else
      {
         gain = 10 * sklvl;
         if( !ch->fighting && sn != gsn_hide && sn != gsn_sneak )
         {
            set_char_color( AT_WHITE, ch );
            ch_printf( ch, "You gain %d experience points from your success!\r\n", gain );
         }
      }


ayuri
       
Pages:<< prev 1 next >>