View unanswered posts | View active topics It is currently 16 Jul 2018 10:48

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.



Reply to topic  [ 129 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12, 13  Next
Client for Genesis (Mac/Win/Linux) (Insomnia adventures) 
Author Message
Beginner

Joined: 12 Feb 2013 00:33
Posts: 10
Makfly wrote:
I'm pretty sure all this is pretty awesome, but I have no idea what most of that meant, nor do I have an idea of where to start to take advantage of this.

Is there a 'Getting started' post somewhere or something that can help people get started out on using all of those (probably) awesome functionalities?


Hard to guess where you are standing, get you started from where? I wasn't sure about that in my previous post, but here ... Well, let's see ... "Makfly, Titan, joined three years before me" -- maybe rather you help me? ;-)

Have you Mudlet running? connected to Genesis? do you know Mudlet? Do you have the package loaded and now wonder how to use it?

When the package is loaded much of its "functionality" is just there, the aliases I mention can be used like Genesis commands; and there are some buttons on the top left that spill out some help texts.

On package loading: see my previous post. If that does not help, you are welcome to ask some more concrete questions, before I go on and tell you kilobytes of things you already know and no bit of things you want to know :-)


29 Mar 2013 03:19
Profile
Beginner

Joined: 12 Feb 2013 00:33
Posts: 10
eowul wrote:
Work in progress: http://genesismud.org/pages/gmcp […]

This was one of my sources (the others were some text file from IRE(?) and a Mudlet GMCP tutorial).

eowul wrote:
While we did base our system on IRE's specifications (amongst others),

Which? Or has all relevant info gone to the page mentioned above?

eowul wrote:
LPMud isn't directly compatible with their system, as such we have adjusted things.

The basic protocol seems to work (see my experiences below), the information details, of course, contain different data and are structured differently.

eowul wrote:
As you can see on the page I mentioned earlier, you will need to get Mudlet to subscribe to the Char package, which will start the updates for health amongst others.


I got vitals without(?) subscription, and others not even after trying and failing and …

Code:
I (or Mudlet) got char.vitals.drink without request or hello or gmcp log-in or …

On drinking
   drink = "drink quite a lot more"
vanishes and
   intoxication = "slightly intoxicated"
appears -- for few seconds; then drink reappears and intoxication vanishes. Can the mudlib request deletion of data?

I tried to request health:
?? Sending 'core.ping' yields 'core'.
?? Sending 'char.vitals.get' yields nothing.
?? Sending 'core.supports.add [ "char 1" ]' replaces
  drink info with fatigue info.
?? Sending "char.vitals 1" or "vitals 1" yields nothing.

Something seems to be going on, though. The debugger shows:
   System Message:
   GMCP event <gmcp.char.vitals> display(gmcp) to see the full content
But there is no health in the vitals (which were there from the start -- but with the drink entry only).

A trigger on 'return isPrompt()':
   my_health = gmcp.char.vitals.health
   mymaxhealth = gmcp.char.vitals.mana
   echo(string.format("Health: %s, Mana: %s\n"
                               ,my_health
                               , my_maxhealth))
yields:
   LUA OK script gmcp_trigger (trigger212condition0) ran without errors
   Trigger name=gmcp_trigger(return isPrompt()) matched.
   LUA: ERROR running script gmcp_trigger (Trigger212)
   ERROR:[string "function Trigger212()..."]:5:
   bad argument #2 to 'format' (string expected, got nil)

So the trigger had no data. Is that because I did not 'subscribe'? or because Mudlet fails to digest received data (and to report that failure)? In this case either the (JSON) data or Mudlet is faulty.

Has char.vitals.drink its JSON data formatted with spaces around square and curly brackets? I think to remember something about Mudlet requiring spaced brackets (not sure whether that was about GMCP, though).

Is there any explanation why "char" does not include "char.skills", "char.items" etc., but "char.vitals"?
Or more concrete: why does "Char" not remove the others too?
   Core.Supports.Remove [ "Char", "Char.Skills", "Char.Items" ]

And why has one to "subscribe to" the former two but not to the latter? Is a subscripton accomplished with 'core.supports.add [ ... ]'? (I refrained from using 'set' lest I should unsubscribe from anything.) What are these packages mentioned on the web site "(see supported packages)"? And are the message names really not case sensitive? is that also true for the elements in the array sent with set, add, remove messages? (JSON attributes, of course, are case sensitive(?))

Found some examples:
   sendGMCP("Char.Skills.Get {}")
   sendGMCP([[Char.Skills.Get { "group": "woodlore", "name": "hide"}]])
and tried:
   sendGMCP([[Char.Get {}]])
to get some char.vitals.health, remembering that 'char' includes 'char.vitals' (but not 'char.skills'), but that didn't help.

At some stage I suddenly found
  char = { […]
    vitals = {
      mana = "rather degraded"
    }
  }
