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 Goto page 1, 2  Next
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Thu Jul 26, 2012 6:24 pm   

Compass, Background Issues on Mapper
 
I've finally begun using the mapper.. and it definitely a handy thing. Will definitely improve my quality of life once I get a lot of maps made.
My only issues so far are:
Background color... I take this to be the color that is the background on the mapper window.. No matter what color I pick it does not change.
(Cmud v2.37, Windows 7) In case either of those are an issue with it. My eyes just do not like the color that is the background. They slide over it and miss stuff. I have tried even with themes turned off on Win7, and a Basic Colorscheme.

My second issue has to do with the auto-detection of the mapper. I play on "Realms of Despair" and we have a compass feature that shows the exits in a room, as well as if they are locked, etc. Below is a visual representation of a room with the compass being in the top right corner.

Code:
>Mumra[1185_1185hp][1685_1685mana][HS][$43,703,615][New Darkhaven]-
l

Darkhaven Square                                           NW    N    NE
-------------------------------------------------------    W -U-(+)--- E
                                                           \     S     /
You are standing within the expanse of the famous Darkhaven Square.
An immense stone statue of Duke Luther sits in the center of the square,
surrounded by fountains of shimmering crystal water.  Gardens and shrubbery
enhance the air of serenity and peace here in the center of the great city.
A plaque set into the base of the fountain attracts your eye.  Cobblestone
roads lead away in the four cardinal directions, while to the northeast
and northwest are forested paths.  The cathedral spires of Notre Dame
de Sioux rise with majesty above the treetops to the northwest.
Exits: north east south west up northeast northwest
A large sundial lies here, a shadow creeping across the surface.
Stone fountains containing crystal clear water surround the Duke's statue.
(Hide) Berengier. is hovering here. [Shock]

>Mumra[1185_1185hp][1685_1685mana][HS][$43,703,615][New Darkhaven]-


I have shown a prompt before and after the room for helpful purposes. My issues are these, the auto-configure can in no way get just the name of the room without the extra characters at the far end (This, while annoying, is liveable). Also, the room description just ends up being the Room Name, and the line beneath it rather than any of the description at all.
I have tried:

Using a special prompt character ( > is visible at the front of my prompt now)
Making a trigger of my prompt and using #TAG prompt
Making a trigger that actually does capture the name of the room properly as a variable, then trying to use #TAG name @RoomName.
Altering the configuration number boxes by 1, 2, 3, 4, etc on the Desc menu in configuration settings for both settings. All to no avail.
NONE of the #TAG commands seem to do anything for me that I can see.

Anyone out there get this working properly ? And if so could you share some of your wisdom with me please?

James
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jul 26, 2012 8:42 pm   
 
You will have to extract the room name, exit list, and room description yourself (using triggers) from the mud text, then use #TAG to tell the mapper what the values should be. After creating the #TAG trigger(s), you need to re-configure the mapper so that it knows about the #TAG commands.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jul 26, 2012 8:44 pm   
 
As for the map background, you need to edit the map configuration file, find the color section, and edit the colors there.
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Thu Jul 26, 2012 9:22 pm   
 
I tried using triggers with TAG, and nothing got altered at all. Though perhaps I may have misconfigured something wrong. Each time I changed or made the triggers, I did reconfiguration like the helpfile said.

As for the background. Blargh.. why can't the config section just work. *trundles away*
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Thu Jul 26, 2012 11:03 pm   
 
It works for me. Try sending your map through the repair utility, and then delete your existing .zfg and make a new one.
_________________
EDIT: I didn't like my old signature
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jul 26, 2012 11:23 pm   
 
Show us the exact script that you used to do the #TAGs. You probably have a bug in your trigger.
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Thu Jul 26, 2012 11:24 pm   
 
Quote:
As for the background. Blargh.. why can't the config section just work. *trundles away*

I'm not sure what you mean by this. Do you still have a problem with the map color?
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Fri Jul 27, 2012 7:37 am   
 
