Jump to content

SCS AI and opcode 214

Recommended Posts

I am thinking of doing some modding (= unauthorized mod editing for personal use), but there is one question I really would like to have an answer first: Is SCS able to use spells (and abilities) via ability that uses opcode 214 like the monk's ki pool in Kit Revision? 

Thank you very much for DavidW or anyone else who is willing to enlighten me about this aspect of SCS.

Link to comment

It doesn't really matter what systems an ability uses. This game's AI scripts can only use an ability if it's explicitly written into the scripts. As such, SCS scripts only know how to use spells and abilities that are in the base game or the very few supported mods (SCS itself, IWD spells, SR spells ...).

So no. SCS doesn't explicitly support that mod, so its AI scripts don't know how to use that mod's abilities. The only way they'll be used automatically, for either a party member or an enemy, is if that character is running a combat script from the mod that the abilities came from. Which then means that they're not running an SCS combat script.

Well, OK, there's one possibility. If these abilities are the same abilities as that character would have in the base game - same resource, just a different system for when and how they become available - then scripts would know how to use them. They'd have no clue about any special mechanics for recharging the abilities, but usage scripts amount to "If I have this ability available and the situation is right, use it". And that part wouldn't be any different.

Edited by jmerry
Link to comment

Yes, but I can edit SCS code for my personal use as it is not that complicated system. What I am interested is if it can use opcode 214 abilities somehow or not, because I haven't yet found any situation where it uses them. Please do not assume that I am so stupid that I don't understand that mod won't use abilities that it doesn't support.

Link to comment

Ah. I looked up that opcode. And I'm pretty sure it's impossible to write an AI script that actually uses it. All you can do is to fake it with the spells you select from; SCS mages might have SI:Abjuration memorized so they can buff with it, but they'll never use the original more versatile "Spell Immunity" itself because it's useless for them. There are many versions of the "cast a spell" script action, and none of "select a spell".

Opcode 214 only works with direct player input. That's an inherent limit of the mechanic. Nothing to do with SCS one way or the other.

Link to comment

Damn, I thought so. I hoped it could be faked in a way. Like npc uses up a use from an opcode 214 ability, but actually forcibly uses another ability even though that npc doesn't directly have it.

Link to comment

Oh, you can absolutely fake it that way; you track how many instances of the ability they "should" have with a variable, and use the sub-ability instead. You'll just need to write those script bits yourself. Or, since these are kit abilities anyway and non-party NPCs don't get those unless explicitly given them, you give that NPC the sub-ability instead of the selection ability. Or maybe all the sub-abilities, and use a variable to track total uses so you can cut them off at the right point. Plenty of ways to fake it, as long as you never actually cast that opcode 214 selection ability.

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...