Cataclysm-DDA
Cataclysm-DDA copied to clipboard
Add Weighted Blankets and Blanket Variants/Snippets
Summary
Content "Add weighted blankets and variants for them and for regular blankets."
Purpose of change
#73365 requested weighted blankets. Since I wanted to add variants for them/learn how to pull snippets into variant descriptions, I decided to add them and the add variants for both the weighted blankets and regular blankets.
Describe the solution
- Create snippets to be used for blankets. These are:
- sports teams – Adds town, mascot, and sport names for use with sports themed blankets and possibly other memorabilia in the future.
- geometric patterns – Adds a handful of shapes for patterned stitching on blankets.
- flowers – common flowers used in floral patterns for household items like blankets and pillowcases
- cartoon_blanket – A handful of cartoon characters for use with a cartoon character blanket. These are not exactly ideal for adding to other variants/snippets in the future, so it’s not ideal for other creations.
All of these snippets were added to json/snippets/snippets.json because frankly I had no idea where else to put them and this looked like a general catchall for a few things, if this is wrong let me know so I can move them.
-
Added variants to the basic blanket, they are:
- A regular blanket, for crafting purposes, so players do not end up crafting patterned blankets or cartoons or whatever.
- Sports blanket – blanket with name/mascot of a sports team, uses 1 of 15 possible teams. Overall 7-ish % chance to spawn.
- Sports blanket collectible – same as above but given a number and brief description explaining that its a collectors item (allegedly). 1-ish% chance to spawn
- Geometric blanket – blanket stitched in various patterns, 7 possible shapes. 38-ish% chance to spawn.
- Fluffy Blanket – advertised as fluffiest blanket in the world. Moderately fluffy. 7- ish % to spawn
- Floral Blanket – A blanket with a flower pattern decorating it, pulls from 12 possible flower designs. 38 ish% chance to spawn
- Cartoon Blanket – Blanket with cartoon character(s), pulls from 8 possible characters, I didn’t want to go overboard with these because they have longer descriptions and I don’t know if there are existing characters we have (other than Boston-chan, which I added to the list) – spawns at 7%ish
-
Made the regular blanket crafting recipe point to the standard variant to prevent players from crafting the pre-cataclysm blankets
-
Added weighted blanket, did what I could, no idea how to calculate volume so just arbitrarily made it larger than the regular blanket for volume. If someone knows how I’m supposed to math that out, tell me, the thickness I’ve found weren’t very helpful and I don’t know how to reflect it’s smaller when folded and etc. Chose not to add a bead item for the filler, they’re mostly made of these tiny little microbeads that would have no use in the game as far as I can tell. So it’s just a blanket. Increased warmth and encumbrance of regular blanket, obviously more weight, wasn’t sure about these aspects of the item, it seems fine to me but second guessing myself and etc.
-
Gave weighted blankets the geometric snippets since that’s the majority of what they look like. I’m sure there are decorative blankets, but literally every one I saw in a cursory search were one color with a geometric pattern of stitching.
-
Added weighted blankets to bedding spawns, at a significantly lower rate than standard blankets. I like them but I don’t think they’re all that common.
I think that’s it.
Describe alternatives you've considered
Well I initially wanted to add a ton more sports teams and a lot more variants, but people said I should keep it limited -_- I know variants and things upset contributors and that some people regard them as bloat but I would have liked to add more blanket variants, like a centennial blanket celebrating police/fire/town/etc centennials, or like... goth blankets that are tarot cards, skulls, etc. But I figured I'd keep myself from going too deep.
Testing
Lots of testing, it was hard for me to work it out, mostly just made sure they generate snippets correctly and that the crafting recipe works for pointing to the variant.
Additional context
This took me a long time and working with snippets and things is new to me. I tested quite a lot to make sure everything is working properly, but it’s possible I have typos somewhere. This was a big project for me, despite seeming small, so if I forgot to add something or whatever please let me know so I can fix it up. Nervous I messed something up x_x
Closes #73365