[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]  Plugins
. . -> [Subject]  Improved Aardwolf "bigmap" miniwindow-based plugin

Home  |  Users  |  Search  |  FAQ
Username:
Register forum user name
Password:
Forgotten password?
(New message)
Subject: Improved Aardwolf "bigmap" miniwindow-based plugin
Name:
Your forum user name.
Register forum user name
Password:
Your forum password.
Forgotten password?
Message:
Message to be posted (in English, please).
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  3  

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sat 08 Aug 2009 03:41 AM (UTC)  quote  ]
Message
Ah, I noticed that a bit too - the auto hide doesn't always work. Here's why ...

When you are "at large" on the big map, the server sends your coordinates, which are what you see at the bottom of the map, like this:


{coords}2,45,22


This means you are at 45,22 in zone 2.

When you enter a zone it sometimes sends:


{coords}-1


When the plugin sees that it hides the map. However some zones (eg. Aylor) don't send either. Thus, the map stays visible. I think, for example, in the Academy it sends "{coords}-1" so the big map disappears when you enter that.

I just made a macro key F5 which sends "bigmap" which toggles the map on and off, and hit F5 when I want to show/hide the map.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Safiya   (4 posts)  [Biography] bio
Date Sat 08 Aug 2009 03:00 AM (UTC)  quote  ]
Message
Ok, thank you for the response and the info. I saw the screenshot with mouseovers and started drooling :P

As to the bigmap not hiding when it should, it varies from zone to zone it seems. For example I can go to Nulan or Flying Citadel and the BigMap always vanishes as it should and reappears when I leave. many other areas however, it does not go away.

I'll fiddle around with it s'more and try to note when it works and when it does not, maybe it'll be useful.

[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Fri 07 Aug 2009 09:28 PM (UTC)  quote  ]
Message
Quote:

I can't seem to get the mouseovers or zone names to work at all


That is an experimental version I haven't released yet. It isn't supposed to work in your version. I am having some technical difficulties, for example in Vidblain all the zones are called the same thing. Also some zones are inside others (eg. the Academy is inside Aylor).


I cant get it to work again.


Maybe you toggled it off? If you type "bigmap" on its own it turns the map off permanently, until you type it again. Also check the plugin is enabled in the plugins list.

Quote:

... would it be possible to not have the dual targeting rings surrounding the player position?


Sure, anything is possible. In the plugin are four sets of lines like this:


-- draw circle around us
  WindowCircleOp (win, 1, 
                  our_location_x - 20, our_location_y - 20,
                  our_location_x + 20, our_location_y + 20,
                  ColourNameToRGB "cornflowerblue",  -- pen colour
                  0, -- solid pen
                  3, -- pen width
                  0, -- brush colour
                  1 ) -- null brush


The first two do the outer ring, which is a 3-pixel wide "cornflowerblue" ring, with a 1-pixel wide "cyan" ring in the middle of it. This is drawn 20 pixels out from where you are (see the + / - 20 above).

The second two do the inner ring, which is 8 pixels from where you are.

To get rid of one of the rings delete the appropriate batch of lines. To change the diameter change the "20" or the "8" to some other number.

You could make the rings narrower by changing the "3" (pen width) above to 2 or 1.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Safiya   (4 posts)  [Biography] bio
Date Fri 07 Aug 2009 02:43 PM (UTC)  quote  ]

Amended on Fri 07 Aug 2009 06:06 PM (UTC) by Safiya

Message
This plugin looks great but I can't seem to get the mouseovers or zone names to work at all. Are there options for this in game I just haven't found? Also the map never goes away when I enter an area regardless of the 'bigmap auto on/off' setting.

From a purely aesthetic perspective would it be possible to not have the dual targeting rings surrounding the player position? The near ring obscures the nearest surrounding tiles. Maybe instead of an inner ring just make the square the player is occupying currently stand out in a different manner. The outside ring is great.

Thank You

EDIT: The map is turning off/on properly now, mouseover/label issues remain.

EDIT 2: Well it only worked for a brief while and I cant get it to work again. I do not know if another plugin is messing with it or it is the plugin itself or simply user error.

If it helps, I am running the following plugins + AardMUSH client updated to 4.42:

