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

Assisting with proficiencies through books #44680

Closed
I-am-Erk opened this issue Oct 6, 2020 · 8 comments · Fixed by #46347
Closed

Assisting with proficiencies through books #44680

I-am-Erk opened this issue Oct 6, 2020 · 8 comments · Fixed by #46347
Assignees
Labels
Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Mechanics: Effects / Skills / Stats Effects / Skills / Stats

Comments

@I-am-Erk
Copy link
Contributor

I-am-Erk commented Oct 6, 2020

Is your feature request related to a problem? Please describe.

#31610 is nearly complete to a point where, although there are a lot more proficiencies to add, they are at least a big and growing part of the game.

Unfortunately the only way to learn proficiencies currently is through practice. Recipe books can tell you things to make, but don't grant you any help with actually making them.

Describe the solution you'd like

Allow books to provide partial alleviation of proficiency penalties.

A json definition for this would look like:

  "id": "book_lockpick",
  "type": "BOOK",
  "name": { "str": "MIT Guide to Lock Picking",  "str_pl": "copies of MIT Guide to Lock Picking" },
  "description": "A home-made booklet with large black-and-white pictures of several types of modern locks and general information on how to crack them open.",
  "proficiencies": [ { "proficiency": "prof_lockpicking", "time_factor": 0.9, "fail_factor": 0.5, "include_prereqs": true }  ]

In this example, having book_lockpick within range would let you do tasks that require prof_lockpicking. Any tasks that have a time_multiplier due to their proficiency requirements would have that time multiplier reduced to 90% of its normal value, and any tasks with a fail_multiplier due to their proficiency requirements would have that fail multiplier reduced by half. In this example the book doesn't really speed you up, but does make you more likely to succeed.

include_prereqs means that the book grants this proficiency and any other necessary prior prerequisite proficiencies for the task, with the same multipliers to those proficiencies. For example, a blacksmithing book with this set to true should confer metalworking at the same factor as it confers blacksmithing.

If not specified, both of these values should default to 0.5. include_prereqs should default to true.

Multiple proficiency books

If you have multiple books granting a proficiency, the time factors shouldn't quite stack. We can use sum of squares for this, like we do with morale, but it has to be tweaked a little since in this case lower is better.

Final_time_factor = 1 - sqrt( SUM[ 1 - time_factor]^2 )

In this example having 3 books with a time factor of 0.5 will bring your time factor down to 0.36. Having three books with a fail factor of 0.9 will bring your fail factor down to 0.82. This keeps you from stacking a bunch of low-quality references, but lets you use a bunch of low quality references if that is all you have.

Describe alternatives you've considered

It might be worth considering having the intelligence requirement of the book affect whether or not you can use it to learn proficiencies. If you have lower than the required intelligence, the time and fail factors could be multiplied by (required int) / (actual int) to a maximum of 1.

Likewise for required skill.

Additional context

Once we have the ability to reduce proficiency penalties by a factor, the same infrastructure could and should be used to make proficiency penalties gradually fall off as you get close to the necessary xp to have the proficiency.

Additionally, it would be nice if having a faction NPC with a proficiency help would count as having that proficiency yourself. I don't know if we have that code already.

I think we need at least a rudimentary version of this implemented for 0.F given the number of proficiencies going in. However I have tried to set up proficiencies to work without this feature, so it's a matter of some debate.

@I-am-Erk I-am-Erk added Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Mechanics: Effects / Skills / Stats Effects / Skills / Stats labels Oct 6, 2020
@I-am-Erk I-am-Erk added this to Confirmed blockers / To Do in 0.F Release Planning via automation Oct 6, 2020
@I-am-Erk I-am-Erk moved this from Confirmed blockers / To Do to Delayed blockers (for 0.G) in 0.F Release Planning Oct 6, 2020
@NickVolynkin
Copy link

NickVolynkin commented Oct 11, 2020

I like this idea a lot!

Will having a manual also speed up learning the proficiency?

Will a manual boost crafting only for recipes in the book, or for all recipes with a proficiency requirement?

