Skip to content
Damian Monogue edited this page Dec 2, 2021 · 13 revisions

EMCO is now maintained as part of the MDK

What is EMCO?

EMCO is the Embeddable Multi Console Object. It is in many respects the successor to YATCO, the tabbed chat solution I wrote ages ago. YATCO's always had some shortcomings though, especially when it comes to embedding it within an existing UI. You also only got one of them. But there are plenty of situations where you might want a tabbed console object for displaying information, especially in combination with something like fText's TableMaker to aid in displaying the information.

How does it work?

Largely, it works like any Geyser object would. You make a new one using EMCO:new() and pass it a table of constraints, as well as the Geyser object to use as its parent. The brief example I used for my first smoke tests may serve as a decent example.
Also see Valid Constraints
For function information, see the API Docs

testCon = Geyser.Container:new({
  x = "0",
  y = "0",
  height = "600px",
  width = "295px",
})

local stylesheet = [[background-color: rgb(0,180,0,255); border-width: 1px; border-style: solid; border-color: gold; border-radius: 10px;]]
local istylesheet = [[background-color: rgb(60,60,60,255); border-width: 1px; border-style: solid; border-color: gold; border-radius: 10px;]]
testEMCO = EMCO:new({
  name = "testEMCO",
  x = "0",
  y = "0",
  width = "100%",
  height = "100%",
  allTab = true,
  allTabName = "All",
  gap = 2,
  consoleColor = "blue",
  consoles = {
    "Guild",
    "All", 
    "Local",
    "Map",
  },
  mapTabName = "Map",
  mapTab = true,
  activeTabCSS = stylesheet,
  inactiveTabCSS = istylesheet,
}, testCon)

This creates a container in the top-left corner with the overall dimensions I want, then creates an EMCO bound to that container. It then looks a little something like this(after a bit of test echos):

Ready made pkg

I have an xml which takes all the defaults from the old YATCO and gives them to you in an editable script object named DefaultYATCOConversion. This will allow all the old instructions for YATCO to work, as it creates the EMCO object at demonnic.chat , which is the same place all the old YATCO commands used to be.

First install the newest release from the releases page and then install THIS and it will create the old default YATCO container in the top right corner. You can then edit the items in the DefaultYATCOConversion script object to move the box around. As written currently you may need to restart Mudlet or run lua resetProfile() on the command line in order to see the changes take effect.

Then if you wanted to trigger off of, say (City): Somebody says 'Something or other' and put it in the City tab, you could make a begin of line substring trigger for (City): and in the script box put:

selectCurrentLine()
demonnic.chat:append("City")
deselect()
resetFormat()

Clone this wiki locally