Quantcast
Channel: Modding — Beamdog Forums
Viewing all articles
Browse latest Browse all 11774

WeiDU question: PATCH_IF

$
0
0
Throwing this out to see if anyone on these boards knows the answer:

Given this code:
COPY_EXISTING_REGEXP GLOB ~^.+\.itm$~ ~override~
READ_STRREF 0x0c "name"
PATCH_IF ~%name%~ contains ~+1~ BEGIN
INNER_PATCH_SAVE new_name ~%name%~ BEGIN
REPLACE_TEXTUALLY ~ +1~ ~~
END
SAY_EVALUATED 0x0c ~%new_name%~
END
I'm reasonably sure all of that works, except for the "contains" bit, which I just put there as a marker of what I want to do.

Anyone know how I can do that - only patch if the string contains some particular text?

Viewing all articles
Browse latest Browse all 11774

Trending Articles