temnix Posted October 21, 2019 Share Posted October 21, 2019 I would like to patch all spells that use the Play Sound effect and play a particular sound so that they use a different sound. I have an "alter effect" function in my mod: COPY_EXISTING_REGEXP GLOB ~.*\.SPL~ ~override~ LPF ~ALTER_EFFECT~ INT_VAR match_opcode = 174 STR_VAR match_resource = ~EFF_M02~ resource = ~EFFM02_#~ END BUT_ONLY This should go through all of the spells and change them on a match, but Weidu gives me warnings because there are many spells that don't match and aren't changed as a result. How do I direct Weidu to only look at spells with that combination? Quote Link to comment
Jarno Mikkola Posted October 21, 2019 Share Posted October 21, 2019 3 hours ago, temnix said: COPY_EXISTING_REGEXP GLOB ~.*\.SPL~ ~override~ You will want to at least use this structure: COPY_EXISTING_REGEXP GLOB ~^.+\.spl$~ ~override~ PATCH_IF (SOURCE_SIZE > 0x113) THEN BEGIN // protects against invalid files ... END Quote Link to comment
temnix Posted October 21, 2019 Author Share Posted October 21, 2019 Nice, but irrelevant! Quote Link to comment
Endurium Posted October 21, 2019 Share Posted October 21, 2019 (edited) COPY_EXISTING_REGEXP GLOB ~.*\.SPL~ ~override~ PATCH_IF (SOURCE_SIZE > 0x113) THEN BEGIN // protects against invalid files LPF ~ALTER_EFFECT~ INT_VAR match_opcode = 174 silent = 1 STR_VAR match_resource = ~EFF_M02~ resource = ~EFFM02_#~ END END BUT_ONLY Per the WeiDU readme you can use the "silent = 1" int var to suppress messages when you know they're only happening due to spells lacking the opcode you're trying to alter. Edited October 21, 2019 by Endurium Quote Link to comment
temnix Posted October 21, 2019 Author Share Posted October 21, 2019 1 hour ago, Endurium said: COPY_EXISTING_REGEXP GLOB ~.*\.SPL~ ~override~ PATCH_IF (SOURCE_SIZE > 0x113) THEN BEGIN // protects against invalid files LPF ~ALTER_EFFECT~ INT_VAR match_opcode = 174 silent = 1 STR_VAR match_resource = ~EFF_M02~ resource = ~EFFM02_#~ END END BUT_ONLY Per the WeiDU readme you can use the "silent = 1" int var to suppress messages when you know they're only happening due to spells lacking the opcode you're trying to alter. Excellent! Will try. 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.