Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
darmir
Sorcerer


Joined: 10 Oct 2000
Posts: 706
Location: USA

PostPosted: Fri Nov 19, 2010 6:05 pm   

Coloring Room Descirptions in Armageddon
 
Has anybody ever been able to figure a way out to make a trigger that will color the room descriptions in armageddon? I am having difficulty finding a way to recognize the end of a room description. I just wish the developers would put a blank link after the line desc and before any person or object in the room.
Here is a few examples of room descriptions:
Code:

A Small, Dusty Plaza [N, E, S]
   Crowds choke this plaza, stirring up thick dust and fine, silty sand
into the air, already thick with the odors of the lives conducted here.  The
ground underfoot is simple, hardpacked dirt, worn smooth with footsteps, but
with an occasional jagged crack or pile of offal that keeps the traveller's
step wary.  Slightly taller buildings surround this plaza, many of them
featuring balconies fluttering with the laundry which has been hung out to
air in the fierce sun. 
A half-giant soldier of Tektolnes walks along here.
A half-giant soldier of Tektolnes walks along here.
A lithe, obsidian-eyed woman lounges near the tavern entrance.
A clay-stained human potter sits here on a woven mat of grass.
A crew of Borsail dwarven slaves is here, laboring

Code:

Commoners' Way [N, E, S]
   Commoners' Way proceeds onward from here, wandering amidst the tangle
of crumbling, old mud brick buildings and faded tents that house Allanak's
working class.  The road underfoot initially looks like simple hard-crusted
dirt, but a second glance reveals the layer of worn bricks lying underneath,
their withered outlines barely visible beneath the layers of tracks and
footprints that cover their smooth worn surfaces.  The road is crowded with
Allanak's common folk and slaves, some hurrying about their business, while
others linger, lounging in any patch of available shade to find respite from
the fierce sun. 
   A high clay-brick wall, set with a pair of sturdy gates, lies to the
east, sharp shards of glass set into the top to prevent it being scaled. 
The tanned, red-haired girl stumbles along here, looking unwell.


Any ideas? The only thing I can see is the paragraph in room descriptions are indented.
_________________
Run as hard as a wild beast if you will, but you won't get any reward greater than that destined for you.
Source: (Egyptian)
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Nov 19, 2010 7:49 pm   
 
I am actually in the process of writing a bunch of code that grabs item descriptions in Armageddon, for the purpose of automatically populating a database with value, weight, description, and analysis information. Unfortunately, the only way I could do it was to figure out every common phrase or phrase fragment that migh appear on the line immediately after the description proper. I am still finding a few phrases to put in the "conclude description" list.

Fo room descriptions, I don't think there is any possible solution. There is simply no way to identify, for instance, "A half-giant soldier of Tektolnes walks along here." as not being part of the description. There is an unlimited number of possible phrases that might appear as part of the "person or object is here" lines, especially since people can create their own arbitrary poses. Armageddon automatically linewraps room descriptions. You might be able to tell that line like "the fierce sun." is short, and so possibly the end of a paragraph, but a line like "east, sharp shards of glass set into the top to prevent it being scaled." is just as long as other lines, and ends in a period. Code can't tell that the next line is not part of the description. And there isn't even any consistency about paragraphs being indented. I've seen descriptions in Armageddon with 0 spaces, 1 space, 3 spaces, and 6 spaces at the beginning of a paragraph.

In short, I believe there is no way to identify the end of room descriptions in Armageddon. I have resigned myself to simply editing the room description in the mapper if I happen to notice non-description stuff in it. Person descriptions are easy, and item descriptions are possible, but not room descriptions.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Fri Nov 19, 2010 11:59 pm   
 
Inspiration! I just thought of something you _could_ do. You could compare the text grabbed from the mud output with the room description stored in the mapper database, figure out what parts match, set the room description to the part that matches, and color the matching part in the mud output.

The matching algorithm might be a bit tricky. The code would also have to first gag the mud output while it slurped it all in, and then display the colored part followed by everything else. Could be an interesting exercise, though!
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net