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

RFC: Rework item repairs into faults #64528

Open
irwiss opened this issue Mar 24, 2023 · 9 comments
Open

RFC: Rework item repairs into faults #64528

irwiss opened this issue Mar 24, 2023 · 9 comments
Labels
Items / Item Actions / Item Qualities Items and how they work and interact (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing

Comments

@irwiss
Copy link
Contributor

irwiss commented Mar 24, 2023

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

Fwiw I've presented it to some devs on discord a while ago and the response was fairly positive, but likely not too accessible to people outside the timezone at the time; so I'm putting this as an issue as a RFC and polishing before I start working on it, or probe for potential blockers for this.

Right now item damage is abstracted into arbitrary number that you decrease using some magical toolkit (e.g. needle / tailor's kit / firearm repair kit etc) activator for the repair ui. This was pretty dodgy even before, but now with multi-material items like armor being widespread or complex repair kits made of mundane items (welding blanket) it creates even weirder situations.

Here are some primary examples of it:

  • Vehicle parts had to reinvent repairing because the item repairing was lacking features, but now there are 2 separate flows that disagree with each other Repair inconsistency leading to huge exploits #24803 for example:
    • A quarterpanel on vehicle (based on metal sheet) requires 2 welding wire, 1 chunk of steel, 40 arc welder charges, welding goggles, hammer quality 2, mechanics 2.
    • A sheet metal item requires: 1 chunk of steel, 10 arc welder charges * failure chance... And that's it, not even welding goggles.
  • There are 3 completely separate flows that do the same thing in different way: item repair, vehicle part repair, and mending.
  • Repairing has very rudimentary support for multiple materials, in essene you can pick any material you want, so the player will always prefer to repair using the "cheaper" or more available material, for example: motorcycle boots are made from kevlar and cotton, you will never need kevlar sheets as long as you have (bulletresistant?) cotton patches in stock.

Secondary / minor issues:

Solution you would like.

I propose implementing damage and repairs via faults and mending instead, this will allow flexibility of almost freeform damage, eliminate the need for magical activation kits to trigger iuse UIs, ease the UX - with mending we can just find whatever tools that are needed in crafting inventory, defined by a fairly flexible "requirements" structure rather than put the task of knowing which magical kit they need on the player or the item info window, finding and activating the item, knowing what consumables they need etc...

My proposal for implementing this is using these steps so they are fairly individual and "complete" PRs rather than a single massive PR:

  1. Clean up item damage code - remove item's min_damage/max_damage, cap hitpoints between a 0 and some constant integer, thereby disallowing negative damage and adjust tests to match. This will remove magical "reinforcement" of some materials like cloth/leather and accurizing guns:

    • Accurizing guns makes no sense - it takes battery charges and a magical tool kit to lower gun "damage" under 0, this damage is then modifying parameters elsewhere creating silly bonuses like increasing bash damage Accurized gun issue #61320 .
    • "Reinforcing" cotton/leather/kevlar etc items without adding mass; probably a remnant of the old clothing mods system - I can't think of a manipulation you can do that doesn't change mass besides rubbing the armor piece with cotton patch(or whatever repair material), but this manipulation somehow lowers damage below 0 allowing more durability.

    This will also cut out fairly large chunks of item code and ease the implementation. Later reinforcing can be implemented in another, likely better way that won't violate laws of thermodynamics - I'm mostly eyeing enchantments system, or just ditched altogether.

  2. Provide the initial implementation of faults/mending:

    • Add ridumentary autogenerated "default" faults e.g. "Damaged leather", with equally generic "Mend leather parts" that takes a some of of current repair material (leather patch) and removes this fault (may be adding up a small amount of degradation ).
    • Repurpose the repair UI or write a fresh UI that will allow using mending in a comfortable way; perhaps select multiple faults to mend at a time, practically something that'd give UX parity between mending and current repair UI.
    • Make item damage add these faults in addition to manipulating damage number - this will solve materials issue; if random roll decided (by armor parts definition or otherwise) that the damaged part is the kevlar one, you won't be able to plug holes with cotton/leather just because there's some of that in the item definitions.
  3. Implement more complex faults, at this point this will be mostly JSON effort so likely available to wider amount of contributors too: Make an item-relevant selection of faults, that will apply to specific items, for example;

    • Electronics devices can have broken screens / water corrosion / burnt fuses / capacitors / other e_scrap stuff, perhaps "unknown fault"s which you mend with volt/multimeters/oscilloscopes?/other new electronics repair tools to discover "short" faults; for example repairing headlamp that received a hit in the electronics part would require e_scrap instead of welding more wire on top.
    • Magazines could have busted springs requiring a spare one instead of "just weld a chunk of steel to it", bent feed lips requiring time+pliers, stuck cartridges and so on...
    • Metal/blade items could have chipping / bending of various degrees, allow "burning" off handles but leave blade intact - allowing you to "mend" by milling/carving a new handle etc, instead of current situations where items are either completely immune to fire or burn off the nether in a few turns.
    • I'm sure there can be more here from members more creative than I am.
  4. Work on UX so that repairing doesn't become a UI chore ( I think most people hate navigating menus to solve minor issues ) - allow zone activities with "auto item mending zone" and automate "repair items you wear" in some way, although a menu to pick an item you want to repair and let the ui find the right tool is already a giant leap vs the current "match the correct repair kit with your item" minigame.

  5. Optionally:
    5.1) Reimplement reinforcement in a way that makes sense: an enchantment that adds mass/volume and modifies relevant stats, or a TOOLMOD kind of way, or some other way I didn't think of...
    5.2) Reimplement "accurizing" guns in a way that makes sense - may be make an activity that requires the gun to have an actual scope to accurize, consumes some paper targets and ammo, makes noise and adds a temporary sights dispersion buff.

