Jump to content

Adding new spell to druid or cleric


nysisyn

Recommended Posts

Hello,

I'm used to ADD_SPELL function in order to add new arcane spell.
I tried to use it for adding a new divine spell for druid with following code :

ADD_SPELL ~%MOD_FOLDER%/spell/rayofsickness/ny#ros1.spl~ 1 1 ~RAY_OF_SICKNESS~  
        SPRINT current_spell_res "%DEST_RES%"
        SAY NAME1 @31  
        SAY NAME2 @31
        SAY UNIDENTIFIED_DESC @32
        SAY DESC @32
        WRITE_ASCII 0x3a ~ny#ros1C~ //Change spell book icon
        LPF ALTER_SPELL_HEADER STR_VAR icon = ~ny#ros1b~ END  //Change Icon & projectile

It seem to be working as the spell is added and get an SPPR ID (1

image.png.41604cb626b857f80430e878a75c5981.png

But then I don't see the spell in the druid or priest spell book.

I know the first number after spell file on ADD_SPELL represent the spell type (1 for divine, 2 for wizard). But I suppose I should do something more if I want to add the spell to druid or cleric spell list.
Could someone enlight me?

I checked several existing mod that add divine spell (Like SR) and they seem to just add their spell the way I do. I don't get what make the spell available for druid or cleric.

Thanks

 

 

Link to comment

Yes, you need to copy the spell, and make that spell useable by the new class. Part of this process is to assign the spells spell type aka the .spl's primary headers offset 0x001c to be 2. And possibly remove the possible exclusion flags in offset 0x001e.

Also it might be easier to edit those in Near Infinity... as you have a custom spell file there already.

Link to comment
30 minutes ago, subtledoctor said:

No, you don't.

Erghm, so according to you, we cannot:

COPY ~%MOD_FOLDER%/spell/rayofsickness/oldspell.spl~ ~%MOD_FOLDER%/spell/rayofsickness/ny#ros1.spl~
    WRITE_SHORT  0x001c 2

ADD_SPELL ~%MOD_FOLDER%/spell/rayofsickness/ny#ros1.spl~ 1 1 ~RAY_OF_SICKNESS~  
....

 

Link to comment

Thanks both of you for your answers.

20 hours ago, Jarno Mikkola said:

And possibly remove the possible exclusion flags in offset 0x001e.

So if for example the spell has an exclusion flag with value :

image.png.faf5b7450d455bedf48e3dc9f5bbe68b.png

Then only druid will access to the spell? Didn't know that. Thanks a lot.

19 hours ago, subtledoctor said:

You need to level up in game (or create a new character) in order for a spell to show up in the spellbook. It might be working and you just don't see it.

it's now working with new character. Thanks

 

Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...