[Home] [Downloads] [Search] [Help/forum]

Gammon Software Solutions forum

See www.mushclient.com/spam for dealing with forum spam. Please read the MUSHclient FAQ!

[Folder]  Entire forum
-> [Folder]  MUSHclient
. -> [Folder]  Miniwindows
. . -> [Subject]  Map miniwindow in MKO?
Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Map miniwindow in MKO?
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please)
Maximum of 6000 characters. Text only please, no HTML.
Forum codes:
Check this if your message uses 'forum codes' or templates (auto-detected for new posts).
Forum codes Templates

Save this message ...


Subject review (reverse sequence)

Pages: 1 2  

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Sun 15 May 2011 03:29 AM (UTC)  quote  ]

Amended on Sun 15 May 2011 03:30 AM (UTC) by Twisol

Message
Kaimarae said:
My god... Your plugin is the most insane thing I have EVER seen.

Does it track things entering and leaving the room too? Christ.

Ahahahahaha. :D No, that's all data that MKO itself is sending! The GMCP plugin enables it and makes it available to other plugins.

(And yes, it should track things entering and leaving! Just not players, I think. Check out ironrealms.com/gmcp-doc for almost-full documentation.)

Kaimarae said:
EDIT: More fun things. Disabled the Debug. Map now updates when I walk... Still isn't gagging, and the map appears twic- nevermind. It stopped doing that. Now to gag the old one...

Yeah, I figured the debug output would muck up the triggers. Disable the debug (like you did) and behavior should return to normal.

Kaimarae said:
Also, is it possible to retain the original formatting of the map? Or is that a huge screw around?

Possible.... yes. Really, MapWindow does a couple things. First it cuts out a -lot- of extra space by removing every other character in a line. This compacts [] to +, removes the spaces between a room and its exits, and in general makes the map more compact. I don't really recommend changing this, personally.

The second thing it does is replace certain MAP characters with others. This is totally optional, and you can add/remove entries by changing the relevant fields in the plugin:
-- translate MAP markers
roomcode = {["S"] = "$", -- shop
            ["+"] = "@", -- current location
            ["$"] = "B", -- bank
            ["N"] = "N", -- newsroom
            ["P"] = "P", -- post office
            ["@"] = "W", -- wilderness exit
           }
 
-- color-code "special" rooms
roomcolor = {["@"] = 0xFFFFFF, -- white
             ["B"] = 0xFF8800, -- deep blue
             ["N"] = 0xFF8800, -- deep blue
             ["P"] = 0xFF8800, -- deep blue
             ["W"] = 0x0000FF, -- red
            }

You can disable the translation by changing this to:
roomcode = {}
roomcolor = {}


Kaimarae said:
Wow. I turned CONFIG MAPVIEW OFF for shiggles. Turns out, your map still works. So I guess that counts as it being gagged, heh...

Ahh, yes. I forgot that MKO has this (and Achaea only got it recently). Basically you have the main MAP command, which shows you the MAP alone, and the config option that shows the MAP as you move. My plugin, since it was written before CONFIG MAPVIEW became available, issues a MAP command and gags the response. You can turn the config option off without affecting the plugin.

Kaimarae said:
Sorry for taking up so much of your time, and thank you!

No problem! It's good to know the MapWindow isn't completely locked to Achaea. :)

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 03:15 AM (UTC)  quote  ]
Message
Wow. I turned CONFIG MAPVIEW OFF for shiggles. Turns out, your map still works. So I guess that counts as it being gagged, heh...

Sorry for taking up so much of your time, and thank you!
(If you're STILL in the mood for helping newbies could you take a look at this?
http://www.gammon.com.au/forum/?id=11110
Another thing I can't figure out.)
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 03:05 AM (UTC)  quote  ]

Amended on Sun 15 May 2011 03:08 AM (UTC) by Kaimarae

Message
Added "sequence = 99," to the help alias... now PARSE shows up. Did parse... But uh, no display is happening. Just doing MAP doesn't show it in the miniwindow now either (still displays map in main window)

EDIT: More fun things. Disabled the Debug. Map now updates when I walk... Still isn't gagging, and the map appears twic- nevermind. It stopped doing that. Now to gag the old one...

Confused panda.

Also, is it possible to retain the original formatting of the map? Or is that a huge screw around?
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 03:02 AM (UTC)  quote  ]
Message
Yay for your 2000th post!

MAP HELP comes up with the same list of commands as MAP PARSE.

In oth- WOAH. Just reconnected. Many MANY new lines upon looking around...

Hold on. They are:

Password correct. Welcome to Midkemia Online.
Your last login was from domain: pa114-72-245-171.pa.nsw.optusnet.com.au.

"message"="Char.StatusVars"
"data":
  "city"="City"
  "name"="Name"
  "guild"="Guild"
  "order"="Order"
  "level"="Level"
  "class"="Class"
  "fullname"="Full name"

