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
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Mon Dec 12, 2011 3:38 am   

Gmcp in Materia Magica Problem
 
So I was messing around checking out some new Muds. I decided I would try Materia Magica and lo and behold they have implemented GMCP for the mapper. However, this is what is showing up in the debugger:

Code:
room.info{"num":11640,"name":"The Eastern Arm of the Garden","zone":"The Village of Lasler","terrain":"plain","terraininfo":"diggable plains","size":"norma","shape":"square","plane":1,"coord":{"id":5,"name":"Lasler Wilderness","x":30,"y":27},"exits":{"w":11639}}


Even if you do a %replace to replace the "& q u o t ;" with " it cuts off everything before the name and ends up as:

Code:
"The Eastern Arm of the Garden","zone":"The Village of Lasler","terrain":"plain","terraininfo":"diggable plains","size":"norma","shape":"square","plane":1,"coord":{"id":5,"name":"Lasler Wilderness","x":30,"y":27},"exits":{"w":11639}}


I am not sure how to fix the problem here or why it isn't capturing all of it in "%gmcp.room.info".

Edit: Well for some reason even putting this into a code block it still is translating the "& q u o t ;". So just imagine that first code block having that for every quotation mark.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Dec 13, 2011 5:08 am   
 
Okay I figured out what the problem is. This is what it looks like when I print out %gmcp:

