Spellbook_Injector_V2.1.zip 20.3 KB
Spellbook_Injector_Documentation_r3m.zip 854.1 KB
September 3, 2021

Spellbook Injector V2 (Public Release)

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

Chinese Translation by ABonnie

Comments (49)

J
JA Simmer · August 27, 2026

Here in Spanish - https://www.patreon.com/JASimmer1/posts/traduccion-al-de-167822692?utm_medium=clipboard_copy&utm_source=copyLink&utm_campaign=postshare_creator&utm_content=join_link

S
Simsonian Library · August 31, 2026

Thank you so much for all of the translations! I'll be incorporating them all into the next versions of things, and will credit you as the translator. Thanks again!

a
allesimher · August 10, 2026

Does anyone know if this mod is still good? I need it for other mods, but I have noticed that I've getting BE python source code error & after reading through this description, I'm worried it may be from this ?

S
Simsonian Library · August 10, 2026

It's fine as far as I know. I'm using it right now as I type this with a couple of dozen custom spells, and don't get any exceptions, errors or other issues logged by Better Exceptions, MCC or Tuning Error Notifier. A specific spell might trigger an error if it's not configured correctly. Can you paste the error you see in the last exception file? Not sure what else it could be.

L
Litano · June 1, 2026

Hi, thank you so much for this tool! I recently made a spell with it but apparently made an error in the tuning that's caused me some grief. The spell can be learned as intended and shows up in the spellbook with its icon and tooltip but does *not* show up as an interaction in the spell menu when I click on a target. Based on this behavior, do you have any suggestions for places where the error might be? I know it's impossible to give a specific answer without the full tunings, but I just wondered if there were any usual errors that you see first-timers make or any possibilities that I could eliminate just based on the parts that are working for me. Thanks!

L
Litano · June 1, 2026

Nothing showed up with better exceptions or scrumbo's tuning error notifier, and I assume it's some obvious thing like an ID that's off by one digit or badly formatted XML that excludes necessary stuff but is still fine syntax-wise.

e
enigmatwink · May 18, 2026

Hey Simsonian Library. Modded spells aren't appearing in the spellbook, or as options to select in the pie menu. Also noticed that it says I'm ranked out and cannot learn any new spells. All help appreciated, really enjoying the mod. Cheers

S
Simsonian Library · May 18, 2026

Hello, I'm not sure I've seen that happen yet (or gotten any reports about it). It is working for me as of last night, in any case. It sounds a little like the script isn't loading to inject the spells. It might be possible for a custom spell to break the injection process and stop it from loading (maybe?). Make sure you have the latest version labeled V2.1 from this page, as there was a breaking change last year. Also, could you make sure that the script is no more than one folder deep in the Mods folder (eg, Mods/Spellbook_Injector_V2/r3m_spellbook_injector_V2.ts4script) since if it is in a deeper subfolder the game won't load it (applies to scripts only). In case a custom spell is breaking the script when it loads it, check to see if there is a lastException.txt file next to your Mods folder after you start your game. If so, it would be helpful to see any stack traces from that. Thanks for the feedback, and let me know if it does/doesn't fix it.

M
Matthew Jacob simons · May 16, 2026

Hello! will this mod be compatible with the May 12th 2026 update? This mod is so cool and I'd love to be able to add it to my game <3

S
Simsonian Library · May 16, 2026

Yes, it works with the May 12th patch. Just tested it.

I
It'sFancy · May 2, 2026

this mod is giving errors

V
Virginia Dowdney · April 29, 2026

Is this mod still being updated?

S
Simsonian Library · April 29, 2026

Yes, I have a couple of other mods that use it. As far as I know, version 2.1 above has been working fine as of a two days ago.

m
manon · March 27, 2026

hi I use better exceptions and it keeps saying this tho it works well ingame 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 (x86)\Steam\steamapps\common\The Sims 4\Data\Simulation\Gameplay\core.zip\sims4\tuning\tunable.pyc) (ImportError: cannot import name 'HasTunableReference' from 'sims4.tuning.tunable' (C:\Program Files (x86)\Steam\steamapps\common\The Sims 4\Data\Simulation\Gameplay\core.zip\sims4\tuning\tunable.pyc))

S
Simsonian Library · March 28, 2026

Could you check that you are using the latest version (attached to this page above as V2.1) and also that you don't have any older copies in your mods folder? That particular bug was fixed in version 2.1 in July 2025. Thanks for the feedback! Let me know if the problem persists with the new version above.

G
Giorgia · March 18, 2026

Hi, is this mod compatible with the March 18th patch?

S
Simsonian Library · March 18, 2026

Yes, just tested it.

L
Lord Igniz The KnightWolfTiger · March 1, 2026

S. Sonian. Can I "Shares U 1 AdViceMeNT: Sooner Or Later: U´ll Gonna Find´s Out, Than That Subject/Modder: "Zero": It´s A Merelly Fleshy Man Pale, Empty Of Soul, & DespictABLe... So DuaLiZeD In His Inner Broken Psyque. So: Don´t/NVR Trust In AnyThing Than Comes Out From H.I.M. (Take Care: "WiZaRD Br").

v
valentina1988 · February 6, 2026

