Colors

efgosser
22 Feb 2007, 18:51
Is their a way to make a room a certine color

Make this room BLUE
define room <KRD291 >
alias <You're in the Chamber of the Soul.>
look <This mystical room strikes you with complete awe. As you look around, everything seems to extend forever, in an infinitely large universe... with no boundaries. Far in the distance billions of stars glimmer as whole galaxies grow and die before your eyes. Within your vision, you are witnessing eternity... beyond any and all mortal limitations. You feel the rush of time passing by, oblivious to all things of physical nature. Doorways of light are exits to the south and east.>
south <KRD289 >
east <KRD292 >
beforeturn override
end define

Make this room DarkGrey
define room <KRD302 >
alias <You're in the lair of the dragon.>
look <This dark, gloomy cave radiates an aura of incredible evil. The darkness hides almost all the features of this large, ragged cavern, but the distinctive odor of dragon waste identifies this place as a lair of a dragon. A chill of fear runs through your blood and your heart beats fast as the effects of dragonfear overcome you. The throne chamber lies to the south.>
south <KRD301 >
up <KRD290 >
beforeturn override
end define

Alex
22 Feb 2007, 18:56
Yes, you can run a script command when the player enters the room to change the foreground and background colours.

Section 19.3 of the QDK Tutorial covers this, but basically all you need to do is go the Advanced tab for the room, and put a script command in "When the player enters the room". You can use the "Change the background colour" and "Change the foreground colour" commands from the "Print" category.

efgosser
22 Feb 2007, 19:15
Thanks gotit, I looked their for colors

efgosser
23 Feb 2007, 04:58
Here is an example: I want the alias to be cyan and the look to be dark green in this room and the floor description to be cyan. The code allows you to do the room description.


User view:
[cyan]You're in a dark forest. [dark green]Tall, ominous pine trees surround you, their thick, bristly branches hanging down and making it difficult to proceed in any direction. Almost all of the sunlight is blocked out by the densely packed trees, and the few rays which do filter down create dark, menacing shadows which seem to dance along the leafy forest floor. As you glance around, this location appears to be very similar to the rest of the forest, making it confusing to determine your exact location.
[cyan]]There is a garnet and a pearl lying on the forest floor.


Code:
define room <KRD044>
alias <You're in a dark forest.>
look <Tall, ominous pine trees surround you, their thick, bristly branches hanging down and making it difficult to proceed in any direction. Almost all of the sunlight is blocked out by the densely packed trees, and the few rays which do filter down create dark, menacing shadows which seem to dance along the leafy forest floor. As you glance around, this location appears to be very similar to the rest of the forest, making it confusing to determine your exact location.|n>
north <KRD045>
south <KRD089>
east <KRD067>
west <KRD112>
script {
background <000000>
foreground <008000>
}
beforeturn override
end define

efgosser
27 Feb 2007, 11:06
Alex wrote:Yes, you can run a script command when the player enters the room to change the foreground and background colours.

Section 19.3 of the QDK Tutorial covers this, but basically all you need to do is go the Advanced tab for the room, and put a script command in "When the player enters the room". You can use the "Change the background colour" and "Change the foreground colour" commands from the "Print" category.


Alex can I do colors like I want with Quest?

Here is an example: I want the alias to be cyan and the look to be dark green in this room and the floor description to be cyan. The code allows you to do the room description.


User view:
[cyan]You're in a dark forest. [dark green]Tall, ominous pine trees surround you, their thick, bristly branches hanging down and making it difficult to proceed in any direction. Almost all of the sunlight is blocked out by the densely packed trees, and the few rays which do filter down create dark, menacing shadows which seem to dance along the leafy forest floor. As you glance around, this location appears to be very similar to the rest of the forest, making it confusing to determine your exact location.
[cyan]]There is a garnet and a pearl lying on the forest floor.


Code:
define room <KRD044>
alias [cyan]<You're in a dark forest.>
look [dark green]<Tall, ominous pine trees surround you, their thick, bristly branches hanging down and making it difficult to proceed in any direction. Almost all of the sunlight is blocked out by the densely packed trees, and the few rays which do filter down create dark, menacing shadows which seem to dance along the leafy forest floor. As you glance around, this location appears to be very similar to the rest of the forest, making it confusing to determine your exact location.|n> [cyan]
north <KRD045>
south <KRD089>
east <KRD067>
west <KRD112>
script {
background <000000>
foreground <008000>
}
beforeturn override
end define

Alex
27 Feb 2007, 11:46
The simplest way to do this would be to embed the colour formatting codes in your alias and description. The list of formatting codes is at http://www.axeuk.com/quest/developer/do ... attext.htm

The formatting codes only have a limited range of colours though, so you can't for example choose cyan using this method.

The harder way is to use some custom room description script for your game. There is an ASL example of this at http://www.axeuk.com/quest/developer/do ... ptions.htm

You could paste the code on that page into your "define game" block, and then open using QDK to edit. You'll find the script by selecting "Game" on the tree menu, clicking the Advanced tab and selecting "To describe rooms in the game" from "Advanced script commands".

You could then insert the script commands to change the colour for the various lines of description. This would apply to all descriptions throughout the entire game.

As an aside, ultimately it would be better if Quest gave you more control with the text formatting commands. The text formatting commands have remained largely unchanged since Quest 1.0 Beta 2 back in August 1998, and changing them to something more HTML-like has been on the "to do" list for a while. I'll have a think about this for the next version...

efgosser
27 Mar 2007, 11:50
I guess what I was looking for was the basic 16 colors in ascii code, or old bbs 16 colors. Is their anyway you can add that to your next version. Or is their a way I can edit somthing to get 16 colors?

What language are you makeing Quest/QDK with?