I couldn't decide where this should go, as it's not "bug", I guess, and not really a feature request:
I was
trying to help out by providing a workaround using {TXTREPLACE:}, however I can't get it to work in any form.
The documentation says:
{TXTREPLACE:myToken:test:monkey} renders as 'This is a monkey'.
I tried {TXTREPLACE:{CMD}:{CMD_AFTER}:}, {TXTREPLACE:'{CMD}':{CMD_AFTER}:}, {TXTREPLACE:{CMD}:test:blah}, {TXTREPLACE:'{CMD}':test:blah}, and {TXTREPLACE:CMD:test:blah}
I even tried setting a text value to {CMD} and using that, like {TXTREPLACE:TextValue:test:blah}, but that doesn't work either. It always returns "Not set".
So, while I know you said:
I think the only tokens that really takes text are {EXP} and {TXTRANDOM} (not even sure why they are that way... must have seemed good at the time) . The other tokens that take variable names could accept a token as the variable name. However, the problem is that it all needs to be reworked to recursively process inner tokens, as what is happening right now is simple find and replace. You just don't know which order the tokens are being replaced. {EXP} is processed last, preceded by {TXTRANDOM}, but that still does not help with nested tokens contained in the value parameters. It's in the higher end of the todo list.
How am I supposed to use this token currently? What am I doing wrong?
EDIT: I remembered seeing in the changelog that replacing with nothing should be possible, sure enough:
- Set text feature, 'replace text' now accepts tokens
in the 'replace' and 'replace with' fields. 'Replace'
will now accept spaces and 'Replace with' will now
accept a blank (empty) value.
And yet my question still stands: What am I doing wrong here?
{TXTREPLACE:{CMD}:{CMD_AFTER}:} looks perfectly valid to me with these new additions, and yet I can't get it to work.