Sorry for the long delay, my schedule is a daytime one for sleeping.

Rahab: Yes the map color is still wrong in the configuration section.. changing it makes no difference. So I open up the file in notepad++ and just see a bunch of 'NUL" "SOH" "ENQ" etc. So naturally I did not mess with any of that.
Though I do see the expression that it believes is my prompt. I have very little experience with Regex.. other than a semester for writing asp.net scripts.. and we only used it a couple times. The expression it has listed is:
Code:
^\>\w+\[\d+\_\d+\w+\]\[\d+\_\d+\w+\]\[\w+\]\[\$\d+\,\d+\,\d+\]\[\?\?\?\]\-


where my prompt is shown as
Code:
>Mumra[1185_1185hp][1685_1685mana][HS][$43,703,615][New Darkhaven]-


I was using this to try to name the room via trigger, and if I #show @roomname it does show the correct name:
Code:
#TR {^(%1)(*)~ {~/     ~-     ~\|~/     N     ~\|NW    ~-     ~\|NW    N     ~\|NW    ~-    NE|NW    N    NE|~/     ~-    NE|~/     N    NE}$} {#VAR roomname {%1};#alarm +1 {#SAY Roomname is: @roomname};#TAG name {%1}


I have run 'reconfiguration' as the help #TAG suggests after I made the trigger (I have also deleted the trigger and deleted the zfg, then autoconfigured, remade the trigger, then selected reconfiguration and did it again) but the room name stays unchanged on the mapper.



I have run the converter repair on the map and deleting the existing .zfg file as MattLofton suggested as well, numerous times now while attempting to create/recreate the triggers. Of course I had the map set in MAP mode, not Follow mode to allow changes. I just don't see what I am doing wrong and I thank you all for your help :)


EDIT: Two erroneous spaces removed.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Fri Jul 27, 2012 7:55 am   
 
Update: OK. So having been a little annoyed, I deleted my characters whole session, and all of their files in the cmud directory. Then remade the triggers, reconfigured, etc etc.
Room name, description and exits now work fine for detection with the above trigger. I don't know why, perhaps one of my other triggers I have was causing an issue or it didn't come in from zmud entirely proper.

The colors still won't change for the background though. But the other colors all change. Room, Links, Above, Below, etc.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Fri Jul 27, 2012 3:32 pm   
 
Oh well, I give up, but thank you guys for your assistance :D The mapper is working fine, and I will just deal with the not so nice background color. Hope you all have a good day.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Fri Jul 27, 2012 5:41 pm   
 
I take the last post back... Thought the mapper was fine, hadn't had time to actually sit down and map, just did the configuration, and saw that it made the room properly on the map. Nothing else mapped though. It would only add a room and desc, etc when I did reconfigure. I'm not sure if the reconfigure option actually causes the client to do something more than just move. But it selected the right text for name/desc/exits automatically with the trigger above. Just never worked when manually inputting a direction. Any ideas on this?

As for the background color.. it still doesn't change in zmud.. but if I change my desktop them to say, a high contrast black, or white. the background of zmud will change then and only then. Any thoughts here would be appreciated as well.

Thanks again for all of you guys help, you really save some headaches :)
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Progonoi
Magician


Joined: 28 Jan 2007
Posts: 430

PostPosted: Fri Jul 27, 2012 10:08 pm   
 
Hasn't the talk so far been about CMud? They're two completely different products, why are people still unable to comprehend that.

Anyways, you should give text examples from Mud with Exits line, Desc, prompt etc.

You probably have something funky going on in your own triggers you previously tried to no avail. Reconfigure isn't reliable, for any trouble, you're
supposed to use #tag triggers.
_________________
The Proud new owner of CMud.

--------------------------------
Intel Core i5-650 3,2GHz
4 DD3 RAM
GTX 460 768MB
Win 7 Home Premium 64x
--------------------------------
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Fri Jul 27, 2012 10:44 pm   
 
