Skip to content

Opcode: apply effect based on internal variable

I would like to request an opcode-based way to apply a given effect, like #177, to creatures that have a particular internal variable set to a particular value.

Thanks

Comments

  • GrammarsaladGrammarsalad Member Posts: 2,582
    If this isn't possible for whatever reason, what about an additional unique.ids that is referenced by 177, but not used by any other resource. That would do the same thing, and I don't think it would require much work
  • argent77argent77 Member Posts: 3,503
    Problem is where to store such a value in the CRE structure. There isn't much space left without breaking backwards compatibility. Wouldn't the "Specifics" value work for your purposes?
  • GrammarsaladGrammarsalad Member Posts: 2,582
    edited February 2016
    argent77 said:

    Problem is where to store such a value in the CRE structure. There isn't much space left without breaking backwards compatibility. Wouldn't the "Specifics" value work for your purposes?

    @argent77

    I've been told by Adarnis(sp) that using specifics can break some scripts (I believe that is what he said... I'll see if I can find the post)

    Edit: this, though my plan was to primarily alter character specific through the clab. I don't know where specific is referenced, so I have no idea how it could break anything
  • GrammarsaladGrammarsalad Member Posts: 2,582
    Also, anyway,, I would like the option to create new values and assign them as needed to any cre (though never the simulcarium(sp)
  • argent77argent77 Member Posts: 3,503
    I've seen a warning about using this value mentioned in IESDP as well. However, that remark had been made for the original BG2, so it might have been fixed in the Enhanced Editions already.

    And then there is the issue of the small range. The Specifics value is limited to values 0-255 and several of them are already used directly or indirectly by the games (especially in IWD:EE). A new field for identification purposes would indeed be useful.
  • CamDawgCamDawg Member, Developer Posts: 3,440
    Oh, and IIRC the specifics issue is really more about breaking scripting. Some AI scripts use specifics to mark special allies or enemies, especially w.r.t. shouts. If you end up changing it to a special value to get spell effects working, even temporarily, you can risk combat AI misbehaving.
  • GrammarsaladGrammarsalad Member Posts: 2,582
    CamDawg said:

    I've always thought the best solution would be an opcode that executes a one-time script on a target, as it would eliminate a lot of these shenanigans. You could call in effects or other consequences based on both the caster and target attributes and really turn modders loose.

    Want a spell that has specific effects for drow that use scimitars? Yes.

    Want an item that does extra damage to creatures with less wisdom than the wielder? Yes.

    Want an anti-magic spell that has different effects based on the target's current protections? Oh my, yes.

    Want a spell that causes the target to initiate dialogue, teleport to another area, or some other scripting action not available via spell? Yep.

    It would be super awesome if this is a hint of what is to come!
Sign In or Register to comment.