CleverRaven / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A turn-based survival game set in a post-apocalyptic world.
http://cataclysmdda.org
Other
10.33k stars 4.14k forks source link

Implement dynamic scaling of crafted equipment size #53496

Closed Terrorforge closed 1 year ago

Terrorforge commented 2 years ago

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

Problem 1: A lot of XL gear is inconsistent with its normal-sized version. Recipes, stats, materials, all sorts of mismatches. This is practically unavoidable as long as they’re defined as their own separate items with separate recipes, because it means that every change made to the normal version has to be added manually to the XL.

Problem 2: Most XL gear has (barring the above) the exact same stats as the normal version. Thus being Large, and especially Huge, feels weird because you’re still largely beholden to the same restrictions re: items and storage as normal-sized characters. It’s obvious that the average person couldn’t attach a Barrett .50 cal to a single-point sling because it would literally scrape the ground, but why couldn’t a 3m+ minotaur? And if that minotaur made themself an XL duster, why would they give it proportionally tiny pockets matching the capacity of the normal version?

Solution you would like.

Do it programmatically. Implement a system that allows the player to craft a “Fitted” version of (theoretically) any garment, and dynamically adjust the values of the fitted garment based on the player’s height. Add a flag that allows specific garments/recipes to be exempted. The values that would potentially need to be scaled dynamically include (but may not be limited to):

I DON’T think encumbrance should scale. The idea is that the equipment is scaled up so that it's proportionally the same size as it is for a normal-sized character, so it shouldn’t be any more or less cumbersome. There may be some square-cube law shenanigans or something that I’m not considering, though.

e: worth noting that, since encumbrance is based on the relative volume of the items in a pocket to the pocket's volume allowance, this would let larger characters carry either the same amount of gear for less encumbrance, or more gear for the same encumbrance. that seems right to me, though.

Describe alternatives you have considered.

Simply increasing the values of XL gear, but that would get weird. Not only does XL gear need to be appropriate for Huge, Large, and normal-sized characters with restrictive mutations, there are also no restrictions preventing completely unmutated characters from using XL gear. It also wouldn't solve the problem of inconsistency.

Additional context

I’d like to see Huge (and Large, and I guess Tiny) characters become more distinct in general, and that includes distinct disadvantages as well as the distinct advantages I’m proposing here. That ten foot minotaur may be able to carry a Barrett in a tactical sling, but would probably struggle to fit their finger into the trigger guard of a Glock or grasp a combat knife. But that's a separate issue from this, I think.

Photoloss commented 2 years ago

The weight, volume and length allowance of its pockets

This can get ugly with any recipe which normally uses existing items as storage components. You can't craft a 50% larger jerrypack out of a standard jerrycan, and making it larger would require welding. But you could craft an XL-fitted survivor backpack out of an XL-fitted backpack, and you could attach three pouches instead of two without any refitting. However using existing pouches would mean the number of pockets increases and not the size of the individual pocket, which might be important especially for length restrictions.

The item’s own weight, volume and length. Thickness (and thereby armor values)

Nope, joint articulation still gets obstructed. And this can be very imbalanced in either direction based on selective application of the square cube law. That 50% larger minotaur with a 50% thicker steel helmet? That's over three times the regular weight on their head! Hopefully we don't run into any limitations regarding the internal strength of the common materials, that would get really nasty.

Terrorforge commented 2 years ago

This can get ugly with any recipe which normally uses existing items as storage components.

That's why there needs to be a flag or something that says "this recipe cannot be scaled", as I mentioned.

Nope, joint articulation still gets obstructed.

I suppose that's true. Could make it so armor with articulated joints either isn't made thicker, or does get increased encumbrance.

And this can be very imbalanced in either direction based on selective application of the square cube law. That 50% larger minotaur with a 50% thicker steel helmet? That's over three times the regular weight on their head!

Not everything needs to scale 1:1, I forgot to say that. Maybe the 50% taller minotaur wears a helmet that's only 25% thicker. But also, Encumbrance doesn't really model weight. Weight models weight, and it just so happens that the minotaur in question probably has about three times as much carrying capacity than the average PC.

Hopefully we don't run into any limitations regarding the internal strength of the common materials, that would get really nasty.

I admit this level of material science is a little bit above my pay grade. I assumed it wouldn't be a huge problem because the relative difference isn't that massive? Afaik the "average" is considered to be 180cm and the tallest you can be is 320cm, which is about a 78% increase. I also assumed that making the gear thicker would serve to shore it up against problems like this, but I really don't know enough about the materials in question to say if that's actually true.

Photoloss commented 2 years ago

That's why there needs to be a flag or something that says "this recipe cannot be scaled", as I mentioned.

