Icon Captions

Discussion in 'JS Plugin Releases (RMMV)' started by Astfgl66, Apr 10, 2019.

  1. BlueMage

    BlueMage Slime Lv99 Veteran

    Messages:
    116
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMVX
    This is one of my most favorite plugin!
     
    #21
  2. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    661
    Likes Received:
    512
    First Language:
    French
    Alright, this is probably the final update, unless bugs are reported:
    I've added the ability to set individual conditions for each icon caption.
    These must be set inside the plugin using the following template:
    Code:
    313: "Gold \nMultiple lines",
    cond313: "$gameParty.gold() > 0",
    //template: iconId: "Text",
    //you can use all text codes, but have to make them with two \ instead of one. \\c[1] for example
    //cond[iconId] : "Text",
    //The text must be a valid javascript statement. If it evals to true the caption will show.
    //In the given example, the gold caption will only show if party gold is > 0.
    
    I've also added the possiblity to modify the caption in game and the individual condition too using these commands, from a script call:
    Code:
    You can add or modifiy a caption in game with:
    IconCaptions.setCaption(iconNumber,text)
    
    You can modifiy a caption condition in game with:
    IconCaptions.setCond(iconNumber,text)
    The text must be a valid javascript statement, which will be evaled when hovering
    the caption. If it evals to true, the caption will show.
    
    I will not be providing support for writing your own javascript code, sorry!
    You can find a ton of examples in the "javascript equivalent of event commands" thread pinned in the MV subforum, or ask in the forums if you need something specific though.

    Have a nice day everyone, and thanks for the nice words!
     
    #22
    BlueMage and SoSick. like this.
  3. BlueMage

    BlueMage Slime Lv99 Veteran

    Messages:
    116
    Likes Received:
    147
    First Language:
    English
    Primarily Uses:
    RMVX
    Awesome! What better than a caption? It's a caption with showing condition!
     
    #23
  4. Iqus

    Iqus inVictor Member

    Messages:
    27
    Likes Received:
    11
    Location:
    England
    First Language:
    Spanish
    Primarily Uses:
    RMMV
    Salut!

    Excellent plugin! And great addition, now with conditions! One question though, are conditions compulsory? I was using your previous version and I downloaded the new one, copy-pasting all the icon captions and now they do not appear. I don't know if it's a compatibility issue arisen with the newer version or the fact that they do not have a condition specified.

    Also, I am using a custom Battle UI and I noticed through the code that a refresh option is added to the default windows. The captions are not working in my custom windows so maybe I need to alias the refresh function for each of my custom windows?

    Merci d'avance!
     
    #24
  5. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    661
    Likes Received:
    512
    First Language:
    French
    Conditions aren't compulsory.
    They shouldn't affect existing captions at all unless you've set them.
    Do any caption show up at all?
    Does an error show up in the console? You may have omitted a bracket or something while copy pasting which would cause the plugin to break.
    Captions show up just fine in my version of the plugin, both with and without conditions. Are you sure the formatting of your icon captions hasn't been modified during the copy pasting process?
    If you think the formatting is right, please show me the caption list. Via PM is fine if you'd rather not show it publicly.

    Do any of you people using the plugin also have this problem with captions no longer showing after the last update?

    And yes, you need to reset icon captions when your windows are modified, otherwise you'll get the errors mentioned in the beginning of the thread: captions showing even after switching windows or not updating. I did it for all base windows that needed it, but if you have custom windows you'll have to do it yourself.
    Sprites using the state icon sprite template will also update automatically, no further modification needed.
     
    #25
  6. Hisao Shou

    Hisao Shou Veteran Veteran

    Messages:
    105
    Likes Received:
    13
    Hello @Astfgl66 , I'm using your plugin and it is doing a great job so far! Thank you for making it.
    Yet recently I have tried to add some icons in a custom hud with Orange's Hud Line plugin, and they don't have captions when I hover the icons from the custom hud.
    I have tried to look into both scripts but I couldn't figure out what was the cause.
    Is there any way to make the captions also be displayed for custom huds?
     
    #26
  7. EseQueL

    EseQueL Veteran Veteran

    Messages:
    56
    Likes Received:
    18
    First Language:
    English
    Finally a tooltip plugin. Anyone tried if it works on mobile? I bet not cuz in mobile you must long press not hover. If so, can you make it work on mobile via long press instead?
     
    #27
  8. Astfgl66

    Astfgl66 Veteran Veteran

    Messages:
    661
    Likes Received:
    512
    First Language:
    French
    I have not tried it on mobile and have no easy way to.
    It should work if the touch screen sets the mouse position correctly though.

    The issue with the hud plugin is most likely that every window must be added for the plugin to work. I have no time right now to look into it, sorry.
     
    #28
    EseQueL likes this.

Share This Page