Fallout 4

File information

Last updated

Original upload

Created by

Dank Rafft

Uploaded by

DankRafft

Virus scan

Safe to use

About this mod

Easy to use scripts for leveled list (guns, armor, ammo), legendary effect and INNR injections. Prevent conflicts between mods.

Requirements
Permissions and credits
Changelogs
Donations
Leveled Item List Injector Scripts

Update: My most recent leveled item injection script "Dank_LeveledItemInject" part of the download makes all other previous iterations obsolete because it allows to inject any amount of any item (or nested/sub-form for that matter) into any leveled item list.

IMPORTANT: If you do make changes to the code make sure to rename the script or move it to another folder, so that other mods which use the original version don't get negatively affected by your changes.

How do I use it?

That's the most important part. You need at least one tool for that process: Fallout 4 Creation Kit (downloadable via Steam). In some instances FO4Edit is required as well. More on that later. Once you have the Creation Kit (short: CK) installed we can begin.

  • Download the script and put the contents into your Fallout 4 Data folder. Can also be done with a mod manager.
  • Start the Creation Kit and activate the plugins you want to inject a weapon from.
  • Once finished loading, head to the Object Window and open Character/Quest.
  • Right-click somewhere on the right of the Object Window and choose "New". (pic. 1 above)
  • In the opened Quest window type in a FormID of your choice. I tend to use something like UniquePrefix_WeaponLLinject, so my IDs always look like Dank_CRifleLL. That makes it easier to find your records later on in case you need to modify them. (pic. 2 above)
  • Then click on the Script tab in the Quest window and click on Add. A new window named "Add Script to" should appear. (pic. 3 above)
  • Check the Incompatible checkbox and my scripts "Dank_AmmoLLInject, Dank_ArmorLLInject, Dank_GunLLInject2 and Dank_LeveledItemInject" should appear. "Dank_LeveledItemInject" is a universal script, you can inject anything into any leveled item forms of your choice. Add one of them (depending on what you want to inject) by double-clicking or hitting the OK button.
  • After a while a new window named "Properties for script Dank_GunLLInject2" should appear. (pic. 4 above)
  • In this window you're required to fill some entries. Select the entries on the left and hit Edit on the right. WeaponName is a string / plain text. Type it in manually or leave it empty if you don't want the player to see an in-game notification. WeaponForm and/or ListForm (whether you want to inject just a weapon and/or a whole leveled list containing weapons) require the FormID of the weapon / leveled list you want to inject. You can easily filter the results by typing in a few characters in the filter dialogue box
  • Now let's get to the optional part. PlayerLevel determines the global level at which NPCs start spawning with the weapon defined. By default it's set to 1.
  • Below you find a lot of lists. Select the lists you want the weapon to be injected into and click on Auto-Fill. Pay attention to the documentation string at the end. For every LL there are two entries. One for the LL FormID/reference and one for the custom level. Only auto-fill the one where it says auto-fill.
  • Open the leveled lists you're using and pay attention to flags set in there. Most of them have the "Calculate from all levels <= PC's level" flag set while a few don't. If it isn't set only a single entry which matches the player's level is used upon generating an NPC's inventory. If the flag is set every entry equal to the player's level and below will have a chance to appear. This is relevant if you want some variety in loot generation/spawns.
  • As mentioned previously there are two entries per LL. The second is to set a custom PlayerLevel which overrides the global level you set at the top of the list for that specific LL. If you want the weapon to appear in every LL at the same level there's no reason to fill these entries. Not setting a value or having it set to 0 ignores the custom level. The global value will be used instead.
  • Once you're done filling all the entries with your desired values hit OK and also close the quest window with the OK button.
  • Save your changes to the active plugin or create a new one.

The following steps become obsolete if you're using F4 Creation Kit Fixes because that mod enables saving of ESP plugins as masters in other plugins.
If you don't use the aforementioned mod and you've created a new plugin which references a weapon contained in an ESP file you now you have to continue working in FO4Edit because the CK can't save ESPs as masters in a plugin.

  • Open FO4Edit and select both the original plugin you want as master and your newly created one.
  • Once fully loaded right click on your new plugin, select "Add master..." and add the original plugin.
  • Open your plugin, go to the quest created and in the "VMAD - Virtual Machine Adapter" section you'll find all the values you previously selected.
  • The second last entry should be WeaponForm. Right below where it says "FormID" insert the FormID for the weapon again.
  • Save/close FO4Edit and you're done.

Mods using my script



Legendary Effect Injector Script

The files included are the tools I use for my other mod Crafting Framework and Equipment and Crafting Overhaul (ECO) to provide users an option to inject these mods' custom legendary effects into the game's legendary loot pool. Once injected they'll spawn naturally according to the rules you set up within the script properties on legendary enemies.

Keep in mind that arrays can only hold 128 entries. The same is true for the array used in the LegendaryItemQuest where your new rules get injected into. The base game already has ~60 rules/entries, Far Harbour adds ~15 and Nuka World unnecessarily  ~30. So, you're left with roughly 20 spots for your own legendary effect rules.
When It comes to Nuka World I wrote "unnecessarily". That's because the entries it adds are just for dummy legendary effects, all they do is to change item descriptions. Both Crafting Framework and ECO disable those entries for that reason which results in 30 more spots for actual legendary effects available.


INNR Injector Script

Inject your custom INNR rules into another ruleset (e.g. the game's base/global INNR forms) and prevent conflicts when multiple mods try to make changes to the same INNR form. For this to work you have to make sure that the rules' structure in your custom INNR form matches the one in use in the original/target form. Be especially careful when injecting into the vanilla INNR because there are several mods out there that change the overall structure and the order of groups. And when the injected INNR doesn't come with the same structure the user will end up with broken INNR that can't be fixed without reverting to a previous save.

In order to use this script, you need a bit of experience with both the Creation Kit and xEdit (FO4Edit). You could do everything within the Creation Kit but modifying INNR records is way faster and more efficient with xEdit IMO.


Form List Injector Script

This script is also part of my recently released mod Loot Detector Expansion. You could use that mod as reference if you want to try the script.

The special feature of this script is that you won't have to add the plugins, that contain the forms you want to inject, as master dependencies to your plugin. Instead, you just specify the plugin name and parts of the form's FormID in the script properties. The script then checks if the specified plugin is present in a given load order and when that case applies retrieves the form from the partial FormID you provided.


------------------------------------
<<< CHECK OUT MY OTHER MODS >>>
------------------------------------
<<< SUPPORT ME IN CREATING MODS >>>
------------------------------------