fodev.net

Other => FOnline:2238 Forum => Archives => Survival Guides / Game Help => Topic started by: firehand on April 20, 2012, 03:10:08 pm

Title: Myth: Everyone has a chance to successfully lockpick a car.
Post by: firehand on April 20, 2012, 03:10:08 pm
Myth: Everyone has a chance to successfully lockpick a car.

Most likely only players with a luck trait higher than 1 or with a high lockpick skill can succeed in breaking into a car.

Algorithm for lockpicking a car:*[1]

min chance = RoundDown(luck / 2)

So if you have 1 luck then your min. chance is 0%,
if you have 2 luck then your min. chance is 1%,
for 10 luck it's 5%.

base chance = lockpick skill - 200

bonuses:
lockpick in active slot >>> base chance + 25
expanded lock pick in active slot >>> base chance + 50

If base chance is smaller than min chance it is set to min chance.
If base chance exceedes 100 then it is set to 95.

So if you have lockpick skill below 200 and no tool then your chance is equal to min chance.
If your skill is for example 220 then your chance to lock pick a car is 20%.
If your skill is for example 250 and you use super lock pick then your base chance is equal to 100 but max chance is set to 95% so it is 95% in the end.

*there is a possibility that the algorithm was changed by fonline2238 team.

Reference
1. The corresponding fragment of a source code from http://svn.xp-dev.com/svn/fonline_sdk/Server/scripts/car.fos
Code: [Select]
bool UseSkillOnCar( Critter& cr, Item& car, int skill ) // Export
{
(...)
else if( skill == SK_LOCKPICK )
    {
        if( cr.Timeout[ TO_SK_LOCKPICK ] > 0 )
        {
            cr.SayMsg( SAY_NETMSG, TEXTMSG_GAME, STR_SKILL_WEARINESS );
            return true;
        }

        if( _CarIsNoLockpick( car ) )
        {
            cr.SayMsg( SAY_NETMSG, TEXTMSG_GAME, STR_SKILL_LOCKPICK_FAIL );
            return true;
        }

        int    base = cr.Skill[ SK_LOCKPICK ] - 200;
        uint8  mode = 0;
        uint16 activePid = cr.GetSlotProto( SLOT_HAND1, mode ).ProtoId;
        if( activePid == PID_LOCKPICKS )
        {
            base += 25;
            if( Random( 0, 30 ) == 0 )
                cr.DeleteItem( PID_LOCKPICKS, 1 );
        }
        else if( activePid == PID_EXP_LOCKPICK_SET )
        {
            base += 50;
            if( Random( 0, 30 ) == 0 )
                cr.DeleteItem( PID_EXP_LOCKPICK_SET, 1 );
        }

        int minChance = cr.Stat[ ST_LUCK ] / 2;
        base = CLAMP( base, minChance, 95 );
        if( base >= Random( 1, 100 ) && car.LockerId != 1 )
        {
            DriveToGlobal( cr, car, true );
            cr.StatBase[ ST_EXPERIENCE ] += 200;
            cr.AddScore( SCORE_CRACKER, 1 );

            Item@ key = cr.GetItem( PID_KEY, SLOT_HAND1 );
            if( not valid( key ) )
                @key = cr.GetItem( PID_KEY, SLOT_HAND2 );
            if( valid( key ) )
                key.LockerId = car.LockerId;
        }
        else
        {
            cr.SayMsg( SAY_NETMSG, TEXTMSG_GAME, STR_SKILL_LOCKPICK_FAIL );
        }

        cr.TimeoutBase[ TO_SK_LOCKPICK ] = LOCKPICK_TIMEOUT( cr );
    }
(...)
}
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: JovankaB on April 20, 2012, 03:49:17 pm
Many things are different in 2238 comparing to SDK.
Lockpick mechanics can be different as well.
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: Sarakin on April 20, 2012, 05:32:22 pm
But are they ? Why these kind of information are confident ?
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: firehand on April 20, 2012, 06:25:36 pm
But are they ? Why these kind of information are confident ?

Based on my experience I would say this algorithm wasn't changed. But still Jovanka is right, I can't be really sure about that  :-\
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: cannotspace on April 20, 2012, 08:13:46 pm
Many things are different in 2238 comparing to SDK.
Lockpick mechanics can be different as well.

I never understood why the GMs always seem to want to keep us in the dark on some of those things.
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: maciek83 on April 20, 2012, 08:23:40 pm
the less we know the less ways of exploiting we will find
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: Perteks on April 20, 2012, 08:27:07 pm
The less that game will be playable :D and more bugsss :)
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: Pandaeb on April 20, 2012, 08:44:49 pm
Hum... Isn't FOnline (from Cvet) created as OpenSource? If so, according to opensource rules, the one who is using this code in his program has to make public his whole code.
In other words - if FOnline code is opensource, Devs of FO:2238 have to make FO:2238 opensource aswell.
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: firehand on April 20, 2012, 09:35:34 pm
Hum... Isn't FOnline (from Cvet) created as OpenSource? If so, according to opensource rules, the one who is using this code in his program has to make public his whole code.
In other words - if FOnline code is opensource, Devs of FO:2238 have to make FO:2238 opensource aswell.

Fonline isn't an open source project. Even if the code of Fonline was open source it wouldn't mean that you would be able to freely modify it. There are different open source licenses and the one that you were thinking about is most likely GPL(general public license) which in my opinion is one of the worst(in nutshell the code is reusable only in other GPL projects).

Anyway Fonline has a proprietary license and it can be found here -> http://fonline.ru/license.html[1] (page coding is Cyrillic "Windows-1251").

Still I couldn't find a license statement for the source codes of the scripts that are the part of Fonline SDK. They are either licensed over the above mentioned license or they don't have a specified license and that means the author of the particular code poseses the full rights for it.


Resources
1. The license agreement translated from russian by google translator:
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: JovankaB on April 21, 2012, 02:05:50 am
Nice explanation firehand :)

Quote
I never understood why the GMs always seem to want to keep us in the dark on some of those things.
Let's make some things clear - I don't want to keep you in the dark. I'm in the dark myself :)
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: Michaelh139 on April 21, 2012, 03:15:04 am
Let's make some things clear - I don't want to keep you in the dark. I'm in the dark myself :)
I think he also meant the devs.

Basically anyone in staff.  Why must we remain ignorant?
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: JovankaB on April 21, 2012, 04:51:05 am
I don't know dev reasons but would you prefer if devs spend available time to work on game, or
to explain every single detail of game mechanics so powerplayers can create their minimaxed alts?
Besides such info can easily become outdated and wrong information is worse than no information.

But this is just opinion of lowly GM :)
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: cannotspace on April 21, 2012, 05:08:07 am
powerplayers can create their minimaxed alts?

This seems to be pointed a lot by some GMs, why are players always seen as the villain that just wants to be a no-fun-allowed-elitist?

Info helps those "powerplayers" and the normal users the same way, actually good info helps the normal users more, because the powerplayers will eventually figure out how stuff work(sort of, at least).
Title: Re: Myth: Everyone has a chance to successfully lockpick a car.
Post by: JovankaB on April 21, 2012, 05:16:18 am
I didn't call anyone villain. I just think it's better if time resources are spent to improve a game instead
of documenting source code details that aren't vital to play and can change anyway because game is in beta.

But I might be wrong, I never made a game ;D