Script Fix Kit for Spellbook Injector Mod
Updated: Aug 11, 2021
The Spellbook Injector mod by r3m, needed to enable most custom Spells for the Sims 4 Realm of Magic pack, has been raising exceptions on Macs for some time, and is reported to cause problems with Tomes and Market Stalls on all platforms. Unfortunately, the author apparently hasn't been heard from in over 2 years.
Since I like to use custom spells, and I know a lot of other people do too, I decompiled the script with the spellbook injector mod, fixed some of the problems and recompiled it. The fix appears to work, and has been tested by my patrons for the last couple of weeks. I've been using it myself for about 6 months.
Details of the Fix
The error in the original script arose from some code that was intended to log directly to a file whether spells were successfully loaded by the mod. This code did not work correctly on Macs, leading to errors that caused spell loading to fail.
So I removed that and replaced it with code that used the built in Sims 4 logging service. To view the logs now, install Scumbumbo's Sim Log Enabler and follow the instructions. There's no need to install that if you aren't developing your own mods, though.
The second change was to disable Tome injection into the Market Stall purchase lists in the Magic Realm, due to reports of issues on all platforms that seemed to be related to it.
I've included the fixed source inside the .ts4script archive, so if you wish to examine or tinker with it yourself, just unzip it and the source is all there.
Instructions
THIS IS NOT A STANDALONE MOD.
To use, download and install the original r3m spellbook injector from Mod The Sims here:
Then remove this script file from the mod:
r3m_spellbook_injector.ts4script
And replace it with the one in the download attached to this post named:
r3m_spellbook_injector-sl-fix.ts4script
Continue to use the r3m_spellbook_injector.package file that came with the original mod.
You should end up installing exactly these two files for the spellbook injector to use this fix:
r3m_spellbook_injector.package
r3m_spellbook_injector-sl-fix.ts4script
(Plus, as many Spell mods as you wish. It should be compatible with all of the spells that worked with the old script.)
For usage instructions for the Spellbook Injector, refer to the Spellbook Injector MTS page.
Installation instructions for this fix are included in the download (but are also shown above).
I've included a couple of download links for the same file, in case some of them are problematic for certain browsers or regions.
DOWNLOAD
OR
Comments