It seems to me that the default include_prereqs=true can become a problem for balancing the game. Say, I have a book which boosts plastic working by 50% and has include_prereqs. There are a lot of recipes with plastic and now I can craft them all twice as fast. Even with endgame materials or whatever from mods.

@I-am-Erk
Copy link
Contributor Author

Will having a manual also speed up learning the proficiency?

It makes you finish tasks faster, which speeds up learning. I don't know if we need more than that.

Will a manual boost crafting only for recipes in the book, or for all recipes with a proficiency requirement?

It has nothing to do with recipes in the book, only proficiencies. We'd want a number of proficiency books that don't have many/any recipes in them at all.

It seems to me that the default include_prereqs=true can become a problem for balancing the game. Say, I have a book which boosts plastic working by 50% and has include_prereqs. There are a lot of recipes with plastic and now I can craft them all twice as fast. Even with endgame materials or whatever from mods.

I don't know what you mean here. This would be the case with or without include_prereqs.

@PatrikLundell
Copy link
Contributor

If I understand thing correctly, I believe "include_prereqs" should apply only to the recipes in the book. For any other tasks the book would only contribute to the proficiency it's dedicated to.

I believe that is what NickVolynkin was after: Just because you've got a plastic mastery book, that shouldn't suddenly allow you to craft an atomic reactor that has plastic knobs as part of its design, but only assist in the knob construction part, and have no effect on welding, radiation shielding construction, programming, etc. that are actually the bulk of the task.

I also don't think consulting multiple books should speed things up. If anything, the more cross referencing and comparisons you have to make, the more time it should take, and you'd fairly quickly end up with taking more time to do the task using multiple references that you'd take just winging it (although the latter would have a much higher risk of failure, including failures that result in redoing things, which means that the actual time taken may well be longer without references, but the nominal time would still be shorter).

@I-am-Erk
Copy link
Contributor Author

I think you guys aren't following what include_prereqs does.

Nothing in this suggestion affects recipes directly. It only acts on proficiencies. Proficiencies have prerequisites. If a proficiency book adds a bonus to blacksmithing, and includes prereqs, then it also counts as adding that same bonus to metalworking if you don't have blacksmithing yet. I'm not quite sure how you're picturing it working but a fancy book that makes a nuclear reactor with plastic knobs would only be impacted by a plastic working proficiency book if that reactor recipe called for plastic working, and it would only ever drop the crafting time/fail by a portion of what missing plastic working costs. It wouldn't impact proficiencies unrelated to plastic working. Even if they were prerequisites to plastic working it could only ever boost the prerequisites to plastic working.

There's some debate to the time penalties, but having books to refer to is always going to be faster than figuring out from first principles. The formula here includes diminishing returns, because yeah having ten books isn't going to be a lot faster, but having two can very much be faster than one if both books have information you can use. I don't think we need to include fancy details about loss of indexing efficiency besides just basic diminishing returns.

@PatrikLundell
Copy link
Contributor

Thanks for the explanation.
The point where I went wrong is, as you guessed the prerequisites being for the proficiency, where I'd interpreted it as being for the task using the proficiency (and hence the silly example).

@NickVolynkin
Copy link

NickVolynkin commented Oct 26, 2020

@I-am-Erk Thank you, now it finally makes sense to me. I was making the same mistake as Patrik. And I didn't realize that proficiency isn't trained untill its prerequisite is complete, like with metalworking→welding.

Anyway, this is a great addition to the proficiency system!

@PaulBlay
Copy link

Can NPCs assist with gaining proficiencies and should they be able to?

Note that until #46364 is closed, NPCs can offer to teach Lockpicking (which is no longer a skill) but it is doubtful that they can actually improve your Lockpicking proficiency.

@kevingranade
Copy link
Member

This issue has been mentioned on Cataclysm: Dark Days Ahead. There might be relevant details there:

https://discourse.cataclysmdda.org/t/will-there-be-proficiency-books/26222/2

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Mechanics: Effects / Skills / Stats Effects / Skills / Stats
Projects
No open projects
6 participants