Fiendish's Chat
Colored Consider Messages from here somewhere
Bast Spellups
Bast Quest Miniwindow
Bast Campaign Miniwindow
Blainers Inventory Miniwindow
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 06 Aug 2009 12:33 AM (UTC)  quote  ]
Message
The whole thing might look better if someone (hint) did graphics for every possible terrain type (like I did for the zone entrances) rather than relying on the built-in textures which are not entirely appropriate. Then stars could look like, well, stars.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 06 Aug 2009 12:15 AM (UTC)  quote  ]

Amended on Thu 06 Aug 2009 12:44 AM (UTC) by Nick Gammon

Message

This is what Vidblain looks like now, for me:

I edited the plugin above to reflect these changes.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Thu 06 Aug 2009 12:11 AM (UTC)  quote  ]

Amended on Thu 06 Aug 2009 01:10 AM (UTC) by Nick Gammon

Message
I have incorporated your changes into my latest version of the plugin. I see your point about the space, however the plugin was just drawing a space in a textured way in the current colours, as you noticed. You might argue that Aardwolf is drawing a space "in the wrong colour". ;)

Incorporating images is a moderator-only thing.

As for the other anomalies, they are caused by the detection code for the "|" symbols. In the function map_redirect replace:


    for _, v in ipairs (map) do
      
      if v [1].text == "|" then
        table.remove (v, 1)
      end -- remove first border
      
     if v [#v].text == "" then
        v [#v] = nil
      end -- remove last border
      
      if v [#v].text == "|" then
        v [#v] = nil
      end -- remove last border
    
    end -- for


by:


   for _, v in ipairs (map) do
      
      if v [1].text == "|" then
        table.remove (v, 1)
      elseif string.match (v [1].text, "^|") then
        v [1].text = string.sub (v [1].text, 2)
        v [1].length = #v [1].text
      end -- remove first border
      
     if v [#v].text == "" then
        v [#v] = nil
      end -- remove last border
      
      if v [#v].text == "|" then
        v [#v] = nil
      elseif string.match (v [#v].text, "|$") then
        v [#v].text = string.sub (v [#v].text, 1, -2)
        v [#v].length = #v [#v].text
      end -- remove last border
    
    end -- for


This additional code handles the case of the "|" being in a style run with a space - which is what happens in this particular case. Then force the cache to be reloaded by typing:

bigmap remove map cache


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Artel   USA  (63 posts)  [Biography] bio
Date Wed 05 Aug 2009 11:31 PM (UTC)  quote  ]

Amended on Wed 05 Aug 2009 11:33 PM (UTC) by Artel

Message
Oops. Maybe I mis-described the problem, or didn't describe it enough. Sorry about that.

I've now looked into this a little more, and I still think the bigmap isn't showing how it ideally should. For a good example of the problem, note the blue star of Ultima. In the actual bigmap, it's a single star. In the plugin, it's a blue bar. This happens with all objects in Vidblain though.

For a screen shot of the original bigmap, see
[img]http://frostblade.net/aardwolf/vidblain_actual.png[/img]

The cause of this is that the bigmap plugin bases the brush based on the text color. Aardwolf exploits the fact that a space character doesn't have any text to color, so all of the maps and bigmaps "color bleed" (or at least that's what we would call it in Aardwolf. I realize now that color bleeding means an entirely different thing in this real world!)

See this screen shot for an example-- it is just Vidblain highlighted to show the foreground colors:
[img]http://frostblade.net/aardwolf/vidblain_highlighted.png[/img]

A possible fix, I thought, would be to check to see if the character is a space, and if so, set the foreground color to be the background color of the bigmap.

The small code changes on approx. line 210 in function Display_Styled_Line:

      local forecolour = v.textcolour
      if brush == 0 then 
        backcolour = v.textcolour
      end -- if
      if char == " " then
        forecolour = background_colour -- invisible
       end -- if
      WindowCircleOp(win, 2, left, top, left + rectangle_size, top + rectangle_size,
                    forecolour, 5, 0,   -- pen colour, null pen, pen width
                    backcolour, brush)  -- brush colour, style


This makes things look much better-- see the following screenshot.

[img]http://frostblade.net/aardwolf/vidblain_better.png[/img]

It's now usable, but for some reason, there are several visual mistakes on Vidblain such as the vertical bar on the left and two squares that are cut off on the right. I haven't yet looked into those.

Edit: How do you get the images to show up in the post, Nick? Is that a moderator-only thing, or is it an undocumented forum code?

Artel.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Wed 05 Aug 2009 09:32 PM (UTC)  quote  ]
Message

It's not bleeding. Perhaps an optical illusion from the ragged edges. See your original:

And now part of it enlarged by zooming in:

The edges are crisp and regular.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Artel   USA  (63 posts)  [Biography] bio
Date Wed 05 Aug 2009 08:18 AM (UTC)  quote  ]
Message
http://frostblade.net/aardwolf/vidblain.png

Artel.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Wed 05 Aug 2009 05:58 AM (UTC)  quote  ]
Message
Doesn't look too bad to me. Can you post a screen shot somewhere?

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Artel   USA  (63 posts)  [Biography] bio
Date Wed 05 Aug 2009 03:04 AM (UTC)  quote  ]
Message
This is quite cool!

Only problem is that the brushes seem to bleed while on Vidblain for me. I haven't yet tried to debug it, so I'm not sure what the cause is.

Artel.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Mon 03 Aug 2009 08:46 PM (UTC)  quote  ]

Amended on Mon 03 Aug 2009 11:06 PM (UTC) by Nick Gammon

Message
Edit the plugin, and in it, near the end of function DrawMap (around line 325), change:


  -- DrawEdge rectangle
  WindowRectOp (win, 5, 0, 0, 0, 0, 10, 15)
  
  WindowShow (win, true)
  
  Repaint ()
end -- DrawMap


to:


  -- DrawEdge rectangle
  WindowRectOp (win, 5, 0, 0, 0, 0, 10, 15)
  
  if show_map then
    WindowShow (win, true)
    Repaint ()
  end -- if

end -- DrawMap



I amended the post at the top of this page to have the change in it.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
[Go to top] top

Posted by Aps   (5 posts)  [Biography] bio
Date Mon 03 Aug 2009 12:40 PM (UTC)  quote  ]
Message
It looks better, but there is a problem. Typing bigmap to disable it so I can see my screen to read when I don't need my bigmap doesn't work how it was intended idt. Everytime I look or move the bigmap pops up taking up my screen again when it was suppose to be disabled. Then I have to enter bigmap twice to get it back off my screen, but it'll come back up if I move or look.
[Go to top] top

Posted by Nick Gammon   Australia  (18,770 posts)  [Biography] bio   Forum Administrator
Date Sun 02 Aug 2009 02:05 AM (UTC)  quote  ]

Amended on Mon 03 Aug 2009 12:15 AM (UTC) by Nick Gammon

Message

I've been experimenting a bit with this plugin. It looks good so far, but I still like to know *what* is around me - just seeing a lot of zone entrances is kind-of unhelpful. Like, which zone is which? Where should I go to next? This enhancement attempts to address this issue.

What this is showing is:

  • If you mouse-over a zone entrance a tooltip window pops up telling you the zone name, level range, and minimum level requirement.
  • Zones within your area range have their names shown on the map, optionally. The reason for not showing all of them is that, first it is cluttered, and second, you don't care as much about zones outside your level range.
  • At the bottom of the map it shows which zone you are currently in.
  • Zone entrances are colour-coded, as follows:
    • Cyan - Zone name (and therefore, its information) is not known
    • Green - too low for your level
    • Yellow - appropriate for your level
    • Red - too high for your level
    • White - your level is not known - install the Stats plugin

It is hard to cram the information on the window without it looking a mess, even using a 6-point typeface. Still, I am reasonably pleased with the result. It gives a better idea of where to explore.

The information is kept in a SQLite database, so it can be shared between all characters you might have, more easily.


The image above shows the zones with the names toggled off - you can still see from the entrance colours which ones are appropriate for you, so you might mouse-over the yellow ones to work out which ones to explore.


- Nick Gammon

www.gammon.com.au, www.mushclient.com
[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.


13,821 views.

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

[Reply to this subject]  Reply to this subject   [New subject]  Start a new subject   [Refresh] Refresh page

Go to topic:           Search the forum


[Go to top] top

[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]    [Internet Contents Rating Association (ICRA) - 2K]    [Web site powered by FutureQuest.Net]