I have been battling this off and on for awhile. I fight with it when I don’t feel like writing the story.
I am using the compass rose in a custom status bar (borrowed from Bronze) and I like the ability to show unvisited rooms in another color. In fact, 6 different colors depending on region. In z-code this is easy. But in Glulx I can’t even get a single color to change in the status bar.
I have used the extension Glulx Text Effects by Emily Short to try and do this. I defined the tables like this:
[code]Section 7G (for Glulx Only)
Include Glulx Text Effects by Emily Short.
To say default letters: say roman type.
Table of User Styles (continued)
style name justification obliquity indentation first-line indentation boldness fixed width relative size glulx color
special-style-2 – -- – -- – -- – g-pure-red
Table of Common Color Values (continued)
glulx color value assigned number
g-pure-red 16711680
[/code]
Then try to use (in the code for the compass rose):
To say top rose:
let place be the room up from the location;
if the place is a apparent room, say "[if the place is unvisited][second custom style][end if]U [default letters]"; otherwise say " ";
(just a single sample line, there are many others) in the lines that write the rose marker… and nothing happens. It compiles, but the color never changes. I have even tried copying the tables directly from the examples (where they work) for the different styles like bold, italic, etc… and tried to apply them to the compass rose lines but nothing changes.
But, to add to my confusion… this works:
[code]RM is a room.
Gw is a room. Gw is north of RM.
Section 7G (for Glulx Only)
Include Glulx Text Effects by Emily Short.
To say default letters: say roman type.
Table of User Styles (continued)
style name justification obliquity indentation first-line indentation boldness fixed width relative size glulx color
special-style-2 – -- – -- – -- – g-pure-red
Table of Common Color Values (continued)
glulx color value assigned number
g-pure-red 16711680
The description of RM is “[if Gw is unvisited][second custom style][end if]U[default letters]P”; [/code]
It prints the red ‘U’ in “UP” if Gw is unvisited, and “UP” if it is visited.
Which to me, seems to be basically the same thing, just not being printed in the status bar.
Why does something as simple as color have to be so difficult? Is it because it is the status bar and not normal game text?
In z-code, it works using the basic commands for color (I have them separated into a Section 7Z) but I can not get it to work in Glulx. Any ideas?