critto Posted April 25, 2016 Share Posted April 25, 2016 Yes, it's me again, re-discovering things that the community has probably known for years. Until today, I wasn't aware of any weirdness that can be caused by SpellCastInnate(). In Watcher's Keep, in AR3020's script (the Demogorgon's room), there's a code block that triggers when Odren's scroll is cast: IF Global("TalkedTozGorDemo","GLOBAL",1) SpellCastInnate([ANYONE],ODREN_RITUAL_SCROLL) // SPIN593.SPL (No such index) Global("OdrenRitualDone","GLOBAL",0) THEN ... I have introduced an enemy in there that casts an innate spell on death condition (IF DIE() ...) via ReallyForceSpellDeadRES. It is not the same innate as the Odren's scroll but it happens to have the same spell level. It does not, however, have a SPIN5XX.SPL name neither does it have an entry in SPELL.IDS. Whenever the creature dies and ReallyForceSpellDeadRES is run, the Odren's block fires in the area script and gives XP to the party. So far I have found three solutions: 1) remove the ReallyForceSpellDeadRES action which doesn't work for me at all 2) monkey-patch the AR3020.BAF script so that SpellCastInnate targets Players 1 thru 6 via OR(6) rather than [ANYONE] 3) patch my innate spell to have Spell Level 1. What is the most appropriate solution and what the hell is happening? I have carefully read all the old threads that discuss issues related to SpellCastInnate and none of them mention anything similar. Quite on the contrary, people seemed to have more issues with the trigger not running properly when it's supposed to. Cheers, critto Link to comment
Fiann of the Silver Hand Posted April 26, 2016 Share Posted April 26, 2016 I thought there was a problem with the [anyone] ids. I've been in the habit of not using it, so I can't point you to any relevant threads on it. Link to comment
CamDawg Posted April 27, 2016 Share Posted April 27, 2016 It's possible, but really, SpellCastInnate is just horribly flaky. Is there any reason you can't just make the spell arcane or divine? If there's no reason to mess with the stupid innate actions and triggers, I'd avoid it altogether. Link to comment
critto Posted April 27, 2016 Author Share Posted April 27, 2016 No, no particular reason. The SpellCastInnate() action in that area is vanilla and I was looking for an appropriate, less invasive patch. And, mostly, just curious about what's happening. But I guess you're right, it's better to avoid innates altogether. Link to comment
CamDawg Posted April 27, 2016 Share Posted April 27, 2016 devSin and some of the other Fixpack members did a bunch of research into all of this; this thread is probably the best rundown of which innate triggers/actions work and under what conditions. Generally, SpellCastInnate only works when the spell's level matches its file name. SpellCastInnateRES will return true for any innate spell cast, regardless of which one you're trying to check in the trigger. What you reported in the OP is a new twist and does, I think, jibe with the current understanding. Instead of SpellCastInnate returning true for a specific innate, it looks like it will instead return true for any spell of that level with an appropriate matching file name. Link to comment
critto Posted April 27, 2016 Author Share Posted April 27, 2016 Yes, I have read this thread when I was studying the issue. Curious how new things tend to pop up even after 20 years. This issue probably needs a couple more tests just to be sure that our conclusions are correct. Link to comment
Bill Bisco Posted April 28, 2016 Share Posted April 28, 2016 Does that mean the solution in this thread: http://gibberlings3.net/forums/index.php?showtopic=28010 is not good? Should kit innates really be wizard or priest spells? Does the game handle casting special abilities as wizard or priest spells differently than innates other than not causing this bug in Watcher's Keep? Link to comment
subtledoctor Posted April 28, 2016 Share Posted April 28, 2016 Should kit innates really be wizard or priest spells? Does the game handle casting special abilities as wizard or priest spells differently than innates other than not causing this bug in Watcher's Keep? That's a different issue. The issue for this thread is only about scripting spells to be cast. Kit abilities are generally only used by the player, and not included in scripts, so you need not worry about this. Link to comment
Bill Bisco Posted April 28, 2016 Share Posted April 28, 2016 I plan on writing AI Scripts for my modded character to use which will use these Innate abilities. That would trigger the OP's bug yes? Link to comment
critto Posted April 28, 2016 Author Share Posted April 28, 2016 If you plan to use SpellCastInnate() then yes, probably. Since there's no way for you to use a wizard/priest spell type (from what I gathered about your mod), you'd need to find another workaround to detect those spells. It should be doable, I think, I even saw some suggestions around on the forums two days ago when I did a search on SpellCastInnate. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.