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

[READY] Recipe reference rework #7814

Merged

Conversation

Projects
None yet
8 participants
@kevingranade
Copy link
Member

commented Jun 2, 2014

  • Conceal book details until player has read the book for one cycle.
  • Allow player to craft a recipe using a nearby book as a reference.
  • Delete oxford comma with extreme prejudice.
  • Give player chance to learn/memorize recipe when making it using a book as a reference.
    • Tweak chance to learn, any suggestions?

X Remove/lower chance to memorize recipe from reading book. (punted to another PR)

This is the current number of minutes of crafting required to learn a recipe based on skill(rows) and difficulty(columns):

x 1 2 3 4 5 6 7 8 9 10
1 1 16 81 256 625 1296 2401 4096 6561 10000
2 0 8 40 128 312 648 1200 2048 3280 5000
3 0 5 27 85 208 432 800 1365 2187 3333
4 0 4 20 64 156 324 600 1024 1640 2500
5 0 3 16 51 125 259 480 819 1312 2000
6 0 2 13 42 104 216 400 682 1093 1666
7 0 2 11 36 89 185 343 585 937 1428
8 0 2 10 32 78 162 300 512 820 1250
9 0 1 9 28 69 144 266 455 729 1111
10 0 1 8 25 62 129 240 409 656 1000
@Rivet-the-Zombie

This comment has been minimized.

Copy link
Member

commented Jun 2, 2014

Why you hating on the oxford comma?

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

Uh, yeah, here I thought you liked the Oxford comma. ???

