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
JRSteensen
Novice


Joined: 27 Jul 2004
Posts: 35

PostPosted: Tue Oct 09, 2012 2:46 am   

Automapping in modified FotE code....
 
Having a really really hard time getting the mapper to configure here. Autoconfig doesn't work for this MUD. Any pointers? Desc length lines change, and therefore the Exits line changes as well.

Code:

-=( North Imperial Avenue )=-
This looks like a fairly typical coruscant roadway, designed primarily for foot
traffic featuring large patterened walkways lined with lightposts, buildings
and advertisements. There is also a wide roadway that runs between the
walkways to accomodate vehicles that require land to travel.  The roadway is
made of a black duracrete with white lines painted on it divideing it up into
2 lanes. To the east is a shorter but wide structure hime to the Imperial
Combat School, where many people hone their combat skills before enlisting in
the service. To the west lies the ever popular Blaster Boutque.
Exits: North, East, South, West.

[HP: 880/880 MV: 972/1000 Credits: 6,007]([0m
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Oct 09, 2012 12:12 pm   
 
Use #tag triggers. When you are done writing those, run the config wizard again to activate the #tag commands.
_________________
EDIT: I didn't like my old signature
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Wed Oct 10, 2012 5:54 pm   
 
If Automapping is new to you, you may want to look at this post as I just got through addressing as much helpful information as I could there.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
JRSteensen
Novice


Joined: 27 Jul 2004
Posts: 35

PostPosted: Thu Oct 11, 2012 4:53 am   
 
meddlesome wrote:
If Automapping is new to you, you may want to look at this post as I just got through addressing as much helpful information as I could there.


GREAT Guide. Got me starting in the right direction, but I've been playing around with tags for several hours and I guess I'm just not getting the hang of tag triggers.

For example, I cannot get
Code:
#TAG -=( * )=- @RoomName
to work for the life of me. Says its illegal. Also, how do I handle the randomly multi line descriptions?

Thanks.
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Thu Oct 11, 2012 5:01 am   
 
Try this:

#TRIGGER {-=~( &RoomName ~)=- } {#TAG name @RoomName}

Take note of the "ADVANCED: Extracting data from a line" in #TRIGGER
It explains the usage of the ~ to tell cMUD not to parse special characters like the parenthesis
that would normally denote a Predefined Variable pattern matching string for parameter usage.
(at bottom of Predefined list)

Also take note of the List of Keywords to use with the #TAG listed in first paragraph of the page.
name the name of the room
desc the room description
exit the room exit information
vnum the virtual room number
flags flag settings for the room
prompt the MUD prompt
descpara the entire paragraph is the room description
exitpara the entire paragraph is the exit information
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Thu Oct 11, 2012 5:48 am   
 
For your Exits trigger I would say go with:

#TRIGGER {Exits: &RoomExits.} {#TAG exit %replace(@RoomExits,",","");#OK}
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829

Last edited by meddlesome on Thu Oct 11, 2012 6:05 am; edited 1 time in total
Reply with quote
meddlesome
Wanderer


Joined: 24 Aug 2012
Posts: 70

PostPosted: Thu Oct 11, 2012 6:00 am   
 
Might as well set the prompt too...

#TRIGGER {HP:%d/%d MV: %d/%d} {#TAG prompt} "" "nocr|prompt"

And if your lucky, once you reconfigure it should pick up the room description on it's own.
_________________
Intel Core 2 Quad Q9450 @2.66GHz
MDAC 2.8 SP1 ON WINDOWS XP SP3
Msjet40.dll ver 4.0.9511.0 + Security Bulletin MS08-028
CMUD v237
Order number: **7829
Reply with quote
Amorelia
Beginner


Joined: 09 Oct 2012
Posts: 18

PostPosted: Thu Oct 11, 2012 7:38 pm   
 
Man, with it this complex, no wonder us newbies have trouble!

I spent a few hours just figuring out how to tag my prompt. Had to use the Trigger editor for it, and run some tests (replaced "#TAG prompt" with "#ECHO Hi").

The MUD's prompt is simply an asterisk in ansi-blue:

*

so the trigger is basically:

#TRIGGER {^%e[1;34m~*%e[0m} {#TAG prompt} "" "nocr|prompt|ansi"

But I reran the Automapper configurator, and it still included the * in the room text, so I'm not yet sure if it's tagging right even though I know the trigger recognises it. But if I get this right, the room names might be easier because they're in ansi-light-green, room descriptions are ansi-darker-green, exits are ansi-white with a ":" delimiter.

Do non-standard exits also have to be defined (e.g. "Out"), even if I never use them?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4578
Location: Pensacola, FL, USA

PostPosted: Thu Oct 11, 2012 8:07 pm   
 
#TR {^~*$} {#NOMAP;#TAG prompt} "" "prompt"

should do it... unless you get single asterisks on a line by themself for others reasons, there is no reason to match the color.


I tend to map the non standard exits to an unused cardinal exit and use the name field to supply the command
_________________
Discord: Shalimar#3679
Reply with quote
Amorelia
Beginner


Joined: 09 Oct 2012
Posts: 18

PostPosted: Thu Oct 11, 2012 8:41 pm   
 
shalimar wrote:
#TR {^~*$} {#NOMAP;#TAG prompt} "" "prompt"

should do it... unless you get single asterisks on a line by themself for others reasons, there is no reason to match the color.


I tend to map the non standard exits to an unused cardinal exit and use the name field to supply the command


Ok thanks, will try that, I forgot the #NOMAP part.

But ... should it be:

#TR {^~*$} {#NOMAP;#TAG prompt} "" "prompt|nocr"
?

Will try both ways, see what works or not.

What does the "$" do in "#TR {^~*$}"?
Reply with quote
shalimar
GURU


Joined: 04 Aug 2002
Posts: 4578
Location: Pensacola, FL, USA

PostPosted: Thu Oct 11, 2012 9:39 pm   
 
that anchors it to the end of the line, its the opposite of the carot ^
_________________
Discord: Shalimar#3679
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Oct 11, 2012 11:23 pm   
 
Quote:

I forgot the #NOMAP part


You didn't forget it, #NOMAP is for telling the mapper to NOT use a line for room info--which is rather contrary to your purpose for using #TAG. You should, though, use a multistate trigger.

#trigger "tRoomInfo" {^-=~( * ~)=-$} {
//initialize room variables
RoomDesc = ""
}
#condition {(*)} {
#if (%begins(%1,"Exits: ")) {
//this is the exits line
RoomExits = %right(%1,6)
#state tRoomInfo 2
} {
//this is still part of the room desc
RoomDesc = %additem(%1,@RoomDesc)
}
} {manual}
#condition {^~*} {
#tag name %t1
#tag desc %expandlist(@RoomDesc,%cr)
#tag exit %if(@RoomExits = ""," ",@RoomExits)
} {prompt|nocr}

Also, since you were curious, "prompt" means the Trigger on Prompt option is checked and the trigger code will be executed as soon as the pattern is matched. "nocr" means the Trigger on Newline option is unchecked. When this option is checked, the trigger will wait until the newline after the pattern is matched to execute its code.
_________________
EDIT: I didn't like my old signature
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