Bear with me, seeing this topic inspired me. I don't know Fallout's scripting language but I had a few ideas that I wanted to share in the hopes it might help anyone who DOES have the scripting knowledge to put a system in place.
Does each instance of an in-game armor have a
unique identifier? If so, I have an idea to avoid the 'too many items bug' that would occur if a script were attached to each armor.
Assuming there exists a way to reference an individual piece of armor in the game (i.e. not the item 'type' but it's specific instance), one global script could run that monitors all the 'on hit' instances that occur to the player while wearing an armor identified by that unique ID. This script would populate a large matrix of unique item codes and the number of hits / HP of damage the player sustained while wearing it. Periodically, the script would check to see if the item has accumulated enough hits to change quality level, and the item would be swapped for a Used, Heavily Used or Broken variant. Overall, it would be organized something like this:
1. For the Player
Each armor 'type' could have 4 tiers of status:
- 1. Pristine: 0 to X hits
2. Used: X to Y hits
3. Heavily Used: Y to Z hits
4. Broken: > Z hits
Hits could either represent the actual number of hits the player has taken (tracked by said global script) while wearing the individual armor, or by the HP damage
received by the player while wearing the armor. The latter is ideal IMO, but would require distinguishing between non-weapon damage (i.e. radiation, poison, etc) and weapon-induced damage. Each armor archetype could be assigned a hits/HP threshold, concomitant with the quality of the armor (P.A. takes more hits than leather, etc).
This would by far be the most complicated part to introduce, but if it could be done the rest would be trivial. It could be more complicated based on the damage type, but I think that gets into the realm of too realistic and doesn't add enough to counter balance the complexity required.
2. For NPCs
To reduce complexity, each NPC is equipped with pristine-state armor. Upon death,
if the NPC is supposed to drop their armor, then the global script would kick in and do a random chance to determine the status of the armor. Something like:
- 10% Pristine
30% Used (X hits, i.e. barely used)
40% Heavily Used (Y hits, i.e. barely heavily used)
20% Broken
This would simplify the overhead required by the global script AND make it easier to track. Rather than tracking the number of hits every NPC received and dropping armor of some intermediate number of hits, armor of a general condition (i.e. used Leather with X hits, not a value between X and Y) is dropped which reduces the complexity.
3. For Shopkeepers
The simplest, I would assert that shopkeepers only sell Pristine (0 hits) armor, same as vanilla.
-------------------------------------------------------------------------------
As to repairing, I don't think directly giving the PC the ability to repair armor would be good. It would minimize the effect of degrading equipment, which is counter to the point. I feel as if several NPCs should exist in the world that are capable of repairing each class of armor:
- Leather/cloth types: Someone in Klamath, Tanner in Modoc, NCR Ranger station in NCR, Vic's daughter in VC.
Metal/tesla types: New Reno Arms shopkeeper, NCR Rangers, Vic's daughter, Skeeter in GECKO, Ratch in NCR, San Fran, Navarro quartermaster.
Combat Armor types: Vic's daughter, NCR rangers, San Fran, Enclave, 'secret' NPC in New Reno?
P.A types: Navarro quartermaster. Perhaps this is the exception to what the player can fix, due to limited supply. And existence of those manuals. Could be a quest.
These locations are semi-balanced in that both good and evil chars can access at least 1 NPC of a given armor repair type. Perhaps Vic could repair the Leather / Metal variants too, to give him a bit more usefulness.
A system like this would remove some of the over the top money generated by selling armor in the game. I also think the number of hits each armor can take should be slanted towards 'too many' rather than 'too few'. Whew, ok I'm done.