recipes += "</color>";
}
if(index == book->recipes.size() - 1) {
recipes += _(" and "); // Who gives a fuck about an oxford comma?

This comment has been minimized.

Copy link
@KA101

KA101 Jun 2, 2014

Contributor

KA101 does! :-P

@KA101

View changes

src/player.cpp Outdated
@@ -9097,6 +9098,9 @@ void player::read(int pos)
return;
}
// otherwise do nothing as there's no associated skill
} else if (morale_level() < MIN_MORALE_READ && tmp->fun <= 0) { // See morale.h
add_msg(m_info, _("What's the point of reading? (Your morale is too low!)"));

This comment has been minimized.

Copy link
@KA101

KA101 Jun 2, 2014

Contributor

Minor nitpick: maybe change this to "What's the point of studying?" or somesuch might be better, since reading fun stuff can still work?

This comment has been minimized.

Copy link
@kevingranade

kevingranade Jun 2, 2014

Author Member

Indeed.

This comment has been minimized.

Copy link
@kevingranade

kevingranade Jun 6, 2014

Author Member

Almost forgot, but added this.

@KA101

View changes

src/item.cpp Outdated
if(g->u.knows_recipe(iter->first)) {
recipes += "</color>";
if (book->req == 0) {
dump->push_back(iteminfo("BOOK", _("It can be understood by beginners.")));

This comment has been minimized.

Copy link
@KA101

KA101 Jun 2, 2014

Contributor

Thinking that beginner-level books will probably be somewhat obvious from their cover.

This comment has been minimized.

Copy link
@kevingranade

kevingranade Jun 6, 2014

Author Member

That's good too, thanks.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

Nitpicks notwithstanding, I like the general gist here. Looking forward to readiness & mergetest.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 2, 2014

Joking a bit about the comma thing, quoting a song. I do think it's icky, it's redundant with the "and" right next to it.

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

Tsk tsk. Remember the effect it can have on JFK and Stalin.

http://stephentall.org/2011/09/19/oxford-comma/

[EDIT: slightly not safe for work, but only very slightly.]

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

I like this. I've been teaching for the last 3 years, and it amazes me how people think they can learn by sitting back and "absorbing" the code from the screen. Big plus for learn-by-doing encouragement. I'd rather potentially waste materials prototyping vs. the grind of reading before I can do.

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

Linking to Issue #7772.

@Wishbringer

This comment has been minimized.

Copy link
Contributor

commented Jun 2, 2014

Being totally self-taught, in every way, having spent my schooldays mostly running for my life.
For me it was about obsessively needing to understand how things work and later doing everything the "perfect" way (Autism, OCD).
Learned to program Basic, at age ten, reading foreign language books (from the library).
All I had to work with was sparse code-listings (didn't understand a word of Finnish).
It was a major turning point in my life (stopped going to school), saved by my old Atari 600XL.
From chaos came logic! :)
Sorry for sharing and going of-topic.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 3, 2014

"We invited the stripper, Jackie O, and Stalin."
Lack of Oxford comma doesn't make ambiguous sentences, people make ambiguous sentences :P

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 5, 2014

Uh, looking at that table there, I'm thinking the axes are flipped, or I'm missing something? If I'm reading it right, it'd take me 10K minutes of making a level 1 recipe to memorize it, if I had rank 10 in the relevant skill. That seems off.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2014

I'm not sure if I worded it right or not, difficulty goes from low to high as you go right, skill increases as you go down. So that extreme upper-right is 10 difficulty and 1 skill, which can't actually happen, but I was in a hurry to finish it, so I didn't trim the impossible results.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2014

Kevin clarifies the table axes

OK, yeah, that makes more sense. Thanks. As for memorizing from the book, perhaps halve the base chance, have Good Memory double it back to the current rate, and Forgetful either make it impossible or reduce the chance further? (Thinking those traits need a bit more love, since skill rust is not universally accepted.)

@kevingranade kevingranade changed the title [WIP] Recipe reference rework [MAYBE READY] Recipe reference rework Jun 6, 2014

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2014

That commit is in there removing memorization from reading, but it's trivial to yank it back out.
I mostly just think that cold-reading a recipe to memorize it doesn't make much sense, and it's not engaging, and you end up with recipes you don't want.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2014

Here's a better idea, halving the learn rate, and PRing removal of learning recipes by reading seperately.

@kevingranade kevingranade changed the title [MAYBE READY] Recipe reference rework [READY] Recipe reference rework Jun 6, 2014

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2014

In terms of knowing recipes, are recipes random?

I like the disabling memorization from reading books, +1 for me on that (which has landed in your other PR).

From a UI perspective, when I'm tossing houses and looking for reading material, if I examine a book but don't read it, will I get a hint that there are recipes in the book? I didn't see it in the code, it's probably there, but I just missed it.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2014

I don't know what you mean by "knowing" recipes, if you mean the way it works now, yea it's randomized which recipe you learn when reading a book that has multiple recipes in it.

No, you'll need to spend some time reading it to find that out, though if that time period is unreasonable (I honestly haven't checked it), I'd be open to making the first read a shorter action that only gets you that information. (a minute or so? reasonable to do while looting a house, but not in combat)

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 6, 2014

My first sentence above should have been deleted before sending. Ignore the "knowing" part, but thank you for attempting to answer it.

Is this the proposed flow?

  • I find a book.
  • I can probably deduce which ones have recipes by the title. Spy novel? Probably not. Fletcher's Friend? Perhaps.
  • I grab the ones I think have recipes.
  • When safe, I read and discover it has at least one recipe I don't know, and possibly more. Book gets that yellow/blue color in my inventory like it currently does.

Given the implicit id by title, i'm not sure the read to discover the recipe adds a lot to the gameplay experience unless recipes start getting randomized dynamically. If recipes do get randomized, then the required reading to id the recipes would be a fun addition. Nethack has id scrolls, but here we read things to id them an discover recipes.

I might start picking up those Spy Novels if one might randomly have a recipe in it.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 6, 2014

You are correct about the flow of how it's intended to work, though
alternately spend some time skimming the book to find it out.
Recipes are not currently randomized, it is possible to do so, but it would
be a pain.
It's more an immersion thing than a gameplay issue, as a player seeing a
book for the first time across a room and knowing exactly what's in it bugs
me. Yes, I merged making the list of recipes originally, but I've decided
that was a bad idea after the fact.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2014

Here's a better idea, halving the learn rate, and PRing removal of learning recipes by reading seperately.

Clarify: so skill-from-book increases half as fast, or you get recipes from books (assuming for this question that the other PR doesn't exist) half as often, or some other meaning I'm not getting?

Some skills are enough of a pain to raise via books already, and slowing that down even more seems a bad idea IMO.

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2014

I can get the immersion thing, especially since it's appropriate. We have apply and examine that are overloaded, seems appropriate Read can be multipurpose.

To KA101s point, I have a pretty uber Krav Maga character turned Farmer/Homesteader. My guy kicks arse for the lord and doesn't need a lawn mower, but would rather grow wheat (which he just found some seeds of).

But... some of his skills are a bit pathetic. Traps is a decent example of a skill that might need some love. I can't raise traps for the life of me. I don't need them, but I want them and I feel stuck and don't really want to grind learning traps.

My dodge is also uber low. I think it's at 1.5. I've even stood in front of Zombie Children to up it, but man that skill takes a while and I went back to whapping anything green on my screen.

On the other end of the spectrum, survival definitely seems a bit unbalanced. I've gained quite a bit of skill just butchering zombies.

Summary:

  • Is the problem the learning rate of all skills, or just a few that are overpowered for learning, and a few that are underpowered for learning? Some skills seem just about right (for example, mechanics.)
  • I really like the idea of learn by doing that you moved to another PR. I'm a kinetic learner, that's why i keep plowing ahead with my C-- ability in C++: someday I'll get at least decent.
  • I don't necessarily think the learning code is bad from what I know about it. I do think it's unbalanced.
  • Maybe make the formula more logarithmic as one gets above a certain level vs. a flat halving? Maybe make decay kick in sooner?
  • Maybe books become more of bonus, so if found, they can be like the mp3 player for a particular skill, but with a very finite timespan that does get used up? Instead of sitting and reading, we read, get a bonus for a 24 hour period, and go build some huts? The more I type this, the less I like this idea, but there's something about this in general I like.
  • More on topic: Once I peruse the book to see if it has recipes in it or not, I'd love it if the list of recipes stays as it currently exists. This game has a lot of inventory management, and as a player I'd like that piece to stay in for my own sanity.
@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2014

Gagh, missed the commit message there. I think this looks ready for testing, yeah.

@KA101 KA101 self-assigned this Jun 7, 2014

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 7, 2014

Tested. After my snag-fix, I'm getting some cannibal recipes bleeding through (because tio tacos and manwich are autolearned at 3, apparently. Hmm), and the initial read cycle goes until you learn a recipe (for some of the technical documents, you're looking at 45 min or so). Suggest halving/quartering the read time for the ID-read, or perhaps pegging it to X-INT minutes.

Should probably insert a line somewhere "You reference your $BOOK" so players know why their recipes disappear when they leave the book on the other side of the evac shelter. (They're parsed as a crafting ingredient, so the 6-tile radius may take people by surprise.)

Was able to learn raptor serum on the first batch had Cooking 10, cocktail serums require 10 to make. Same for alpha serum...and both take 15K minutes to make, so that's within parameters, but might blow the model. (Same effect with poppy stuff and aspirin.) Thoughts?

@KA101

View changes

src/item.cpp Outdated
@@ -1053,7 +1067,7 @@ nc_color item::color(player *u) const
ret = c_green;
}
}
} else if (is_book()) {
} else if (is_book() && u.has_identified( type->id ) ) {

This comment has been minimized.

Copy link
@KA101

KA101 Jun 7, 2014

Contributor

Snag-fix: Code::Blocks wanted a pointer, not a period. :-/ Sorry, Kevin.

@kevingranade

This comment has been minimized.

Copy link
Member Author

commented Jun 9, 2014

I can't reproduce either issue after a rebase, pretty sure the flu shot thing was an upstream issue, and I don't know about reading in the dark, do you maybe have a really dim light source on you, like a lightstrip?

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2014

I did merge your code into upstream. Oops, should have cloned your code, which I just did and recompiled. Flu shot isn't a problem. Not sure how I got the reusable flu shot in the last game.

I might be misinterpreting my past experience with reading so I took screenshots. Am I supposed to be able to read when it is dark? Forgot to get an inventory shot, but I didn't have any light sources.
screen shot 2014-06-08 at 8 39 40 pm
screen shot 2014-06-08 at 8 39 37 pm

Rivet-the-Zombie added a commit that referenced this pull request Jun 9, 2014

@Rivet-the-Zombie Rivet-the-Zombie merged commit 0dbb6e6 into CleverRaven:master Jun 9, 2014

@rluddy

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2014

You can read in dark, it takes up to 5x as long. The new warning message in the screenshot about being difficult to see fine details is to let you know it's poor light for reading.

You shouldn't be able to read in "very dark," though, like in a basement with no light source. In my testing it seems to still correctly disallow that with "You can't see to read!"

@jeremyosborne

This comment has been minimized.

Copy link
Contributor

commented Jun 9, 2014

Thanks rluddy. My ignorance. I think you were the one who checked in that warning message? Thanks for that. Little things like that help me a lot.

@3t3rn4lfl4m3

This comment has been minimized.

Copy link

commented Jun 10, 2014

When I try to make cooked creep referring to my cookbook, I get floating point exceptions. If I debug to learn the recipe, I have no problem making it. Version: 0.A-3507-gbead0b2

@EricFedrowisch

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2014

I would suggest making it clear in the messages that a lack of light is why it is difficult to read/craft. "It's too dark, making it difficult to see fine details." "Without better lighting, reading will take much longer than usual." This would clue in newer players, as many other games let you read in pitch darkness, even though it is completely unrealistic.

@KA101

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2014

AerikVhedrovix wants notes for low-light time penalties

Uh, doesn't it do that already?

@EricFedrowisch

This comment has been minimized.

Copy link
Contributor

commented Jun 12, 2014

Looking at the screen shot above it doesn't mention WHY it is hard to see. The words "light" or "dark" are not in the messages. It may be obvious to some. Maybe not to others. Especially when it is daytime and the tiles around the player are revealed.

@kevingranade kevingranade deleted the kevingranade:recipe-reference-rework branch Mar 21, 2015

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.