Escape characters
Displaying 1-4 of 4 total.
1
Please enter a numerical value for the importance of this sticky.
Enter 0 to unsticky.
Goldenrod111

The May 19th update added the ability to insert escape characters directly into strings. Which ones work in VERGE (for example, I doubt "\t" is implemented)?

Posted on 2010-08-25 14:45:11

Overkill

Have no doubt, \t is in there. So are \b, \t, \n, \f, \r, and \0. And, for any other escape sequences they emit the character exactly after the backslash, such as in \" or \\. If there are any other kinds of character codes that need to be done, you should prefer chr(int code) for those.

However, it looks as if PrintString and friends ignore \t, so use soft tabs (ie. spaces) instead. Hard tabs aren't really that useful anyways (since the amount of spaces isn't necessarily the same as what you'd expect -- some people would want \t to emit 4 spaces, where others would want it to be 8 spaces or maybe even something weird like 3 spaces; so this sort of makes tabs less useful).

Other, more useful characters such as \r and \n are obeyed.

Also, the archaic \f (form feed) ascii character is now used in order to change font subsets. Any digit following the form feed character (\f0 up to \f9) escape will switch to the next font subset.

Previously font subsets were switched with @, but this was considered a bad idea, since it screwed up TextWidth, and occasionally happened when undesired (or sometimes glitched out and required double-@ due to some bugs). Anyways, \f works better.

Since it's seldom explained well: A font subset is basically having two fonts (of the same size) in the same image file. This can be used to accomplish text highlights, italics/bold, and other features (equipment icons maybe -- although that's up to you, I'd personally just use images, but in a textbox code it might simpler to just use one font). Font subset 0 is the default.

Anyways, rambling a bit, but yes, there are escape characters. They should work as expected for the most part. If you have old code, make sure to fix all uses of the backslash \ in your code, or put "oldstring" in your verge.cfg.

Posted on 2010-08-26 01:41:37 (last edited on 2010-08-26 12:40:11)

Goldenrod111

Thanks! Is there anywhere I can see a complete list, with their effects? I know what some of the more standard ones do, but I don't know the others (like \b). Someone should probably add a page on this to the manual...

Posted on 2010-08-26 17:53:53

Goldenrod111

Nevermind, I found one. For anyone who's wondering, it seems to just be the standard ASCII escape sequences. I was just having trouble figuring out which language VERGE uses in this case.

Posted on 2010-08-27 13:14:35


Displaying 1-4 of 4 total.
1
 
Newest messages

Ben McGraw's lovingly crafted this website from scratch for years.
It's a lot prettier this go around because of Jon Wofford.
Verge-rpg.com is a member of the lunarnet irc network, and would like to take this opportunity to remind you that regardless how babies taste, it is wrong to eat them.