nysisyn Posted January 30, 2022 Share Posted January 30, 2022 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 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 Quote Link to comment
Jarno Mikkola Posted January 30, 2022 Share Posted January 30, 2022 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. Quote Link to comment
subtledoctor Posted January 30, 2022 Share Posted January 30, 2022 1 hour ago, Jarno Mikkola said: Yes, you need to copy the spell, No, you don't. 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. Quote Link to comment
Jarno Mikkola Posted January 30, 2022 Share Posted January 30, 2022 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~ .... Quote Link to comment
nysisyn Posted January 31, 2022 Author Share Posted January 31, 2022 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 : 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 Quote Link to comment
Recommended Posts
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.