-
Notifications
You must be signed in to change notification settings - Fork 326
Increase effect of prying quality on prying difficulty, JSONize prying_results #837
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
Increase effect of prying quality on prying difficulty, JSONize prying_results #837
Conversation
I'd like to see some stats so that we aren't working on purely abstract proxies. |
When I get the chance later today I'll write up a table for it. It's definitely a bit of a weird roll:
That's one drawback I mentioned when discussing the different possible implementations to this, one side effect is it also nerfs the claw bar. It does still have the advantage of being much more portable, but I'm not sure if that's enough. Making it prying 3 would fix that but then make it a strait upgrade to the crowbar. Conversely, the competing proposal was to allow prying 1 to work on everything, balance the scaling of prying bonus so that it's prying 1 that gets a difficulty increase and prying 2 that's nudged down to normal, have the makeshift crowbar retain prying 1, then sanity-check which other items have prying 1. This would have the disadvantage of potentially nerfing other items that also have prying 1, and lead to trying to decide whether the standard hammer is beefy enough to warrant keeping that quality. EDIT: Huh, where'd the comment I replied to go? o.O |
So, this should quantify the actual odds of a successful pry, before and after the changes, in a selection of contexts: https://anydice.com/program/2418a Against locked doors specifically:
The apparent takeaway from this:
|
Marking as WIP for now and closing, as discussion on the BN discord has led to the suggestion of tinkering with some partial JSONization of prying. Will likely take a while. |
JSONizing this is looking to be more complex than expected, and I still wanted to has out the desired balance of it first.
I started to look into what would be needed to overhaul this, but with the makeshift crowbar PR affected by this PR, along with the fact that I need to hash out the balance of prying behavior either way, it seemed like it would be better to fix it now and JSONize later, than to leave it broken while I stumble my way through implementing the overhaul. |
That door break function sure is ugly. Also, take results of breaking from terrain type and |
It'll take more time to JSONize things and I'm still not yet certain how well it'll go, but will try I guess. Gonna be out and about today however. |
Closing for now to work on this but I'm not very confident in this JSONization working out well. |
So I've started work on unhardcoding it, there's likely some typos here and there but the biggest sticking point seems to be:
Specifically the first bit, the I can see very clearly that I need to eliminate the last vestige of the old |
This might help: CleverRaven/Cataclysm-DDA#51778 It uses |
I'd have to very thoroughly check what all nessecary code changes preceded this. I'm not really the right person for this, hence why I really wanted to fix the numbers first so we'd at least have decent behavior player-side, THEN worry about JSONization. That was something I actually had accomplished and ready for review before I was talked into trying something I don't even remotely have the experience to handle. |
It's a definition of a lambda function. In order:
You already have a
Both of the above are equivalent.
It would be better if you checked the id for whether it is null. Like this:
This works because ids have a defined cast to |
Alright, I'll need to tinker with it when I get back later today. Thank you. |
Okay, finally starting to look at this, I'm...hmm. Trying to make sense of this but the example provided doesn't seem like it would actually fit in the function. It's a lot to go over. |
Fix compile errors Finish up pry_result loading Add pry_result checking Add JSON for previously hardcoded prying results
Fix-up prying until builds + works
With thanks to @OvenBaker it now seems to compile without errors, though still showing errors of unknown nature on the checker. Going to test it some more and make sure the JSON matches up with what I had planned, then hopefully it'll be ready soonish. |
The ones with "reorder" mean that you need to have the same order in constructor as in the structure.
The warning will happen, because in the constructor, it goes |
For breaking the terrain / furniture on a failed prying attempt, you could use the bash function with a guaranteed chance of success, which uses the byproducts and effects of the |
Think I've got it organized right now. I am getting errors on compile still, but it also still compiles, I suspect I might've not missed that last time I tested it.
That'd be useful but I'd rather get at least something actually working without errors before I get lost in yet more code changes I'm not really prepared to tackle. This PR has already suffered massive scope creep ever since I was talked into trying to JSONize the prying function instead of getting the actual balance working right first like I was trying to do. |
|
Well, that makes it no longer successfully open a build though. :/ |
? |
As in it goes from "successfully compiles but with errors" to "won't compile" |
src/mapdata.cpp
Outdated
difficulty( 1 ), noise( 0 ), | ||
alarm( false ), breakable( false ), | ||
new_ter_type( ter_str_id::NULL_ID() ), new_furn_type( furn_str_id::NULL_ID() ) {} | ||
break_ter_type( ter_str_id::NULL_ID() ), break_furn_type( furn_str_id::NULL_ID() ), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You have to move the {}
to the end and make sure that commas match.
A comma between each field name, but no comma before the constructor body (empty, so it's just the {}
).
Now it looks like I can finally get to eyeballing the JSON implementation in the fix that was sent to me. |
Summary
SUMMARY: Balance "Unhardcode and JSONize prying results for terrain and furniture, increase effect of prying quality"
Purpose of change
Per discussion in #835, it was suggested that the effect of prying quality have more of an impact, noting that there was very little advantage to using a crowbar over a claw bar, and that this was an obstacle to balancing makeshift crowbars so that they can be allowed to open doors again.
Initial efforts to simply hack the desired features into the old hardcoded function led to being nudged to try and unhardcode it. After much fumbling about, with immense thanks to both Coolthulhu and OvenBaker, it's finally implemented.
Describe the solution
Tables summarizing net impact of this will be below.
Describe alternatives you've considered
pry_bonus_mult
for a separate PR, as already doing with the "doors can break on failed pry" mechanic.Testing
Additional context
Separate from but related to PR linked to above, making the balance impact of un-nerfing makeshift crowbars have less of an effect on the desirability of normal crowbars.
This should quantify the actual odds of a successful pry, before and after the changes, in a selection of contexts: https://anydice.com/program/2418a
Against locked doors specifically:
Time taken per pry attempt:
Implementing the ability to screw up and break doors on a failed pry will be added in a follow-up PR, per request.