[Request] Detectable Spells
Cuv
Member, Developer Posts: 2,535
Alright, I will be honest and say that I have not read everything here yet, so this request may be covered in the G3 Fixpack somethere. But if not, I will elaborate.
Detectable Spells is a terribly useful feature for all modders where combat scripting is concerned. It allows enemies and allies, alike, to recognize and defend/respond to spells and tactics which give the appearance of much smarter AI.
Detectable Spells was developed at IEEAIS by Kenasai Ryu and Vulgar Zildrah as a special request by David Gaider for our work on Ascension... and then later further enhanced by Cirerrek with some tweaks and bugfixes for missing flags and modifiers.
Certain combat related spells have modifiers added that can be detected via a modified STATS.ids through scripting. These modifiers do nothing by themselves, but rather allow combat scripts to make use of them. Most combat mods already require a version of Detectable Spells to be installed prior to installation of the mod. Ascension for example. If the spells simply ship with these additions, then there should be need to include them in your mod. And having a mod install them over-top into the override should also cause no conflicts. It is my belief that this would be a worthy addition to BGEE.
Others may know the current state of DS better as I have been out-of-the-loop for a few years. So feel free to comment and discuss. Hope I formatted this request correctly.
Example:
Current Behavior - Your mage is protected against normal missiles. High level foe shoots ranged arrows at you anyway even though they should recognize your protection.
Desired Behavior- Your mage is protected against normal missiles. High level foe discovers first shot cannot hit you, so switches tactics; loads magical arrows, switches to melee, casts a spell or uses a wand.
Detectable Spells is a terribly useful feature for all modders where combat scripting is concerned. It allows enemies and allies, alike, to recognize and defend/respond to spells and tactics which give the appearance of much smarter AI.
Detectable Spells was developed at IEEAIS by Kenasai Ryu and Vulgar Zildrah as a special request by David Gaider for our work on Ascension... and then later further enhanced by Cirerrek with some tweaks and bugfixes for missing flags and modifiers.
Certain combat related spells have modifiers added that can be detected via a modified STATS.ids through scripting. These modifiers do nothing by themselves, but rather allow combat scripts to make use of them. Most combat mods already require a version of Detectable Spells to be installed prior to installation of the mod. Ascension for example. If the spells simply ship with these additions, then there should be need to include them in your mod. And having a mod install them over-top into the override should also cause no conflicts. It is my belief that this would be a worthy addition to BGEE.
Others may know the current state of DS better as I have been out-of-the-loop for a few years. So feel free to comment and discuss. Hope I formatted this request correctly.
Example:
Current Behavior - Your mage is protected against normal missiles. High level foe shoots ranged arrows at you anyway even though they should recognize your protection.
Desired Behavior- Your mage is protected against normal missiles. High level foe discovers first shot cannot hit you, so switches tactics; loads magical arrows, switches to melee, casts a spell or uses a wand.
19
Comments
Advanced Option: Checkboxes for Enemy AI Enhancements
Those are actual AI scripts. While they may indeed include DS or aspects of it, the Enhancements is a mod rather than a modding asset. Detectable Spells does not change gameplay or difficulty by itself, scripts must be added to utilize the features... and that is a players choice whether to add those game changing mods.
Thanks for looking though, dont want there to be request duplication.
I would like to clarify that what @Cuv has asked is not an actual AI improvement the effects of which would be seen immediately in BG:EE. That would be, I think, out of the dev's reach due to their contractual obligations anyway. Cuv is merely asking that the feature "Detectable spells", which requires specific scripts to be written in order to be used, is included in vanilla BG:EE so that modders can take advantage of it when scripting their mods.
I fully support this request as a ton of mods can benefit from it and get better with less hack and coding if it is implemented.
I would also like to point out that if the developers have time, they can certainly add modifiers to more of the spells in the game. The ones included in DS were only what was needed at that time. Does anyone know if there has been any further work on Detectable Spells beyond v1.2.1? I could not find any in my searches. @Ascension64 or @aVenger might know if they have seen this thread. As would @Miloch if he were around here.
Miloch is not a member of this forum, and the last time I exchanged PMs with him (a couple weeks ago) he was quite busy with RL. @Ascension64 is a member but he's also quite busy with RL, so your best bet to reach him is to PM him over the SHS forums and direct his attention this thread. It worked when I did it ;-) @aVENGER is quite active here (but I had to mention him 'cause I'm unsure whether the name drop feature on this forum is case sensitive).
Other modders who might be interested in your proposal and have an account here are @devSin, @CamDawg, @GrimSqueaker and @Demivrgvs.
I don't think there have been any official updates since then, but I seem to recall that @Ardanis was working on expanding it and had some suggestions in this regard for @Ascension64 concerning TobEx.
I suppose that they can add a long list of "open" stats that would allow mods to use the current functionality, or maybe a new trigger that can check if a particular object is under effects originating from a specific resource key (e.g., you could have something like AffectedBySpell("SPWI102",Player1) to see if they have any effects that claim the Armor spell as their parent resource) since the EFF structure already stores that information.
Somebody more familiar with the needs of detecting specific effects and spells would probably have better feedback to give, though.
@AndreaColombo Yeah, that would work too. But as @Ascension64 pointed out, there are tons of older mods that still rely on the old DS. Not that they could'nt be updated... but who would do that for all of them???? The ones that don't will still have all that junk in your override to get lost with everything else, heh.
Either way.... perhaps a developer can settle this. I would be happy with a whole new set of scripting states that we could work with for combat/behavior.
Besides detecting spells, DS also can be accustomed to detect other effects - like the enchantment level of equipped weapons.
AffectedBySpell() trigger won't suffice for mods - it will not work with complex 146th opcode shell spells, nor will it understand if a spell has been changed. @Miloch is working on updating Ascension, and afaik it is mostly done. I advise to contact him first.
Also keep in mind, that SCS2 offers it's own AI for Ascension creatures, and it is much more... modern, shall we say, at least compatibility wise.
Basically, you've been left far behind the train The thread is here http://www.shsforums.net/topic/53579-detectable-spells/ I have updated several parts of DavidW's version, mainly to retain compatibility with spell-altering mods (Spell Revisions in particular). Currently this version is used in beta updates for Ascension and Big Picture, and we'll add it into future releases of IR and SR. I suggest you also update RR and aTweaks to it.
I did found another compatibility issue barely a week ago, though - ToBEx is vulnerable to SCS'/RR's version of DS, which irreversibly destroys any existing 200+ stat labels in STATS.IDS. It makes dynamic addition of new stats impossible, forcing either to use hardcoded values (where clashes are possible) or a new IDS file. I'm working on the latter.
So in short, I agree this should be implemented if it hasn't. It's worth mentioning that it did exist even in BG1 (for example you have 64 MINORGLOBE etc. in stats.ids, clearly designed to be detectable), was expanded in BG2, much more so in Gaider's Ascension, so the next logical step would be to implement it fully or at least enable it so that it can be so implemented.
As you say Black pits can benefit from this and thats good enough for me.