Fallout 4
0 of 0

File information

Last updated

Original upload

Created by

EffElO

Uploaded by

effelo

Virus scan

Safe to use

About this mod

Convenient tool to find and automatically fix issues in weapon mods and weapon mod patches - Saves a lot of time for creating new weapon mods or patching weapons, also helps integrating weapons to Weaponsmith Extended

Requirements
Permissions and credits
Changelogs
Donations
This one is for my fellow modders: Since I created some Weaponsmith patches, I spent a lot of time manually looking through values in xEdit, trying to fix inconsistencies when I spotted them - and still: every time I revisited one of my patches I found another small thing I missed the last time. In my experience it is also the case that a lot of very good weapon mods do have minor issues that fell through the cracks when they were created. Until now I found no weapon mod that was perfectly consistent with its records.

So I took the time to write a tool that can check and automatically fix a lot of issues with weapons in Fallout 4, so that I do not have to repeat time-consuming, error-prone investigations and consistency checks for every weapon I look at.
There is still a lot (!) of features that should be added, however, since it was sitting around unused now for over a month as I didn't have a lot of time since the pandemic, I thought I'd share it with the community. The tool is tested and working and it does pretty smart stuff (therefore it also has around 5,000 lines of code already).

-> If you are creating a new weapon or a patch for an existing weapon mod, download this tool and try it out with default settings. It could potentially save you a lot of time modding, avoid potential issues when using the weapon in the game, or point you to inconsistencies that exist in the original weapon you are patching.

Features - Weapon name and class:
  • Remove hard-coded Vis-G tags from the weapon name ("[Tag] Name" -> "Name")
  • Remove redundant name parts out of a weapon name which will be added by the dynamic naming rules anyway (e.g. "M16 Assault Rifle" -> "M16") - in order to understand which name parts will be added, the tool actually resolves the INNR for the basic form of the weapon programmatically and identifies all name parts that would be added by the INNR
  • Fix/add the AWKCR gun class - you can set the AWKCR gun class via the tool. It also checks if there are multiple classes set at the moment, and displays the currently set AWKCR gun classes (by adding the text " (set)" to the entries in the dropdown). In case no AWKCR gun class is set at all, the feature to set it will be colored orange and the features needing a gun class will be greyed out.
  • (Of course the tool also works in case you do not have AWKCR in your load order. In this case it will grey out the respective settings.)

Features - OMODs:
  • Add a name to weapon modification records (OMOD) that are missing a name - (This is the name being displayed in the weapon workbench and such records would result in the weapon mod not being displayed in the weapon workbench.) The name will be auto-generated from the EditorID (e.g. EditorID "mod_M16_Receiver_Automatic" would result in FULL name "M16 Receiver Automatic").
  • Remove unnecessary adding of additional attach points in OMODs if the attach point is already present in the base form of the weapon - (If this situation is present it sometimes leads to the modifiers of the respective mods on the attach point to be added multiple times to the base values of weapons - e.g. if we are talking about a receiver mod that buffs the damage and the mod re-adds the attach point a second time, the damage buff would be doubled.)
  • Remove unnecessary adding of additional keywords to the weapon via an OMOD where the keywords are already present in the base form of the weapon - (This would have no real consequences in the game except minor save file bloating, however it keeps the records as clean as possible - they are already complicated enough anyways.)