Quote:
data=Office","zone":"Tellerium","terrain":"indoors","terraininfo":"sheltered","size":"normal","shape":"square","plane":1,"coord":{"id":1,"name":"Alyria","x":1724,"y":685},"exits":{"s":41855,"d":41965}}|olddata=Office","zone":"Tellerium","terrain":"indoors","terraininfo":"sheltered","size":"normal","shape":"square","plane":1,"coord":{"id":1,"name":"Alyria","x":1724,"y":685},"exits":{"s":41855,"d":41965}}|module=room|package|message=info{"num":41852,"name":"Mayor's|room="info=Office","zone":"Tellerium","terrain":"indoors","terraininfo":"sheltered","size":"normal","shape":"square","plane":1,"coord":{"id":1,"name":"Alyria","x":1724,"y":685},"exits":{"s":41855,"d":41965}}"


You can see what is happening in the bolded part. That's why %gmcp.room.info only captures part of what is received.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Tue Dec 13, 2011 6:18 am   
 
Here is what the server is sending and what it looks like: http://pastebin.com/vyZLVvmR
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Tue Dec 13, 2011 5:11 pm   
 
There is only one piece at that link. Did you intend to send a second piece? I can't tell whether you are saying this is a bug in Cmud or a bug at Materia Magica.
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Wed Dec 14, 2011 12:02 am   
 
So? That's the only piece that matters? I just copied that off the Message Dialog from tools. Razz That's exactly what it looks like in #DEBUG anyway.

Anyway, I'm not sure. I think it may be both. It's sending the whole thing, but Cmud isn't translating it correctly?
Reply with quote
oldguy2
Wizard


Joined: 17 Jun 2006
Posts: 1201

PostPosted: Sat Dec 17, 2011 3:42 am   
 
So here is an example straight from the debugger:

Code:
a  materiam |[SAFE]<678hp 400sp 680st> l
i  materiam >l<CR><LF>
d  materiam |[1] materiamagica_def Comline : stopped
i  materiam <<IAC><SB><201>room.info{"num":28035,"name":"Temple Courtyard","zone":"Sigil","terrain":"city street","terraininfo":"diggable hard","size":"immense","shape":"square","plane":1,"coord":{"id":1,"name":"Alyria","x":435,"y":1226},"exits":{"n":28036,"e":28016,"s":27963,"w":28079}}<IAC><SE><LF><CR>
<ESC>[1;33m Temple Courtyard                                       <ESC>[34m-      <ESC>[33mN     <ESC>[34m -<ESC>[0m<LF><CR>
<ESC>[1;34m(-------------------------------------------------)     <ESC>[33mW <ESC>[34m<-<ESC>[34m-<ESC>[34m-(<ESC>[35mM<ESC>[34m)-<ESC>[34m-<ESC>[34m-> <ESC>[33m<ESC>[33mE<ESC>[0m<LF><CR>
                                                        <ESC>[1;34m-      <ESC>[33mS     <ESC>[34m -<ESC>[0m<LF><CR>
  <ESC>[1;36mVisible Exits: <ESC>[33mN <ESC>[33mE <ESC>[33mS <ESC>[33mW <ESC>[0m<LF><CR><LF><CR>
  <ESC>[0mThe square before the temple has a large circle of inlaid wood in the<LF><CR>
center.  The oak depicted is a mesh of various woods, with leaves of green<LF><CR>
pine, golden teak and red sequoia.  The tree looks real, as the various<LF><CR>
shades blend together, and the traffic has not diminished the beauty of the<LF><CR>
carving.  Suddenly, a being materializes and walks from the tree toward the<LF><CR>
druids standing off to one side.  <LF><CR>
<ESC>[0m     <get name="a Yule evergreen tree" desc="a Yule evergreen tree"><ESC>[1;33mA tall, evergreen Yuletide tree is here, giving holiday cheer to the towne.<ESC>[0m</get><LF><CR>
     <get name="a string of blinking Yuletide lights" desc="a string of blinking Yuletide lights"><ESC>[1;32mA string of Yuletide lights blink here, giving the streets a warm glow.<ESC>[0m</get><LF><CR>
<ESC>[1;33m[Clan 81]<ESC>[0m <pers name="Calum" desc="Calum"><ESC>[0m<ESC>[1;32mCalum<ESC>[0m<ESC>[1;32m</pers> <ESC>[0;35mc<ESC>[1;31mat<ESC>[1;30mtus <ESC>[0;35mrabi<ESC>[1;31mdus<ESC>[0m<ESC>[0m<ESC>[1;32m is here<ESC>[0m<ESC>[1;32m.<ESC>[0m<LF><CR><LF><CR>
<ESC>[1;37m[SAFE]<ESC>[0m<ESC>[1;34m<<V Hp><ESC>[0m678</V><ESC>[1;34mhp <V Sp><ESC>[0m400</V><ESC>[1;34msp <V St><ESC>[0m680</V><ESC>[1;34mst><ESC>[0m
a  materiam #Telnet 201: room.info{"num":28035,"name":"Temple Courtyard","zone":"Sigil","terrain":"city street","terraininfo":"diggable hard","size":"immense","shape":"square","plane":1,"coord":{"id":1,"name":"Alyria","x":435,"y":1226},"exits":{"n":28036,"e":28016,"s":27963,"w":28079}}

a  materiam | Temple Courtyard                                       -      N      -
a  materiam |(-------------------------------------------------)     W <---(M)---> E
a  materiam |                                                        -      S      -
a  materiam |  Visible Exits: N E S W
a  materiam |
a  materiam |  The square before the temple has a large circle of inlaid wood in the
a  materiam |center.  The oak depicted is a mesh of various woods, with leaves of green
a  materiam |pine, golden teak and red sequoia.  The tree looks real, as the various
a  materiam |shades blend together, and the traffic has not diminished the beauty of the
a  materiam |carving.  Suddenly, a being materializes and walks from the tree toward the
a  materiam |druids standing off to one side. 
a  materiam |     <get name="a Yule evergreen tree" desc="a Yule evergreen tree">A tall, evergreen Yuletide tree is here, giving holiday cheer to the towne.
a  materiam |     <get name="a string of blinking Yuletide lights" desc="a string of blinking Yuletide lights">A string of Yuletide lights blink here, giving the streets a warm glow.
a  materiam |[Clan 81] Calum cattus rabidus is here.
a  materiam |
a  materiam ][SAFE]<678hp 400sp 680st>
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Thu Feb 09, 2012 7:29 am   
 
When we do this in cmud 3.24 pro its
Quote:

gmcp: {
char: {
clan: Alyriae","clanalliancemembersince":1265768089,"clanhonorific":"Adeptus Major","clanmembersince":1264897563,"clansecurity":"setinfo setmotd addmember gohall deposit tax-deposit log chatlog balance alliancetalk clantalk","clangemdepositedtotal":116,"clangemdepositedmonth":0,"clangolddepositedtotal":3000011,"clangolddepositedmonth":0}
}
room: {
info: at Main and Baphomet","zone":"Towne of Rune","terrain":"city street","terraininfo":"diggable hard","size":"large","shape":"square","plane":1,"coord":{"id":1,"name":"Alyria","x":695,"y":770},"exits":{"n":10514,"e":10462,"s":10595,"w":10498}}
}
}


In CMUD Standard the %gcmp.message shows the remainder of the string in Pro there is no message?

CMud problem or Mud problem?
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
charneus
Wizard


Joined: 19 Jun 2005
Posts: 1876
Location: California

PostPosted: Thu Feb 09, 2012 8:46 pm   
 
I'd imagine it's a MUD problem. I've never seen this issue, and I use GMCP extensively on Aardwolf. It seems as if the MUD itself is pushing the quote entity instead of the quote character. I would wager that CMUD isn't translating it because CMUD shouldn't have to translate GMCP. I'd ask your MUD exactly how they're sending the GMCP information.
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Tue Feb 21, 2012 4:32 am   
 
Code:
0.1058 | <IAC><SB><201>room.info{"num":225834,"name":"The Arches of Rune Estates East","zone":"Rune Estates","terrain":"city street","terraininfo":"diggable hard","size":"normal","shape":"open","plane":1,"coord":{"id":1,"name":"Alyria","x":695,"y":770},"exits":{"w":10486,"ne":225849}}<IAC><SE>

_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Tue Feb 21, 2012 8:26 pm   
 
Okay Zugg question for you

They changed the GMCP to send as below in non compact format with space. This immediately fixed the issue. Concern being why in CMUD is that required and secondly why does CMUD send the server the same type of thing "W/O" spaces?

It seems to be somehow what should parse in compact mode JSON in CMUD does not but we send it in the very way that CMUD can't parse it. Counter Intuitive?

Quote:

0.0871 | <IAC><SB><201>room.info {<LF>
0.0001 | "num": 225834,<LF>
0.0000 | "name": "The Arches of Rune Estates East",<LF>
0.0000 | "zone": "Rune Estates",<LF>
0.0000 | "terrain": "city street",<LF>
0.0000 | "terraininfo": "diggable hard",<LF>
0.0000 | "size": "normal",<LF>
0.0000 | "shape": "open",<LF>
0.0000 | "plane": 1,<LF>
0.0000 | "coord": {<LF>
0.0000 | "id": 1,<LF>
0.0000 | "name": "Alyria",<LF>
0.0000 | "x": 695,<LF>
0.0000 | "y": 770<LF>
0.0000 | },<LF>
0.0000 | "exits": {<LF>
0.0000 | "w": 10486,<LF>
0.0000 | "ne": 225849<LF>
0.0000 | }<LF>
0.0000 | }<IAC><SE>
0.0030 | a MM #Telnet 201: room.info {<LF> "num": 225834,<LF> "name": "The Arches of Rune Estates East",<LF> "zone": "Rune Estates",<LF> "terrain": "city street",<LF> "terraininfo": "diggable hard",<LF> "size": "normal",<LF> "shape": "open",<LF> "plane": 1,<LF> "coord": {<LF> "id": 1,<LF> "name": "Alyria",<LF> "x": 695,<LF> "y": 770<LF> },<LF> "exits": {<LF> "w": 10486,<LF> "ne": 225849<LF> }<LF>}
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Tue Feb 21, 2012 8:29 pm   
 
Switched to INDENT 0 compacted it and it just added spaces. The spaces WERE REQUIRED to make it function in CMUD JSON without spaces failed horribly?

Take a look?
_________________
Confucious say "Bugs in Programs need Hammer"
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: Sun Apr 15, 2012 5:49 pm   
 
GMCP requires a space between the message name and the JSON data. So there MUST be a space between room.info and the first {
Reply with quote
edb6377
Magician


Joined: 29 Nov 2005
Posts: 482

PostPosted: Sat Apr 28, 2012 1:01 am   
 
Thanks zugg. We are loving the addition of it to Materiamagica.
_________________
Confucious say "Bugs in Programs need Hammer"
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