Gwen... you were correct. I was foolish, and one of my files were misspelled. Thank you for that.
Usually, this kind of message (without any warning or message error) means that WeiDU did not find the library or file to be loaded or copied. Either you moved it to another place, or you misspelled it in your code.
I need some help with patching existing items and spells.
Specifically, I have created some items that can inflict conditions (Stunned etc.) accompanied by unique Display String effects.
I'm now trying to ensure those strings aren't shown if the target is immune to the condition, by way of Opcode 267.
For that, I need to add effects using Opcode 267 to creatures, spells, items and item abilities that have/confer relevant immunities. In all cases, I can copy existing Opcode 267 effects.
Here is an example implementation for item (equipped) effects, mostly copy-pasted from Tweaks Anthology:
Short summary:
All items are copied, a for loop finds all existing 267 effects giving immunity to string 25807 ("Confused") and clones all such effects twice giving immunity to two other strings (@67 and @89). If any patching happens the patched item goes into the override folder.
This works, and a very similar implementation is possible for effects that are part of .CRE files.
But I don't know right now how exactly I would do this for item and spell abilities. So, to continue the example with string 25807, I'm not sure how to patch Chaotic Commands and all similar spells through a for loop.
I'm not even sure if CLONE_EFFECT is really applicable in this case.
I want to trigger an action or script upon reading a book. I would prefer not to only check if the item is in the inventory.
Is it possible to trigger a script on the right-click book and "copy note" actions?
I would post the same topic at this forum but it doesn't have a 'Tutorials' section so it would be quickly lost. I'm posting it here to at least have it where the beginner's stuff is discussed.
So I'm trying to mod the Cloak of Mirroring (CLCK26.ITM) so it behaves like it did in Shadows of Amn, before Throne of Bhaal brought down the nerf-hammer on it.
The original cloak used op code 203 to reflect spells back at the caster and that was it.
The EE cloak uses 205 to protect from offensive spells, plus protection from 15 individual spells via opcode 206.
I would like to change 205 to 203 as it was originally and clear the individual protections (I could possibly re-add some of them with opcode 197 against their projectile.)
I'm using the following code to change 205 to 203 but it does nothing; could someone please tell me what I'm doing wrong here?
ACTION_IF FILE_EXISTS_IN_GAME ~clck26.itm~ BEGIN
COPY_EXISTING ~clck26.itm~ ~override~
LPF ALTER_ITEM_EFFECT
INT_VAR
check_globals = 0
match_opcode = 203
END
BUT_ONLY
END
Can LPF be used to alter the number of charges for an item's ability as well?
Say I wanted to restore infinite charges to Algernon's Cloak, for example.
EDIT:
One more query.
I'm writing a component to apply EE companion colors to vanilla games.
I'm starting off my code as:
ACTION_FOR_EACH creature IN ~ajantd~ ~ajanti~ ~ajanti4~ ~ajanti6~ BEGIN
However this is limited these character files for Ajantis. If a mod introduces more variations for Ajantis, my code won't capture them. Is there a way to make my code dynamically pick up all creature files for a given companion regardless?
DELETE_CRE_ITEM: deletes all matching items from a creature. Regexp allowed. This is a PATCH macro and function
DELETE_STORE_ITEM: deletes all matching items from a store. Regexp allowed. This is a PATCH macro and function
DELETE_AREA_ITEM: deletes all matching items from an area. Regexp allowed. This is a PATCH macro and function.
REMOVE_STORE_ITEM_EX: removes all sale instances matching the specified item name from the current STO file. This is a patch function
One more question: I opened one of the items I want to remove in NI and hit “Find References” to find out where it is; however even selecting all options for Find References, none were found. How can I identify the STO, CRE, or AR where the item is (and where within an AR)?
So in the case of SW1H34, in order to remove it from the game I'd have to clear it from both the CREs and the scripts? What is the correct WeiDU command to clear it from the scripts?
DELETE_CRE_ITEM: deletes all matching items from a creature. Regexp allowed. This is a PATCH macro and function.
SPRINT item_to_delete to the item you want to delete.
DELETE_STORE_ITEM: deletes all matching items from a store. Regexp allowed. This is a PATCH macro and function.
SPRINT item_to_delete to the item you want to delete.
DELETE_AREA_ITEM: deletes all matching items from an area. Regexp allowed. This is a PATCH macro and function.
SPRINT item_to_delete to the item you want to delete.
So, in your case:
LPF DELETE_AREA_ITEM STR_VAR item_to_delete = SW1H49 END
Edit: you can gather all items to delete in a single area:
PATCH_FOR_EACH item_to_delete IN ~sw1h49~ ~misc48~ ~otheritem~ ... BEGIN
LPF DELETE_AREA_ITEM STR_VAR item_to_delete END
END
Just wanted to share a small series of functions I made while developing kit mods. The goal is basically to simplify and streamline the spell creation process. It can be used to scale spells with level or stats automatically, simply by filling in a table. You may also find a few examples of what it can do. https://github.com/ZKArunsun/ZK_Weidu_Stuff
I'm taking suggestions if you want me to add extra functionalities or functions.
Hello everyone. I am having trouble with the DELETE_ITEM_EFFECT patch function and I'm not sure what i'm doing wrong. I want to allow spellcasting on an item (opcode 145), and i am using this code and its not working, but not giving me errors, any idea what I've done wrong? I don't find many examples of LPF DELETE_ITEM_EFFECT when searching around
COPY_EXISTING ~chan06.itm~ ~override~
LPF DELETE_ITEM_EFFECT
INT_VAR
opcode_to_delete = 145
END
Hello everyone. I am having trouble with the DELETE_ITEM_EFFECT patch function and I'm not sure what i'm doing wrong. I want to allow spellcasting on an item (opcode 145), and i am using this code and its not working, but not giving me errors, any idea what I've done wrong? I don't find many examples of LPF DELETE_ITEM_EFFECT when searching around
COPY_EXISTING ~chan06.itm~ ~override~
LPF DELETE_ITEM_EFFECT
INT_VAR
opcode_to_delete = 145
END
Anything obvious?
Apparently OPCODE 145 is just an EFFECT not an ITEM effect. I'm gonna herp and derp some more.
Comments
And no, Gwen, at least, not that I think so. But I'll definitely look around for such.
It fully installed... Now to see if the guy shows up.
This should have been saved. It was very useful
Edit: okay, I'll posta few basics re using splprot later
Usually, this kind of message (without any warning or message error) means that WeiDU did not find the library or file to be loaded or copied. Either you moved it to another place, or you misspelled it in your code.
Specifically, I have created some items that can inflict conditions (Stunned etc.) accompanied by unique Display String effects.
I'm now trying to ensure those strings aren't shown if the target is immune to the condition, by way of Opcode 267.
For that, I need to add effects using Opcode 267 to creatures, spells, items and item abilities that have/confer relevant immunities. In all cases, I can copy existing Opcode 267 effects.
Here is an example implementation for item (equipped) effects, mostly copy-pasted from Tweaks Anthology:
Short summary:
All items are copied, a for loop finds all existing 267 effects giving immunity to string 25807 ("Confused") and clones all such effects twice giving immunity to two other strings (@67 and @89). If any patching happens the patched item goes into the override folder.
This works, and a very similar implementation is possible for effects that are part of .CRE files.
But I don't know right now how exactly I would do this for item and spell abilities. So, to continue the example with string 25807, I'm not sure how to patch Chaotic Commands and all similar spells through a for loop.
I'm not even sure if CLONE_EFFECT is really applicable in this case.
Any help with this would be appreciated.
I want to trigger an action or script upon reading a book. I would prefer not to only check if the item is in the inventory.
Is it possible to trigger a script on the right-click book and "copy note" actions?
[Tutorial] How to properly handle mod translation by using HANDLE_CHARSETS function:
https://www.gibberlings3.net/forums/topic/32369-tutorial-how-to-properly-handle-mod-translation-by-using-handle_charsets-function/
So I'm trying to mod the Cloak of Mirroring (CLCK26.ITM) so it behaves like it did in Shadows of Amn, before Throne of Bhaal brought down the nerf-hammer on it.
The original cloak used op code 203 to reflect spells back at the caster and that was it.
The EE cloak uses 205 to protect from offensive spells, plus protection from 15 individual spells via opcode 206.
I would like to change 205 to 203 as it was originally and clear the individual protections (I could possibly re-add some of them with opcode 197 against their projectile.)
I'm using the following code to change 205 to 203 but it does nothing; could someone please tell me what I'm doing wrong here?
Can LPF be used to alter the number of charges for an item's ability as well?
Say I wanted to restore infinite charges to Algernon's Cloak, for example.
EDIT:
One more query.
I'm writing a component to apply EE companion colors to vanilla games.
I'm starting off my code as:
However this is limited these character files for Ajantis. If a mod introduces more variations for Ajantis, my code won't capture them. Is there a way to make my code dynamically pick up all creature files for a given companion regardless?
- a location within an AR file
- a store
- a CRE's inventory
What would be the code to do that?
DELETE_CRE_ITEM: deletes all matching items from a creature. Regexp allowed. This is a PATCH macro and function
DELETE_STORE_ITEM: deletes all matching items from a store. Regexp allowed. This is a PATCH macro and function
DELETE_AREA_ITEM: deletes all matching items from an area. Regexp allowed. This is a PATCH macro and function.
REMOVE_STORE_ITEM_EX: removes all sale instances matching the specified item name from the current STO file. This is a patch function
One more question: I opened one of the items I want to remove in NI and hit “Find References” to find out where it is; however even selecting all options for Find References, none were found. How can I identify the STO, CRE, or AR where the item is (and where within an AR)?
Here is the sw1h34 search result in SoD.
So in the case of SW1H34, in order to remove it from the game I'd have to clear it from both the CREs and the scripts? What is the correct WeiDU command to clear it from the scripts?
For example,
Am I doing this right?
So, in your case:
Edit: you can gather all items to delete in a single area:
Just wanted to share a small series of functions I made while developing kit mods. The goal is basically to simplify and streamline the spell creation process. It can be used to scale spells with level or stats automatically, simply by filling in a table. You may also find a few examples of what it can do.
https://github.com/ZKArunsun/ZK_Weidu_Stuff
I'm taking suggestions if you want me to add extra functionalities or functions.
Happy modding!
Anything obvious?
Apparently OPCODE 145 is just an EFFECT not an ITEM effect. I'm gonna herp and derp some more.
You need to tell the code with global has the effect you want to delete.