Bartimaeus Posted May 20, 2020 Share Posted May 20, 2020 (edited) I have code that will search all spells' extended headers for a specific opcode and output it - how do I do the same for item extended headers? (e): Wait, would it literally just be change "SPL_V10_HEADERS" to "ITM_V10 HEADERS" plus change the file type to .itm instead of .spl? ... (e): Yes, yes it would be - okay, well, never mind that - read the question below instead, . COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ override // remove spellstates GET_OFFSET_ARRAY ab_array SPL_V10_HEADERS PHP_EACH ab_array AS int => ab_off BEGIN GET_OFFSET_ARRAY2 fx_array ab_off ITM_V10_HEAD_EFFECTS PHP_EACH fx_array AS int => fx_off BEGIN READ_SHORT fx_off fx_type PATCH_IF fx_type = 49 BEGIN PATCH_PRINT "%SOURCE_RES%.spl has opcode %fx_type%" END END END BUT_ONLY ...Also, what would I do to to make it so the "PATCH_IF fx_type = 49 BEGIN" line supports multiple opcodes? (i.e. if I want to search for both 49 and 44...or more!) I tried adding an "OR 44", but it just displayed every single opcode on every single spell in the game as if I had specified a wildcard instead. Thanks in advance. Edited May 20, 2020 by Bartimaeus Quote Link to comment
subtledoctor Posted May 20, 2020 Share Posted May 20, 2020 PATCH_IF (fx_type = 49) OR (fx_type = 44) OR (fx_type = %one_meeellion%) BEGIN // pinky to mouth Quote Link to comment
Bartimaeus Posted May 20, 2020 Author Share Posted May 20, 2020 Thanks, Dr. Evil - worked, . Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.