CleverRaven / Cataclysm-DDA

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

Allow math to affect item statistics #74526

Open Standing-Storm opened 5 months ago

Standing-Storm commented 5 months ago

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

Right now, Mind Over Matter uses items behind the scenes to provide some of its powers, such as pockets for the Lifting Hand telekinetic trait or a pseudo-tool for the Vehicle Lifting or Hacking Interface powers. However, since items are immutable, each of these powers requires up to dozens of different copies of the item with a single stat changed in order to allow the power to have proper scaling.

Solution you would like.

Allow item traits to accept math. The specific ones from the powers above would be pocket max_contains_volume/max_contains_weight and tool quality (e.g. HACKING or JACKING ), but looking through the list of MoM items, it would also benefit the ammo amount in ammo_restriction in pocket_data or the bandages_power, bleed, disinfectant_power etc from the heal use_action.

Describe alternatives you have considered.

Dozens of items with individually-set numbers.

Additional context

No response

Hyperseeker commented 5 months ago
"pocket_data": [
  {
    "pocket_type": {
      "math": ["u_has_special_trait ? NONE : CONTAINER"]
    }
  }
]

Wouldn't that be a lot of fun?

Mithrite commented 4 months ago

Might this allow for comestibles that reduce volume/weight, along with returning nutrients as you eat? using a "%consumed food" item similar to butchery and crafting would make large meals(or small stomachs) work pretty seamlessly.

github-actions[bot] commented 3 months 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.