Skip to content

Stat Opcodes and effects

NeigeNeige Member Posts: 18
edited May 2023 in General Modding
I want to make a fighter mod which implements stance. Thanks to the Artisan's kitpack I have been able to create the spells to achieve this, however I have some trouble to remove some effects when the stance is ended.

To better understand, I have used EEKeeper to see what is going on. The following opcodes are not counted as effects:

opcode 0 (AC modifier)
opcode 1 (attack per round modifier)
opcodes 27 to 30 (resistances to acid, cold, electricity, fire)
opcodes 86 to 89 (resistances to slashing, crushing, piercing, missile)

while the following opcodes are listed in the effects tab:
opcode 31 (resistance to magic damage)
opcode 173 (resistance to poison)
opcode 278 (to hit modifier)
opcode 301 (critical hit modifier)

The effects of the spell are all the same (permanent until death) and are supposed to be removed thanks to the effect with opcode 321 (remove effect by ressource). Currently my spell only remove opcodes listed in the effects tab of the Keeper, while other effects are permanent once set.

For instance for opcode 0, in game the AC is displayed as 9, and not as 10 with a characteristic bonus of 1.
Post edited by Neige on

Comments

  • NeigeNeige Member Posts: 18
    If anyone wants to test, I have added my current files
  • jmerryjmerry Member Posts: 3,881
    In general, when stat-modifying effects with timing mode 1/4/7 are applied to a creature, that alter's the creature's base stats and does not leave behind any removable effect. If you want something removable, you use a different timing mode; the appropriate "permanent" mode in that case is timing mode 9.
  • NeigeNeige Member Posts: 18
    edited May 2023
    Ok I found how to solve this issue. All effects were timed as "Instant/Permanent until death", switching to "Instant/Permanent" gave the expected behavior with opcode 321.

    Edit: i did not see the answer of jmerry. Now I have, thank you !
    Post edited by Neige on
Sign In or Register to comment.