Necessary Tools:


Disclaimer

Most importantly, consider this guide to be for advanced users.
Furthermore, this process is only meant to give a baseline that will then need to be edited further in xEdit and tested in-game,
it is not meant to give you a finished drop-in-and-go patch.
Also, this is not a 100% complete walkthrough, you'll most likely need to adapt any or all of the steps to work in your situation.
This is just a general guide that will hopefully give you good head start towards a patch.
This process was created with SSE, not SLE, although I see no reason to doubt its usability with SLE, and the Bethesda Toolkit can be used with either.
Windows 10 was used, and as such, there may be mention of Windows 10-specific functionality, such as specific keys. This guide assumes that if you are not using Windows 10, you know of an equivalent function in your OS of choice.
This guide also assumes basic knowledge of xEdit and the confidence needed to get your hands dirty.
Again, this is for advanced users, please don't attempt any of this if you've really never delved into xEdit usage.
I am not responsible if/when your game breaks, or for any other unfortunate unforeseen consequence that may occur from any mishandled step in this process.
Lastly, any and all patches included with this guide are provided as-is. They should technically function as intended, but I cannot make any promises to such claims. 
Use these patches and this guide at your own risk.


Reasoning

I decided to use Bethesda Toolkit as opposed to xEdit because, as far as I'm aware, there is no current in-built functionality to do what I required in xEdit. I could have made an xEdit script, but due to past experience, I'm quite adverse to doing that, and am not yet interested in learning zEdit to make a patch using its framework.
There is also time that was considered, a patch would have taken considerably longer to develop than the method employed which utlized the Bethesda Toolkit. After all, in my opinion, text is far easier to work with than ESP's record format, at least for my purposes in this situation.
Also of note is that I mention using a non-ESL-flagged ESP file for your baseline conversion/editing. I don't know how the Bethesda Toolkit handles ESPFE plugins, but I wasn't interested in finding out, and there wasn't any known benefit to starting with that anyway.


General Overview

Using the Bethesda Toolkit, a given magic-oriented mod will be converted to an XML file, which will then have appropriate conditions applied to negate team magic damage for any given spell in the mod, resulting in a baseline patch that can then be refined to make a proper patch.


Steps Overview

  • Copy Object Effect (ENCH) and Spell (SPEL) records to a new non-ESL-flagged ESP file
  • Convert to XML
  • Mass-add conditions
  • Edit condition ID to match load order of NFF
  • Convert to ESP
  • Verify no errors
  • Adjust ID as needed, repeat #5
  • Prune records that don't do damage to followers
  • Check ESL flag in header
  • Make any further patches from the created patch, based on patches for original mod
  • Check ESL flag in header for any additional patches made


Step 1

For this example, we'll be considering Forgotten Magic Redone
Load up xEdit, and only load ForgottenMagic_Redone.esp, no other patches, such as for Ordinator, as well as the main nwsFollowerFramework.esp plugin.
Expand ForgottenMagic_Redone.esp, Ctrl-select Object Effect and Spell, right-click and select "deep-copy as override into" then select, at the bottom, a new ESP, non-ESL-flagged, file. Name it appropriatly, such as "NFF_NTMD_FGR".
Right-click on the main file and select "add masters", and in the list that shows up, make sure nwsFollowerFramework is selected.
Right-click again and select "sort masters".
Save the new file and exit xEdit.



Step 2

Extract the Bethesda Toolkit archive to a new folder, and copy the newly created ESP into that folder.
Open a command prompt and navigate to this folder, for example enter "CD c:\Toolkit" into the command prompt. 
Enter the following command: bethkit convert NFF_NTMD_FGR.esp NFF_NTMD_FGR.esx
Your ESP file should now be converted to an ESX (XML) file.


Step 3