Sorry, yes it is cmud. I typed zmud out of habit. I just only recently started using cmud, had a break from muds for over 6.5years, and was used to using zmud. No need to be condescending though for a simple misspelling, especially when you saw me even say the version I use in the first post since you read it. Or maybe you didn't. Since I provided a room output as well as prompts.

As for tag triggers, I do use one to capture the room name, the rest the configuration captures in the example. So I don't know why it wouldn't in the general use. Really, you didn't say anything that was useful. But thanks for being condescending. :)
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Jul 28, 2012 1:39 am   
 
Your trigger pattern has (%1) in it. You should not use %1, %2, etc. inside a trigger pattern. Your trigger pattern should be:
Code:
^(*)%s{~/     ~-     ~\|~/     N     ~\|NW    ~-     ~\|NW    N     ~\|NW    ~-    NE|NW    N    NE|~/     ~-    NE|~/     N    NE}$
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sat Jul 28, 2012 6:57 am   
 
You are correct in that sir, I copied this trigger from here on the forums.. and didn't change anything that actually worked in the trigger itself. But yeah, bad practice and all that. Thanks!
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sat Jul 28, 2012 12:11 pm   
 
In this case it was more than just bad practice. You had "(%1)(*)~ ". Cmud might not have been able to figure out what should go into %1. Have you tested it again since that fix?
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sat Jul 28, 2012 9:51 pm   
 
It found what was to go in the %1 properly before it actually. Though %2 would also catch the room name, as well as the space after it. but it did correctly grab the roomname with %1. since the fix you suggested, it will map the new rooms. but now the desc's while saying as detected in the reconfigure window, will not show up. but the exits and roomname will show up properly. I'm afraid I don't know how to get the #TAG command to work for roomdesc entirely. So that was the big thing that the autoconfigure grabbing it was really nice for.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sun Jul 29, 2012 1:48 pm   
 
To use the #TAG to work on the description, you have to get the entire description into a single variable (call it @roomdesc or something), then
Code:
#TAG desc @roomdesc

The only tricky part of this is actually getting the description into the variable. Is that the problem you are having?

Is the mud output always exactly as you have described it above--that is, is it always a RoomName, then two lines you don't care about, then the room description in multiple lines, then "Exits:"? If that is the case, then we can use that pattern to identify the room description. An easy way to do this would be to make the trigger which identifies the room name into a multistate trigger. The second state will match the "------" line and do nothing. The third state will match anything and also do nothing. The fourth state will start grabbing the description. It will be of type "MANUAL", which means it will stay in this state until explicitly told to go to another state. It will grab lines from the mud until it sees a line starting "Exits:". It then tags the description, tags the exits, and goes back to the first state, waiting for the next room name. The following multistate trigger should be able to handle your room name, room description, and room exits:
Code:

#TRIGGER {^(*)%s{~/     ~-     ~\|~/     N     ~\|NW    ~-     ~\|NW    N     ~\|NW    ~-    NE|NW    N    NE|~/     ~-    NE|~/     N    NE}$} {
  #VAR roomname {%1}
  #alarm +1 {#SAY Roomname is: @roomname}
  #TAG name {%1}
}
#COND {*} {}
#COND {*} {}
#COND {*} {
  #IF (%begins(%1, "Exits: ")) {
    #TAG exits
    #TAG desc @roomdesc
    #SET 0
  } {
    #VAR roomdesc %trim(%concat(@roomdesc, " ", %1))
  }
} Manual

[edited]


Last edited by Rahab on Sun Jul 29, 2012 1:52 pm; edited 2 times in total
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sun Jul 29, 2012 1:52 pm   
 
Yes sir, it is the problem of me capping the desc into a variable. As for the 2 lines, yes as well. So long as I have the compass on, that format will always be there. I prefer the compass being on, so obviously I want to get it to work with it on. It is exactly how you described it. Name, 2 lines I don't care about, the description, then Exits: . I will give it a try in just a few minutes and holler back at you.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Sun Jul 29, 2012 1:53 pm   
 
