JavaScript questions that don't deserve their own thread

● ARCHIVED · READ-ONLY
Started by Shaz 3413 posts Page 45 of 171 View original ↗
  1. Kiryuu said:
    <counter condition> is not a lunatic mode tag. I think you should be using <custom counter rate>

    I do appreciate the suggestion, but I'm not actually seeking to change their counter rate depending on their HP.

    Like if a skill used isn't a magical hit, the counter condition isn't met. That's the case I'm trying to find with the HP part, like if the attacker's HP is 0, the condition isn't met (while earlier it was during a multi-hitting damage phase that would make it go down to 0) , while not having to bring their rate down.

    I wonder if a variable would solve the issue, regarding whether the enemy is alive or not.
  2. is there a way to check if a plugin is installed via separate plugin?
  3. Hey All.

    Just starting to learn how to Javascript myself so I'll be asking a BILLION questions if not more, and by new Mean more green then a well Green Morbol....

    So my first issue is i'm trying to get my event named Red to speak via java. but it's saying it's not defined.

    my code is:
    red.say("Well hello there")

    So what am doing wrong?
  4. @Martin_Arcainess you should use console.log('Well, hello there!') to output information to the console. use F8 to open developer tools and view the console.
  5. is anyone able to show me how to iterate over each file within the 'img/system/' folder so that i can run a string comparison over each file there?
  6. Hey guys,
    I'm new to scripting and maybe my problem is easy to solve (at last I hope it's an easy one ...)

    I want to check if the number of a special item in the partys inventory is equal or higher then the number of party members. So I have to check each actors inventory if and how many of the items are there and then match the number with he number of party members.

    Any suggestions? Thanks for your help!
  7. @freebooter using "Script" (page 4) within a conditional branch event command:
    Code:
    $gameParty.numItems($dataItems[item id]) > $gameParty.size();
  8. Thanks a lot! Works great.
  9. @freebooter you are very welcome! if my previous post was helpful, consider liking the post; you would be doing me a great favor!
  10. Is there a way to make an NPC have different shops for each party member according to their level and class? I mean, you interact with the shopkeeper and he asks you who's going to interact with him, And then the shop varies according to the chosen party member and its level and job. Thanks!!!
  11. dbchest said:
    is there a way to check if a plugin is installed via separate plugin?
    The easiest way is to check the global $plugins but the name of the plugin could be different than what you may expect, especially if the file was renamed.
    This snippet below will return the plugin in the $plugins array if it exists. If there is more than one plugin with the same name it will return those as well. I add the extra check for the status to ensure the plugin is turned on.
    PHP:
       const plugin = window.$plugins.filter(plugin => plugin.name === 'plugin_name' && plugin.status === true)[0]

    dbchest said:
    is anyone able to show me how to iterate over each file within the 'img/system/' folder so that i can run a string comparison over each file there?
    This one is fairly easy if you know how to use Node. I never tested it but it should read the directory and return the filenames

    PHP:
      // Local only (No Browser)
      const fs = require('fs')
      fs.readdir('./img/system', 'utf8', (files) => {
        files.forEach(file => {
          console.log(file)
        })
      })
    I hope this helps or at least points you in the right direction.
  12. @LTN Games thank you so much! i will experiment with these and see if i can achieve the results i am looking for. you have been a great help.
  13. How can I start a new game using script calls? I want to build a title scene with events...
  14. @hyuugacln SceneManager.goto(Scene_Title)
  15. dbchest said:
    @hyuugacln SceneManager.goto(Scene_Title)
    Nah, that only opens the Title Scene. What I tried to do is replacing the Title Scene with events. Meanwhile I figured it out myself:

    DataManager.setupNewGame();
    SceneManager.goto(Scene_Map);
  16. Gargoyle77 said:
    Is there a way to make an NPC have different shops for each party member according to their level and class? I mean, you interact with the shopkeeper and he asks you who's going to interact with him, And then the shop varies according to the chosen party member and its level and job. Thanks!!!

    This could actually be done with events, Choices, and branches.

    So like you could set it up, Textbox with the shopkeep saying "Hi, who will I be serving today?" The choice event showing the name of members of your party? The underneath each choice of the member you selected would be the Conditional Branch? Like if Party member LV 5 or above do shop command if not check to see if Level 1 is one or more and do this shop command?
  17. Hi everyone. i just need a simple help to organize and optimize my plugins list! i know this is a stupid need, but i am still not sure about what to do, and i rather want to ask for advice and help.
    Plugin list
    2017-12-28 (1).png
  18. ashyramoonwolf said:
    Hi everyone. i just need a simple help to organize and optimize my plugins list! i know this is a stupid need, but i am still not sure about what to do, and i rather want to ask for advice and help.
    Plugin list
    View attachment 79102

    Organise in what way? Alphabetical order? As for optimisation that could vary quite widely as to what you want to do. I doubt organizing the list of your plugins will bring out the best of your plugins.

    Now, for organize I generally tend to set up them up as say you were using yanfly plugins, I keep them all together or keep battle related plugins together.

    But keep in mind that changing the order of the plugins list may cause conflict as the top of the plugin list takes prioty over the low plugins.
  19. Martin_Arcainess said:
    Organise in what way? Alphabetical order? As for optimisation that could vary quite widely as to what you want to do. I doubt organizing the list of your plugins will bring out the best of your plugins.

    Now, for organize I generally tend to set up them up as say you were using yanfly plugins, I keep them all together or keep battle related plugins together.

    But keep in mind that changing the order of the plugins list may cause conflict as the top of the plugin list takes prioty over the low plugins.
    This is mainly to be sure that the plugins work together fast! The trouble i have (not really a trouble) is that i made the game for Android and phone at first. I just want to be sure my plugins load order are optimized to not slow the game... (I hope i am clear enough, sorry if i'm not i do not really know how to say it)
  20. ashyramoonwolf said:
    This is mainly to be sure that the plugins work together fast! The trouble i have (not really a trouble) is that i made the game for Android and phone at first. I just want to be sure my plugins load order are optimized to not slow the game... (I hope i am clear enough, sorry if i'm not i do not really know how to say it)

    I know what you mean, So the game boots and loads up quickly. In all honesty, I don't think the order of your plugins will affect the games load up speed. But there is other speed you need to think about as well, such as when you enter a battle, how quickly dose the battle screen load in, or how quickly does the text scroll across the screen but even then say for example, your text is appearing slowly, it may be due to 2 plugins interfering with each other regardless of there order.

    And plugins work fast? A plugin will work or not. Wouldn't I say a plugin can work slow? It either works or it doesn't. It's quite a wide scope when you talking about all plugins.