7 years ago ... CMUD mapper help needed

Need some help with your MUD client? Forgot your password? Get help here.
Forum rules
- Use common sense and be respectful towards each other at all times, even when disagreeing.
- Do not reveal sensitive game information. Guild secrets, player seconds are examples of things not allowed.
User avatar
Kitriana
Champion
Posts: 627
Joined: 04 Mar 2010 04:46
Location: United Kingdom

Re: 7 years ago ... CMUD mapper help needed

Post by Kitriana » 11 May 2017 22:31

Tarax the Terrible wrote:
gorboth wrote: It features maps that are quite a bit cooler than zmud maps! ;-)
cmud supporting gmcp allows them to make a window to include magic map beside zmud type map if they want, i believe
How do you do this?
If something I wrote sounds confusing ... assume you misunderstood it.

User avatar
Ody
Hero
Posts: 396
Joined: 18 Apr 2015 03:28
Location: Vingaard Keep

Re: 7 years ago ... CMUD mapper help needed

Post by Ody » 11 May 2017 22:40

Kitriana wrote:
Tarax the Terrible wrote:
gorboth wrote: It features maps that are quite a bit cooler than zmud maps! ;-)
cmud supporting gmcp allows them to make a window to include magic map beside zmud type map if they want, i believe
How do you do this?
I love the magic map. I'd also like to know how.

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: 7 years ago ... CMUD mapper help needed

Post by Tarax the Terrible » 12 May 2017 02:58

First ask someone smarter than me...

But here is why I reckon it is possible reading Mercedes post here tells us the map is in gmcp data available to the client

https://www.genesismud.org/forums/viewt ... =37&t=2947
The GMCP interface for maps has been changed. The complete ASCII map is now passed with GMCP, along with the coordinates. This way the client doesn't have to rely on the maps being available before from a certain location. For this Room.Info has been amended with the coordinates. This is called when the player moves to another room.



Code:
Room.Info

Upon subscription of the Room package it will send information about the
environment the player is in. The payload for each room is an object with
the following keys:

id - A unique identifier for the room. This will remain static as long
as the code of the room isn't moved.
short - The short description of the room.
exits - An array listing the exits of the room.
doors - An array listing the exits of the room reachable through a door.
x, y - Coordinates of the room on the map. Omitted if the room isn't on
the map. Note x=0 will never happen, so you can test for that.
The zoomx, zoomy are only given if there is a zoomed map.

Example: { "id" : "iX5PnH",
"short" : "A pond with a waterfall.",
"exits" : [ "up", "east" ],
"doors" : [ "north" ],
"x" : x, "y" : y, "zoomx" : zoomx, "zoomy" : zoomy }




In addition, a new Room.Map has been created, that is called whenever the player moves to a new section of the map.



Code:
Room.Map

This package is sent when a player enters into a new map area. It contains
the map graphics and optionally the zoomed map graphics.

Example: { "map" : "map graphics",
"zoom" : "zoomed map graphics" }




Note, the Room.Map is NOT called when the player moves to an area that isn't covered by the Map. Whether the player is on the map can be determined by the Room.Info.X being positive (X=0 will not happen on maps). The presence of the zoom function can be determined by the Room.Info.zoomx being positive.
Then work out how to call that gmcp data up in cmud

http://forums.zuggsoft.com/forums/viewt ... p?p=158455
Explains gmcp in cmud

From that to show map on main screen a command something like this is needed

#SHOW %gmcp.Room.Map


But have to work out how to call the "map graphics" bit. I think it is.

#SHOW %gmcp.Room.Map.map


Once you have a command that shows the map finally need to work out how to send it to its own dedicated chat window.
There is an example here of ppl at another mud sending gmcp data to a new window

http://www.aardwolf.com/wiki/index.php/Clients/CmudGMCP

So try

Code: Select all

execwin MagicMap { #clr }
#win MagicMap  {%gmcp.Room.Map.map}
Lol would be pretty amazing if that works

If it does, make a trigger for it to fire every time game sees "exit"

If not ask the guys posting on the mud client section of the forum I'm sure if it is possible they will tell u how.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: 7 years ago ... CMUD mapper help needed

Post by Tarax the Terrible » 13 May 2017 02:13

Installed trial of cMud to play around with it..
It is definitely possible but still need some expert help to make it usable.

I am not familiar with cMud at all and I had trouble making a new window at first, but then got it to work even tho I didn't do anything different.
Just used two commands to see if they work.

To Create the Window

Code: Select all

#window MagicMap
And to send magic map data to the window.

Code: Select all

#window MagicMap {%gmcp.Room.Map.map}

Here are some screenshots.

Called the map up on the game screen as well to compare them.

So if you could work out how to control when the text being shown in the Magic Map window moves to a new line you are all set.
Attachments
cmd2.png
Sending GMCP data to the window. Don't need normal map on the mud screen could do it at any time, with a trigger like every time you move.
cmd2.png (72.31 KiB) Viewed 2342 times
shows-promise.png
It does show that it is possible at least
shows-promise.png (90.84 KiB) Viewed 2342 times
has-issues.png
There is a problem with the word wrapping in the window. If the width of the window isn't right the map looks wrong. But maps of different areas will not stick to the same window size.
has-issues.png (85.5 KiB) Viewed 2342 times
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

User avatar
Tarax the Terrible
Myth
Posts: 1331
Joined: 09 Mar 2010 20:33
Location: UK

Re: 7 years ago ... CMUD mapper help needed

Post by Tarax the Terrible » 13 May 2017 02:26

Package editor looks promising, digging through the settings to see if I can find anything.
Session emulation and wordwrap might be the key...
Lol turned off word wrap and thought I was on to something and instead it put it all on one line!

About reached the limits of my tinkering powers.

You could maybe work around it by measuring the length of the legend line of text from the map and resetting the window width on the fly, but I am sure there could be a more elgant solution

Was thinking on on this how you could use string functions to break it up into the correct line width.
Legend line would have been easiest to use to calculate the proper width, but just realised this isn't included in the .map

If there is something I'm missing which can tell gmcp users the correct width for each map pls let me know.
http://genesisquests.pbworks.com/
Join up and help each other with Quests :)

Post Reply
http://tworzymyatmosfere.pl/przescieradla-jedwabne-z-gumka/