Fallout 4

File information

Last updated

Original upload

Created by

alegendv1

Uploaded by

yoyoma3010

Virus scan

Safe to use

Tags for this mod

About this mod

Find weapons and armor in various states of disrepair. Repair them. A weapon/armor condition/degradation loot system that uses the latest and greatest F4SE plugins and script extensions to be as fast and efficient as possible. This system needs NO PATCHING and works with everything. Highly customizable in MCM for loot chance, script load, etc.

Requirements
Permissions and credits
Changelogs
Details
Spoiler:  
Show
A new game is highly recommended with this mod. I did build this to work on current saves, but I can't recommend it given that this is a loot overhaul (if you already have good loot, what's the point of the loot overhaul then XD).

Find weapons and armor in various states of disrepair. Repair them. A weapon/armor condition/degradation loot system that uses the latest and greatest F4SE plugins and script extensions to be as fast and efficient as possible. This system needs NO PATCHING and works with everything. Highly customizable in MCM for loot chance, script load, etc.

This is a primarily a loot degradation/condition mod. Condition is determined when loot is found and (optional) can degrade by chance through player use.

In order for condition to appear in ALL item names, you must run Complex Sorter with my plugin enabled OR run the Synthesis patcher. Most items have instance naming, but many vanilla armors don't, so that's what the Complex Sorter plugin is for.

If you use ECO Redux, you still need to run Complex Sorter for ECO, but you don't need my Complex Sorter plugin.


There are 7 tiers of condition for weapons and armor:
  • Broken: Unusable by player, and severest debuff
  • Damaged: Severe debuff
  • Salvaged: Moderate debuff
  • Usable: Minor debuff
  • Repaired: Slight debuff
  • Maintained: No change (equivalent to normal weapons/armor)
  • Pristine: Slight buff

Debuffs for armor: Each piece of armor that is damaged slightly decreases movement speed. This effect stacks (up to six pieces per type) and is worse for lower condition tiers. If you equip all Damaged armor, you're going to move slower.

Debuffs for weapons: Decreases damage and reload speed. Effect is worse for lower condition tiers.

Debuff effects are togglable for NPCs and Player. Damage decrease is customizable for NPCs and Player.

Weapons and armor can be repaired by using either Weapon or Armor repair kit. These are distributed into loot leveled lists, NPCs, and Vendors via RobCo Patcher and SPID, meaning no conflicts. Chance of items appearing is customizable in MCM.


The How
Spoiler:  
Show

Essentially, I run a script that detects just weapons or armor that have a keyword distributed by RobCo Patcher. If it has the keyword, the mod rolls dice and adds a condition object mod to it.

There are 4 main methods that the script can run:

1. World Scanner 
Every time player enters a cell, I scan a radius of cells around the cell player is in. By default, this is enabled, and scans a radius of one cell. Increasing the radius is not a good idea. You could lower radius to 0, which scans only cell you're in, but the radius of one is better for immersion. Scanners are separated for dead npcs, containers, and dropped objects, which are separately toggleable for weapons and armor. You can optionally completely disable this scanner and just rely on Crosshair Scanner. As of 0.2.4-BETA, I actually recommend scanner radius of 0.

2. Crosshair Scanner
Crosshair scanner detects a container, dead npc, or dropped object in your crosshairs. You have to be close enough to the reference in question for it to run (AKA you can see loot menu or see object name). I recommend always leaving this on for all options in case the scanner misses something or is slow, or for  This is the lightweight script option, so you could disable World Scanner, and this method would fill in its place. However, you see conditions change in loot menu, and if you loot too fast, you may break something. Still a good option to always have on though, just in case.

3. NPC Scanner
The NPC scanner is a script directly on an NPC that can use weapons/armor (Humans, ghouls, Super mutants, synths). Weapons roll immediately on NPC spawn due to limitations. However, Armor rolls when NPC starts to die by default. I don't recommend rolling Armor on Spawn because the 3D reloads, but if you don't mind that, then its fine. You can disable the NPC scanner if you'd like, and rely on the Crosshair Scanner for dead npcs, but keep in mind that NPCs won't be affected by condition since it won't happen until they're dead.

4. Vendor Scanner
This is the most intensive script, but on the plus side, it only runs when you enter a barter menu with a vendor. Works with QuickTrade, if you use that.
When entering the barter menu with a vendor for the first time (or after vendor reset), the game will fade to black to process the vendor's inventory. This can take a few seconds if the vendor has many items. Just be patient with vendor processing.


Final Scripting Notes:

If this sounds script intensive, it may be. However, I'm using clever scripting and script extensions to make sure things aren't rescanned unless they absolutely need to. Using SUP, I don't cycle through an entire inventory, I cycle through ONLY what is absolutely necessary. This method is about as fast as it can get using Papyrus. I will note, I'm dynamically attaching scripts to a plethora of containers. This script remains on the object reference of container. It will only get added if the container has objects that need to be scanned. The good news is that it only fires for OnLoad and OnReset, and has safety checks. The script is only added once to a container object reference. This was necessary because its difficult to track when containers respawn. The APS command will fill your console command log. The end result is no different from adding a script to the container record, however, note that this method is more compatible with mods that add custom containers to the world.


The Why
Spoiler:  
Show
This mod was initially thought of when RobCo Patcher introduced Attachment Point patching for weapons. I came up with the idea of creating an attachment point for condition (which has worked out quite well).

Another part of the idea, was inspired by Damn Apocalypse (DA). DA adds a misc object in place of a weapon based on a flat 75% for broken, and 25% chance for intact weapon.

