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

For item recipes, merge skill_used into skills_required #9939

Closed
narc0tiq opened this issue Nov 9, 2014 · 9 comments

Comments

Projects
None yet
4 participants
@narc0tiq
Copy link
Contributor

commented Nov 9, 2014

It used to be that all recipes had a single primary skill requirement (still present as skill_used + difficulty) and a single optional secondary skill requirement. The secondary skill checks have since moved into a skills_required JSON array which explicitly supports listing multiple named skills and levels (e.g. as "skills_required": [[ "survival", 1 ], [ "throw", 2 ]] from the javelin recipe).

As the support now exists for an arbitrary number of skills being listed as skills_required, we should consider merging the "primary" skill into the list of skills required, which will make things easier for folks reading and writing recipes. This should not otherwise alter recipe behaviour or availability (handle with care).

Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Nov 9, 2014

Issue that I "know", but could be wrong about: The primary is the only skill rolled against for success/failure, and exercised by making the recipe. The secondaries currently just gatekeep. Therefore, we'd have to overhaul the various formulas to point out which/all skills that get rolled against, etc.

@narc0tiq

This comment has been minimized.

Copy link
Contributor Author

commented Nov 10, 2014

I figured it'd be something like that, thank you for the clarification. As I said, handle with care.

@Asmageddon

This comment has been minimized.

Copy link
Contributor

commented Dec 18, 2014

I'm currently working a bit on the recipe system(I want to generalize it to be usable for other kinds of actions, such as vehicles, construction, possibly disassembly), and this specific issue is a change I want to make.

As discussed with narc on IRC, I believe I will opt for a weighted average. E.g. the currently primary skill would be 1.0 weight, while secondary skills would be 0.5 or some other value.

Additionally, I believe that since skillbooks already employ a somewhat similar system, and few places in code also have difficulty/cap value split, I will split skill requirements into the required minimum and the optimal value at which your success rate will be, well, close to what it is now.

@narc0tiq

This comment has been minimized.

Copy link
Contributor Author

commented Dec 18, 2014

That's not the kind of weighted average I said. Weight by the skill level
required. There should be no primary skill anywhere.

On Thu, Dec 18, 2014 at 4:54 PM, Asmageddon notifications@github.com
wrote:

I'm currently working a bit on the recipe system(I want to generalize it
to be usable for other kinds of actions, such as vehicles, construction,
possibly disassembly), and this specific issue is a change I want to make.

As discussed with narc on IRC, I believe I will opt for a weighted
average. E.g. the currently primary skill would be 1.0 weight, while
secondary skills would be 0.5 or some other value.

Additionally, I believe that since skillbooks already employ a somewhat
similar system, and few places in code also have difficulty/cap value
split, I will split skill requirements into the required minimum and the
optimal value at which your success rate will be, well, close to what it is
now.


Reply to this email directly or view it on GitHub
#9939 (comment)
.

@Asmageddon

This comment has been minimized.

Copy link
Contributor

commented Dec 18, 2014

Oh, the 1.0 and 0.5 weights were for loading data that specifies primary/secondary skills. You convinced me on IRC to drop explicit weights, so they don't matter anymore.

@Asmageddon

This comment has been minimized.

Copy link
Contributor

commented Dec 18, 2014

Actually, after extensive pondering, I believe that I will settle on a different system, rather than computing a weighted average for the success chance(or dice rolls, as that seems to be how it's implemented internally), I will test against each skill individually, after adjusting the probability chance to individual_chance * (1.0 / len(skills))

That said, it seems like the current system uses dice to achieve a normal distribution effect, e.g. rather than 30/50/70%, the actual probabilities are likely closer to 15/50/85%. That's easily emulable with simple math, though the exact formula won't be the same. Additionally, knowing the actual percentages will let me display some sort of difficulty rating, such as "Impossible", "Hard", "Easy", "Trivial"

@narc0tiq

This comment has been minimized.

Copy link
Contributor Author

commented Apr 17, 2015

See also #11052.

@Asmageddon

This comment has been minimized.

Copy link
Contributor

commented Apr 25, 2015

I have an unmaintained branch that changes some of this stuff, but I've dropped working on it because mental health issues. I've got JSON loading of a format similar to the one presented in #11052 mostly done.

@Leland

This comment has been minimized.

Copy link
Contributor

commented May 25, 2017

Closing this due to years of stalled discussion.

@Leland Leland closed this May 25, 2017

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.