WIEDU: How can I target specific opcodes for armor?
Callirgos
Member Posts: 105
Hi,
I'm using WEIDU to redo some armor values.
Armor typically has 4 values for armor.
I'd like to target a specific value, instead of deleting all of them with one command.
Is this possible?
This is what I have -
COPY_EXISTING ~CHAN04.itm~ ~override~
LPF ~DELETE_ITEM_EQEFFECT~
INT_VAR
opcode_to_delete = 0 // armor bonus
END
How can I specify the above to only be the base armor bonus, or bonus vs piercing, etc. ?
I'm using WEIDU to redo some armor values.
Armor typically has 4 values for armor.
I'd like to target a specific value, instead of deleting all of them with one command.
Is this possible?
This is what I have -
COPY_EXISTING ~CHAN04.itm~ ~override~
LPF ~DELETE_ITEM_EQEFFECT~
INT_VAR
opcode_to_delete = 0 // armor bonus
END
How can I specify the above to only be the base armor bonus, or bonus vs piercing, etc. ?
0
Comments
match_parameter2 can be whatever calue you're looking for--BIT4 is the overall armor value, and the other specific modifiers are BIT0 through BIT3 (crushing, missile, piercing, slashing). If you just want to change the value, you can also use ALTER_EFFECT to directly insert a new value:
What is the "check_headers = 0" doing? What is a "header" here?
... maybe it is what creates the matching requirements below?
"match_opcode = 0" makes sense to me. Because 0 is the opcode for armor bonus, right?
"match_parameter2" makes sense.
Could I use ALTER_EFFECT to do math here? For example, could I somehow do +1 to whatever the current value happens to be? That way I could do a pass where I set up all the armors of a given type, then some quick steps to update all the enchanted armors.
Near Infinity calls these abilities--for the most part, armor don't have many. check_headers=0 basically means to ignore checking the effects on abilities and instead limit the patch to equipping effects.
And I probably should have added silent=1 to the patch, otherwise WeiDU will throw warnings at the user if it can't find a matching effect to patch/delete.
Unfortunately, no, you'd have to write a proper loop to read and adjust these on the fly. It's not too difficult to do, but it is an extra step.