I just spotted a small bug in my code and edited it above.
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sun Jul 29, 2012 1:53 pm   
 
K. regrabbed it.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sun Jul 29, 2012 2:15 pm   
 
Hrm, that just sets the room name as the desc, the full line of the roomname including the compass directions. As well now it isn't grabbing the room name correctly. It is adding the compass directions to the name, as well as the line after. So the above room would have:

"Darkhaven Square NW N NE------------------------------------------------------- W -U-(+)--- E "
as the roomname, and the same exact thing as the room desc.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sun Jul 29, 2012 5:21 pm   
 
OK.. so.. with some more work at this.. I changed the trigger I made, as well as you made.. to try to narrow it down.. so I have this now:

Code:
#TR {^(*) (%s) {NW|/} (%s)  {N|-} (%s) {NE|\}$} {
  #VAR roomname {%1}
  #alarm +1 {#SAY Roomname is: @roomname}
  #TAG name {%1}
}
#COND {^(*) (%s) {W|-} -(?)-~(~+~)-(?)- {E|-}$} {
  #ALARM +2 {#SAY Stage 2 reached}}
#COND {^(*) (%s) {SW|\} (%s)  {S|-} (%s) {SE|/}$} {
  #ALARM +3 {#SAY Stage 3 reached}}
#COND {(*)} {#IF (%begins(%1, "Exits: ")) {
    #TAG exits
    #TAG desc @roomdesc
    #SET 0
  } {
    #VAR roomdesc %trim(%concat(@roomdesc, " ", %1))
  }
} Manual


As you can see it does some #SAY's to test if the stage is being reached.. And each time I look, I do receive a the following:

Roomname is: Darkhaven Square
Stage 2 fired
Stage 3 fired


So it is definitely reaching those stages.

If I make 'Manual' condition to the trigger, it either loops, or throws a zmud error. and I have to disable triggers. Will update in a moment with the call stack error. And it constantly spits back the following as the loop:


Also, when I 'reconfigure' after changing the triggers.. it still recognizes that room that the reconfigure automaps perfectly. Blue name only (not the compass dirs also), Green desc, Red exits. That is the most frustrating part. It is doing something else in the auto that it won't do when I try to walk. Then the mapper stops even making rooms again.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Daern
Sorcerer


Joined: 15 Apr 2011
Posts: 809

PostPosted: Sun Jul 29, 2012 11:45 pm   
 
Two problems that I see. First, the #SET should be a #STATE. Second, the roomdesc variable is never being cleared, so rooms will have the descriptions of the all previous rooms you've been through tacked on at the start. Just add a roomdesc = "" to empty it in the first trigger state, and you should be good to go.
Reply with quote
Mumra
Wanderer


Joined: 12 Feb 2003
Posts: 93
Location: USA

PostPosted: Sun Jul 29, 2012 11:45 pm   
 
PHEW! After fiddling with it all day.. trying many different ways to capture it all. I ended up using this:
Code:

#TR {^(*) (%s) {NW|/} (%s)  {N|-} (%s) {NE|\}$} {
  #VAR roomname {%1}
  #TAG name {%1}
  #VAR roomdesc {}
  }
#COND {^(*) (%s) {W|-} -(?)-~(~+~)-(?)- {E|-}$} {}
#COND {^(*) (%s) {SW|\} (%s)  {S|-} (%s) {SE|/}$} {}
#COND {^(*) (%s) {SW|\} (%s)  {S|-} (%s) {SE|/}$} {
#IF %begins(%line, "Exits") {#TAG exits} {#IF %begins(%line, ~>%char) {} {#addi roomdesc %line}}} {Dur|Param=700}


Now, it IS doing everything right. Proper names, descs, exits.
_________________
Mumra the Everliving, Realms of Despair
216.251.47.10 Port 4000
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
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