I understand I am asking a very very lot may be but On An Occult Ley Line (Lot Trait) - was from this author - if you have time and opportunity it would be good idea to update it cause and Zafireria dissapeared suddenly too(

S
Simsspeler 175 · February 5, 2026

Hello, is this mod still working with the 3rd februari patch?

S
Simsonian Library · February 5, 2026

I just checked, and yes, the custom spells still show up in the spellbook, and no errors reported from it. let me know if you notice any problems.

K
Kenny · January 5, 2026

hi i got an issue, when i try to play it send me in world selection, no matter how many time i try to choose a sims to play with it set me back in world selection, its everytime with a mod using spellbook injector, idk why tho

S
Simsonian Library · January 8, 2026

Hello, sorry it took me a few days to answer. Make sure you are using the version 2.1 linked to this page. Otherwise -- not sure yet. When it does that, it should create a file name 'lastException.txt' next to your Mods folder that will contain the error that happened. If you can either copy and paste the contents of it here, or send the file to simsonianlibrary@gmail.com, I can probably figure out what's going on in your case. It's also theoretically possible for a spell that this mod loads to cause a problem (never had it happen, but in theory it could). If you could let me know which spell mods you also have loaded, that might help, though I'm not aware of any that are problematic right now.

S
Skylark · December 27, 2025

Hi, Merry Christmas, I hope you had wonderful holidays. Just want to mention that I have the same situation as Jeff Ellis (below post). I only use Upgradios from LittleMsSam but it stopped showing in my spellbook.

S
Simsonian Library · December 28, 2025

Hi Skylark, As I posted below, I spent some time trying to replicate this, but it stubbornly kept working for me. I tested it in my normal save, with a few dozen custom spells, and that worked -- they all showed up. I tested it in a new save with no other mods but the injector and Upgradios, and that showed up and worked as expected. So, I'm not sure what's going on with your installation. I'll copy the rest from my other response, since it includes some things to check: It sounds like the script isn't loading. I don't think there's been a patch since Dec 2nd, and my game that I'm testing with should be up to date. Make sure that: - You're using the latest version of Spellbook Injector attached to this page (currently 2.1) - You have script mods enabled in preferences (it gets shut off during some patches) - The Spellbook Injector mod folder is directly inside your Mods folder, and not within another folder first (eg, not more than 1 level deep). That's about all I can think of. If the lastException.txt file next to your Mods folder get recreated when you run the game (eg, something is throwing an exception), the contents of it might reveal the problem. You could post them here or send them to simsonianlibrary@gmail.com. Thanks for the feedback! If I can replicate the problem, I'll post a fix.

J
Jeff Ellis · December 27, 2025

For some reason, this has stopped working correctly for me. It still injects the potions in the spellbook, but most of the spells are not being added anymore. The spells from WickedCC are still being added. For a few days it was still adding the practical magic spells from LittleMsSam but now those have stopped showing up as well. Does this conflict with any other injectors? Everything was working fine until about a week ago.

S
Simsonian Library · December 28, 2025

Hello, I spent some time trying to replicate this, but it stubbornly kept working for me. I tested it in my normal save, with a few dozen custom spells, and that worked -- they all showed up. So then I created a brand new save, a new spellcaster, and only used the spellbook injector mod, LittleMsSam's Upgradios, and my Classic RPG Spells mod, and they all showed up. The new spellcaster was also able to learn the spells and cast them. So, I'm not sure what's going on with your installation. It sounds like the script isn't loading. I don't think there's been a patch since Dec 2nd, and my game that I'm testing with should be up to date. Make sure that: - You're using the latest version of Spellbook Injector attached to this page (currently 2.1) - You have script mods enabled in preferences (it gets shut off during some patches) - The Spellbook Injector mod folder is directly inside your Mods folder, and not within another folder first (eg, not more than 1 level deep). That's about all I can think of. If the lastException.txt file next to your Mods folder get recreated when you run the game (eg, something is throwing an exception), the contents of it might reveal the problem. You could post them here or send them to simsonianlibrary@gmail.com. Thanks for the feedback! If I can replicate the problem, I'll post a fix.

C
Cactus Plumbob · December 18, 2025

Hi! Is this compatible with the most recent update? Thanks!

S
Simsonian Library · December 21, 2025

Yes! It's working for me and not turning any errors up in Better Exceptions.

M
Madame De Muffin · December 6, 2025

Thanks for your mod! Here is my translation into Russian - https://boosty.to/madamedemuffin/posts/617b9667-8425-4af2-8efb-00279eade130

S
Simsonian Library · December 8, 2025

Thanks! I'm running a little behind right now, but I'll get this posted to this page!

R
RoshySims · December 3, 2025

https://www.patreon.com/posts/143651307?collection=1836777

R
RoshySims · December 3, 2025

My Spanish translation for the Simsonian Library mod, which you can find on my Patreon. https://www.patreon.com/RoshySims

K
Kelza B · October 28, 2025

is this the up to date version

S
Simsonian Library · October 28, 2025

Yes, the version 2.1 above, released on July 1, is the newest version. If you've noticed any problems with it, let me know.

S
Social 4Cha · September 29, 2025

Hi, I too have been getting critical error since a few days and I have the lastest version of your mod.

S
Simsonian Library · September 29, 2025

Do you have any other information about this at all? Maybe the lastException.txt file? I am not experiencing the error here, so I'm going to need somebody to give me a few more details about the error in order to fix it.

S
Simsspeler 175 · September 3, 2025

Is 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.

S
Simsonian Library · September 3, 2025

it seems to be working for me! It needed an update after the July 1 patch, but seemed fine after the Aug 19 patch.

A
Armins Gize · August 14, 2025

It 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

S
Simsonian Library · August 16, 2025

The 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.

P
PLZSAYSIKE · July 14, 2025

does this work for custom potions? i've tried asking around and havent been able to find any answers

S
Simsonian Library · July 14, 2025

The 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').

m
meitho2 · July 12, 2025

Hi. 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))

S
Simsonian Library · July 12, 2025

Could 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.

z
zee · June 10, 2025

Hii, 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

S
Simsonian Library · June 10, 2025

Hmm, 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.

U
UyTheo · January 19, 2025

Thank you for updating this! Is this the most recent one/working for current patch?

S
Simsonian Library · January 19, 2025

Yes, 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.