This simple script will help you to flag quest mods as esm to avoid the temporary references cap. What it does is: flag the plugin as ESM and then flags each NPC that is referenced by a quest as persistent, so that the quest is not bugged.
Permissions and credits
Credits and distribution permission
Other user's assetsAll the assets in this file belong to the author, or are from free-to-use modder's resources
Upload permissionYou can upload this file to other sites but you must credit me as the creator of the file
Modification permissionYou are allowed to modify my files and release bug fixes or improve on the features without permission from or credit to me
Conversion permissionYou can convert this file to work with other games as long as you credit me as the creator of the file
Asset use permissionYou are allowed to use the assets in this file without permission or crediting me
Asset use permission in mods/files that are being soldYou are not allowed to use assets from this file in any mods/files that are being sold, for money, on Steam Workshop or other platforms
Asset use permission in mods/files that earn donation pointsYou are allowed to earn Donation Points for your mods if they use my assets
Author notes
This author has not provided any additional notes regarding file permissions
File credits
The great developers who made xEdit possible!
Donation Points system
This mod is not opted-in to receive Donation Points
Changelogs
Version 0.2
Fixed a bug where plugins outside of the selected one were edited. Sorry if this caused somebody troubles.
Version 0.1
First edition of the script, very basic but it seems to do the job fine.
Thank you to zilav for his suggestions on how to go about creating this script.
Install: Just put the .pas file in your xEdit scripts folder. Usage: Right-click on the plugin you want to be converted and select Apply Script and from the dropdown menu select "ESMifyer.pas".