Jump to content

Adding memorized spells


Salk

Recommended Posts

Hello!

I want my creature to memorize a custom spell (via script). How do I do it? I have already made sure that the spell is known by editing the .cre file itself.

 

If you have any advice about what I should also be considering when doing something of the sort please feel free to share! :)

 

Thanks!

Link to comment

Mike1072,

 

I don't need to patch the .cre file because it's a custom .cre file I am working on. I just need the spell to be available at a certain stage (level of the creature) and not before. In short... I need to make it "active". I need to do that in the .cre's script, I think...

Link to comment

You have to modify the .cre file. If it's a custom creature, that means you could alter it with an editor like NearInfinity or you could patch it in at install-time with WeiDU's convenient ADD_MEMORIZED_SPELL command.

 

Via script, you can learn a spell or cast a spell you haven't memorized, but you can't memorize a spell.

Link to comment

Okay, that is a bit of a different problem.

 

Innates get memorized automatically when you rest. I would avoid having the spell known in the .cre file if you don't want it to be available until later.

 

Instead, at the appropriate level, you can add the spell via script with the AddSpecialAbility action. Performing this action may even memorize the innate immediately (but don't quote me on that).

Link to comment

I think you can use the Give ability (effect number 171) opcode on a .spl and apply that .spl from a script. If you do this I recommend using multiple extended headers with different values on their casting levels (according to the levels you want the special abilities to be given) and apply the .spl by making the creature-you-want-the-abilities-for cast it over itself (or however you want that… if you want your Familiar to get the abilities when your PC reaches level X, make your Player1 cast it over the Familiar). Anyway Mike's last suggestion seems better than mine. ;)

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...