Welcome to the Achaea Forums! Please be sure to read the Forum Rules.

Vyzor Map Frame

ShubShub Posts: 27Member
I'm redoing my gui with Vyzor, and I cant seem to get a map frame that allows me to click on it. It is really driving me crazy! What am I missing?

--Borders
Vyzor.Options.Borders = {Top = 0.0, Bottom = 0.0, Left = 0.0, Right = 0.49}

--Frames
local map = Vyzor.Map( 0, 0, 1, 1 )
local mapframe = Vyzor.Frame("mapframe", 0, 0, 1, .5)
mapframe:Add(map)
Vyzor.HUD.Frames["VyzorRight"]:Add( mapframe )


Vyzor.HUD:Draw()


Comments

  • ShubShub Posts: 27Member
    So, I had to squish the right border frame in my setup function:

    function GUI_Setup()
      --Borders
      Vyzor.Options.Borders = {Top = 0.0, Bottom = 0.0, Left = 0.0, Right = 0.49}
      
    Vyzor.HUD.Frames["VyzorRight"]:Resize(0.51, 0.5)
    Vyzor.HUD.Frames["VyzorRight"]:Move(0.51, 0.5)
      Vyzor.HUD:Draw()
    end

    Then use the geyser mapper container in the newly freed up space:
    mapper = Geyser.Mapper:new({
      name = "mapper",
      x = "66%", y = 0,
      width = "34%", height = "50%"
    })

    Very ugly and counter-intuitive
  • ShubShub Posts: 27Member
    edited November 14
    Making progress on my new GUI, struggling with the chat window now. 

    I have gmcp capturing chat and routing it to various tabs of a vyzor chat widget, pretty slick!


    I'm having a very hard time coloring the text in the chat box though. When if fills up with white on black it gets very hard to read! The API reference functions are only letting me customize the tab headings.
  • ShubShub Posts: 27Member
    I ended up hacking a CEcho function into the chat.lua section the the vyzor code in my profile, that way I color code the channels separately the chat echo function just dispatched to the miniconsole's echo, minicolsole has a cecho that chat was lacking, so all I really needed to do was make a copy of echo and put some C's in front of it. Does the Vyzor author play Achaea? We should probably see about getting this in there to spare others these pains I'm going through.


      --- Echos any kind of text into a specific channel.
      -- @string channel The channel into which to echo.
      -- @string text
    function self:Echo (channel, text)
    if _miniConsoles["All"] then
    _miniConsoles["All"]:Echo(text)
        end

    if channel and channel ~= "All" then
    _miniConsoles[channel]:Echo(text)

    if channel ~= _currentChannel and _currentChannel ~= "All" then
    if _tabs[channel].Components["Background"] then
    _tabs[channel]:Remove("Background")
            end

    _tabs[channel]:Add(_pendingBackground)
    _pendingChannels[channel] = true
    end
    end
    end

      --- Echos any kind of text into a specific channel.
      -- @string channel The channel into which to echo.
      -- @string text
    function self:CEcho (channel, text)
    if _miniConsoles["All"] then
    _miniConsoles["All"]:CEcho(text)
        end

    if channel and channel ~= "All" then
    _miniConsoles[channel]:CEcho(text)

    if channel ~= _currentChannel and _currentChannel ~= "All" then
    if _tabs[channel].Components["Background"] then
    _tabs[channel]:Remove("Background")
            end

    _tabs[channel]:Add(_pendingBackground)
    _pendingChannels[channel] = true
    end
    end
    end
  • ShubShub Posts: 27Member
    edited November 15
    My GUI is starting to come together, maybe the switch to vyzor will be worth it, time will tell.

    I added a room info miniconsole without running into any roadblocks, it lists players denizens and items in their own respective sections. I'm going to make the list items into links that pop out with options to probe/get/target/ etc. as applicable to my clicked line, much like the nexus client.



    I also added the svo singleprompt, much like the mapper it is a geyser object that does not like to sit in a vyzor frame, so I had to resize and move the bottom border frame to see it. I still need to play with the reposition function to make it stay where I want it when the window resizes. Everything else in the UI survives window resizing except the prompt widget.

    I'm also thinking about making the resize event calculate and fire off new page length and line width config numbers to the game, that would be pretty slick.

    I'm still thinking about what I'd like to put in the green space. I'm trying to keep this looking like a terminal so that I can bash at work without drawing any suspicions.
  • KeneanungKeneanung Posts: 542Member ✭✭✭✭ - Eminent
    I don't think he plays Achaea, but I'll point him here.

    About the line width: you may want to set the Mudlet linewidth instead of in-game one as the latter one may break triggers with their hardcoded linebreaks.
  • TorinnTorinn Posts: 534Member ✭✭✭✭ - Eminent
    Awesome.  You want to add a limb tracker or after tracker! (Or both)
    Deucalion says, "Torinn is quite nice."
  • KeneanungKeneanung Posts: 542Member ✭✭✭✭ - Eminent
    Oh and you may also want to file some issues at https://github.com/Oneymus/Vyzor
  • KeneanungKeneanung Posts: 542Member ✭✭✭✭ - Eminent
    As he doesn't have an account here, I'll try to relay his answer. But it'd be best if you filed everything that nagged you at the repository mentioned above.

    If you like, you can open a PR on github. If you don't know how that works, come by the Mudlet discord (https://discord.gg/kuYvMQ9) and we can show you.

    The mapper and label could be https://github.com/Mudlet/Mudlet/issues/764, which is a long-standing bug in Mudlet :(
  • JacenJacen Posts: 2,243Member @@ - Legendary Achaean
    Would love to see the Mapper bug resolved, but I'd have no idea where to start
    image
  • ShubShub Posts: 27Member
    Wow, thank you all for visiting my spontaneous GUI pains thread!

    I hooked svo's namedb into my miniconsole, now my player list names are color coded by city. I also have some gmcp parsing going on that color codes items in the room, highlighting those that are takeable.

    Next question, is there a gmcp-ish way to determine denizen loyalty? I could do similar highlighting actions to separate out mounts/pets/minions from villagers and hostile creatures. The nexus client puts different little icons next to the different types of room items and denizens, so I know that information is there somewhere, I doubt it is doing probes and parsing everything.


  • ShubShub Posts: 27Member
    looks like GMCP contains a field for icon and some handy flags that could inform highlights, but does not contain loyalty information.

    I suppose I could use the gmcp info to trim my list of things to probe down to a reasonable amount if I were really determined to highlight denizens by their loyalties

    here is some sample gmcp data, m specifies that it is a monster, x that you probably shouldn't attack it. That gives you enough to not randomly strike people's mounts and guards, but pets don't have any such indicators. I'm thinking mx's go in gray, remaining m's get silently probed for loyalties. If the loyalties make it through my filters then it is marked as fair game for killing. Here is some sample GMCP output:

      },
      Add = {
        location = "room",
        item = {
          id = "508250",
          attrib = "m",
          name = "a diminutive homunculus resembling Shub",
          icon = "magical"
        }
      },
      List = {
        location = "room",
        items = {
          {
            id = "29962",
            attrib = "m",
            name = "a crystalline golem",
            icon = "magical"
          },
          {
            id = "62234",
            name = "a runic totem",
            icon = "rune"
          },
          {
            id = "106192",
            attrib = "mx",
            name = "a Riverwall bow-maiden",
            icon = "guard"
          },
          {
            id = "136695",
            name = "a logosmas stocking",
            icon = "lamp"
          },
          {
            id = "136883",
            name = "a logosmas platinum stocking",
            icon = "lamp"
          },
          {
            id = "161952",
            name = "the city's bounty board",
            icon = "scroll"
          },
          {
            id = "195601",
            name = "a lichen-mottled gravestone",
            icon = "mineral"
          },
          {
            id = "332213",
            name = "a lichen-mottled gravestone",
            icon = "mineral"
          },
          {
            id = "337125",
            name = "a lichen-mottled gravestone",
            icon = "mineral"
          },
          {
            id = "373786",
            attrib = "m",
            name = "Calcine, humgii of Fire",
            icon = "magical"
          },
          {
            id = "408459",
            name = "an ornate, silver-edged scroll",
            icon = "scroll"
          },
          {
            id = "417458",
            attrib = "m",
            name = "Dawlish, a one-handed atavian boy",
            icon = "humanoid"
          },
          {
            id = "418711",
            attrib = "m",
            name = "a crystalline golem",
            icon = "magical"
          },
          {
            id = "421603",
            attrib = "m",
            name = "a crystalline golem",
            icon = "magical"
          },
          {
            id = "444224",
            attrib = "mx",
            name = "a Naxian mistweaver",
            icon = "guard"
          },
          {
            id = "451247",
            attrib = "mx",
            name = "a Blackstone swordsman",
            icon = "guard"
          },
          {
            id = "464658",
            attrib = "mx",
            name = "a Duskmere brawler",
            icon = "guard"
          },
          {
            id = "464750",
            attrib = "mx",
            name = "a Shornwall defender",
            icon = "guard"
          },
          {
            id = "503429",
            name = "emerald mist"
          },
          {
            id = "474400",
            name = "a lichen-mottled gravestone",
            icon = "mineral"
          },
          {
            id = "116081",
            name = "a phantom sea turtle",
            attrib = "mx"
          },
          {
            id = "399906",
            name = "a guardian angel",
            attrib = "m"
          },
          {
            id = "386872",
            attrib = "mx",
            name = "a radiant white war horse",
            icon = "animal"
          }
        }
  • KeneanungKeneanung Posts: 542Member ✭✭✭✭ - Eminent
    @Shub There is a new release of Vyzor: https://github.com/Oneymus/Vyzor/releases/tag/v4.1.0, Oneymus said about this "I added a .IsPlaceholder flag to the Frames that will prevent a label from being drawn. I can't make any promises, though, since I don't know the full extent of the problem"
  • ShubShub Posts: 27Member
    edited November 16
    I added icon parsing to my miniconsole. I'm using @Trevize 's handy mData script to supply the required data and it only needed minor modifications to add icons to its tables. 

    I played with miniconsole fonts, thinking I could use a font with symbol glyphs in it to do icons like the nexus client, but patching the mudlet embedded bitstream font gave me all sorts of alignment problems and it didn't seem worth the bother to do a graphical frame of icons side by side with the console listing. Adding some pictorial glyphs into the embedded mudlet font would be super useful for what I'm trying to do with this console. I settled for just slapping the icon name in front of the item name in the console, it is a surprisingly useful piece of information to have on display:


    IohannaAldwic
  • TorinnTorinn Posts: 534Member ✭✭✭✭ - Eminent
    edited November 16
    Next up, choosing how to sort the results.  Via icon or name alphabetically!  (Or both). All guards grouped together, for instance, would be amazing
    Deucalion says, "Torinn is quite nice."
  • ShubShub Posts: 27Member
    Some tweaks For @Torinn ;

    Denizens are now sorted by their id number. I chose that method because that seems to be the hunting order when groups are working through rooms containing multiples of the same name. 

    I separated out the guards and put them at the end of the list, a lot could be done with clustering and sorting things, still playing with it:



    I also gave the non icon'd items a placeholder icon, to keep me from getting confused between a word wrap from the previous line and an item without an icon.
  • AlyxeriAlyxeri Posts: 262Member ✭✭✭ - Distinguished
    'm' means monster/mobile, by the way. Not magical.

    For reference:
    • "w" = worn,
    • "W" = wearable but not worn,
    • "l" = wielded (left),
    • "L" = wielded (right)
    • "lL" = wielded (both)
    • "g" = groupable,
    • "c" = container
    • "r" = riftable
    • "f" = fluid
    • "e" = edible
    • "m" = monster
    • "d" = dead monster
    • "t" = takeable
    • "x" = should not be targeted (loyal to city, player....)



    Austere
  • ShubShub Posts: 27Member
    The (magical) is not coming from the attrib flag, but the "icon" field of the gmcp information, which controls the little graphics that appear next to each denizen in the nexus client. I agree that m flag is very handy. I highlight all the m flagged items in green, and the mx in gray.

    I re-did the console's sorting. Primary sort is alphabetical, secondary is by id number, plus the guards sectioned off by themselves. This way when somebody calls out a monster we can both easily find it, and pick the correct one by starting at the top.

    in hindsight now that I've done all of this, I probably need to chop 'a ' and 'an ' form the front of their names:



    I suppose after all this work I ought to get it cleaned up and shared with you all.
  • ShubShub Posts: 27Member
    Here is a shot that includes my console and the room item gmcp output to illustrate:


  • AlyxeriAlyxeri Posts: 262Member ✭✭✭ - Distinguished
    You should add borders to things. Also add wrapping to your chat!
  • ShubShub Posts: 27Member
    edited November 17
    The chat is wrapping at 80 characters, it has some window resize quirks though. It can shrink like a champ but doesn't like to grow afterward. I do intend to re-visit it later on but there are larger priorities.

    The miniconsole is good enough for targeting assistance, I'm sure I'll add chat trigger highlighting and link click functions to it in the near future though.

    Next on the plate is a battlerage tracker. I got to logosian on @Klendathu 's amazing tracker script but I feel the rage tracker is an important step towards capable combat that I must write up for myself. I also used @Keneanung 's bashing script pretty heavily. My idea is that I can step up from rage tracker, to denizen combat script, and ultimately to an effective fleet of player combat scripts. The kill paths get increasingly complicated with many timers and variables interacting, so cutting teeth on denizen combat should be helpful.



    The tracker is going in the ugly green box in the top center of my window for now, I'll likely move it and make some modal toggle that hides it when I'm not hunting. It does not look like much but is filling up with red when I smack rats. The gmcp vital messages for it didn't update frequently enough until I did a CONFIG RAGEMSG GAIN to get the updates more often, I'd get all the rage gain updates without the setting, but the rage loss would come in very delayed. The vyzor gauges look to be quite capable, though I was thrown off at first by the variable names passed as strings to supply the gauge limits. I wonder how a gauge whose minimum was a number other than zero might work.

    I do worry a little about doing animated timers on my own without the demmonic widgets, I'm not sure how often I can fire my update functions before I start affecting mudlet's performance.
  • AtalkezAtalkez Posts: 4,045Member, Secret Squirrel @@ - Legendary Achaean
    Should add your config rage stuff on login, and maybe when you refresh some stuff. It likes to reset itself for some reason, sometimes.


    You hug Aurora compassionately.
  • TysandrTysandr Posts: 166Member ✭✭✭ - Distinguished
    Shub said:

    I do worry a little about doing animated timers on my own without the demmonic widgets, I'm not sure how often I can fire my update functions before I start affecting mudlet's performance.
    Really frequently. On my old macbook with a 0ms repeat timer, the cpu heated up a little but performance was 100%. (Not sure who wrote that code but yeah)
    Proof of Concepts: Sailing Map, Trading
    bounty
    "It's not rocket surgery."

  • TorinnTorinn Posts: 534Member ✭✭✭✭ - Eminent
    edited November 17
    @Shub Should start playing Achaea again instead of idling about tbh :(.   <3
    Deucalion says, "Torinn is quite nice."
  • ShubShub Posts: 27Member
    I spent a good chunk of my morning producing this:



    The Vyzor box widget came in handy for stacking and aligning stuff. I'm starting to see the need for some borders and styling. I have the gauge on the left filling with rage, the buttons will eventually become indicators/actuators/cooldown timers for the battlerage abilities. Right now they are just festive colored squares.

    Stacking and aligning frames is really tedious! It reminds me of java swing in the early 2000's but it is coming along.
  • ShubShub Posts: 27Member
    edited November 17
    I now have rounded corners and a semi-functional rage tracker. My buttons are lighting up when I have sufficient rage, I have them stacked in rage cost order rather than the order in which one gains the abilities while leveling, that made more sense to me. The next task is to make them clickable, followed by laying cooldown timers on top of them:



    semi-related question: what is the maximum battlerage amount? I arbitrarily picked 50 because I tend to spend mine quickly.
  • AlyxeriAlyxeri Posts: 262Member ✭✭✭ - Distinguished
    edited November 17
    Shub said:
    semi-related question: what is the maximum battlerage amount?
    Isn't one. Or if there is, it's pretty fucking high. Have gotten well over 800 or so when following Penwize around. Solo it'll probably be unlikely that you get over like 30-40 if you're using your attacks on cooldown.
  • CooperCooper IowaPosts: 4,098Member @@ - Legendary Achaean
    I think it is 655.

    Also, don't just use the attacks when they are off cool down, that is inefficient.

  • ShubShub Posts: 27Member
    I found a bug in mData, the denizens table was not updating when critters left the room. The script used the attrib flag from the gmcp removal messages, but removal messages do not typically contain attrib fields. This caused my console to gradually fill with rats that did not clear when they left the room. I fixed it to not rely on the attrib flag to pick which table to remove from.

    is @Trevize still active? This mData script is a massively helpful building block for my UI logic. I may have to fork it if he is'nt around.
  • ShubShub Posts: 27Member
    I can't figure out how to make my miniconsole echolinks in a different text color!

     

    I suspect I need to use a style sheet and am having a hard time with that
  • KeneanungKeneanung Posts: 542Member ✭✭✭✭ - Eminent
    You should be able to use an optional last parameter that uses the currently set echo style (if using echoLink) or the given text style (if using cechoLink or dechoLink, see https://wiki.mudlet.org/w/Manual:Lua_Functions#cechoLink, take care of the last true)
Sign In to Comment.