Jump to content

Leveled List Injection for existing mods


Savela

Recommended Posts

Hi,

I downloaded a bunch of mods that add new Armors and Clothing into the game. But most of them don't add them to the leveled lists. So i want to make a "addon" that deals that for me.

 

I found a tool that helps with that but it's designed to modify the source mod directly. Can anyone tell me what i have to do to to make a little leveled list injector for those mods?

Link to comment
Share on other sites

If the mod in question is .esp, flag it as .esl in FO4Edit (just temporarly), then open it in the Creation Kit (CK). Saving the mod in the CK won't allow you to directly save into the mod's plugin because flagging an .esp as .esl makes the CK treat it as a Master file and normally, those can't be edited in the CK. Instead, a window will be opened asking for a file name. That would be the file name of your Leveled List injector mod patch.

Edited by LarannKiar
Link to comment
Share on other sites

If the mod in question is .esp, flag it as .esl in FO4Edit (just temporarly), then open it in the Creation Kit (CK). Saving the mod in the CK won't allow you to directly save into the mod's plugin because flagging an .esp as .esl makes the CK treat it as a Master file and normally, those can't be edited in the CK. Instead, a window will be opened asking for a file name. That would be the file name of your Leveled List injector mod patch.

Thank you for the awnser!

Do i understand this correctly that i don't set a active plugin for this? Because if i do, the CK will just save to the .esp that i flagged as a .esl

Link to comment
Share on other sites

Unfortunately there is no "get all forms from master <with or without specifier>" function or functionality in papyrus, unless one exists in some obscure F4SE extension which would be cool to find. So you will need to get some data output from, probably, xEdit first, and then with the help of SUP_F4SE (which is an F4SE extension) you could read that data from file into form arrays.

Maybe this could be a starting point (I have not tested it beyond confirming that the forms are valid and loaded) :

https://gist.github.com/NidusUmbra/6f116d59ebe20ae35fd86323b8dfa451

Link to comment
Share on other sites

Unfortunately there is no "get all forms from master <with or without specifier>" function or functionality in papyrus, unless one exists in some obscure F4SE extension which would be cool to find. So you will need to get some data output from, probably, xEdit first, and then with the help of SUP_F4SE (which is an F4SE extension) you could read that data from file into form arrays.

 

Maybe this could be a starting point (I have not tested it beyond confirming that the forms are valid and loaded) :

 

https://gist.github.com/NidusUmbra/6f116d59ebe20ae35fd86323b8dfa451

Thank you for your awnser. Hower I do not understand what most of what you just wrote means lol

Link to comment
Share on other sites

 

Unfortunately there is no "get all forms from master <with or without specifier>" function or functionality in papyrus, unless one exists in some obscure F4SE extension which would be cool to find. So you will need to get some data output from, probably, xEdit first, and then with the help of SUP_F4SE (which is an F4SE extension) you could read that data from file into form arrays.

 

Maybe this could be a starting point (I have not tested it beyond confirming that the forms are valid and loaded) :

 

https://gist.github.com/NidusUmbra/6f116d59ebe20ae35fd86323b8dfa451

Thank you for your awnser. Hower I do not understand what most of what you just wrote means lol

 

 

Then you cannot make a little leveled list injector. Yet.

Link to comment
Share on other sites

You could use GetFormFromFile in order to read the weapon from another mod instead of using a property.

It'd be even better iterating from an array of structs containing the aiFromId and the asFilename from a property, that'd let you fill many weapons from various mods in just one script.

Also this script uses a property for each leveled list, using a formlist to store the leveled lists, and iterating it, would save some code.

Link to comment
Share on other sites

 

If the mod in question is .esp, flag it as .esl in FO4Edit (just temporarly), then open it in the Creation Kit (CK). Saving the mod in the CK won't allow you to directly save into the mod's plugin because flagging an .esp as .esl makes the CK treat it as a Master file and normally, those can't be edited in the CK. Instead, a window will be opened asking for a file name. That would be the file name of your Leveled List injector mod patch.

