Spellbook Injector V2 (Public Release)
Added 2021-09-03 17:00:11 +0000 UTC
This is the 'for real, complete and official' release of the Spellbook Injector fix I posted here last month. It's the same script as before, but includes the .package file, rather than having you download the old version yourself. Also a new Readme, explaining that I've adopted this the mod as a maintainer for the time being.
If you've been using the fix, this is the same fix, so no pressing need to update. Future updates, if required, will be released here in this form.
If you're unfamiliar with the mod here's what it does:
Mod Overview
The Spellbook Injector is a utility mod that loads custom spells into the game. These spells won't override any EAxian tuning, which ensures that creations from different modders will be compatible!
If you're a modder interested in making new spells for Spellcasters, then this is for you! The Spellbook Injector will take care of all the scripting required to inject a new spell, so you don't have to worry about maintaining a Python script. Instead you can focus on the tuning of you spell. For more details and documentation about developing your own spells, see r3m's original posting.
Features
Below is a list of what the Spellbook Injector (V2) actually does:
injects spells developed by modders to the spellbook
allows injected spells to be learned randomly through one of the following interactions:
-- "Ask to Teach Spell"
-- "Duel for Knowledge"
-- "Practice Magic"
makes custom magic tomes findable through the "Search for Tomes" interaction
unlocks custom spells for newly generated Sages
allows injection of potential outcomes that result from the Curse of Scrambled Spells
allows injection of interactions that are exclusive to spellcasters
Installation & Testing
If you had previously installed the original version of the Spellbook Injector, remove it before installing this version.
Spellbook_Injector_V2.zip is the main download meant for users. It contains 3 files which must go (no deeper than one 1 folder) inside your "Mods" folder. You don't need to include the Readme.txt, but it shouldn't hurt anything.
Version 2 Notes
This fix is compatible with all spells that were written for V1 of the Spellbook Injector, as the changes I made to fix it were fairly minor. There is one bit of functionality that has been disabled for the time being: making custom magic tomes purchasable from Caster's Alley in the Magic Realm. Many users reported issues with being able to buy anything a the RoM market stalls while V1 of this mod was installed, so I disabled that for now.
TO ENSURE CONTINUE SUPPORT OF THIS MOD I have included the current Python source code within the .ts4script archive. If I vanish too, hopefully other modder can pick it back up and continue supporting it. This mod lets us do some cool things, and we should try to keep it around.
Custom Spells
If you're looking for more custom spells to try, in addition to the ones I've posted on this site, here are some others to check out:
Release Log
2.0.0, 9/3/2021, Adoption by Simsonian Library, fix errors due to logging issues
2.1.0, 7/1/2025, Patch fix for Enchanted by Nature
Comments
it seems to be working for me! It needed an update after the July 1 patch, but seemed fine after the Aug 19 patch.
Simsonian Library
2025-09-03 12:30:25 +0000 UTCIs this mod still working with the 19 august 2025 patch? I heard that patch broke a lot of mods, including xml injectors. I really want to keep this mod when I update my game.
Simsspeler 175
2025-09-03 08:59:54 +0000 UTCThe Tomes that come with custom spells don't get automatically added to libraries (yet...I have been looking for a way...). You can find them in Build Buy if you use the 'bb.showhiddenobjects` cheat. They should also be findable in the bookshelves in the Magic Realm (search for tomes), but that's pretty hit and miss. I use the Classic RPG Spells mod along with this, and I can verify that it works. I still need to manually set up libraries with Tomes, but usually learn most of the spells through practicing or from Sages.
Simsonian Library
2025-08-16 03:40:46 +0000 UTCIt doesn't work for me i downloaded everything and also I cant find the book that I can turn others into vampires the book isn't in the library
Armins Gize
2025-08-14 17:16:56 +0000 UTCThe original author, r3m, started to add support for custom potions but never completed it. I've looked it over, and it's possible, but it's a bit more work than spells. There are more places to inject the new potion and loot. I plan to open source this mod, since it's sort of a community project, and then maybe someone will helpfully submit a pull request with the implementation. :) I just need to get some time to reorganize my gitlab projects to set up an open source group in gitlab. I include the python source code in all of my mods that use scripts, so if anyone wants to take a look at it, all of the code (both compiled and uncompiled) is within the .ts4script zip archive (you can open it with 'unzip').
Simsonian Library
2025-07-14 13:29:57 +0000 UTCdoes this work for custom potions? i've tried asking around and havent been able to find any answers
plzsaysike
2025-07-14 10:26:58 +0000 UTCCould you double check that you've updated the spellbook injector to the latest version (2.1) above that I released last week? That error mentioning 'HasTunableReference' is the one that the latest patch caused, and the latest 2.1 injector update fixes.
Simsonian Library
2025-07-12 14:44:33 +0000 UTCHi. I've got an BE by the BetterExceptions Mod (TMEX) about this injector. I know that it doesn't mean this mod is broken or unusable per se but I thought it might be good to know for you if it's an error you should look into it. I don't know much about modding/coding and such things but I hope this is informative for you. :) The listed script mod failed to load and should be removed or updated. Failure: 'spellbook_injector/__init__' (spellbook_injector) cannot import name 'HasTunableReference' from 'sims4.tuning.tunable' (C:\Program Files\EA Games\The Sims 4\Data\Simulation\Gameplay\core.zip\sims4\tuning\tunable.pyc) (ImportError: cannot import name 'HasTunableReference' from 'sims4.tuning.tunable' (C:\Program Files\EA Games\The Sims 4\Data\Simulation\Gameplay\core.zip\sims4\tuning\tunable.pyc))
meitho2
2025-07-12 05:38:16 +0000 UTCHmm, it's not likely to have anything to do with this mod, since the tomes and all of the tuning for them are done by each spell author (or are built into the game). That's also not a function commonly overridden for a tome, so even custom tomes are probably using the stock 'put away' tuning code. That being said, I looked over the codepath that the game uses to put a book away, and I bet that the picker_interaction you mentioned is probably this one? "autonomous_ObjectPicker_PutAway_Books" it's used by the game to find a bookcase to put the books in. It's also the same interaction for both regular books and tomes. Totally wild guess, but I think it's possible that it could happen if it chose a bookcase to put a book in based on it having the 'BuyCatSS_Bookshelf' tag, but didn't have the required 'Put_Away_Books' interaction, I guess I could see this sort of error? If you have more details, in particular a python stack trace (like from MC Command's exception page, or the Better Exceptions 'more details' view), I could probably pinpoint this a little further. Are you using a custom bookcase? Does it happen in rooms even where you have a stock bookcase instead? That's about my only guess without a stack trace. Thanks for the feedback! If you can get a stack trace, I might be able to diagnose further.
Simsonian Library
2025-06-10 01:48:23 +0000 UTCHii, I have been having a problem for a while now where whenever a Sim needs to "put away" a magic tome they've been reading, it causes an animation error and resets the sim - leaving the tome on the floor. The exception I receive says there's a problem with "picker_interaction", with reason "", when I searched online for this problem, it suggested your fix would resolve an issue similar, but I've realised that I've had your file in my mods folder for a long time already. Sorry if this is out of your scope - but would you know why this is happening, and if I can fix it somehow? Thank youuu
zee
2025-06-10 00:54:09 +0000 UTCYes, this version is working. :) If you ever run into errors, let me know and I'll fix it. I use this mod myself all the time, but sometimes others catch things first.
Simsonian Library
2025-01-19 14:54:33 +0000 UTCThank you for updating this! Is this the most recent one/working for current patch?
UyTheo
2025-01-19 08:43:33 +0000 UTC