Taimon Posted July 15, 2009 Share Posted July 15, 2009 Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing. You can now specify, whether you want items to be dispelled or not. And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach) Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not. I'm sure no one will ever use this, but it sure was a challenge. Link to comment
Aranthys Posted July 15, 2009 Share Posted July 15, 2009 Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing. You can now specify, whether you want items to be dispelled or not. And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach) Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not. I'm sure no one will ever use this, but it sure was a challenge. Taemon. In wuv youuuu damn, I really need to learn reverse engineering stuff Link to comment
Demivrgvs Posted July 15, 2009 Share Posted July 15, 2009 Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing. You can now specify, whether you want items to be dispelled or not. And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach) Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not. I'm sure no one will ever use this, but it sure was a challenge. This is something that I absolutely have to implemented for SR V3 Polymorph Self and Shapechange forms! Not to mention that finally fixing Dispel opcode itself is great, and you recently allowed me to fix Mirror Image too. I'm sure Aranthys will be glad to test it a lot! Link to comment
Aranthys Posted July 15, 2009 Share Posted July 15, 2009 Already coded that. I decided to rewrite much of the dispel code, so it needs some extensive testing. You can now specify, whether you want items to be dispelled or not. And there is a third option, that tries to emulate the behavior of dispel on items. (i. e. a chance-based approach) Since items don't have a "caster-level" I decided to take the magic class level of the user that wields the item. And then I apply the formula discussed above, to determine whether the item should be dispelled or not. I'm sure no one will ever use this, but it sure was a challenge. This is something that I absolutely have to implemented for SR V3 Polymorph Self and Shapechange forms! Not to mention that finally fixing Dispel opcode itself is great, and you recently allowed me to fix Mirror Image too. I'm sure Aranthys will be glad to test it a lot! Go modify the polymorph paws, you freak Link to comment
Demivrgvs Posted July 15, 2009 Share Posted July 15, 2009 Go modify the polymorph paws, you freak Sure. As soon as Taimon tells me which code should I use, and how I should flag a magically created item as "not-dispellable". Link to comment
Taimon Posted July 15, 2009 Share Posted July 15, 2009 As soon as Taimon tells me which code should I use, and how I should flag a magically created item as "not-dispellable". I'm afraid you currently can't do this on a per item basis, but rather configure it in the dispel effect. The upper word of parameter 2 selects the behavior. See my tob_hacks.tp2 for a short comment about each option. Link to comment
Taimon Posted July 15, 2009 Share Posted July 15, 2009 Okay, I've added a check for the item flag to skip the dispel (bit 24 of item flags) and will update the tp2 as soon as there is a consensus about what should be the default behavior for dispel: dispel items or not? (i. e. what should be the meaning of UpperWord(param2) == 0) Link to comment
Ardanis Posted July 15, 2009 Share Posted July 15, 2009 I've added a check for the item flag to skip the dispel (bit 24 of item flags)Wasn't it also made the AoE flag for the purpose of Mirror Image bypassing? Link to comment
Demivrgvs Posted July 15, 2009 Share Posted July 15, 2009 Okay, I've added a check for the item flag to skip the dispel (bit 24 of item flags) and will update the tp2 as soon as there is a consensus about what should be the default behavior for dispel: dispel items or not?(i. e. what should be the meaning of UpperWord(param2) == 0) It probably depends:(a) shapeshifting paws shouldn't be dispellable (b) magically creted weapons such as Melf Minute Meteors, Flame Blade and so on should be dispellable, though I'm sure many players would prefer them to be non-dispellable © some "weapons" such as Cause Wounds, Slay Living and so on should probably be non dispellable Anyway, while (a) and © cannot be addressed in any athor way, (b) can be easily achieved by adding "remove item" opcodes to dispel in case we absolutely want an item to be dispellable. I obviously vote for making 'dispel' opcode not dispel items on its own. I've added a check for the item flag to skip the dispel (bit 24 of item flags)Wasn't it also made the AoE flag for the purpose of Mirror Image bypassing? If I remember correctly Ardanis is right... Link to comment
Taimon Posted July 16, 2009 Share Posted July 16, 2009 Anyway, while (a) and © cannot be addressed in any athor way, (b) can be easily achieved by adding "remove item" opcodes to dispel in case we absolutely want an item to be dispellable. To clarify: With the modified effect you can cover all those cases - I just want to know, what the most sensible default is. In the first version I also choose to not dispel items by default and I guess I'll leave it at that for the moment. I've added a check for the item flag to skip the dispel (bit 24 of item flags)Wasn't it also made the AoE flag for the purpose of Mirror Image bypassing? If I remember correctly Ardanis is right... I knew this would be coming, so I have a chance to clear that up: The AoE flag on items is not configurable via item flags (0x018 in .itm), but with the ability flags (dword at 0x026 in every item ability). Updated the version to include that "no dispel" flag. Link to comment
Salk Posted July 16, 2009 Share Posted July 16, 2009 Amazing job as usual, Taimon! Thanks a lot! Link to comment
Taimon Posted July 18, 2009 Share Posted July 18, 2009 There are other effects (besides dispel) that automatically remove the item in the magical weapon slot. *sigh* I hope you don't want to know about them. Link to comment
Ardanis Posted July 18, 2009 Share Posted July 18, 2009 I assume you know them already, right? Won't you tell then? Link to comment
Taimon Posted July 18, 2009 Share Posted July 18, 2009 Well, that means more work for me, doesn't it? 0x011 (Current HP modifier): with bit 1 set in the upper param2. (remove all non-timing-mod-9 effects) 0x087 (Polymorph): with an empty resource1 Those should be okay -- no modification needed. 0x0DC (Remove primary type) 0x0DD (Remove secondary type) 0x0E5 (Remove primary type [1]) 0x0E6 (Remove secondary type [1]) Haven't tested this, but the code looked pretty straightforward. There are a bunch of spells using those opcodes. Link to comment
Taimon Posted July 18, 2009 Share Posted July 18, 2009 False alarm, I guess. It will only happen, if there is a "Remove item" (0x070) opcode in the effects list. Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.