It's not that simple. Some recipes won't work at all, others can scale discretely by quantity rather than continuously by quality and there might be a few cases where different recipe ingredient choices scale differently e.g. if you can use a kevlar vest or 20 kevlar patches.

Could make it so armor with articulated joints either isn't made thicker, or does get increased encumbrance.

That's basically everything other than chestplates and limb guards though. Even a t-shirt will get stiffer in the shoulder.

also, Encumbrance doesn't really model weight

Not exclusively but if encumbrance only modelled bulk then limb guards should be zero encumbrance. They really don't get in the way of swinging your arms at all.

Terrorforge commented 2 years ago

It's not that simple. Some recipes won't work at all, others can scale discretely by quantity rather than continuously by quality and there might be a few cases where different recipe ingredient choices scale differently e.g. if you can use a kevlar vest or 20 kevlar patches.

This is a problem, but I have to point out that the current implementation already plays extremely fast and loose with that stuff. For the storage of a survivor suit, you can use (among other things) a tac vest, a tool belt or two fanny packs, which are in no way equivalent to each other. You can also use 4 leather pouches, which is fewer than what you get if you just dissasemble the toolbelt instead. It also requires a kevlar vest. And the XL version? 2 kevlar vests. I don't think it's a disaster if it doesn't make 1000% sense.

Could always set the scale such it's at minimum one more of the thing, with the understanding you're using the second for spare bits. Wouldn't make sense for everything, I'm sure, but would at least prevent weird discounts.

That's basically everything other than chestplates and limb guards though. Even a t-shirt will get stiffer in the shoulder.

Enough to matter? You're bigger, stronger, have more leverage. Honestly though, I'm not particularly married to this aspect. How would you prefer it be done? Thicker armor with worse encumbrance? Same encumbrance, same thickness?

Nerdy314159265 commented 2 years ago

Perhaps it'd be good to move away from using sub-items as the base for some recipes so that it's purely materials in the recipe which would scale better.

Or perhaps it'd be better to make armor and storage more modular as a whole so that you can create a custom pack with a custom size/number of pockets. This would let someone larger create a larger base backpack and/or add more pouches to a smaller backpack for more pockets and storage. This would also allow things like adding a holster to a backpack that would be faster than it being loose in a pocket but slower than at the hip or a sling/clip for longer items. These sort of modifications would have an encumbrance benefit over using separate slings/straps but would still be realistic.

Similarly pockets could be added to existing armor in different locations (affecting encumbrance of the area) and sizes by using relevant tools and materials matching the armor type.

I'd be in favor of customizable armor with multiple zones too, so that you could make armor with mixed materials depending on location or adding extra reinforcement in areas that won't affect encumbrance as much, like adding metal to the back of forearms for an increase in armor on the arms but low or zero restriction. Weight could be added as a modifier to encumbrance at the end. So if you added hard plastic arm guards, you should get basically no encumbrance penalty but if you make them out of steel or lead, then they'd be way more difficult to use.

However, at this point I'm starting to get close to suggesting an entirely new body part and armor system but I think everything up to that would still be amazing. I've been rather annoyed with the lack of options for attaching something like a crowbar to a smaller backpack with a clip or being able to make armor that is more tailored to my fights.

Photoloss commented 2 years ago

I would definitely prefer fully modular templates over everything being a distinct item with more or less arbitrary stats, that might suck away a lot of flavour and mundane familiarity though.

Perhaps it'd be good to move away from using sub-items as the base for some recipes so that it's purely materials in the recipe which would scale better.

That's also unrealistic and a nerf to valuable loot though. If you aren't a mutant being able to combine existing items makes a lot more sense. Also survivor suits are getting their storage outsourced to strapped pouches so that will split off part of the problem.

Enough to matter? You're bigger, stronger, have more leverage. Honestly though, I'm not particularly married to this aspect. How would you prefer it be done? Thicker armor with worse encumbrance? Same encumbrance, same thickness?

"Enough to matter" is not well defined here since realistically scaling up the body just straight up doesn't work. There's a reason elephants don't climb trees and ants don't grow to the size of dogs. In most cases you'd try to taper off to a thinner layer at the joints, or even leave full gaps if it gets too rigid like they did with historical plate armour. For the sake of gameplay simplicity I'd just leave material thickness and encumbrance unchanged and then check where other needs arise.

Nerdy314159265 commented 2 years ago

That's also unrealistic and a nerf to valuable loot though. If you aren't a mutant being able to combine existing items makes a lot more sense. Also survivor suits are getting their storage outsourced to strapped pouches so that will split off part of the problem.

If there was at least partial modularity then you could use good loot and modify it with additional pouches and armoring. You could keep at least some of the flavor by pushing the heavily modular elements to late game characters with high tailoring skill because once I hit that point I'm basically going to settle into some survivor gear anyways and not pay as much attention to all the regular clothing options (I don't frequently walk around in t-shirts and shorts while knee deep in the undead).

