HTML5 Q&A

edited October 2012 in Mechanic's Corner
Hello, all! I'm the guy responsible for the new HTML5 Client, and I thought it high-time I made myself available to anyone using the client for any questions, concerns, ideas, etc. you might have.

So lay it on me. Can't get a trigger to work like you want it to?  Something breaking?  Random javascript question?  Idea for the fancy-logger?  I'll do my best to help wherever I can. 

The client is very much a work in progress, so I look forward to your ideas and to helping figure stuff out that needs figuring out.  Thanks a million!

- Cromm

Comments

  • Quick update for anyone interested: I've updated the client manual at http://client.lusternia.com/help/ with examples of each built-in function (in the Scripting Guide section) as well as a start-to-finish guide in the next section (Example Reflexes and Scripts) for creating basic targeting, attack, and defense reflexes.

    Take a look and let me know if there's anything you'd like me to further discuss!
  • edited November 2012
    Hmm. I had some problems with it before, so I'll give it a try. First thing I noticed:

    When creating a character, the ages in the age dropdown box are very hard to see (black on a dark grey?).
    Again, when creating a character, having the races/genders selectable by dropdown box in addition to the current way might be nice.
    Could probably make the text-area the race info show up in be a bit taller to fit more of the text in (there seems to be a lot of space towards the bottom).
    The same window is also a bit too narrow, creating a scrollbar at the bottom.

    Again, a combobox-behavior on the guild/city might also be nice. Going through each guild can get a bit much.

    More to come as I test it more, I suspect!

    EDIT: When creating key-bindings, I don't get a scrollbar that allows me to scroll down... which, needless to say, is a Bad Thing(tm). Is that my browser acting up, or is it actually missing?
    image
  • Thanks for the feedback, @Ssaliss!

    We're actually in the process of completing a major overhaul to the new character process, but I'll be sure to incorporate what hasn't already been addressed.  Thanks again!
  • QistrelQistrel the hemisemidemifink
    edited November 2012
    This is the flash client, right? I'm also having the 'no scrollbar in the settings window' problem. My aliases have pushed my keybindings down off the screen, so I can't edit or change them.

    Oh, and thanks for the updates to the manual, I couldn't get functions to work until I used the example you gave.

  • Thanks for the feedback!  The Settings window/scrolling problem has been a long-standing issue that I think we finally have resolved.  If approved, it'll go live shortly, and I'll shoot you a message to confirm it.

    Thanks again!
  • I'm not sure if this is client-related or Lusternia-related, but I'm starting to suspect the first. Anything that ends with HELP and is in caps is made a link of. So, for instance, checking CGHELP INDEX while in Gaudiguch tries to point you to http://www.lusternia.com/game/helpview/lusternia/INDEXFORTHEORDEROFTHESECRETFLAME. In addition, a GHELP that points you to another GHELP creates a link to a HELP-file with that name.
    image
  • Oh, and a request for more information in the client-helps: A few examples on how to parse the JSON objects that comes through GMCP would be awesome! For instance: How do you get variables from the JSON object (such as health from Vitals)?
    image

  • Ssaliss said:
    I'm not sure if this is client-related or Lusternia-related, but I'm starting to suspect the first. Anything that ends with HELP and is in caps is made a link of. So, for instance, checking CGHELP INDEX while in Gaudiguch tries to point you to http://www.lusternia.com/game/helpview/lusternia/INDEXFORTHEORDEROFTHESECRETFLAME. In addition, a GHELP that points you to another GHELP creates a link to a HELP-file with that name.
    Thanks again! I'd forgotten about this one... It's now been fixed and pushed live, so you should ONLY see links for regular help files (HELP CITIES, etc.), not organization help files.


    Ssaliss said:
    Oh, and a request for more information in the client-helps: A few examples on how to parse the JSON objects that comes through GMCP would be awesome! For instance: How do you get variables from the JSON object (such as health from Vitals)?
    Definitely!  There's a VERY brief example in the help files now in the Defensive Reflex Examples section -- you'll see how to identify it as a "Char.Vitals" call, then how to get the current and max hp from it.

    I'll definitely be adding more info on using GMCP as we go -- will try to have more examples as soon as possible.

    Thanks!
  • It stopped underlining CHELP/GHELP etc fine, but it still underlines (and links) HELP INDEX FOR THE ILLUMINATI GUILD. Not sure how much can be done about that though, but figured I'd point it out.

    And if the change to add a scrollbar in the settings should be live as well, it didn't work it seems :(
    image
  • Still waiting to hear from the bosses on the settings window, and I'm not sure what I'll be able to do about the other HELP example, but I'll keep pondering... :)
  • Found one more thing with the HELP-underlining: It misses digits in some cases: Looking in HELP CURES, it gives: see HELP 13.7.4 which misses the last ".4". I haven't found a link to a helpfile with only two numbers, but a link to HELP 13 shows up as it should at least.
    image
  • QistrelQistrel the hemisemidemifink
    For the settings window, I realised I can zoom out (make the font really small), which makes stuff fit onto the screen. You just can't see it very well. It's not ideal, but it'll do until the scrollbar is implemented.

  • For @Qistrel and @Ssaliss: the Settings window will now open normally in a new tab/window -- this SHOULD fix the scrolling problem, but let me know if you still have trouble.  Thanks!
  • QistrelQistrel the hemisemidemifink
    Thanks!

    I'm wanting to make a function that switches between the different influence attacks for a specific type. What I have is a variable called infswitch and a function called emp, that does this:

    if (args)
    {
        if (infswitch == "1")
        {
            print("Influencing " + args + " with praise", "yellow");
            send_direct("influence " + args + " with praise");
            set_variable("infswitch", "2");
        }
        else
        {
            if (infswitch == "2")
            {
                print("Influencing " + args + " with admiration", "yellow");
                send_direct("influence " + args + " with admiration");
                set_variable("infswitch", "3");
            }
            else
            {
                print("Influencing " + args + " with compliments", "yellow");
                send_direct("influence " + args + " with compliments");
                set_variable("infswitch", "1");
            }
        }
    }

    I am not used to using this language (is it javascript?), and am obviously doing something wrong, as it always does the first part of the statement (influences with praise).


  • I must say, I actually prefer the settings this way in its own tab! No more shall they be lost.

    I'll play around with variables a bit, Qistrel, and see if I can find something.
    image
  • edited November 2012
    It is Javascript. :)

    It LOOKS like there's some confusion over client variables versus javascript variables (slight difference).  Since you're setting the variable "infswitch" using the set_variable() function, you're actually using client variables.

    Thus, I'd guess you'll want to change your if statements to look something like this:

    if (args)
    {
        if (get_variable("infswitch") == "1")
        {
            print("Influencing " + args + " with praise", "yellow");
            send_direct("influence " + args + " with praise");
            set_variable("infswitch", "2");
        } else if (get_variable("infswitch") == "2")
        {
            print("Influencing " + args + " with admiration", "yellow");
            send_direct("influence " + args + " with admiration");
            set_variable("infswitch", "3");
        } else 
        {
            print("Influencing " + args + " with compliments", "yellow");
            send_direct("influence " + args + " with compliments");
            set_variable("infswitch", "1");
        }
    }

    I just changed the criteria from infswitch == "1" to get_variable("infswitch") == "1" (also tightened up the if/else if/else structure -- works either way, this is just more compact).

    Try that and see if it does what you're after.  If not, hollar back and we'll keep at it. :)
  • Yeah, think I found it. Instead of if(infswitch == "1"), try if(get_variable("infswitch") == "1"). Should work.
    image
  • QistrelQistrel the hemisemidemifink
    Yes, it works now. Thanks!

  • I didn't even notice I was ninja'd :(
    image
  • Hmm. A functionality I would love to see, but I'm not sure how hard it would be to add:

    Player-created packages that can be imported much like the IRE-packages. Preferably with each package having its own namespace (to avoid two packages confusing eachother with variables and functions having the same name and everything, plus they could have their own onGMCP and onLoad). I think such a system would increase the interest in the client as system-transfers become easier to manage.
    image
  • I like it. Will pitch to the bosses and try to work it in. :)
  • QistrelQistrel the hemisemidemifink
    Minor problem with the helpfile links I've just come across. Part of HELP ARTIFACTS shows the following:

    - HELP ARTIFACTS WEAPONRY

    o Lists artifacts which modify or improve weapons or offensive items.

    - HELP ARTIFACTS COMBAT

    o Lists artifacts which add to your offensive or defensive ability

    in combat

    - HELP ARTIFACTS TRADE

    o Lists artifacts relating to trade and trade skills.

    - HELP ARTIFACTS UTILITY

    o Lists artifacts which improve your travel, survival, or influence

    abilities.

    - HELP ARTIFACTS MISCELLANEOUS

    o Lists other artifacts that do not fit into the other categories.

    When I click on any of those help links, it can't find the help file it's looking for. I think the problem is that it's removing the space between the words (i.e. searching for ARTIFACTSWEAPONRY fails, but searching for ARTIFACTS WEAPONRY succeeds).



  • edited December 2012
    Thanks for pointing that out!  It's a difference I wasn't aware of in how the different games handle links -- some want a space between the words, some don't.

    It's now fixed -- let me know if you find anything else!
Sign In or Register to comment.