-
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
Small enhancement to Character Modifiers #55253
Small enhancement to Character Modifiers #55253
Conversation
350e2b8
to
127e97b
Compare
It requires a fair bit of guesswork to figure out that 'x' is supposed to mean multiplication (in the snipped in the post: the code seems to use the only marginally better '"'), assuming I guessed correctly... I would suggest to let the strings contain words, or at least abbreviations of words, such as "ADD", "MULT", etc. JSON is actively hostile to anything that requires documentation... |
IIRC Cata devs managed to inject comments into JSON via some hack or other - this is a case of something that needs a comment. |
On the comment tangent: It works to add "data" elements with names of "//", "//1", etc. followed by the documentation string in at least some places (I've used it with construction recipes). I suspect anything starting with double slashes are left unmatched against the actual pattern the JSON parsing is looking for. It's a shame the nutjob creating JSON threw out support for actual comments in a rage fit over perceived misuse of comments as processing directives by someone, though. |
Sweet! Now, this probably counts as "arbitrary arithmetic", but do you think weighted averages would be doable? Slipping down uses (
to make gripping more important than the rest. It's not a big thing if it's more trouble than it's worth, addition/multiplication already covers a lot of the bases. |
I guess I have more work to do :P But really, it shouldn't be too hard to implement weighted lists. I'll add that to these changes. |
127e97b
to
d64e1db
Compare
d64e1db
to
6887fe1
Compare
6887fe1
to
3a0a6e9
Compare
Summary
None
Purpose of change
Minor enhancement to #53069.
JSONify the fall damage and slip prevention modifiers added in #54555.
Describe the solution
Add the ability to define an array of limb scores affecting a character modifier (as well as a combo operation, either ADD or MULT).
Also add the ability to specify a weighted list (with a custom denominator):
Describe alternatives you've considered
I get the impression that JSON is not very friendly to arbitrary arithmetic :P
Testing
Added test cases to check that added/multiplied limb scores in character modifiers are correctly calculated:
Additional context
Ping: @Venera3