I just hit the wall on size in my Z-Code project in Inform V7, so I switched to Glulx. When I compiled, I received a number of errors because I used colored text in certain situations. I did some searching and found that Basic Screen Effects by Emily Short isn’t supported by Glulx. She instead wrote Glulx Text Effects, but I can’t figure out how to use it. First, is it a separate download, or do I just do an “include” line at the beginning? Second, I noticed that color values were numbers. Do you just put the numbers in brackets instead of [green letters]? It looked like maybe you have to define what you are doing with the text before you can even use any effects. Could someone translate the following into Glulx for me as an example? Looking at examples has been my best teacher so far.
say, “[green letters]testing[default letters].”
I’ve been working on my first adventure on and off for over 5 years now. I guess I should have started on something a little less ambitious for my first time, but it’s been a labor of love. I’m around 3/4 done, so I can’t cut enough to make it fit into Z-Code. I’m sure I’m not very efficient when it comes to using Inform either, but I can’t go back when I can finally start to see the light at the end. Any help would be greatly appreciated.
Glulx text effects comes with several colors, or “glulx color values”, defined, but not green, so the first thing to do is make an amendment to the table that declares colors. The glulx color value is traditionally g-whatever color name, and the assigned number is the decimal value of the hexidecimal color you want. (I just look up the hex value for the color I like in GIMP or on the web, and then use a web page that converts hex to dec.)
You can redefine any of the styles listed in the Table of User Styles, or there’s a couple of “free” user styles. I used one of these and filled out a row in the User Style table for it.
Roman type always gets you back to “normal”.
[code]Include Glulx Text Effects by Emily Short.
Table of Common Color Values (continued)
glulx color value assigned number
Table of User Styles (continued)
style name justification obliquity indentation first-line indentation boldness fixed width relative size glulx color
special-style-1 left-justified no-obliquity 0 0 bold-weight proportional-font 0 g-green
When play begins:
say “The moon is made of [first custom style]cheese[roman type]!”;
I made a tool in I7 that lets you enter RGB or hex and get the decimal value. The main purpose was as a technical demo, but it’s still my tool of choice if I have to convert more than 1 or 2 colors. It’s the “Color Picker” gblorb in this archive:
@gravel. Thanks for the help. It took a while, but I got it. And thanks especially for taking the time to write out the example. [default letters] doesn’t seem to work in glulx either and it gave me errors after I got the colors straightened out. I used [roman type] in most cases, but a few had [default letters] instead. I must have seen it used in an example or something.
@ektemple. I’m keeping the color picker in case I have a need for it down the line, but I only needed 2 colors, so I just used the basic examples they had. Thanks.
Pleasantly surprised that I was able to get help here much faster than I had expected,