Replace string
Alkalurops
Member Posts: 269
I've been looking through the weidu documentation up to the point that it nearly turned me crazy.
So let's say I have a string variable, i.e.
For example, replace all "o" in "spoon" by "a" so identifiedDesc becomes "spaan".
The only command that seems remotely similar is the REPLACE command, but it's a patch action and thus modifies a file instead of updating a variable.
So let's say I have a string variable, i.e.
// when patching an item READ_STRREF 0x54 identifiedDescHow in the world do I replace all occurrences of a substring in identifiedDesc with another string?
For example, replace all "o" in "spoon" by "a" so identifiedDesc becomes "spaan".
The only command that seems remotely similar is the REPLACE command, but it's a patch action and thus modifies a file instead of updating a variable.
0
Comments
I think BG2Tweaks does item description updates in one of their components, or you could take a look at how Miloch does it with the Spears: Increased range and damage component in P5Tweaks mod.