Jump to content

Feature request for v31: opt out or otherwise manage application of AI

Recommended Posts

SCS takes several hours to install on my setup, and it seems that a significant amount of that time is spent performing operations that will never affect my game.


Here's an example:


Faiths & Powers adds a divine-spell sphere system to the game, and like DR before it, assigns spheres/spells to clerics via the kit's "clab" table of abilities. A lot of spells are added via AP_ to the clab table of every divine-class kit, and each such spell uses opcode 177 to add a dozen-plus more spells to your spellbook.


Now, Faiths & Powers is designed to only affect PCs. It makes extensive changes to divine spells to balance out the 23 spheres, adding IWD spells and adding new spells, and adding some wizard spells, and changing the level of some vanilla spells. This is all done in a wYbthst only changes things for the player. AI spellbook said are left untouched, and vanilla spells are left untouched, so that AI scripts can be left untouched. AI NPCs are assumed to have a particular "kit," unavailable to the player, that just so happens to provide them with sphere/spell access that matches the spellbook already in their .CRE file.


This way players can get new options and new configurations of spell access, while the fundamental nature of the challenges they face - in-game enemies - remains stable.


But, when SCS does it's "applying kit/proficiency/script features" routine, it slows to a crawl. It depends 10-12 minutes asking such features to POGHMA5.CRE, which is a low-level priest of Oghma the most players will never speak to, much less fight. And it spends that time adding spells to the .CRE's spellbook but (presumably) not changing its memorized spells or the script used to cast those memorized spells. So all of that work is for nothing, even in the rare case where a player going on a priest-killing spree.


Some optimization is in order... but I don't think SCS necessarily needs to do the heavy lifting, optimization-wise. Maybe just create a hook other mods can tie into for a blacklist of .SPL prefixes that should be ignored. Like, let me (as a player) edit something in SCS to tell it "don't process any kit effects named x, and have it recognize regexp so I can exclude anything that begins with "d5pp," "d5fp," or "d5mp."


Maybe look for a .2da file with such a list, so mods can create or append strings to the table as needed, leaving breadcrumbs for SCS to find later. Something like that. I think this could cut install times by an order of magnitude for some players who have a lot of mods that add things to clab tables.

Link to comment

SCS takes several hours to install on my setup


Faiths & Powers


so that AI scripts can be left untouched.

Then why not pivot the setup-and-design and make sure the F&P is installed after SCS ? Easy nonhours long install.

This was why the BWP installed all the kit mods originally after the SCS too.

Edited by Jarno Mikkola
Link to comment

First, because it's a mod that adds/changes spells, adds kits, and changes kits. So I feel like it should be installed with other mods that add/change spells, add kits, and change kits. Should every mod that appends things to clab tables be installed after SCS? That would completely fracture established mod install order.


Second, because there may be mods designed to be installed after FnP, but before SCS. Remember the bad old days when there was stuff like

"mod A: install before B;"

"mod B: install before C;" and

"mod C: install before A?"


What joy. And this speaks to the first point too. Consider, there is a mod now that adds quests, NPCs, items and spells... but rather than installing early, with all the other mods that add quests, NPCs, items and spells, it demands to be installed after SCS. Which means all the tweak mods that patch NPCs/items/spells would need to go after that to be fully effective... except SCS wants to be installed after most such mods. To quote a wise woman: blerg.


I don't see a good reason to risk creating more such situations.


Third, what if the mod includes some patches that are intended to be processed by SCS?


Long story short that's a ridiculously onerous suggestion, compared to adding something g like

into the SCS code before it processes the kit abilities.


Note, something like this would also solve the sometimes-incompatibility between SCS and the QDMulti multiclass kit functions.

Edited by subtledoctor
Link to comment

Third, what if the mod includes some patches that are intended to be processed by SCS?

Hmm, a separate component ? I have no idea what that is, but I hear there's some weidu function that can do that, but I can't say what it is actually, as I ... never heard of it before, have you ? :p


... make sure the F&P is installed after SCS ..

something like this would also solve the sometimes-incompatibility between SCS and the QDMulti multiclass kit functions.

Indeed it does.


Now, that was fun. Of course it doesn't diminish the validity of your request... it just explains the fact that -if you want to do it faster, you would do it yourself, instead of trying to get SCS, a mod that hasn't been updated for as long while(January 2015), to do it for you.

Edited by Jarno Mikkola
Link to comment

Something like this would also, for instance, allow the new version of Refinements' "Use Scrolls" feature to use a nicely reliable implementation, using opcode 180. It works great... but it slows SCS to a days-long crawl, because there are a lot of effects to parse... and never mind that it will not affect enemies one iota.


So the general suggestion is to have a way to tag some kit abilities as PC-only, and indicate that the SCS AI components should skip them.


Being unable to design kits or features as we prefer, for no technical reason except SCS doesn't like it, is kind of annoying.

Edited by subtledoctor
Link to comment

My suggestion to speed this up:


Let other mods create a simple .2da table, or if it already exists then append to it, with entries designed as filename regexp values. So I could exempt single files:

...or I could exempt a series of files with a certain prefix:

...or even

All SCS would need to do is read that table, and skip any AP_ clab entries with those characteristics ( ^%spell%+\.spl$ ) when performing its AI .CRE patching.


Apart from that addition to SCS, this would be completely opt-in for other modders. If they know their mod needlessly slows down SCS but their added kit abilities are necessary for the mod to function, then they can do something about it that would require no further action from SCS or from players.


So, that's my idea. Thanks for listening.

Edited by subtledoctor
Link to comment

Join the conversation

You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Create New...