The wiki page for http://www.creationkit.com/index.php?title=LeveledItem_Script states that
while the wiki page for http://www.creationkit.com/index.php?title=LeveledActor_Script does not mention this.
Testing confirms that any script-based changes to LeveledActors will be reset when booting Skyrim (but not after a save&load without reboot), in contrast to LeveledItem.
In my DDC2 mod, this creates lots of room for error since hundreds of entries need to be added every time the game boots. On some PCs this can take several minutes and on others it seems to hang indefinitely. This greatly increases the chance of bugs.
But I know that Skyrim Immersive Creatures also allows LeveledActors to be adjusted through the MCM script, and as far as I've seen this mod is stable. Unfortunately SIC does not include source code.
Does anyone know how to achieve stable LeveledActor edits via script? And/or does anyone know where I can find source code of a mod that does this?