0 of 0

File information

Last updated

Original upload

Created by

FranQ_QWangK

Uploaded by

FranQQWangK

Virus scan

Safe to use

About this mod

Bind a hotkey through MCM, then press it to inspect your current equiped weapon. Easy to create a patch by using robco patcher and fo4edit. I have made some patches for weapon mods and vanilla game weapons.

Requirements
Permissions and credits
Description
Press down hotkey, then inspect your weapons, just like some modernization FPS games.
This mod is a basic framework, it design for both modders and players. Modders make a patch for weapon mods, and players install this framework and patches. This will make weapon inspect easily.
This mod support max 3 kinds of weapon module combination. For exmaple,Type A barrel, Type B frontgrip, Type C magazines. it's enought for most weapon mod.
This mod also support empty magazine inspect animation (if weapon mod has). When your gun got 0 ammo, framework can play empty mag inspect animation.

Usage
1. Download this mod.
2. Intall weapon mod witch have a inspect animation.
3. If you want to inspect some vanilla game weapons, you will need to install some reanimation mods. I have listed for you.
4. Open MCM menu, bind a hotkey to inspect function. I suggest you using KEY T.
5. Press hotkey to inspect.

Patches I Made For Weapon Mods
Open the ini file check code annotation for more detail
Vanilla Games Reanimation Mods Supports(included in framework):
LaserGun | NukaAK | VRP 10MM | XCAD 10MM | Assault Rifle | CombatGun | PipeGun | PlasmaGun | DoubleBarrel SG | 44P | SMG | Deliverer | GaussRifle |

Weapon Mods Supports:
BO6 - Colt 723 (XM4) | SIG Sauer AG


Current Problem
Because of using Robco Patcher to dynamic inject records to formlists, the loading save time will increase during the initial startup fallout 4, and then return to normal. Tested 200 records need 30 secords to load ( i7 13700K ).


TroubleShoots
If you see the notification in game: "Warning! The Inspect Framework's Formlists contain illegal records:  Total records = m, But Formlist 2  = n"
It means that some ini files may include wrong rules, witch try to inject the fomlist 2 with not exist value, For example:
(1)CustomRules.ini load the ModB.esp's rules but you don't have ModB.esp loaded. 
(2)You writed a wrong formid, cause the robco path can't find the record.


Tutorials

Part I - How does this mod work
Every times when you equiped a weapon, framework will try to find a inspect rule to match your equiped weapon. This will take a few seconds.
If found a matched rule, save rule index to cache. When you pressed hotkey, framework can use cached rule index play inspect animation immediately.
If can't find a match rule, framework will notify you current weapon don't have inspect rules.

Part II - What is Inspect Rules
A inspect rule is used for unique mark a weapon with special mod parts.  It's a combined of 6 elements:
(1)Weapon's main keyword: this keywod use to unique mark a weapon. Suggest use animation key word, so this rule can work for all weapons use same animation keyword.
(2)Weapon's special mod keyword 01: the first weapon mod to match, For example AnimsLargeMag keyword.
(3)Weapon's special mod keyword 02: the second weapon mod to match.
(4)Weapon's special mod keyword 03: the third weapon mod to match.
(5)Inspect animation idle record: witch inspect animation you want to use. 
(6)Is Empty magazine animation flag: used for flag current rule is a empty mag inspect animation or not.
These elements are saved in the corresponding formlists. All 6 elements with the same index together combined 1 rule. See the Rule Stutcture Table.
Rule Structure Table


Part III - How to define Inspect Rules
The elements in 6 formlists don't allow have null elements.
You have to fill the formlist with Null_Element_Flag("Weapon-Inspect-Framework_Fran.esp|0") if you don't need to use the element.
The following are the value rules for elements:
(1)Flst_1-WeaponsAnimKW: must be a weapon main keyword. For example: "Fallout4.esm|CE97E"  //The vanilla 44 Pistol main animation KW(Anims44).
(2)Flst_2-WeaponsOMOD01KW: Can use Null_Element_Flag or special weapon mod keyword.
(3)Flst_3-WeaponsOMOD02KW: Can use Null_Element_Flag or special weapon mod keyword.
(4)Flst_4-WeaponsOMOD03KW: Can use Null_Element_Flag or special weapon mod keyword.
(5)Flst_5-InspectAnimIDLE: must be a idle record. For example, "WeaponModA.esp|F123"
(6)Flst_6-IsEmptyMagFlagGV: Only has 2 options to choose, the empty mag inspect flag is "Weapon-Inspect-Framework_Fran.esp|E", if not ,fill with Null_Element_Flag.

