Jump to content

SPLPROT targeting on item equipped timing


Aquadrizzt

Recommended Posts

I asked this already on the beamdog forums but I only got a couple responses, so I figured I'd ask here.

 

Is it possible, using SPLSTATES, SPLPROT and Opcodes 326 and 328, to have an item apply an effect only to characters with a specific spell state active or not?

 

For example, if I had a SPLSTATE named Armored Caster, would I be able to have items that use 326 to check to see if a creature has that splstate and then prevent spellcasting if they do not?

Link to comment

If you mean the item should apply extra effects after the wearer has been affected by something, then still not possible, just like there was no way in vanilla. Opcodes 232/272 remain the only option.

 

PS I missed the last paragraph... That should actually be possible (I think?).

Link to comment

It would only need to update when the item equipped check runs. It doesn't need ot update more frequently than that I don't think.

 

The two outcomes I want are:

- If Armored Casting is on when armor is equipped, do nothing.

- If Armored Casting is off when armor is equipped, disable spells until the item is unequipped.

 

This is trivial to do with IDS targeting via 177; the current version uses SPECIFIC.IDS. SoD unfortunately makes extensive use of specific.ids to identify allied/enemy factions, so I don't want to use that anymore. I also want to be able to have a character change between several different tiers of Armored Casting without having to resort to kit switching.

Link to comment
SoD unfortunately makes extensive use of specific.ids to identify allied/enemy factions

 

Well, sorry about that :D But between all the quest and cutscene stuff I had on my hands, I couldn't be bothered to maintain multiple AI systems as well, and specifics were originally implemented exactly for team/faction purpose, so...

Link to comment

The two outcomes I want are:

- If Armored Casting is on when armor is equipped, do nothing.

- If Armored Casting is off when armor is equipped, disable spells until the item is unequipped.

I think the real technical question is, is it possible to implement that "until unequipped" part.

Link to comment

All good Ardanis, I'm glad to see that its finally being used (I figured it was supposed to be that, given that Torment uses Faction.ids for similar stuff). It just means that I have to get more creative in how I implement Armored Casting. For now I think I'll just use 177 targeting classes and remove the progression from the one class that previously had it. Shame I can't make it a HLA though, that'd be neat.

Link to comment

You add the additional effects in a new spell, then apply them with opcode 326 which triggers on the specific spell state.

 

If you need continuous checks - then you still have to use opcode 232/272 or 333 to repeat the effect triggering.

The spell state function code in splprot is: 0x112

Link to comment

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...