Jump to content

Question on injected leveled lists vs manual lists


grands4everyone

Recommended Posts

I've tried using the search function on the forum and google, but couldn't find any topics on this on my question so my apologies if this comes up frequently.

 

So lets say I have Mod A, Mod B, and Mod C.

 

Lets say Mod B and C both add weapons to the raiders leveled lists for weapons and they have a conflict. I create a patch for that conflict.

 

Now, Mod A, injects a weapon into the same leveled list via quest or script (is there a difference? is one better than the other?).

 

Does Mod A inject the weapon(s) into the merged list I made or is it injecting it into the vanilla list? If it goes to vanilla list, how does it not cause a conflict?

 

I guess my question is, can a mod that adds item to leveled lists via quest or script cause conflicts with other mods that add items to the same leveled lists manually? I know the whole notion of adding items this way is to prevent conflicts, but i'm curious as to how it works.

Link to comment
Share on other sites

Mod A's leveled list entries should never conflict with B and C. The forms in your merged patch gets appended to the leveled lists which the game reads from. Injected entries are appended at the end of the lists.


It's been so long since I looked into manual leveled lists, but I can tell you it's inferior in every way to the injected approach.


Injected scripts work by adding things to a formlist when the game (and the mod) is run for the first time. The nature of injecting, at least in the form of weapons and keyword entries, is always an additive operation. It doesn't edit existing entries because the function it calls (AddForm) doesn't allow it. If a form already exists in the formlist which the script is trying to add, it is simply skipped.



Another way to put it, is that the game reads leveled items from predefined lists. Manually entered entries need to edit these lists in order to include custom weapons and armor, otherwise the game won't read and use it. You can't manually add new entries to a list without getting a conflict down the line, because even a blank entry in a formlist has an internal address. And if another mod uses the same blank entry, it will conflict with whatever has already taken that spot. That's why merged patches are a thing - they move one of the conflicting entries to a new blank entry. An injected entry, however, is dynamically appended at the end of the formlist, at the first available entry.



Quest vs scripts is like the difference between knife and a fork. You sort of need them both for utility work like injectors. The quest engine is an internal task scheduler, which can trigger something like a script. Inject scripts usually only need to run once (when the mod is loaded for the first time) so using quests to trigger the script once ensures that it will run without any user interaction. When you save the game, the injected formids get baked into the save. If you disable the mod, the game will eventually do garbage collection and nullify those entries, or they will get removed when a revert command is called.

Link to comment
Share on other sites

Thank you so much for the explanation. I think I better understand how this mechanism is able function without causing conflicts. I don't make mods, but I use FO4Edit to patch conflicts and was worried that perhaps I needed to do something additional since everyone switched to this injection method in order to ensure that my merged conflict patch didn't conflict with mods that add items via quest or script.

 

I've never noticed an issue in my many hours of game-play, but with over 500 mods running I sometimes forget which items I have installed and think I may not necessarily notice if a particular item was spawning or not.

 

Thanks again for the info and have a great day!

Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...