"message"="Char.Status"
"data":
  "city"="Krondor (Peasant)"
  "name"="Kaimarae"
  "guild"="The Pathfinders (a Runner)"
  "order"="(None)"
  "level"="25 (11.62%)"
  "class"="Warlock Magician"
  "fullname"="Recruit Kaimarae"

"message"="Char.Skills.Groups"
"data":
  1:
    "name"="Vigilance"
    "rank"="Inept (0%)"
  2:
    "name"="Fighting"
    "rank"="Adept (17%)"
  3:
    "name"="Riding"
    "rank"="Inept (0%)"
  4:
    "name"="Arcana"
    "rank"="Adept (0%)"
  5:
    "name"="Thaumaturgy"
    "rank"="Adept (15%)"
  6:
    "name"="Demonology"
    "rank"="Capable (48%)"
  7:
    "name"="Tattoos"
    "rank"="Inept (0%)"

"message"="Comm.Channel.List"
"data":
  1:
    "caption"="Newbie"
    "name"="newbie"
    "command"="newbie"
  2:
    "caption"="Market"
    "name"="market"
    "command"="market"
  3:
    "caption"="Krondor"
    "name"="ct"
    "command"="ct"
  4:
    "caption"="Pathfinders novices"
    "name"="gnt"
    "command"="gnt"
  5:
    "caption"="Pathfinders"
    "name"="gt"
    "command"="gt"

"message"="Char.Name"
"data":
  "name"="Kaimarae"
  "fullname"="Recruit Kaimarae"

"message"="Room.Info"
"data":
  "map"="www.midkemiaonline.com/irex/maps/clientmap.php?map=4&building=0&level=0 12 6"
  "num"=7126
  "name"="First Bank of Krondor."
  "environment"="urban"
  "details":
    1="bank"
  "coords"="4,12,-1,0"
  "exits":
    "n"=566
  "area"="Krondor"

Your moon tattoo tingles slightly.
*** SPECIAL: It's Double XP today!

First Bank of Krondor.
This simple room is small and square without windows or secondary entry point 
other than the main doorway to the street. Iron bars divide the room in half, 
with several guards holding crossbows and swords belted at their waist. Standing
behind the safety bars, they guard a wizened old man who sits behind a desk in 
the middle of the room with a large ledger on his desk, holding a long feathered
quill. There are 2 corpses of a seagull here. Cutlass discarded to one side, a 
mariner lies here covered in his own blood. Her fine clothes ruined, a female 
smuggler lies here dead.
"message"="Char.Items.List"
"data":
  "location"="room"
  "items":
    1:
      "id"="12593"
      "name"="the corpse of a seagull"
    2:
      "id"="15046"
      "name"="the corpse of a seagull"
    3:
      "id"="13146"
      "name"="the corpse of a Quegan mariner"
    4:
      "id"="9505"
      "name"="the corpse of a smuggler"


You see a single exit leading north (open door).
"message"="Char.Vitals"
"data":
  "string"="H:935/935 E:236/236 M:1033/1033 A:500/1000 NL:11/100 "
  "ep"="236"
  "maxhp"="935"
  "hp"="935"
  "maxap"="1000"
  "maxep"="236"
  "maxmp"="1033"
  "mp"="1033"
  "nl"="11"
  "ap"="500"

935h, 236e, 1033m xb A:50% -

Room.Info { "num": 7126, "name": "First Bank of Krondor.", "area": "Krondor", "environment": "urban", "coords": "4,12,-1,0", "map": "www.midkemiaonline.com/irex/maps/clientmap.php?map=4&building=0&level=0 12 6", "details": [ "bank" ], "exits": { "n": 566 } }------- v7126 -------
"message"="Redirect.Window"
"data"="map"

  |           | 
 [<] [P] [S] [ ]
    \ |   |   |     /
-[ ]-[ ]-[ ]-[ ]-[ ]-
      |   |   | 
 [C] [ ] [+] [ ] [N]
      | \   /   \ | 
-[ ] [<]-[ ]-[ ]-[ ]-
  |   | \   /       /
 [ ] [ ] [ ]-[E] [S]
      | / | 
"message"="Redirect.Window"
"data"="main"

------ 12:-1:0 ------


Then the vitals thing just repeats a lot.

My god... Your plugin is the most insane thing I have EVER seen.

Does it track things entering and leaving the room too? Christ.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Sun 15 May 2011 02:53 AM (UTC)  quote  ]

Amended on Sun 15 May 2011 02:55 AM (UTC) by Twisol

Message
....That's very weird, because it's an alias I put in MapWindow. It shouldn't be coming up with a list of commands, it should do nothing visibly at all. And yet GMCP's debug alias seems to be working.

