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

Make backpacks more consistent #33347

Merged

Conversation

ampersand55
Copy link
Contributor

@ampersand55 ampersand55 commented Aug 18, 2019

Summary

SUMMARY: Balance "Make backpacks more consistent

Purpose of change

Adjust the new backpacks to be consistent with the old backpacks.

Fixes #33292 (to some degree).

Describe the solution

We are given storage capacity. We assume that storage capacity is proportional to volume and material use and weight is proportional to surface area times material thickness.

Assuming a backpack has the shape of a 1x1x2 box, it will have a surface area proportional to ~6.2996 x volume.

We normalize material use from to the regular backpack, which use 1 rag per storage per thickness (20 rags, 10L storage, 2 thickness).

  • Relative material cost of materials is calculated using the duffel bag recipe, which uses 40 rags, 32 fur pelts, 24 leather or 6 hides.

  • Old backpacks material is left as is.

  • Warmth is calculated as coverage x material_thickness / 10.

  • Survivor gear warmth is left as is (at 0).

  • Coverage of new backpacks is reduced. Assuming the high-volume rucksack covers the entire back it has a coverage of 50%.

  • Other values are left as is.

  • Removed "steel" as a material for high volume rucksack as it made its armor value far to high.

  • Backpacks (all belted torso items used for general storage) moved to backpacks.json.

Describe alternatives you've considered

Backpacks probably need more rebalancing. Some things to consider for a future PR:

  • Allow new backpacks to be made out of rags, and change default material to cotton.
  • Take a look at weight and volume for the backpacks.
  • Make survivor versions of new backpacks.

Additional context

https://docs.google.com/spreadsheets/d/1i72c0SF2o6ZMDmcTU2I4NBQKpshlr4Ps0y7cGH7Saco/edit?usp=sharing
https://en.wikipedia.org/wiki/Surface-area-to-volume_ratio

Copy link
Member

@anothersimulacrum anothersimulacrum left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Moving items and making changes to the in the same PR is confusing, because it obfuscates what changes you make. Doing so in the same commit makes it incredibly impractical to tell what changes you made.

@ampersand55
Copy link
Contributor Author

Moving items and making changes to the in the same PR is confusing, because it obfuscates what changes you make. Doing so in the same commit makes it incredibly impractical to tell what changes you made.

That's true, sorry. I thought of it, but too late.

The changes in backpack.json are to material, material_thickness, coverage and warmth for the new backpacks and warmth for the old backpacks.

I've detailed all changes I made in the spreadsheet.

Should I make a new PR?

@anothersimulacrum
Copy link
Member

No, the spreadsheet is fine, just please don't do it in the future.

@ampersand55
Copy link
Contributor Author

No, the spreadsheet is fine, just please don't do it in the future.

Will do. I mean not do that in the future.

data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
data/json/items/armor/backpacks.json Outdated Show resolved Hide resolved
@ampersand55
Copy link
Contributor Author

I could rather quickly make a json parser and change volume to be in liters and milliliters in all json files. Is that something we would want?

@anothersimulacrum
Copy link
Member

Yes, just waiting on someone to do it. We have adjust_values.py that could be adjusted a bit to do that, or so I've heard.

@ampersand55
Copy link
Contributor Author

ampersand55 commented Aug 19, 2019

Ok, it wasn't quite as trivial as I thought as music instruments use the key "volume" to denote sound volume and items that use proportional volume gets messed up.

I'll have to look into it some more and properly parse the files instead of just a regexp replace.


EDIT:

This works, I think. Or at least loads without errors. Basically a regexp replace with some hacks to handle music instruments and proportional volume.

@anothersimulacrum
Copy link
Member

Please add the script to ./tools/ when you have it working!

@ampersand55
Copy link
Contributor Author

Please add the script to ./tools/ when you have it working!

Well. It's working but it's ugly and not robust.

@JacobKessler
Copy link

I like backpack consistency. Some thoughts:

  • Should the volume be based on the volume with the packmule trait? It seems like having the manufacturer claimed volume match up with a maximally-efficient survivor seems better than some survivors be able to get 40% more volume out of nowhere.
  • Given the new realistic volumes, 1L/encumbrance seems excessive. A hiking pack is not as encumbering as a poorly-fitting entry suit or wrapping yourself in a blanket. In fact, it seems like the more-advanced packs might want to give better storage/encumbrance ratios at the expense of weight due to the hip and back supports, like the vanilla MOLLE pack. Duffel bags seems like the 'huge storage, very encumbering' class of storage containers.

@ZhilkinSerg ZhilkinSerg added [JSON] Changes (can be) made in JSON Game: Balance Balancing of (existing) in-game features. Items / Item Actions / Item Qualities Items and how they work and interact labels Aug 19, 2019
@ampersand55
Copy link
Contributor Author

I think rebalancing storage / encumbrance is beyond the scope of this PR, but I agree backpacks need to be looked at further.

@ampersand55 ampersand55 force-pushed the make_backpacks_more_consistent branch from 3015c58 to eff7b47 Compare August 21, 2019 16:17
@ampersand55
Copy link
Contributor Author

ampersand55 commented Aug 21, 2019

I did a hard reset and made the balance changes in a separate commit as I should have done from the start.

@ampersand55 ampersand55 force-pushed the make_backpacks_more_consistent branch from 3a33e1f to 9defaae Compare August 21, 2019 16:45
@kevingranade kevingranade merged commit b367eae into CleverRaven:master Aug 22, 2019
misterprimus pushed a commit to misterprimus/Cataclysm-DDA that referenced this pull request Sep 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Game: Balance Balancing of (existing) in-game features. Items / Item Actions / Item Qualities Items and how they work and interact [JSON] Changes (can be) made in JSON
Projects
None yet
Development

Successfully merging this pull request may close these issues.

New Backpacks Need Adjusting
5 participants