Expand Home Photos to Use Variable Snippets #75405
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Summary
Content "Add Variable Snippets for Home Pictures"
Purpose of change
I wanted to learn how to use variable snippets after doing some other contributions. Home Pictures previously used about 35 static descriptions and I thought it would be a good learning exercise to expand them using variable snippets. This is the first of probably 3 PRs to add the new ones I created, they'll be coming in small chunks due to the complexity and because it felt bad to drop like a 300 line PR with lots of nested variables.
Describe the solution
I added variable snippets. This PR covers only three framed types of pictures, graduation photos, puzzles, and small movie posters. In Additional Info I will over-explain each snippet group individually to hopefully make testing/merging easier.
The TLDR is that I enabled variants for home pictures so it can pull from the old list or my new variable list. I set up 3 sets of main snippets, movie posters, grad photos, and framed puzzles, and then used variable snippets to randomize them. So if the game poops out that you found a graduation photo, the combination of variables mean that one picture might be one of hundreds of possible combinations of descriptions.
Describe alternatives you've considered
Not submitting it. I made this like a month and a half ago and it was hard to sort it out and re-test to make sure it was good to go. I thought about just never doing it but hey I already did all the work I might as well.
Testing
When I made the changes locally, back when first created, I tested them extensively to make sure they worked. Today my testing was mostly to make sure the small group I decided to add in this PR all functioned properly. I'm pretty good about grammar but I might have missed a comma splice in there somewhere. I don't know, tested it to make sure none of them are broken but you never know what small thing you might have missed.
Additional context
Okay, so lets tackle these one at a time, I'll make them collapsible, hopefully this helps whoever's merging this. I'm going to probably over explain so here comes huge walls of text.
hp_nested_1 - Movie Posters
These are probably the simplest of what I've added. When spawned, it uses only one variable snippet. So the descriptions are: "A scaled-down image of a famous movie poster! <movie_poster>" where movie_poster pulls a random movie description snippet. There are fourteen possible descriptions, I initially wanted to do 2 types for each of the core genres, but in hindsight 14 is probably too many. I don't know, I just tried to have fun with it. Samples:hp_nested_2 - Graduation Photos
These are graduation photos. They feature multiple variables and have the most randomization of what I've added today. The base description is:"A framed photo from a graduation ceremony. It features <grad_base>, wearing a <color> gown. <grad_details>"
<grad_base> describes the person we're seeing, so they are adjectives with a randomized gender. Example: "a vaguely sleepy-looking <character_gender_adjective> ", with the gender adjective choosing whether its a man, woman, boy, or girl.
It then uses <color> which is an existing snippet group to choose the color of the gown.
Then it adds <grad_details> which is a group designed to add more flavor to the existing photo by adding randomized descriptions of the scenes background/additional info. Sample: "A young woman stands beside the graduate, love and adoration etched on her face."
And when we put it all together, we get these sort of descriptions:
hp_nested_3 - Framed Puzzles
I noticed some of the initial snippets for home pictures included puzzles so I thought I'd add a few variable ones so we weren't always seeing the same identical puzzle.The base description is:
"Someone took the time to frame this small puzzle. It depicts <puzzle_desc>" This is pretty straight forward, it just pulls random snippets to describe the puzzle.
An example of the randomized puzzle description:
"a beautiful bouquet of flowers, mostly <flowers>, in a glass vase." In this example, we use the flowers snippet group (which already existed) to randomly choose what flowers are in the puzzle.
And then as part of the puzzles, I have added a dog_breed snippet group as well, which allows for them to be randomly chosen.
Examples of the dog_breed puzzle:
Puzzle Samples:
This is probably the hardest PR I've ever written in terms of formatting and needing to explain things. I hope everything came across okay and though I'm slow to respond on Github (you can catch me on discord if you need me) I'll try to explain if there are any questions. Sorry to whoever's merging this, I know it's tough to deal with these nested snippets, especially when there's a lot of them.
I have two more batches to add in future PRs, one for adult-ish things (weddings, drinking, etc) and then one for child things (school pictures, notes to grandma, etc.) that are probably even more complicated than this one x_x