The wiki lists two ways to capitalize text variable values. Is there a way to do the reverse? An equivalent to JavaScript’s String.toLowerCase() method? I realize this is a needlessly specific use case, but I’m going to get Remarks and also Comments if I fail to capitalize courtesy titles correctly.
If there’s no programmatic way to do it, I may be reduced to changing the original value, and then scanning my game files for every other use of that variable, to apply $!{}. I’d like to avoid that, naturally.
Unfortunately, I think your only option is to write a chunk of code that iterates through the word(s) you want cast to lowercase and manually rebuild them one letter at a time. I might actually write up a function that does this on my break just for giggles.
I remember reading on a thread that it’s possible to modify CS files to add a feature like this. Someone added $!!! and $!!!! (uncapitalize first letter and uncapitalize all letters respectively).
However, the solution above by @stainedofmind pretty much already covers it.
I searched around a bit but I can’t find the post unfortunately.
Ah, unfortunately it’s as I thought. But again, it’s a rather esoteric need that I can get around. Especially if I plan my variables and values more carefully in the future.
What I would do is just bite the bullet and open all the text files in notepad++. That has a global search/replace function that you can use to replace all instances in all files. You’ll have to do the variables one at a time, of course, but it’ll save a lot of messing about as your scripts grow to sizes that become a chore to edit! That way, you avoid having to change the javascript which is always a bit of a can of worms.