Features - Loose Mods (MISC):
  • Add a name to the loose mod record of a weapon mod if it is missing a name - (This is the name being displayed for a weapon mod in your inventory when you detach it from a weapon and such records would result in the weapon mod not being displayed in your inventory.) The name will be auto-generated from the weapon name and the OMOD name (e.g. Weapon name "M16" and OMOD name "Bayonet" would result in FULL name "{Mod} M16 Bayonet" - if the OMOD for this loose mod is missing a name as well, it will be based on the EditorID of the OMOD instead).
  • Add the "{Mod} " prefix if it is missing in the name ...for Vis-G compatibility and better sorting in your inventory
  • Add the weapon name to the FULL name of the loose mod (e.g. "{Mod} Standard Receiver" -> "{Mod} M16 Standard Receiver") - also supports an additional "general setting" which enables you to use a weapon name enriched via INNR for this operation. This can be handy, if you are talking about weapons whose name doesn't make sense without the INNR name parts (e.g. if you have a weapon whose FULL name is "British" which would be displayed in the game named as "[2e SAR] British Rifle" because of the INNR, then utilizing this feature the standard receiver would not be called "{Mod} British Standard Receiver" but "{Mod} British Rifle Standard Receiver")
  • Add separate loose mod records if a loose mod is used by multiple OMODs - (If this is the case then you could craft one weapon mod, detach it and then use it/attach it to create another weapon mod than the one you crafted originally.) - This feature will add new loose mod records based on copies of the currently used records. If another weapon uses the same loose mod as well, the loose mod will be completely replaced with new loose mods. If the loose mod is just re-used for the same weapon, the original will be used for one of the OMODs, the other OMODs using the same loose mod will get new loose mods.
  • Remove Weight from loose mods - so that they do not take up carry capacity in your in-game inventory
  • Add missing loose mods - (If there is no loose mod record, you cannot re-attach a weapon mod after detaching it in the weapon workbench, but would instead have to re-invest the build cost again if you want it back. This is because after detaching you would find no loose mod in your inventory. This situation only makes sense if we are talking about a mod that does not require any build material to create the mod - e.g. "No Muzzle" for some weapons. However it will also not hurt to have a weightless loose mod "{Mod} No Muzzle".) - Will automatically create new loose mod MISC records if an OMOD does not have a loose mod connected. (New loose mods will get a "{Mod}" tag, a name based on the weapon name and the OMOD name and a vendor base value of 39 - an arbitrary value, reasonable for a standard mod that is not super valuable at vendors.)

Features - Weapon and Mod Recipes [COBJ]:
  • Add missing mod recipes - (If there is no mod recipe, you cannot build the mod in the weapon workbench, but just detach and re-attach it.) - New mod recipes will not require perks to build, and have standard costs of 5 Aluminum, Adhesive, Gears, Oil, Springs and Screws each. (Components are added by default, because it takes less time to manually remove them than to manually add the right components. And these components are common in mod recipes.)
  • Move weapon creation recipe to the AWKCR Weaponsmith workbench - A lot of weapon mods on the Nexus have no build recipes or come with a build recipe for the chemistry workbench. Using this feature you can move existing recipes over to the AWKCR Weaponsmith workbench. (feature will be greyed out if AWKCR is not in your load order or if the gun class or AWKCR Weaponsmith workbench are not set)
  • Change AWKCR Weaponsmith workbench category - Enables you to change the AWKCR Weaponsmith workbench category of an existing weapon recipe (feature will be greyed out if AWKCR is not in your load order or if the gun
    class or AWKCR Weaponsmith workbench are not set)
  • Automatically detect AWKCR Weaponsmith workbench category - In order to save you time deciding which AWKCR Weaponsmith workbench category should be used to create this weapon, there is an automatism built in the tool that automatically suggests the correct category based on the AWKCR gun class. (configured via a separate CSV file, so you can tweak the logic if you want) Of course you can manually overrule the automatic suggestion whenever you want.

Features - Mod collections (MISC):
  • Add missing mod collections - checks for every attach point used by an OMOD if there is at least 1 mod collection covering mods for this attach point and adds a ModCol if there is none

