Substitution using orig color #187
acahir
started this conversation in
Script help
Replies: 1 comment 1 reply
-
The general use of <900> would be after the %0, instead of before, which is likely to result in undefined behavior. Best is to use ~ instead. The old forum is available here: https://tintin.sourceforge.io/forum |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I have a sub that is matching inventory lists either held or worn, and then adding info to the end of it, something like the following:
#sub {{\A| |\(([0-9 ]+)\) }item name{[ ]?}\Z} {%0 ${eqStatColor}(item stats)<099>}
A recent feature change has made the incoming item name vary in color, which I would like to preserve. Interestingly, when the item name begins a line (ex: inventory list), the color is preserved, but when it's in the middle of a line (ex: worn items) it is not. I'm not entirely sure what is different between the two yet, as they both use the same sub line.
Instead of matching on the color code using a ~ match, I noticed the following in the manual under substitution:
"Color codes can be used to color the new text, to restore the color to that of the original line the <900> color code can be used."
I tired added <900> right before the %0 but no luck. is there something I'm missing about <900>?
[on a tangent, are the old forums preserved anywhere? it's been a few years since I've messed with Tintin a lot, and I remember finding some great posts in there.]
Beta Was this translation helpful? Give feedback.
All reactions