Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make lockpicking/safecracking proficiencies functional #44860

Conversation

I-am-Erk
Copy link
Member

@I-am-Erk I-am-Erk commented Oct 14, 2020

Summary

SUMMARY: Content "Makes lockpicking and safecracking proficiencies do things and be learnable."

Purpose of change

I added proficiencies for lockpicking and safecracking when I created the Devices skill, but I didn't make them do anything yet. A few redditors have noticed so I guess my clever ruse is failing... better act quick before word gets out.

Describe the solution

LOCKPICKING

  • Replaces the old mechanic with a standardized normal_roll prototypic to what I have suggested in my standardized roll checks proposal.
  • Devices is now the primary skill in lockpicking, but mechanics has a little role.
  • Dexterity is the primary attribute in lockpicking, but per and int are also used a bit.
  • If you lack basic lockpicking proficiency your skill is effectively 6 levels lower.
  • If you have locksmithing proficiency your skill is effectively 4 levels higher.
  • Low quality lockpicks give a small penalty and high quality give a small boost.
  • Damage to your lockpicks still lowers your effectiveness.

These bonuses are mapped onto a normal_roll with a standard deviation of 2, which is (for now) compared to a randomly generated lock difficulty. In the future, lock difficulty should be defined by an attribute on the terrain/furniture you are unlocking.

Proficiency also affects the speed at which you pick a lock.

Added a debug message that displays your rolls for lockpicking.

SAFECRACKING

  • Randomly fiddling with a safe dial is now much less effective based on real life likelihoods.
  • Safecracking is influenced by devices, not mechanics skill.
  • If you don't have the proficiency, safecracking takes 3x as long, but does grant you proficiency xp.

Describe alternatives you've considered

I was sorely tempted to improve the way we calculate these, and use a normal_roll, but I am trying to avoid adding large new features or changing balance much before Stable.

Testing

Extensive!

High failure rate with no skill, no proficiency, and average stats:
image

Better skill with no proficiency is less bad on your tools but still very hard:
image

Low skill but proficient at lockpicking is also not ideal but better than no prof:
image

Not screencapped: Moderate skill and having the proficiency got the lock on the first try several times.

You can learn these proficiencies through practice now.
image
image

When you do, you can advance to more complex proficiencies
image

I did not take screencaps of safecracking, but it works as intended: It takes a longer time without proficiency, practicing grants safecracking XP, and getting safecracking proficiency makes it much faster.

Additional context

I was going to add disarming, spotting, and setting traps to this PR, but I decided I'd rather just get this set in and work on those separately.

We really need to have lockpicking difficulty defined by the thing being picked. Currently I've left it a random number but that has to change at some point

@I-am-Erk I-am-Erk added [C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Effects / Skills / Stats Effects / Skills / Stats labels Oct 15, 2020
@I-am-Erk I-am-Erk changed the title Make lockpicking and trap based proficiencies functional Make lockpicking/safecracking proficiencies functional Oct 15, 2020
Left in some of the variable name improvements because... why not.

The rest can wait for a second PR
@I-am-Erk I-am-Erk added this to In progress in 0.F Release Planning via automation Oct 15, 2020
@I-am-Erk I-am-Erk marked this pull request as ready for review October 15, 2020 19:53
( std::pow( 1.3, who.get_skill_level( skill_mechanics ) ) +
it->get_quality( qual_LOCKPICK ) - it->damage() / 2000.0 ) +
who.dex_cur / 4.0;
int pick_roll = ( std::pow( 1.5, who.get_skill_level( skill_traps ) ) *
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think pick_roll needs to be a float throughout this process, otherwise it's going to have some pretty bad rounding behavior.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yknow what, I'm just going to change the dang thing to use a normal_roll like I have done with traps... my code there has all the float stuff worked in.

src/iexamine.cpp Outdated Show resolved Hide resolved
@kevingranade kevingranade merged commit 17557d4 into CleverRaven:master Oct 19, 2020
0.F Release Planning automation moved this from In progress to done Oct 19, 2020
@I-am-Erk I-am-Erk deleted the fix-vestigial-proficiencies-before-someone-notices branch October 19, 2020 20:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[C++] Changes (can be) made in C++. Previously named `Code` Mechanics: Effects / Skills / Stats Effects / Skills / Stats
Projects
No open projects
Development

Successfully merging this pull request may close these issues.

None yet

2 participants