Also maybe I was unclear. I wouldn't be opposed to something that uses a standard drop item as a base but maybe a move away from pouches as an additional crafting step since it feels like a half-hearted measure to try and increase depth.

If the modularity was used then I'd be 100% okay with pouches being craftable at various scales since then they could be attached to pre-existing armor in a chosen location with whatever size you want which would add more real depth.

I'd also love if a giant Minotaur character could sew two backpacks together to get one that fits with two giant pockets.

Terrorforge commented 2 years ago

The solution might be to stipulate that if the recipe uses an item that can be fitted, you must use one that's fitted to you. Sounds a bit annoying to implement, but it seems like the alternative would be to enact sweeping changes to crafting recipes and then try to manually ensure it doesn't get weird again, which is one of the problems this suggestion is trying to solve.

PatrikLundell commented 2 years ago

Note that mutations don't just include size, but also modified/additional body parts, so if anything, the current size based system is a bit underwhelming in that it only deals with a single parameter.

One possible way to address some of the issues would be if recipes could inherit from other recipes and then use flags and modifiers to get a derived item. One possible flag would e.g. specify that only base materials would be allowed (so a base item that could take a SWAT vest OR kevlar sheets would only have the sheet option for the abnormal sized versions) and have modifiers that specify material amount percentages and final item weight percentages (e.g. 50% materials, 50% weight for a small version, with 400% and 400% for a minotaur sized one). A recipe that's been inherited in that way ought to be able to override entries, allowing for e.g. larger pockets or a larger number of them.

Photoloss commented 2 years ago

One possible way to address some of the issues would be if recipes could inherit from other recipes and then use flags and modifiers to get a derived item. One possible flag would e.g. specify that only base materials would be allowed (so a base item that could take a SWAT vest OR kevlar sheets would only have the sheet option for the abnormal sized versions) and have modifiers that specify material amount percentages and final item weight percentages (e.g. 50% materials, 50% weight for a small version, with 400% and 400% for a minotaur sized one). A recipe that's been inherited in that way ought to be able to override entries, allowing for e.g. larger pockets or a larger number of them.

This already exists on the item level as "copy_from" with "proportional" data. I'm not sure whether recipes have it too, but the main issue with copy-from is that each variant needs to be defined as a discrete copy which gets really nasty with permutations once a piece of clothing covers multiple body parts. In the worst case something like a hazmat suit might require dozens of variants because it can conflict with horns, eyestalks, snouts, wings, feather/tentacle arms, claws/paws/talons, shells, tails, tentacle legs, hooves/talons and probably a few others.

Terrorforge commented 2 years ago

Note that mutations don't just include size, but also modified/additional body parts, so if anything, the current size based system is a bit underwhelming in that it only deals with a single parameter.

I assume a more extensive rejiggering of the clothing system will be necessary as bodyparts reach their full potenital. In the meantime, I figure this concept of "fitted" clothing works for that as well. If it's fitted to you, you can wear it, period. If you have a snout, you can't wear a normal gas mask, but the mask you can wear isn't necessarily that much bigger, just shaped differently.

One possible way to address some of the issues would be if recipes could inherit from other recipes and then use flags and modifiers to get a derived item.

The reason I've suggested this implementation is that I want to avoid using separate recipes and discrete categories. A big part of the problem right now is that XL gear is neglected, so any solution that requires more manual dev work is undesirable.

One possible flag would e.g. specify that only base materials would be allowed (so a base item that could take a SWAT vest OR kevlar sheets would only have the sheet option for the abnormal sized versions)

I suppose something like this might be necessary, but it's a bit clunky because it means we have to define what constitutes a "base material". Possibly in the recipes, but more likely as a flag on the items themselves or in some kind of centralized list. But I feel like for an initial implementation, it would be fine to do what several XL items currently do and just round up to minimum 1 more (or down to minimum 1) and mumble something about using it for spare parts. That, and an "opt-out" tag for items like the jerrypack where it really wouldn't make any sense.

A recipe that's been inherited in that way ought to be able to override entries, allowing for e.g. larger pockets or a larger number of them.

I think it would be fine for there to be large/small versions to have more differences than simple linear scaling, but that should be opt-in. It's cool if someone wants to make an XL backpack with a different pocket layout, but for the reasons I've explained, I think it's critical that the fitting system functions without devs babysitting it.

stale[bot] commented 2 years ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. Please do not \'bump\' or comment on this issue unless you are actively working on it. Stale issues, and stale issues that are closed are still considered.

Night-Pryanik commented 1 year ago

Closing as stale, since stalebot can't do it by itself.