-
Notifications
You must be signed in to change notification settings - Fork 4.1k
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
Needs testing: Rewrite crafting skill checks to use normal_roll. #46153
Closed
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
actual-nh
reviewed
Dec 19, 2020
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
I-am-Erk
added
<Bugfix>
This is a fix for a bug (or closes open issue)
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Crafting / Construction / Recipes
Includes: Uncrafting / Disassembling
labels
Dec 19, 2020
I-am-Erk
added this to In progress
in Overhaul randomization and actions
via automation
Dec 19, 2020
Make intelligence neutral at an average of 8.
make final_difficulty tallied the same as skill total fix a dumb gaffe from me
actual-nh
reviewed
Dec 31, 2020
actual-nh
reviewed
Dec 31, 2020
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
Co-authored-by: anothersimulacrum <anothersimulacrum@gmail.com>
Co-authored-by: actual-nh <74678550+actual-nh@users.noreply.github.com>
kevingranade
moved this from In progress
to Delayed blockers (for 0.G)
in 0.F Release Planning
Feb 7, 2021
This was referenced May 18, 2021
I-am-Erk
changed the title
WIP: Rewrite crafting skill checks to use normal_roll.
Needs testing: Rewrite crafting skill checks to use normal_roll.
Aug 12, 2022
Shockingly and against all odds this is now at a place where people could help me playtest. It is not yet ready to merge, see my own above unresolved comments |
github-actions
bot
added
the
astyled
astyled PR, label is assigned by github actions
label
Aug 12, 2022
mqrause
reviewed
Aug 13, 2022
I-am-Erk
commented
Sep 26, 2022
* Display recipe chance of failure Split the crafting roll function into just providing the parameters for the normal curve it will be rolling on, and a function doing the actual roll. Also, fix some DBZ bugs, and add debug outputs while we're there. Then, add a function to calculate the chance we'll pass a normal roll with given center, stddev, and difficulty, and use that to provide the recipe success chance. Add this to the crafting GUI. * Adjust crafting catastrophic failure chances Fudge the numbers to make catastrophic (item-destroying) failures much less likely than setback failures. Also display the chance of a catastrophic failure in the UI.
github-actions
bot
added
the
Info / User Interface
Game - player communication, menus, etc.
label
Oct 8, 2022
@I-am-Erk could you please resolve conflicts? |
github-actions
bot
added
the
BasicBuildPassed
This PR builds correctly, label assigned by github actions
label
Oct 15, 2022
Fris0uman
pushed a commit
to kevingranade/Cataclysm-DDA
that referenced
this pull request
Nov 19, 2022
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Fris0uman
pushed a commit
to Fris0uman/Cataclysm-DDA
that referenced
this pull request
Jan 14, 2023
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Fris0uman
pushed a commit
to Fris0uman/Cataclysm-DDA
that referenced
this pull request
Mar 13, 2023
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Fris0uman
pushed a commit
to Fris0uman/Cataclysm-DDA
that referenced
this pull request
Mar 26, 2023
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Fris0uman
pushed a commit
to Fris0uman/Cataclysm-DDA
that referenced
this pull request
May 9, 2023
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Fris0uman
pushed a commit
to Fris0uman/Cataclysm-DDA
that referenced
this pull request
May 21, 2023
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Fris0uman
pushed a commit
to Fris0uman/Cataclysm-DDA
that referenced
this pull request
May 28, 2023
Co-authored-by: I-am-Erk <I-am-Erk@users.noreply.github.com>
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
astyled
astyled PR, label is assigned by github actions
BasicBuildPassed
This PR builds correctly, label assigned by github actions
<Bugfix>
This is a fix for a bug (or closes open issue)
[C++]
Changes (can be) made in C++. Previously named `Code`
Code: Infrastructure / Style / Static Analysis
Code internal infrastructure and style
Crafting / Construction / Recipes
Includes: Uncrafting / Disassembling
Info / User Interface
Game - player communication, menus, etc.
json-styled
JSON lint passed, label assigned by github actions
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
SUMMARY: Infrastructure "Rewrite crafting skill checks to use normal_roll"
Purpose of change
I have revived this PR after a few years inactive, because we still need it and it turns out it wasn't that stale.
1. Proficiency failure penalties are currently not being applied correctly. This is indirectly because the way skill checks are calculated is needlessly complicated.no longer relevant.Describe the solution
To solve both of these, I have migrated the crafting skill check to use normal_roll and make it mathematically predictable. This brings in a few major changes:
This root-sum-of-squares is the same system used in summing morale: it creates diminishing returns the more contributors you have, and makes more skilled sources of help substantially outweigh smaller ones. Using this formula, for example, if you and a helper NPC both have an effective skill level of 7 once all effects are applied, your combined skill level is around 10. If you add another NPC of effective skill level 7, you get a total combined skill of 12.
In the end this makes NPC helpers much more useful (previously they just added a small flat bonus, and only if they were more skilled than you).
2*primary skill*required level of primary skill, + sum of secondary skills * required level of secondary skills
. That means if a recipe asks for electronics 2 and cooking 1 (what the hell recipe is this??), your overall level in electronics will be twice as important to your final skill value. If that same recipe uses fabrication 2 as its primary skill, then fabrication will weigh in at 2x as important as electronics and 4x as important as cooking.Describe alternatives you've considered
I would like some more features in a follow up PR.
Testing
Compiles, loads, and allows crafting. Crafting skill rolls appear to be happening correctly but do have too wide of a range in my opinion. Failures seem to be a bit difficult still, but I would like to test more and I would like some help with that.
As you can see this has my second roll on an effective skill of 3 as a 10. That might just be an outlier but it's pretty sus, I think the standard deviation widening at lower levels may be a mistake, or perhaps that should go along with also dropping the roll a bit.
Additional context
It's kind of insane that this PR loaded and compiled with minimal edits after 2 years.