Part IV - How to create a weapon inspect rule patch
Tools you'll need:
I'll use mod BO6-XM4's default inspect animation as a example:
Step 1 - Use FO4edit to create a esp include IDLE animation records, enable this esp:


Step 2 - Create Robco patch formlist inject ini file:
Create "BO6-XM4_InspectFramework_Patcher.esp.ini" in folder Path: "Data\F4SE\Plugins\RobCo_Patcher\formList\WeaponInspectFrameworkFran\"
Add content:

//Rule 1 - default empty mag inspect.
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|1 : formsToAdd=BO24coslo.esp|1739
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|2 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|3 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|4 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|5 : formsToAdd=BO6-XM4_InspectFramework_Patcher.esp|801
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|6 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|E

//Rule 2 - default normal inspect.
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|1 : formsToAdd=BO24coslo.esp|1739
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|2 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|3 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|4 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|5 : formsToAdd=BO6-XM4_InspectFramework_Patcher.esp|800
filterByFormLists=Weapon-Inspect-Framework_Fran.esp|6 : formsToAdd=Weapon-Inspect-Framework_Fran.esp|0


The inspect framework will load rules in order, means smaller index have higher priority. So you have to put normal inspect rule after empty inspect rule.
Inspect framework can skip all continuous mismatch rules, so in order to improve efficiency, you should put same elements continuous. For example:

Rule01:  WeaponA, ModA1, ModB1, ModC1, Idle1, Flag

Rule02:  WeaponA, ModA1, ModB1, ModC2, Idle2, Flag
Rule03:  WeaponA, ModA1, ModB1, ModC3, Idle3, Flag
Rule04:  WeaponA, ModA1, ModB2, ModC1, Idle4, Flag
Rule05:  WeaponA, ModA1, ModB2, ModC2, Idle5, Flag
Rule06:  WeaponA, ModA1, ModB2, ModC3, Idle6, Flag
Rule07:  WeaponA, ModA1, ModB3, ModC1, Idle7, Flag
Rule08:  WeaponA, ModA1, ModB3, ModC2, Idle8, Flag
Rule09:  WeaponA, ModA1, ModB3, ModC3, Idle9, Flag
Rule10:  WeaponA, ModA2, ModB1, ModC1, Idle10, Flag
Rule11:  WeaponA, ModA2, ModB1, ModC2, Idle11, Flag
Rule12:  WeaponA, ModA2, ModB1, ModC3, Idle12, Flag
......


In this example, if weapon don't have ModA1 installed, skip rule 01-09.

The empty inspect rule must continuous with normal inspect rules, like n = empty inspect, n+1 = normal inspect.
You don't have to define a empty inspect rule, but if there have a empty inspect rule and no corresponding normal inspect rule found, this rule will not work.
Why you have to set the robco patch file name to "BO6-XM4_InspectFramework_Patcher.esp.ini"? 
Because if the ini name contains the name of an esm, esp, esl file, the file is only read, when the mod is also active in the load order. Otherwise it gets skipped.


Step 3 - Create the First person IdleStop fix patch to stop auto reequip weapon after played inspect animation.
Create "BO6-XM4_InspectFramework_Patcher.txt" in folder Path: "Data\F4SE\Plugins\FO4IdleStopFix\"
Add content:

BO6-XM4_InspectFramework_Patcher.esp,0x800
BO6-XM4_InspectFramework_Patcher.esp,0x801


Congratulations! Now you have done to create a new weapon inspect framework patch!
For full patch I made for BO6-XM4, go to file page and you can see it.