JavaScript questions that don't deserve their own thread

● ARCHIVED · READ-ONLY
Started by Shaz 3413 posts Page 127 of 171 View original ↗
  1. Can someone help me with a note tag please.

    I'm wanting to have an accessory which if, and only if, the wearer uses a physical skill gives 10% of the damage dealt back to the user as HP healing.

    Can this be done?

    Thank you.
  2. Kes said:
    Can someone help me with a note tag please.
    Presuming you're using VisuStella Skills & States for passive states, you'd use the Battle Core notetag in that passive state:
    Code:
    <JS Pre-Damage as User>
    if (this.isPhysical())
        user.gainHp(Math.round(value/10));
    </JS Pre-Damage as User>

    You could also try Post-Damage, but I'm not sure if the value variable exists there. Thanks, VS documentation :stickytongue:
  3. ATT_Turan said:
    Presuming you're using VisuStella Skills & States for passive states, you'd use the Battle Core notetag in that passive state:
    Code:
    <JS Pre-Damage as User>
    if (this.isPhysical())
        user.gainHp(Math.round(value/10));
    </JS Pre-Damage as User>

    You could also try Post-Damage, but I'm not sure if the value variable exists there. Thanks, VS documentation :stickytongue:
    You could actually do without the passive state, and just put that note tag directly into the accessory's note box.
  4. Is there a plugin that would allow the player to bring up a basic map with an indication of where they are currently at?
    1689128294916.png
    Something like this?
  5. @Powell This isn't the thread for requesting whole plugins, only for small specific JavaScript questions. You need to post a thread in JS Plugin Requests. You will need to provide a bit more information than you have. Which engine are you using? You don't say and it's not shown under your avatar.
  6. I have a Thornmail effect on a piece of armour which is geared up to react to a physical attack. The note tag begins:

    Code:
    <JS Post-Damage As Target>
    if (value > 0 && this.isPhysical()) {

    I now want a piece of gear to have this effect whether it's a physical or magic attack. Can I just delete the part
    &&this.isPhysical()
    or do I need to specify either/or? And if so, how?

    Thank you.
  7. If the only variable you need to check is this unknown value, why should you even care about the skill damage type at all?
  8. @kyonides Because my only reference point is the note tag I already have where I did care about the damage type because I only wanted it to apply to physical attacks.
  9. Don't think about that. Think logically. Would you check for people's ages before they enter the movie theater to watch an E rated movie? Nope, you wouldn't. The same principle applies here.
  10. @kyonides So you're saying just delete that bit and, presumably, both sets of () brackets so that the first line reads:
    Code:
    <JS Post-Damage As Target>
    if value > 0  {
  11. Kes said:
    @kyonides So you're saying just delete that bit and, presumably, both sets of () brackets so that the first line reads:
    Code:
    <JS Post-Damage As Target>
    if value > 0  {

    No, the condition almost always needs to be put into brackets for syntax reasons.

    Code:
    <JS Post-Damage As Target>
    if (value > 0)  {
       //stuff
    };
  12. Hi all, if I want to use drawText to write a text with the code "\FS[40]Big Text", what should I do?
    I tried \FS40, \\FS[40] but it doesn't process FS like in the editor
    I trie to use convertEscapeCharacters function but no luck either
  13. Try drawTextEx
  14. TESTOSTERONE said:
    Try drawTextEx

    Yup, DrawTextEX converted successfully the font size, but now it doesn't align text to the center and from what I'm reading it looks like Ex doesn't have an alignment option?
  15. What X coordinate are you passing into the DrawTextEx function? Can you tinker with the X-coordinate until you like the alignment?
  16. TESTOSTERONE said:
    What X coordinate are you passing into the DrawTextEx function? Can you tinker with the X-coordinate until you like the alignment?
    Sadly no because it's a script where the trxt can be decided by the developer so I can't use a fixed padding.
    I don't know why but this worked:

    JavaScript:
          this.fontSize = textSize;
          this.contents.fontSize = textSize;
          this.drawText(questTitle, 0, spacing, this.contentsWidth(), "center");

    (and it works only if both fontSize are called but... hey it works so I'll leave it that way)
  17. Do you know what the maximum file size that RPG Maker MZ can handle for Visustella's Grid-Free Doodads?

    I currently have 666 Doodads in my project on the world map, and I use up to a 13 by 13 tile size Doodad, but I am wondering if I could get it lowered more if I create even larger ones... (and yes I've tried 8000+ Doodads and it slows the game down)
    1689340704129.png
    Here is a 13 by 13 Doodad.
  18. Powell said:
    Do you know what the maximum file size that RPG Maker MZ can handle for Visustella's Grid-Free Doodads?
    This doesn't seem to be a JavaScript question to me.

    It's about a specific plugin, and per the first post in this thread, it's not for plugin support.

    It's also system-specific - what causes the game to slow down is going to depend on the computer's RAM and processor, not any single number that's the same for everyone.