Assuming that you have installed Visual Studio Code, open the newly created ESX file, and hit CTRL+F, toggle replace mode by selecting > to the left of the text field. Toggle regular expressions with Alt+R.
Visual Studio Code is needed because Notepad++ has a character limit in its replace function, and will not insert all of the necessary conditions in one step.
If you know of and use another tool that can do such a task with XML files, feel free to use that.
Open up "conditions.txt" in your text editor of choice (included in the download), IE Notepad++.
This file has been edited so that all needed conditions are in a single line of text, and that near-proper formatting is preserved in the XML file (specifically tabs/spacing. It's not perfect, but still provides adequete visual difference for parsing through manually if needed.)
Copy this line of text and paste in the second text field in Visual Studio Code.
Copy "      </EFIT>" and paste in the first text field, including the spaces if you would like near-proper formatting for the replacement text.
Select replace all, or hit CTRL+Alt+Enter.
Now all conditions needed should be appended to each ENCH and SPEL record in the XML file.
Save and exit.


Step 4

Open NFF_NTMD_FGR.esx in your preferred text editor. Ensure your text editor has a replace feature.
Hit CTRL+F and enter "0x04016eb3".
We'll most likely need to adjust "0x04" to match the proper load order, to ensure the reference to the needed conditions is preserved.
The best way I've found to do this is to load up only NFF_NTMD_FMR.esp and its masters in xEdit, check what the form ID is for nwsFollowerFramework.esp, and subtract 2. This is not foolproof, when I was making several patches, in some instances, it needed one subtracted , and sometimes, nothing at all needed changing. You'll just need to mess around with multiple IDs until no more errors occur and the conditions are properly referenced.
For Notepad++, enter the new, adjusted ID (for example, 0x02016eb3) and then select "replace all".


Step 5

Back in the command prompt, enter "bethkit convert NFF_NTMD_FGR.esx NFF_NTMD_FGR.esp" and then copy that ESP into either your data folder, or if you're using Mod Organizer, the overwrite folder. I don't know how other mod managers work in this regard, but I'll assume you know how to handle unmanaged ESP files in your mod manager of choice.

Step 6

Load up your newly converted ESP file in xEdit, once loaded, right-click and then select "check for errors".
If no errors show up, you can safely move on to step 8. Otherwise, proceed to step 7, and repeat from step 5.


Step  7

Generally, I would say start with the ID presented in xEdit, once you've tested once, try subtracting 2, then if needed, subtract 1 from the original. For instance, the original is 04, then try 02, and then 03 if 02 did not work, and so on.
Use the replace all feature to replace the entire ID (0x04016eb3, not just 04) in all instances. Proceed to step 5 and repeat as needed.


Step 8

I won't proclaim to know every record that needs to be removed from the converted ESP, however from what I do know, I would generally recommend removing any Object Effect/Spell that heals/restores/buffs attributes, resistances, as well as any that increase armor or summon creatures. When in doubt as to what a spell does, refer to the mod page and proceed accordingly.
Ideally you only want to have Object Effects/Spells left that negatively affect an NPC.
Otherwise there may be unintended consequences.
Whenever you find a record that needs to be pruned, right-click and select "remove" and then confirm.


Step 9

When you're done pruning, go to the header of the converted ESP, double-click the empty space to the right of "Record Flags" and make sure "ESL" is selected.
You can skip this if you have room to spare in your load order, but I highly recommend checking that flag. As this is a patch, it's the ideal situation for an ESPFE, and no records are edited which would cause problems with the ESL flag (as an example, I've heard, but cannot confirm, that CELL records should be avoided in ESPFE plugins. These records should not be in your plugin created with this guide, so you shouldn't have anything to worry about.)

Step 10

Go through your converted and pruned ESP, looking for any records that are contained in a patch, in the case of Forgotten Magic Redone, there is a patch for it and Ordinator.
Once you find these records, right-click in the new ESP and then "Deep copy as override into", select ESL-flagged ESP and then name it appropriately, such as "NFF_NTMD_FMR_ORD".
Carry over any necessary changes in the Ordinator patch to this new plugin, ensuring to save often just in case of an unexpected closure of xEdit.


Step 11

Ensure that this new patch is an ESL-flagged ESP, again this is the ideal situation for an ESPFE, and there's no need for it to take up space in your load order.


Conclusion

Hopefully you now have a basic understanding for creating a patch that will remove magic damage from any given magic-oriented mod.
Not all magic-oriented mods will need a patch, for instance I found that Witchhunter spells did not add any spells which would negatively affect followers. Best to check in xEdit any mod that you're thinking of patching. Also check the main page for Nether's Follower Framework as the mod author may have added more patches for other mods.
To my knowledge, as of 8-29-2020, they have a patch for the base game, Apocalypse, and Elemental Destruction.
With this download of which this guide is included, I also have provided patches for:


Please note that as of writing, 8-29-2020, these patches are largely untested and should not be treated as ready-to-go without you personally checking the changes in xEdit and ensuring they make the changes you want to experience in-game.
I should also mention that I am not interested in making a patch for you. What patches I have made, were only made because they affect the mods I'm currently using. It is your responsibility to use this knowledge in your own mod list to make your own patches at your discretion.
Finally, while I did my best to make this guide as clear as possible, it could be the case that some steps are unintentionally vague or incomplete. If this is the case, my apologies, however I trust that you're a smart individual and can fill in the blanks with what is provided.
I hope this guide has been of some benefit!

-MatthiosArcanus

Article information

Added on

Edited on

Written by

MatthiosArcanus

1 comment

  1. klydeking
    klydeking
    • premium
    • 8 kudos
    Thanks for taking the time to put together such a comprehensive guide and sharing it with the rest of us.
  翻译: