Jump to content

'Special' Abilities vs Regular Spellcasting


Domi

Recommended Posts

Gibberlings and al.

 

Remeber those special abilities in BG1 your PC got after dreams? The question is - is there any fesible way to check that PC had casted one of these spells in her special abilities without confusing it with say regular healing or horror or what have you from the spellbook?

 

Thank you :)

Link to comment

from spell.ids:

3101 INNATE_CURE_LIGHT_WOUNDS

3102 INNATE_SLOW_POISON

3103 INNATE_DRAW_UPON_HOLY_MIGHT

3104 INNATE_LARLOCHS_MINOR_DRAIN

3105 INNATE_HORROR

3106 INNATE_VAMPIRIC_TOUCH

 

So, if you want to check the CLW, SpellCast(Player1,INNATE_CURE_LIGHT_WOUNDS), etc.

 

PS: is it OK if I'm not a gibberling? ^^

Link to comment
Btw, anyone tried if SpellCastRES works???

 

Tried, not in TRIGGER.IDS, gives an error when compiled.

 

Referencing by 4-digit code make it compile, buyt I need to test to see if it does the job :)

 

Thank you for your help, guys.

Link to comment
Btw, anyone tried if SpellCastRES works???

 

Tried, not in TRIGGER.IDS, gives an error when compiled.

 

Referencing by 4-digit code make it compile, buyt I need to test to see if it does the job :)

 

Thank you for your help, guys.

:) Sure, girl, you have to add the proper line to trigger.ids first :)

Link to comment

It did not work...

 

I patched the TRIGGER.IDS with the SpellCastRES, and the iDS is updated, but it still does not recognize it as a valid trigger. :)

 

Script patched in TP2 (thanks, Cam!)

 

APPEND ~TRIGGER.IDS~ ~0x00A1 SpellCastOnMeRES(S:Spell*,O:Caster*)~
            UNLESS ~0x00A1 SpellCastOnMeRES(S:Spell\*,O:Caster\*)~
APPEND ~TRIGGER.IDS~ ~0x0091 SpellCastRES(S:Spell*,O:Object*)~
            UNLESS ~0x0091 SpellCastRES(S:Spell\*,O:Object\*)~
APPEND ~TRIGGER.IDS~ ~0x00A6 SpellCastPriestRES(S:Spell*,O:Object*)~
            UNLESS ~0x00A6 SpellCastPriestRES(S:Spell\*,O:Object\*)~
APPEND ~TRIGGER.IDS~ ~0x00A7 SpellCastInnateRES(S:Spell*,O:Object*)~
            UNLESS ~0x00A7 SpellCastInnateRES(S:Spell\*,O:Object\*)~
APPEND ~TRIGGER.IDS~ ~0x4031 HaveSpellRES(S:Spell*)~
            UNLESS ~0x4031 HaveSpellRES(S:Spell\*)~
APPEND ~TRIGGER.IDS~ ~0x40D5 ActuallyInCombat()~
            UNLESS ~0x40D5 ActuallyInCombat()~

 

And in Override Script BAF:

 

 

//PC cast one of her innate spells

IF
InParty(Myself)
!Global("X#XARomanceInactive","GLOBAL",1)
OR(2)
Global("X#XARomanceActive","GLOBAL",1)
Global("X#XARomanceActive","GLOBAL",2)
Global("X#XAFloatTalk1","GLOBAL",0)
Global("KnowBhaal","GLOBAL",0)
OR(6)
SpellCastRES("SPIN101",Player1)
SpellCastRES("SPIN102",Player1)
SpellCastRES("SPIN103",Player1)
SpellCastRES("SPIN104",Player1)
SpellCastRES("SPIN105",Player1)
SpellCastRES("SPIN106",Player1)
THEN
RESPONSE #100
PlaySong(0)
PlaySound("xarom")
RealSetGlobalTimer("X#XALovelyTalkTime","GLOBAL",1)
IncrementGlobal("X#XAFloatTalk1","GLOBAL",1)
StartDialogueNoSet(Player1)
END

Link to comment

I beg for forgiveness Matron Domi, but I made some research and came to this conclusion.

It is possible to have a trigger of a specific spell cast by any object (including player1).

 

I've added this line to triggers.ids:

 

0x0091 SpellCastObjectRES(O:Object*,S:ResRef*)

 

And these lines to baldur.bcs:

IF

SpellCastObjectRES(Player1,"DLWI114")

THEN

RESPONSE #100

DisplayString(Player1,3) // ~Open Container~

END

 

When my player1 cast a shield (dltc has those different names, but it SHOULD work with regular spell names as well), the game displayed the appropriate string.

 

I hope my meager contribution furthers the cause of Lolth.

 

Your humble slave,

Avenger

 

PS: your Highness was correct with the WeiDU patch, except that the two parameters were swapped.

Link to comment

If you don't mislead me, male, slaves, weapons, a new torture rack - it all will be yours... :)

 

Thank you, I will try 0x0091 SpellCastObjectRES(O:Object*,S:ResRef*) and see if it works. Shoo, mindflayers, shooo!

 

PS Hope that the fact you are trying it in DL means that it has its head above water again :)

Link to comment

Archived

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

×
×
  • Create New...