The problem with DA is that it's prone to compatibility issues. You have to make a custom mesh for mod added broken weapons, many weapons don't have a broken equivalent, and the leveled list patching is tedious. Not that there's anything WRONG with DA's approach, I just wanted a solution that didn't require patching.

I also wanted to be able to customize the chance of something being broken. Once I realized that I could do this, I came up with the other tiers of condition. A patch for Damn Apocalypse has been provided.

There's two main reasons I never liked playing Fallout 4. First, they removed the skill system. That's why I made the S7 Skill System, to have some type of functioning skill system. Second, there was no condition for armor and weapons making them essentially always at 100% condition. A skill system and weapon/armor condition system were key components to the Fallout series in my eyes. I've always wanted condition for armors and weapons in Fallout 4. Sadly, this isn't really possible via just Creation Kit and Papyrus, at least how it functioned in New Vegas. It is possible via an F4SE plugin or ActionScript, but I don't know how to write for those currently. I also wanted to see what I could do with JUST Papyrus and other mod's resources.


Degradation System (NEW)
Spoiler:  
Show

As of version 0.2, there is now a toggleable degradation system (player only). The degradation system is significantly different from how FO3/FNV/F76 does it, due to the limitations of Fallout 4 and how this mod handles weapon/armor condition. Degradation is by chance, and there are ways to reduce the chance of degradation/breaking.

Any time a weapon degrades, it degrades by 1 condition level (Pristine goes to Maintained, Maintained goes to Repaired, Repaired goes to Usable, Usable goes to Salvaged, Salvaged goes to Damaged, and Damaged goes to Broken).

This system is very much Beta, and still requires more stress testing.

For Weapons:
Whenever you fire a weapon, a number decreases. Whenever you stop attacking, a random chance will roll against that decreasing number. If it exceeds the number, the weapon degrades. If you're really unlucky (not Luck based), your weapon can degrade after 1 shot, but this is rare and is part of the RNG.

Certain weapons degrade number faster (low ammo capacity, bolt action, charging, etc.) and have an MCM customizable degradation value per shot.

Gun Nut (and higher ranks of it) will reduce how fast the degradation number decreases, thus making it more difficult for a weapon to degrade.

When a weapon degrades, it will unequip and reequip UNLESS its broken. If you have more than one type of a weapon (multiple 10mm pistols, for example) the mod will attempt to equip a non-broken weapon. If it cannot find one, it will just keep weapon unequipped.

Whenever you switch weapons, the system will reset the degradation chance. This encourages switching weapons.

Grenade throwing counts as attacking, I've tried to prevent this from increasing degradation chance via script, but its still being tested.


For Armors:
Armor is handled by where you are hit. If you have piecemail armor (armor that covers underarmor) these will gain a break chance per hit. If you are not covered by piecemail armor, your body armor will gain break chance on hit. Each time you're hit, the armor part hit will roll to degrade.

You can fix armor at the armor workbench with adhesive. Higher ranks of Armorsmith allow you to reduce break chance more.

If you have Pipboy Tabs, you can see the break chance of all your armor pieces. Headgear is different, and only shows the headgear with the highest chance of breaking. However, when you fix headgear, it reduces ALL headgear break chance, rather than just one item.

The Armor break chance relies on Apply Combat Hit Spell on NPCs. Any other mod that uses Apply Combat Hit Spell will conflict (such as MAIM). MAIM 2 has been patched, and the misc files contains the patch.

Armor will unequip and reequip when degraded. Broken armor will not be reequipped, however if you have multiple of same armor form, it will have to search for a non-broken one to equip, which means it may equip/unequip several until it finds a non-broken armor.


Final Notes:
Spoiler:  
Show

  • If you ever find a weapon/armor without condition, you can just drop it and crosshair ref scanner (if enabled, which is highly recommended) will grab it.
  • I believe I've covered most items that get added from vanilla quests, etc, including unique legendaries.
  • Mods (such as quest mods) that give weapons/armor as quest rewards are not covered. Let me know of any and I'll see if I can cover them.
  • When a vendor is being processed, the screen will fade to black, and then fade back in. The fade time length depends on how long the vendor processing takes (longer for inventories with many items, especially duplicates).


Known Issues
Spoiler:  
Show

  • Using Wheel Menu, you can equip weapons/armor that are broken. I don't know how to fix this. Be careful doing this, because you will be unable to unequip via Pipboy, and will need to unequip via Wheel Menu.
  • Unique legendaries don't display condition in naming. You can still check at workbench though to see their condition
  • Incompatible with Dynamic Vendor Restocking. For some reason, removing the Respawns flag from vendors causes the function from Lighthouse to not function. Geluxrum is aware, and may be able to develop a solution. This may be fixed now, unsure.


Credits
Spoiler:  
Show

  • Many thanks to TommInfinite - they took requests for developing roughly a dozen or so functions that made this system both possible and also much more efficient script-wise.
  • Many thanks to GELUXRUM - also took requests for custom functions, which enabled me to grab vendor containers for any vendor.
  • Many thanks to Zzyxzz - without RobCo Patcher, this mod would have to be manually patched.
  • Thanks to shad0wshayd3 - BakaFramework allows for this mod to detect when weapons and armor are crafted. It also allows for EditorIDs to be visible for Papyrus
  • Thanks to powerofthree - SPID allows distribution of effects and leveled items to NPCs without manual patching.
  • Thanks to payl0ad - their Damn Apocalypse mod served as inspiration for this mod. They also answered questions on Greslin's discord.
  • Thanks to Greslin and Red for their patience and assistance with my never-ending questions on Greslin's discord
  • Thanks to any modder who assisted me on the Collective Modding Discord.
  • Thanks to F4SE team for F4SE
  • Thanks to Bethesda for Fallout 4.