mlangsdorf / Cataclysm-DDA

Cataclysm - Dark Days Ahead. A fork/variant of Cataclysm Roguelike by Whales.
http://en.cataclysmdda.com/
Other
1 stars 1 forks source link

Finish post-apocalyptic price plumbing #23

Open mlangsdorf opened 6 years ago

mlangsdorf commented 6 years ago

Finish support for NPCs trading using post-apocalyptic prices.

  1. discount cashcards for post-apocalyptic prices done!
  2. add post apocalyptic prices for most things based on perceived utility / labor
mlangsdorf commented 5 years ago

Most items in the game do not have an explicit price_postapoc and use their pre-Cataclysm price. This leads to weird behavior, like antibiotics being unreasonably cheap and gold watches being unreasonably valuable. A solution would be set price_postapoc, but there should be some better guidelines for doing that.

An items' post-Cataclysm market value should be set by either:

  1. Its salvage value, the value of it's components when it is disassembled.
  2. The lower of its utility/scarcity value or Its substitute value. The substitute value is the value of the cheapest item that can be used in place of it, so Western boots won't sell for more than the standard boots that can be used to substitute for Western boots.

Utility/scarcity value starts with either:

  1. For items that can't be crafted post-Cataclysm, the pre-Cataclysm value is a good start. This should be multiplied by some factor to represent rarity: wood planks are really common, so they have a low rarity factor, while powered armor hauling frames and wedding veils are really rare, so they should have high rarity factors.
  2. For items that can be crafted, the crafting cost is a good start. Crafting cost should be 1% of the value of the tools needed to make the item, plus the cost of the components, plus some value for the time of the worker - I suggest $1.15/hr, multiplied by 1 plus the craft difficulty raised to the 3/2 power, which works out to $1.15 for unskilled work and $37/hour for difficulty 10.

Utility/scarcity value is then multiplied by a factor representing the utility of the item: the more people who can use it in more situations, the more useful it would be.

I probably need to write a lot of Python to make this happen.