Thank you for the awnser!

Do i understand this correctly that i don't set a active plugin for this? Because if i do, the CK will just save to the .esp that i flagged as a .esl

 

Sorry, I meant .esm not .esl.

 

Flag the mods that you don't want to directly edit as .esm. Then, open the Creation Kit (but don't load any plugins yet), press save to create your leveled list injector (LLI) patch plugin. As you don't have an 'Active Plugin', a pop up window will ask you to type the file name. By typing the file name, the Creation Kit will create an .esp file with that name. Once you have the file of your LLI patch, load the .esm flagged mods (and make sure your LLI patch is the 'Active Plugin') that you'd like the LLI patch to have access to (so that you can use the weapons from them in the LLI patch).

 

Don't forget to remove the .esm flag from the patched mods (preferably, make a backup of these mods then restore them once you're done with the LLI patch).

Edited by LarannKiar
Link to comment
Share on other sites

 

 

If the mod in question is .esp, flag it as .esl in FO4Edit (just temporarly), then open it in the Creation Kit (CK). Saving the mod in the CK won't allow you to directly save into the mod's plugin because flagging an .esp as .esl makes the CK treat it as a Master file and normally, those can't be edited in the CK. Instead, a window will be opened asking for a file name. That would be the file name of your Leveled List injector mod patch.

Thank you for the awnser!

Do i understand this correctly that i don't set a active plugin for this? Because if i do, the CK will just save to the .esp that i flagged as a .esl

 

Sorry, I meant .esm not .esl.

 

Flag the mods that you don't want to directly edit as .esm. Then, open the Creation Kit (but don't load any plugins yet), press save to create your leveled list injector (LLI) patch plugin. As you don't have an 'Active Plugin', a pop up window will ask you to type the file name. By typing the file name, the Creation Kit will create an .esp file with that name. Once you have the file of your LLI patch, load the .esm flagged mods (and make sure your LLI patch is the 'Active Plugin') that you'd like the LLI patch to have access to (so that you can use the weapons from them in the LLI patch).

 

Don't forget to remove the .esm flag from the patched mods (preferably, make a backup of these mods then restore them once you're done with the LLI patch).

 

I tried again with this approach and it still didn't work. Thank you so much regardless!

 

But i did actually manage it with the suggestion from DieFeM!!!

(although i am still do not understand how arrays and structs and whatnot work in papyrus, i just used the GetFormFromFile function)

 

 

 

If anyone reading this wants to make a leveled List Injector for another mod, here is what I did:

 

1. Create a new .esp how you would usually

2. Make a new Quest and give it a nice name

3. Go to scripts click "add" and select [new script]

 

4. Put in this code:

LeveledItem property [list1] auto
LeveledItem property [list2] auto

Event OnInit()
   Armor itemName = Game.GetFormFromFile([formID], "[modFileName.esp]") as Armor
   if(itemName)
      [list1].AddForm(itemName, [level], [amount])
      [list2].AddForm(itemName, [level], [amount])
   endif
EndEvent

Everything inside [ ] has to be filled it:

  • list1 and list2 are names for lists you want to fill. You can just have one or how many you want. The names dont have to exactly match the list names
  • FormID is the id from the item you want. You can find that using FO4Edit. But you have to put an 0x in front of it. It should look somewhat like 0x0000105A
  • modfile.esp is the filename of the mod where you are taking the item from
  • level is the level that the player has to have before these get added to the list
  • amount is how often you want to add that item to that list

5. save your code and close the scripting window

6. go to properties of your script in the quest window

7. add the LeveledItems to your script properties accordingly

 

I hope this is not bad advice, as i don't really know a thing about papyrus scripting. But it worked for me and maybe it will help someone else

Link to comment
Share on other sites

  • Recently Browsing   0 members

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