General Stuff:
  • Every feature provides a description as a tool tip of how it works when hovering your mouse over the option
  • Every modification feature has 3 settings: you can either set it to ignore the feature, just check the records or to perform the modification
  • There are buttons to change all modification settings to ignore/check/modify with one click for your convenience (if no modification feature is set to the modify setting, the tool will only check the weapon and display a report about all issues found at the end
  • There is a detailed, indented debug log it can put out while running through all methods - I needed this to pinpoint errors during QA ...left the feature in, maybe some of you can use it for your own projects
  • Will always display a final report at the end that summarizes every check it omitted or did and every change it conducted - copy out the report and save it to have a 100% complete record of what exactly the tool checked, changed and why it changed it for later reference
  • Supports working with records whose EditorID have been changed already by an override (basically: If you create a patch for a patch, it will normally not need the patch as a master for your new patch but only the original file that created the record, but still respect potential overriding of EdtiorIDs)
  • Can add necessary masters silently, but there is a setting for switching the tool to ask you for each master it wants to add to your patch as well
  • Modifying a weapon with all settings activated takes around 30 seconds on my machine until the final report is displayed
  • Only works for guns at the moment, I did not add any support to melee weapons so far
 
Installation:
  • Save the contents of the zip (the .pas file and the sub folder) into your "FO4Edit\Edit Scripts\" folder

Usage:
  • right click a WEAP entry and select the Effs_WeaponPatchHelper.pas (will display an error message if you accidentally selected another record type than WEAP)
  • you can use it for existing ESL/ESPs. In case the original file was not created by yourself or in order to have complete control over the changes the tool performs, I recommend copying the WEAP record to a new ESL flagged ESP (last in your load order) and executing the tool on this record.
  • If you are a weapon mod creator, you could for example use the tool the following way to save you massive amounts of time: create the pure OMODs for your weapon (add the respective modifiers, set the EditorIDs ..you can leave the name empty). Then let the tool run over it and handle naming of the OMODs, the creation of the loose mods for the OMODs, the creation of the COBJ entries for mod recipes, the creation of mod collections, etc. -> you can be sure that everything is consistent and you spent around 30 seconds for it instead of several hours manual work.

Planned Features:
(There are already a few features in my pipeline which I want to add. If something else is missing in your point of view that would come in handy to save you time when modding, please let me know in the comments.)
  • Add or remove progression from mod collections - logic should weigh the different changes mods do to a weapon and automatically add a natural progression to the Level setting of mod collections
  • Add OMODs to existing mod collections if they are missing in the collection
  • Remove the FeaturedItem keyword usage in the WEAP and OMOD records
  • Make the weapon use the "common gun" instance naming rule
  • Add weapon object templates where they are missing - at least default, simple, and random templates including their epic versions (utilizing their respective mod collections) - should also detect if the weapon has automatic and non-automatic versions
  • Setting up a leveled list for each object template - at least a simple and a random list - and a main leveled list that contains the object template leveled lists
  • Add them to the game's leveled lists - I plan to offer two methods: one by editing the leveled lists in an overwrite, the other by adding to leveled lists via script
  • Add the tool version and the date of this run to the results displayed at the end
  • Adjusting the damage multiplier properties of OMODs according to standard WSE damage balance (configurable via CSV, so that other frameworks' logic can be used)
  • Add/Adjust a bash damage multiplier to OMODs according to any weight multiplier
  • Automatically creating caliber swap mods for New Calibers - with automatic damage and speed multiplier calculation based on WSE standards (configurable via CSV, so that other frameworks' logic can be used), should also suggest a default caliber based on AWKCR weapon class and type
  • Adding/Fixing/Removing LOADs keywords for instant ammo type switching

How does it work?
In order to come up with the information needed for the automatic decisions it does, the tool analyses the weapon mods with the following basic approach:
  • Start with the main WEAP record
  • Remember the attach points and keywords present in the base record
  • Follow the attach points to all OMODs referencing this attach point
  • Filter them by the keywords of the weapon
  • Remember all attach points or keywords added by these OMODs
  • (Recursively) search for further OMODs applicable for the newly remembered attach points or keywords - until no new OMODs are found
  • Then follow the OMODs to their loose mods, recipes and mod collections via references
(For resolving the INNR it only considers keywords present in the WEAP record, not the ones added by OMODs.)

Have fun!