QuoteQUOTE(DavidW @ Aug 17 2008, 05:24 PM)
Regarding Call Lightning, I'm quite surprised those blocks work - have you tested them? (The game handles offscreen targetting pretty suboptimally).
Yes, they work. You cannot really do elaborate checks unless you summon an invisible .cre offscreen that sets your LastSeenBy() for you and starts shouting.
But in cases like this, a brute check does the intended job very well.
Quote from: DavidW on August 19, 2008, 11:06:02 PM- use Alicorn LanceThis is a new spell, and the file you would be looking for is SPPR216.spl.
Quote from: DavidW on August 19, 2008, 11:06:02 PM- use Thorn Spray
Quote from: Galactygon on August 18, 2008, 04:51:08 PMI sympathise, but it really is very fiddly to script for in a reliable way. You have to check that your own allies are out of range too, somehow prevent them casually wandering into range, and even then you're sunk if the enemy moves up towards you (which usually doesn't happen when the party casts, as their area-effect spells are usually cast at a point, not an enemy).That is true. In the case of Flamestrike, you will not have to worry about the target pursuing fleeing enemies, since the area of effect of a flamestrike is so small, that it will not catch the creature in front of a moving target (this has been tested). The real problem occours with larger area effect spells such as Fireball and Horrid Wilting.
Quote from: Galactygon on August 18, 2008, 04:51:08 PMI'll hazard a guess that the caster was either a lich, a rakshasa, or had minor globe running, and that any other enemies in the area were summons or otherwise expendable.Yes, it was a Lich with other undead (IIRC mummies and ghouls) present.
Quote from: Galactygon on August 18, 2008, 04:51:08 PMNeither of them are party-friendly which can cause potential problems. I have a personal preference against party-friendly spells, and unless the people start rioting I do not want to make everything party-friendly.I sympathise, but it really is very fiddly to script for in a reliable way. You have to check that your own allies are out of range too, somehow prevent them casually wandering into range, and even then you're sunk if the enemy moves up towards you (which usually doesn't happen when the party casts, as their area-effect spells are usually cast at a point, not an enemy).
QuoteThough even in vanilla + SCSII, I have seen the AI employ a triple skull-trap sequencer. So non-friendly area of effects aren't completely new.I'll hazard a guess that the caster was either a lich, a rakshasa, or had minor globe running, and that any other enemies in the area were summons or otherwise expendable.
Quote from: DavidW on August 18, 2008, 08:39:45 AMOkay, this is starting to look pretty complicated. How well does the vanilla-game AI handle it, incidentally?
Quote from: DavidW on August 18, 2008, 08:39:45 AMI take it the area of effect of Flame Strike isn't party-friendly. So probably that makes it hard for AI to use without the risk of incinerating one's allies. Is Color Spray area-of-effect or single-target?
IF
HaveSpell(CLERIC_FLAME_STRIKE)
See(Nearestenemyof(Myself))
!Range(Lastseenby(Myself),10)
!Attackedby(Lastseenby(Myself),MELEE)
... // more elaborate checks if needed
THEN
RESPONSE #100
Shout(111) // This can be any shout, but I would use something more unique
Spell(Lastseenby(Myself),CLERIC_FLAME_STRIKE)
ENDIF
Heard([0],111) // This can be any shout, but I would use something more unique
Range(LastSeenBy(LastHeardBy(Myself)),10) // We don't want to run away if we are not within the area of effect
!StateCheck(LastHeardBy(Myself),STATE_DEAD) // If the caster was killed in the middle of the spell, we will not run away
!ObjectActionListEmpty(LastHeardBy(Myself)) // It works rarely, but it might account if the spell were disrupted
!StateCheck(Myself,STATE_MIRRORIMAGE)
CheckStatLT(Myself,100,RESISTMAGICFIRE)
... // more elaborate checks if needed
THEN
RESPONSE #100
SetGlobalTimer("RunAway_SPPR503","LOCALS",6) // This is very important to have the creature execute the next block repeatedly
RunAwayFromNoInterrupt(LastSeenBy(LastHeardBy(Myself)),30)
END
IF
GlobalTimerNotExpired("RunAway_SPPR503","LOCALS")
Range(LastSeenBy(LastHeardBy(Myself)),10) // We don't want to run away if we are not within the area of effect
!StateCheck(LastHeardBy(Myself),STATE_DEAD) // If the caster was killed in the middle of the spell, we will not run away
!ObjectActionListEmpty(LastHeardBy(Myself)) // It works rarely, but it might account if the spell were disrupted
... // more elaborate checks if needed
THEN
RESPONSE #100
RunAwayFromNoInterrupt(LastSeenBy(LastHeardBy(Myself)),30)
ENDQuote from: DavidW on August 17, 2008, 03:24:51 PMRegarding Call Lightning, I'm quite surprised those blocks work - have you tested them? (The game handles offscreen targetting pretty suboptimally).
Quote from: DavidW on August 17, 2008, 03:24:51 PMDoes Summon Insects still work normally?
IF
AreaType(OUTDOOR)
HaveSpell(CLERIC_CALL_LIGHTNING) // Do this for SPIN193 as well
!See(NearestEnemyOf(Myself))
Range(LastSeenBy(Myself),100)
... // more triggers if necessary
// I would not do more elaborate checks, since the druid is too far to realistically evaluate resistances
THEN
RESPONSE #100
Spell(LastSeenBy(Myself),CLERIC_CALL_LIGHTNING)
END
IF
AreaType(OUTDOOR)
HaveSpell(CLERIC_CALL_LIGHTNING) // Do this for SPIN193 as well
!See(NearestEnemyOf(Myself))
OR(3)
Heard([0.ANIMAL],ALERT)
Heard([0.0.0.DRUID_ALL],ALERT)
Heard([0.0.WYVERN],ALERT)
!See(LastSeenBy(LastHeardBy(Myself)))
OR(2)
Allegiance(Myself,EVILCUTOFF)
Allegiance(Myself,GOODBUTRED)
OR(2)
Allegiance(LastSeenBy(LastHeardBy(Myself)),PC)
Allegiance(LastSeenBy(LastHeardBy(Myself)),ALLY)
... // more triggers if necessary
// I would not do more elaborate checks, since the druid is too far to realistically evaluate resistances
THEN
RESPONSE #100
Spell(LastSeenBy(LastHeardBy(Myself)),CLERIC_CALL_LIGHTNING)
END
IF
AreaType(OUTDOOR)
HaveSpell(CLERIC_CALL_LIGHTNING) // Do this for SPIN193 as well
!AttackedBy([ANYONE])
See(NearestEnemyOf(Myself))
... // more checks if necessary
THEN
RESPONSE #100
RunAwayFrom(NearestEnemyOf(Myself),15) // The druid would keep running away until it does not see any enemies and proceeds to call lightning bolts
END
// After a whole bunch of other blocks should druids resort to csating Call Lightning in combat!Range(LastSeenBy(Myself),10)
!AttackedBy(LastSeenBy(Myself),MELEE)IF
Detect([0.0.0.41])
Range(LastSeenBy(Myself),5)
!HasItemEquiped("ANTIWEB"Myself)
HaveSpell(WIZARD_FIRE_SHIELD_RED) // Do this for fireshield blue, aura of flaming death, and flameblade as well
... // more checks if necessary
IF
AreaType(OUTDOOR)
Detect([0.0.0.41])
Range(LastSeenBy(Myself),10)
!Range(LastSeenBy(Myself),5)
!HasItemEquiped("ANTIWEB"Myself)
... // more checks if necessary
THEN
... // more actions if necessary
RunAwayFrom(LastSeenBy(Myself),15)
END
IF
HaveSpell(WIZARD_FIREBALL)
See(NearestEnemyOf(Myself))
!CheckStatGT(LastSeenBy(Myself),0,WEB)
... // more checks if necessaryQuote from: The Bigg on August 10, 2008, 10:06:55 AMIt's well-hidden, but http://www.shsforums.net/index.php?autocom...mp;showfile=506.
QuoteI wish for an "Enable Dialogue with charmed NPCs" component.It's well-hidden, but http://www.shsforums.net/index.php?autocom...mp;showfile=506.
Quote from: DavidW on August 09, 2008, 06:35:46 PMI'm in the process of revising the AI in the original Sword Coast Stratagems, and I've probably got time to make some modest allowance for the possibility of Spellpack being installed.

Quote from: DavidW on August 09, 2008, 06:35:46 PM(i) some foolproof way of detecting if Spellpack is installed;
Quote from: DavidW on August 09, 2008, 06:35:46 PM(ii) your advice on how clerics, druids and mages optimised for the old spellset ought to be rethinking their strategy and spell choices if Spellpack is installed (L1-5 spells only).Well, this list I posted is quite a number. SpellPack's Readme has a section in it that goes through each spell. It might be easier to look through them and see what is important and what is not, since you have a realistic estimate of what is feasable to implement.

Quote from: DavidW on August 09, 2008, 06:35:46 PMIf this turns out to be viable, I'll extend it to SCSII in the fullness of time.