![]() |
The Black Wyrm's Lair Terms of Use |
![]() ![]() ![]() ![]() |
![]() |
![]()
Post
#1
|
|
Forum Member Posts: 105 Joined: 25-August 06 ![]() |
I'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. It would be helpful to know:
(i) some foolproof way of detecting if Spellpack is installed; (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). If this turns out to be viable, I'll extend it to SCSII in the fullness of time. |
|
|
![]() |
![]()
Post
#2
|
|
Forum Member Posts: 105 Joined: 25-August 06 ![]() |
Okay, this is starting to look pretty complicated. How well does the vanilla-game AI handle it, incidentally?
I 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? |
|
|
![]()
Post
#3
|
|
![]() ![]() Mod Developer Posts: 1158 Joined: 22-July 04 From: Sweden ![]() |
Okay, this is starting to look pretty complicated. How well does the vanilla-game AI handle it, incidentally? I have rarely seen them cast it (I have the impression that Creeping Doom is more common), so I thought I could get away with it. Admittedly, the vanilla does a poor job in handling the Plague on the rare occasions it casts it. I 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? Neither 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. Colour Spray has the same graphics and area of effect as it did in BG1. Though 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. You could handle area of effect spells pretty nicely if you use shouts and LastSeenBy(LastHeardBy(Myself)). I have done some test runs, and I will give you some results: The AI runs away at a sluggish pace, but it works really well. I added this to some script that employs Flamestrike. CODE 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) END I added this to WTASIGHT.bcs CODE IF 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) END -Galactygon This post has been edited by Galactygon: Aug 18 2008, 04:51 PM -------------------- |
|
|
![]()
Post
#4
|
|
Forum Member Posts: 105 Joined: 25-August 06 ![]() |
Neither 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). QUOTE Though 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. |
|
|
![]() ![]() |
![]() |
Lo-Fi Version | Time is now: 7th October 2025 - 12:45 AM |