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

GMCP documentation

KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
Since I have been playing with gmcp again due to various projects, I got a little annoyed that the documentation on it is incomplete or sometimes wrong. So I set about documenting the missing features and correcting the wrong ones.

You can follow my progress on this github repository. If you have own things to share, feel free to fork it and send an pull request!

Keep in mind this is a work in progress.

For those wanting the official docs: I got news they will get updated soon as well.
EldNaisarMannimarJosoulShadracFirienXliTaelNim

Comments

  • VadimusesVadimuses Member Posts: 1,128 @ - Epic Achaean
    I dislike how unmaintained the official docs are as well.
    NimPenwizeXliTael
  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    Just to make sure that the link to the current (achaean) documentation doesn't get swamped in the producer throead, here it is again: http://www.achaea.com/gmcp-documentation
    Nim
  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    After poking around the HTML5 client sources, I stumbled upon the IRE.Target.* messages and documented them in the repository linked in the OP .
  • ValariaValaria Member Posts: 400 ✭✭✭ - Distinguished
    Comm.Channel.Text
    The text of the communication that you heard, who spoke, and which channel it was on
    E.g. Comm.Channel.Text { "channel": "says", "talker": "Tecton", "text": "(Tecton the
    Terraformer says, \"Are we releasing dragon lairs or the phase artefact first?\"" }



    oh really, @Tecton?

    2015/01/12 Tecton, the Terraformer has bestowed His divine favour upon you. It will last for approximately 1 Achaean month.
    MorthifTrilliana
  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    Hm, I seem to have an event handler for IRE.Display.Ohmap, but I never get any IRE.Display events (with the module enabled). Any idea if that used to work but got removed/changed, or if I was hallucinating when I made that, @Keneanung?
  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    Eld said:
    Hm, I seem to have an event handler for IRE.Display.Ohmap, but I never get any IRE.Display events (with the module enabled). Any idea if that used to work but got removed/changed, or if I was hallucinating when I made that, @Keneanung?
    Nope, they still work. My guess is you didn't register the modules. Another wild guess (because that's why it didn't work at once for me): You use the "Password correct. Welcome to Achaea." line as a trigger to register your modules. And that line is not an own line anymore (so exact match won't work as trigger type).
  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    Keneanung said:
    Eld said:
    Hm, I seem to have an event handler for IRE.Display.Ohmap, but I never get any IRE.Display events (with the module enabled). Any idea if that used to work but got removed/changed, or if I was hallucinating when I made that, @Keneanung?
    Nope, they still work. My guess is you didn't register the modules. Another wild guess (because that's why it didn't work at once for me): You use the "Password correct. Welcome to Achaea." line as a trigger to register your modules. And that line is not an own line anymore (so exact match won't work as trigger type).
    Well, the module is still in my list of modules to register, and the other IRE modules in the list are being loaded properly, so it should be registered. I did try registering it manually just in case, and still wasn't getting it. It occurs to me now that I've only checked for the event on a ship so far, not in the mainland wilderness, so there could be something going on there.
  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    Wilderness, ship map and subs are the same... And you should be getting Display.FixedFont messages with everything that requires them (wilderness, hw, other tables).

    If you wanted me to have a look, you could give me the relevant parts (registering and  consumption) in a script export. Or you could go full scale and do a wireshark of the relevant part (with compression off)
  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    Got it. Turns out I needed to explicitly register IRE.Display.Ohmap, rather than just IRE.Display.
  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    That's strange, because I register for IRE.Display and get all Display messages of version 1. (I saw version 3 having some button specific messages)
  • EldEld Member Posts: 3,946 @@ - Legendary Achaean
    Yeah, it's weird, and definitely different from the last time I played regularly (~10 months ago), when the same setup worked fine. I'm seeing something similar with Comm.Channel; if I just register Comm.Channel, I don't get any events for it, but if I register Comm.Channel.Text, I start getting Comm.Channel.Text, Comm.Channel.Start, and Comm.Channel.End.

    ....And now suddenly both are back to working as expected. No idea what changed.
    Keneanung
  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    Good to have you working again :)
  • JonathinJonathin Michigan somewhere.Member Posts: 3,373 @@ - Legendary Achaean
    How do I enable the comm module for incoming or outgoing chat? can't seem to figure it out

    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    For Mudlet you'll want to
    sendGMCP('Core.Supports.Add ["Comm.Channel 1"]')
    after GMCP negotiation is done. I have that after a login trigger.
    Jonathin
  • JonathinJonathin Michigan somewhere.Member Posts: 3,373 @@ - Legendary Achaean
    Oooh derp, my syntax was off a bit.

    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

  • JonathinJonathin Michigan somewhere.Member Posts: 3,373 @@ - Legendary Achaean
    So what's with the little arrows? 



    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

  • ValariaValaria Member Posts: 400 ✭✭✭ - Distinguished
    that is scaJonathin said:
    So what's with the little arrows? 


    that little back arrow you see is the symbol for ascii 'escape'. its decimal number is \027.  

    e.g. \027[0;37;40m. normally it should be non-printable character but for some reason it is there. (maybe it's mudlet way to show you what it is.

    if you want to capture it, my example probably would help you here:
    basically, I did just eliminate the colors from the text. heh. i use my internal color to colorize the channel itself. :) (I'm lazy to code for 16 color and xterm 256 color for now.)
    local function receivedChannelText (event, info)
    	if not event == "gmcp.Comm.Channel.Text" then
    		return
    	end
    	local s
    	local color = "<white:black>" 
    	for k, v in pairs(channelColor) do
    		s = gmcp.Comm.Channel.Text.channel:find(k)
    		if s then
    			color = v
    			break
    		end
    	end
    	local text = gmcp.Comm.Channel.Text.text
    	result = text:gsub("\027%[[0-9;]+m", "")
    	Valar.GUI.Comm:cecho(color .. result .. "\n<reset>")
    	--cecho(color .. result .. "\n")
    end

    2015/01/12 Tecton, the Terraformer has bestowed His divine favour upon you. It will last for approximately 1 Achaean month.
    KeneanungJonathinEld
  • JonathinJonathin Michigan somewhere.Member Posts: 3,373 @@ - Legendary Achaean
    Ahah. That helps a ton. Thanks!

    My site will remain up, but will not be maintained. The repository will continue to have scripts added to it if I decide to play another game. Maybe I'll see you around in Starmourn!
    Tutorials and scripts  The Repository

  • KeneanungKeneanung Member Posts: 616 ✭✭✭✭ - Eminent
    Yeah that's the ANSI colour codes. And Newbie may also have MXP links in it.

    The mudlet version after 3 will come with a lua function to translate them to decho colour codes.
    Jonathin
Sign In to Comment.