Skip to content

How does Opcode Set State (328) work?

GreenerGreener Member Posts: 430
What are the effects of this opcode, how does it work and what are the potential conflicts?

For example if a character is already under a state, for example: ENCHANTED_WEAPON - 93

Will this interfere with other spells attempting to set states?
Thank you in advance...

Comments

  • KerozevokKerozevok Member Posts: 695
    ?!!?....

    stats.ids >> statistic (profs, resist, misc bonus...)
    state.ids >> state (normal, charmed, poisoned...)
  • GreenerGreener Member Posts: 430
    Can you be in more than one state at a time? i.e. charmed and poisoned ect...?
  • KerozevokKerozevok Member Posts: 695
    Of course, they're stackable.
  • GreenerGreener Member Posts: 430
    Kerozevok said:

    Of course, they're stackable.

    Is there any downfall to having multiple states or permanent states?
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862
    The states are independent, if that's what you ask. Each are represented by a single bit.
    There is a StateCheck trigger, and the spell protection mechanism also works with it (like additional effects could affect you if you are in a specific state/or not in a specific state).
    Greener
  • AquadrizztAquadrizzt Member Posts: 1,065
    @Avenger_teambg , could this be extended to have something like the spell combinations in DA:O?

    For example, could you have Grease apply a "Greased" state that causes fire spells to deal bonus damage to any Greased target?
  • GreenerGreener Member Posts: 430
    Thank you for everyones assistance in the matter

    I was worried that if I set a permanent state for example "enchant weapon" that would negatively affect or interfere the character going forward.
  • Avenger_teambgAvenger_teambg Member, Developer Posts: 5,862

    @Avenger_teambg , could this be extended to have something like the spell combinations in DA:O?

    For example, could you have Grease apply a "Greased" state that causes fire spells to deal bonus damage to any Greased target?

    This could be used as a base of that, yeah. A volunteering modder could do it anytime now.
    It takes 3 additional effects per combination.
    1 - 328 with set state
    2 - 326 with add effects list (based on state)
    3 - the actual extra damage, and other effects.

    The original opcode 177 for detecting conditions is totally superseded by opcodes 318/324/326.
Sign In or Register to comment.