I was working on some new features for my Sneak Tools mod, and had to add some new properties to a an existing script, so for them to update and be able to test my features I had to deactivate my own mod to make a clean save, and then reactivate.
So I proceeded to deactivate my mod's .esp file, load my last saved game, get the warning that the saved game depends on content which no longer exists, click yes because I'm sure I want to load anyway... and then the first strange thing happens. A few messageboxes pop up of the NEW things I had just modded and placed there to see if it was working. On one hand it was nice to see that my new feature worked... but it was bad that it did even though I had just DEACTIVATED my mod!
I looked in my spellbook and I still had my mod's spell to teleport to my mod's shop, and I looked in my inventory and I also still had my mod's Rope Arrows in my inventory. I was pretty sure those should all have been removed by deactivating the mod.... either way I went ahead and cast the spell, and I even managed to teleport to the correct location, the entire cell was there and fully functional, even though I had never been there yet on that character before and the .esp file which defines that entire cell was deactivated.
Lastly I entered the console and clicked a random object in the cell so I could see the ID of that reference, and the first 2 numbers were '' 35 '', which tells me that the .esp that placed that object must be loaded by the file in place 35 in my load order.
So, I exited the game, fired up Nexus Mod Manager, scrolled down the list to see which file had Load Order number 35... and that is when I was completely amazed. The very last file in the load order had Load Order number 34. So I don't have a single file loaded which is supposed to show 35.
This is the first time I'm truly completely puzzled with skyrim modding and what's going on... does anyone have any ideas on what might be happening and how to fix it? I've tried activating and deactivating multiple times and I keep getting the same issue.
EDIT: FIXED
I've also got a few optional .esp files in my mod, and they are somewhat dependent on the main .esp. Generally a missing master should mean CTD when you launch the game (assuming that didn't change since oblivion), but here it's not a true master file.. I just esmified the main .esp to make the optional dependent files, and after that espified back (esmifying and espifying using wrye bash)... and apparantly that results in the dependency automatically loading.
Deactivating the optional .esp file as well resulted in everything disappearing from the game as expected.