Some misc points:

  • This will also tie into issues like Crafting quality levels through item faults #53500 - e.g. a "chipped blade" fault on machete can be both a fresh-from-crafting fault and a chipping the machete can receive when hitting/blocking something.
  • As a side effect we can also start introducing item degradation to more than vehicle parts; for example a fault could be set to increase degradation amount when mended, may be even different degradation amount depending on the mending option chosen, and use avatar skills / proficiencies / random roll to reduce the amount.
  • Switching to mending instead of repairs will also solve special casing "repairing" vehicle parts requiring vpart definitions to have dedicated requirements json for vehicle repairs - removing odd situations where item repair is different between when it's installed on vehicle or when it's on your hands.

Describe alternatives you have considered.

No response

Additional context

TL;DR: Use item faults to provide a more flexible model item repairs which can deprecate the inconsistencies between item and vehicle part repairs, magical iuse activator toolkits, introduce degradation feature to item repairs etc...

PS. I'm bad at writing and english isn't my native language, hopefully this is comprehensible to some degree

@irwiss irwiss added the <Suggestion / Discussion> Talk it out before implementing label Mar 24, 2023
@anothersimulacrum
Copy link
Member

I think this is a good idea.

  1. Reinforcing of clothing is already basically gone (remove sew_advanced from the tailor kits #58035), and gun accurizing is not particularly compelling. I do not think they would be missed if cut entirely.

@estebandellasilva
Copy link

Add ridumentary autogenerated "default" faults e.g. "Damaged leather", with equally generic "Mend leather parts" that takes a some of of current repair material (leather patch) and removes this fault (may be adding up a small amount of degradation ).

While i find the degradation system OK on vehicle parts - for clothing i think there should be an option to ... fix degradation for a somewhat higher material cost ... otherwise it would be kinda annyoing

@irwiss
Copy link
Contributor Author

irwiss commented Mar 26, 2023

That mostly depends on what game design people decide and even then likely to be defined per item; there's only so many times you can patch a t-shirt before it becomes a bunch of separate rags held together by thread while replacing the bulb/leds in a flashlight can be done (practically) unlimited amount of times.

Point 3 (complex faults) would be able to include multiple mending methods for a fault, some might incur less degradation, and others will have none depending on the fault and the writer's discretion

@estebandellasilva
Copy link

That mostly depends on what game design people decide and even then likely to be defined per item; there's only so many times you can patch a t-shirt before it becomes a bunch of separate rags held together by thread while replacing the bulb/leds in a flashlight can be done (practically) unlimited amount of times.

Point 3 (complex faults) would be able to include multiple mending methods for a fault, some might incur less degradation, and others will have none depending on the fault and the writer's discretion

image

what i mean iss that you technically can ... replace the whole damaged part for a higher cost ... is it not something i can do to a sheet of metal but with clothing i can

@RAldrich
Copy link
Contributor

Just stumbled upon this and wanted to add:

While it's no longer the default, I play with item health bars turned off because I really like the "cut, ripped, shredded, etc." descriptors. They help me visualize the game much better than a status bar.

It would be cool if we can find a way to keep this functionality and keep the fault name visible in the primary inventory UI (or the worst fault, if there are multiple?).

As an aside, the JSON needed to define faults seems like it's going to be really similar to the JSON for defining wounds. We should see if we can come up with some common conventions for that.

@irwiss
Copy link
Contributor Author

irwiss commented Mar 30, 2023

Item damage / hitpoints will still be a thing, so descriptors are staying regardless

They could be augmented by the faults; if a major fault of a specific type defines it's own adjective like "shorted" electronics then it might take priority over the "generic" ones like cut/ripped/etc, but that'll likely come as finishing touches once the rest of the system is done

@ama0
Copy link
Contributor

ama0 commented Apr 20, 2023

I'm just curious.

Is there some rationale behind having damage instead of HP for an item. I kinda like it, but I suspect there is a reason why this was chosen instead of an HP system almost every other game uses.

And why 4000 damage to destroy an item? I mean, why 4000? Not 255 or 100 or 1000? Probably also a very good reason. I'm curious if someone has any links/comments/ideas.

@github-actions
Copy link
Contributor

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.

@github-actions github-actions bot added the stale Closed for lack of activity, but still valid. label May 20, 2023
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jun 20, 2023
@Maleclypse Maleclypse reopened this Jan 15, 2024
@Maleclypse Maleclypse added (P5 - Long-term) Long-term WIP, may stay on the list for a while. Items / Item Actions / Item Qualities Items and how they work and interact and removed stale Closed for lack of activity, but still valid. labels Jan 15, 2024
@zack-shoylev
Copy link
Contributor

ITEM_BROKEN should be deleted and replaced with (mendable) faults.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Items / Item Actions / Item Qualities Items and how they work and interact (P5 - Long-term) Long-term WIP, may stay on the list for a while. <Suggestion / Discussion> Talk it out before implementing
Projects
None yet
Development

No branches or pull requests

7 participants