TUTORIAL - r3m Spellbook Injector
Added 2019-10-16 07:38:51 +0000 UTCLet's make our spell do something. To do this, we need to go back to the spell tuning:

On the last line we ignored before:

Now this, is the actual spell... so let's copy the name, go into the extractor and add it to our mod to see what it does:

First thing, as usual, let's change the name, ID, Group and hex ID of this interaction:

You should be used to it by now, so I'm not going to explain it again... it looks like this one calls two more interactions we need to add to our mod:

spells_Sim_Change_Appearance and spells_Sim_Change_Appearance_SpectralReact are the ones we need.... first though, let's go back to the spell tuning and replace the pusher with ours:

Now, let's see what those other two interactions are:

Add them both, change name, group etc... change the interactions on the pusher with ours...

And now let's look at the tuning of those two new interactions we have. They're mostly the same... and there are 3 outcomes we need to change. The first one is the failure outcome:

the second one is the normal charge outcome:

and the last one is the charged outcome:

Now the first one cast the spell on the caster, the other two cast it on the target. By the way, don't forget to change the display name and the other strings of these new interactions and in the pusher as well:

So it looks like this spell adds a buff on the target sim that has a mood, a duration, and the effect of changing appearance,..

what's different between the normal spell and the charged spell is only the duration of the buff.... I had investigated it before starting this project, and the curse from JA also is based on a buff...


This buff, though, last 3 days always... I want to divide the effect between charged and not charged, so I added the buff, made the usual changes, changed the duration, and duplicated it:

So now I have two different effects too.. I could have used the buff from JA directly. The last thing I need to do is replace the ID for the buffs in the interactions I imported with the ID of my buffs:

and the strings, too.
At this point, the spell is good to go, but I also wanted to look at the tests in the spell interaction and made it so that the spell cannot be casted on a sim that already has the effect:

you need to look around a bit and see what you need to adjust to make things work like you want. We can now save the package and test it in game:

This mod will be released in its own post.
Comments
Mh... Pass me the package... I've yet to test properly how the spellbook injector too the patch though
Zero_
2020-06-07 20:19:01 +0000 UTC