with 'vitals health' showing:
  You are physically feeling very well and mentally in full vigour.


29 Mar 2013 04:07
Profile
Beginner

Joined: 12 Feb 2013 00:33
Posts: 10
Berwyn wrote:
[…] A scrollbar would be useful but ctrl+enter works fine for me (I don't use mouse with laptop).

The scroll bar is back again. (You know that the page up and down keys also scroll up and down?) Made it also start displaying its initial content again, before logging in, the empty pane was just too bleak a sight.

Berwyn wrote:
Good job!

Would never have got there without gruff's work that is still in there!

Berwyn wrote:
And thank you for the answer: )

Just lying in the bed I've made ;-)


Attachments:
File comment: Scroll bar unveiled (and some internal changes).
For_Genesis_20130329b1.xml.zip [28.53 KiB]
Downloaded 233 times
29 Mar 2013 19:00
Profile
Veteran
User avatar

Joined: 02 Sep 2012 23:56
Posts: 200
Location: Misty Mountains
Thank you, it's working : )

_________________
"Tis but a scratch" - Black Knight, Monty Python and the Holy Grail


30 Mar 2013 01:10
Profile
Wizard
User avatar

Joined: 03 Mar 2010 21:55
Posts: 106
Location: Middle Earth
Hairetikos wrote:
I got vitals without(?) subscription, and others not even after trying and failing and …


I think the confusion comes from several things:

- If you enable GMCP in mudlet, it by default subscribes you to Char, Char.Items, Char.Skills, Ire.Composer and Room, so even without doing something yourself, the mud will start sending Char.Vitals
- Char.Vitals.Get is not a command, Char.Vitals get broadcasted whenever the value changes in the mud
- The mud only sends the vitals that are changed compared to the previous version (you get an initial full set moments after subscribing to the Char package), this means that you will get Char.Vitals messages that contain only one value (for instance, drink, like in your example)
- Subscription is for broadcasted messages only, responses to commands like Char.Skills.Get are sent regardless of your package subscriptions
- Because of the changes in the mana system, updated guilds like the Academics or the alpha Elementalists will not show the same values as you see in game. This will be corrected eventually. Note: this only goes for mana, the rest will be accurate

An example of how to handle the char.vitals updates in Mudlet, add a new script, set registered event handlers to gmcp.char.vitals, and put in the following Lua:

Code:
function vitals_update()
   if gmcp.char.vitals.health ~= nil then
      echo("GMCP Health: " .. gmcp.char.vitals.health .. "\n")
   end

   if gmcp.char.vitals.mana ~= nil then
      echo("GMCP Mana: " .. gmcp.char.vitals.mana .. "\n")
   end
end


This gives the following in my console:

GMCP Health: feeling very well
GMCP Mana: in a vegetable state

If you are familiar with Java, you could see how I handle this in the GMC client

_________________
Caretaker of Arda


30 Mar 2013 17:07
Profile
Apprentice

Joined: 29 Mar 2012 13:44
Posts: 41
I don't know for how long (I noticed that today) there is some information send via gmcp regarding current room - unique id, name of room and visible exits. If you haven't started working on mapper just yet you probably could do that now.


11 May 2013 13:30
Profile
Site Admin
User avatar

Joined: 03 Mar 2010 20:51
Posts: 2150
Location: Some old coffin
This is actually new, and yes, it means we are now working to implement mapping! :-)

G.

_________________
Mmmmmm ... pie ...


11 May 2013 18:56
Profile
Wizard
User avatar

Joined: 03 Mar 2010 21:55
Posts: 106
Location: Middle Earth
Einar wrote:
I don't know for how long (I noticed that today) there is some information send via gmcp regarding current room - unique id, name of room and visible exits. If you haven't started working on mapper just yet you probably could do that now.


We are currently experimenting with it, and it is possible that IDs change as we get new insights.

_________________
Caretaker of Arda


11 May 2013 21:24
Profile
Legend
User avatar

Joined: 04 Mar 2010 17:54
Posts: 771
gmcp.char.target/enemy.... me wants.

_________________
Might and Glory flaming for changing dawn, ancient power revealed of an iron crown, clear and cold and shining so far and bright, crush the world in one clash of your binding light.

Gû kîbum kelkum-ishi, burzum-ishi. Akha - gûm-ishi ashi gurum!


11 May 2013 23:52
Profile
Apprentice

Joined: 29 Mar 2012 13:44
Posts: 41
I would like to receive via gmcp information about health of my team.


13 May 2013 00:00
Profile
Display posts from previous:  Sort by  
Reply to topic   [ 129 posts ]  Go to page Previous  1 ... 6, 7, 8, 9, 10, 11, 12, 13  Next

Who is online

Users browsing this forum: No registered users and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group
Designed by ST Software.