When you installed GMCP, were you connected or not? If you were connected, have you since reconnected? I'm not sure, but I think GMCP can only be enabled right as you're connecting to the MUD, so you should reconnect to be sure.

If you open up the reflexes/map.lua file again, are there any 'alias' lines at the bottom? There should be two, one for any generic MAP* command and another for the MAP HELP output for my plugin. If they're both there, see if MAP HELP works at all.

[EDIT]: You may need to add the "sequence = 99," property to the help alias, due to a bug in my alias ordering I just noticed.

[EDIT]: Woohoo! 2,000th post!

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 02:43 AM (UTC)  quote  ]
Message
Hummm... MAP PARSE isn't a command, it just comes up with a list of other MAP commands.

There don't appear to be any lines out of the ordinary with debug enabled.

And yes, I use quite a few aliases and they are indeed enabled (checked anyway, juuust to be sure)
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Sun 15 May 2011 02:39 AM (UTC)  quote  ]
Message
The MAP PARSE alias should do that (i.e. hide the map output while still updating the window). It's very odd that it doesn't work for you: I just re-downloaded and installed it and it works fine.

As for auto-updating, type GMCP DEBUG and then type LOOK. Paste all of the new lines (they should be like Char.Vitals <stuff>, Room.Info <stuff>, etc.). If there -aren't- any new lines, or the MUD says that's not a command, let me know.

Oh, incidentally, go to Game -> Configure -> Aliases and make sure "Enable aliases" is checked.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 02:29 AM (UTC)  quote  ]
Message
Some manner of success. It now updates when I do "MAP", but not when I move or look around. It also doesn't omit the map in the regular text, is it possible to get it to do that?
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Sun 15 May 2011 02:20 AM (UTC)  quote  ]
Message
Oh lovely. That basically means it's been collecting lines from the output window, and it -finally- hit a line that matches the map-end trigger. Then it processed it (removing every other character) and displayed it.

Open up the MapWindow.plugin folder and edit reflexes/map.lua. Find the trigger definition starting with trigger["prompt"], and change the match text to a regexp that matches your prompt. (Paste yours here and I'll try to write one for you.) Then find trigger["arealine"] right above it and replace the match= line with:

match = [[^\-+(?: v\d+ )?\-+$]],


That should match the first line in your example map output. Reload the plugin and give it another try.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 02:09 AM (UTC)  quote  ]

Amended on Sun 15 May 2011 02:10 AM (UTC) by Kaimarae

Message
Um. Ok. So, I started attacking something. Now the window has two columns of seemingly random gibberish.

e.g.

adna    rainiecvrs
amna    un famna
bnicm   adtcm
bae     evrdm
bro     odn
cen     ar
clsis   aatu onan


...?
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 02:03 AM (UTC)  quote  ]
Message
Moved, looked, MAP-ed. Tried MAP PARSE but it just comes up with a list of commands for it and does nothing. Hmm... Curiouser and curiouser.
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Sun 15 May 2011 02:01 AM (UTC)  quote  ]
Message
Without the GMCP plugin, you can use MAP PARSE to force a refresh. (Sorry I didn't make that clear originally - it's been a while since I first made it!) With GMCP, it should only take a LOOK/QL or any kind of movement to cause an update.

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 02:00 AM (UTC)  quote  ]

Amended on Sun 15 May 2011 02:01 AM (UTC) by Kaimarae

Message
Installed the second plugin, still no display... On the upshot, a black window is a step in the right direction as I couldn't even get that, heh heh.

I have tried manually MAP-ing
[Go to top] top

Posted by Kaimarae   (34 posts)  [Biography] bio
Date Sun 15 May 2011 01:58 AM (UTC)  quote  ]
Message
Weeelp... It displays a blank/black window. Do I need any other plugins to get it to work? If not, how can I go about looking at/changing the trigger matches?
[Go to top] top

Posted by Twisol   USA  (2,257 posts)  [Biography] bio
Date Sun 15 May 2011 01:54 AM (UTC)  quote  ]

Amended on Sun 15 May 2011 01:55 AM (UTC) by Twisol

Message
If I recall, the mapper is built into the Rapture code shared by all of their MUDs, so it should theoretically work the same. You might also want to grab my GMCP plugin [1], as the MapWindow hooks into some GMCP events so it can tell when to update the map.

[1]: http://jonathan.com/achaea/plugins/GMCP.plugin.zip

'Soludra' on Achaea

Blog: http://jonathan.com/
GitHub: http://github.com/Twisol
[Go to top] top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


6,166 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

Quick links: MUSHclient. MUSHclient help. Forum shortcuts. Posting templates. Lua modules. Lua documentation.

[Home]

Written by Nick Gammon - 5K

Comments to: Gammon Software support
[RH click to get RSS URL] Forum RSS feed ( http://www.gammon.com.au/rss/forum.xml )

[Best viewed with any browser - 2K]    [Web site powered by FutureQuest.Net]