Jump to content

Find familiar - how does it work?


StrixO

Recommended Posts

Hello - I've made a few kits, easy enough. Now I'd like to try and write a mod that tweaks the familiars. I've been looking at SPWI123.SPL for some time, but I can't figure out how it works. Help!

 

Where does the game check <CHARNAME>'s alignment and choose the appropriate familiar? And where/how does it point to FAMCAT.CRE, or FAMIMP.CRE, etc?

 

For new summons, I can make new CRE files using NI. But I'm confused on altering the CRE description, SPWI description - will I need to create a few lines in the tp2 which the installer will append somewhere in the DIALOG.TLK file?

 

Thanks for any help!

 

EDIT: And I should mention, I couldn't find any 2DA files that mapped out the familiar/alignment associations. Is this somehow handled by a script?

 

EDIT2: I found SPELL.IDS, and Find Familiar is listed with code 2123. Can someone help me to understand what the IDS files are/do?

Link to comment

Well, I worked out how to get around the hardcoded-ness using opcode 214 (Select Spell) and a change alignment effect.

 

But I have a scripting question now:

 

I'd like to add an innate ability to each familiar to teleport to the PC's backpack. The innate I give them is "Set Global Variable" to 1, 2, 3,...16 (to distinguish CRE files from each other - there are 16 different familiars), string = FamiTele. Here's the script that I need help with:

 

I tried it out in game with just FAMFER.CRE having the innate and setting the Global Var for FamiTele to 1. When I hit the ferret's innate, the PC did recieve FAMFER.ITM, the Global Var for FamiTele was set to 0, but FAMFER.CRE wasn't removed from the game. Here's the script I used. Any ideas? It seems like the DestroySelf() isn't targeting anything.

 

IF
   Global("FamiTele","GLOBAL",1)
THEN
   RESPONSE #100
       GiveItemCreate("FAMFER",Player1,0,0,0)
       DestroySelf()
       SetGlobal("FamiTele","GLOBAL",0)
END

 

And for different familiars, I'll have code like : IF global var = 2, then createitem = fampsd, etc.

 

FYI: http://www.gibberlings3.net/iesdp/scriptin...actions.htm#111

 

EDIT: Well, I ended up using the innate to assign the AI script directly, eliminating the need for any global vars, and the AI script eliminated the problems with DestroySelf(). The familiar vanishes, and the familiar "item" appears in the inventory. Now I'll just add some visual effects. So, problem solved. Thanks for looking anyway.

Link to comment

Archived

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

×
×
  • Create New...