JavaScript questions that don't deserve their own thread

● ARCHIVED · READ-ONLY
Started by Shaz 3413 posts Page 47 of 171 View original ↗
  1. @Sauteed_Onion no I'm not sure if it's a stolen plugin, just that the author has stolen plugins before. That's why I'm asking if we can have a blacklisted plugins thread... So I can check it for Thomas Edison.
  2. Thanks for letting us know, I just got that plug in and was gonna make some cool stuff with it or at least try to. I didn't yet. I would be interested in knowing myself meow. I watched a @Driftwood Gaming tutorial on the Thomas Edison plugin, and I don't think he would lead a bunch of people wrong, he seems like a pretty decent content putter outter, I like how he shows up on other people's channels and encourages people. Very classy. Would be a shame if T.E. plug in was bad apples though, I was like WHOA how neat.
  3. For the thing with SoulPour plugins, I'd say do like people did with that whole situation with Kaus: even if the resource might be completely legit, don't use it because it has his name attached to it. Better to distance yourself from a name that'll potentially drag down your game's reputation.
  4. Kaus's overlay is a no go?
  5. I'd say so, just to play it safe. Besides, if you're set on using a plugin just like it, Hudell made his own version using the same notetags and such.
  6. Ok. Thanks for all this info. I am fixing to start some serious game developing maybe soon. I keep tossing ideas around in my head.. do I want a 'modern' cat world.. or a fantasy'lite cat world? I mean it's all kind of silliness anyhow, but it's all good fun. I hope. Meow.
  7. @GameFire Yikes! See, this is what I'm talking about...everyone seems to use Kaus and I had no idea...
  8. Heya!

    I've been fiddling around with DreamX's Random Prefixes, and since he hasn't logged on for almost a year, I can't ask him to explain how this line in his help documents work:

    <Prefix Suffix Effect>
    var atkBonus = Math.floor((Math.random() * 100) + 50);
    newItem.params[2] += atkBonus;
    newItem.name += " +" + atkBonus;
    newItem.price += atkBonus;
    </Prefix Suffix Effect>

    Since I don't know java, it's pure greek to me. Or rather, I understand how this is used to add a random ATK bonus. But he keeps naming adding affixes that change a weapon's element type, say "Hand Ax of Fire" but none of his note-tags allow me to do this, so I suppose this slab of script is where it's supposed to go.

    So, basically, how do I make this change damage element? If anyone could help me with this, I'd be glad if you started a conversation with me, so we don't spam the forums with a lot of back and forth :)
  9. Nvm, managed to make it work with:
    Code:
    <Menu Enable Eval>
    if (($gameActors.actor(1).abilityLevel("Proficiência: Pactos") >= 5) && !$gameParty.members().contains($gameActors.actor(21))) {
    enabled = true;
    } else {
    enabled = false; }
    </Menu Enable Eval>
    -------------------------------------------
    Hello.
    I'm trying to make and check: if Skill level is 1+ and the actor NOT in party = return true

    Code:
    <Menu Visible Eval>
    if ($gameActors.actor(1).abilityLevel("Proficiência: Pactos") >= 1) && (!$game_party.members.include?($game_actors[21])) {
    visible = true;
    } else {
    visible = false;
    }

    I came up with that code but I always get an error "unexpected && operator". What I'm doing wrong? Btw, that's a condition to Yan-Common menu.
  10. @lokirafael
    Looks like you're mixing up the MV style with VX style, for example:
    $game_party --> VX
    $gameParty --> MV

    .include? --> VX
    Can't remember what this is for MV
  11. Hey all.
    I got a little js problem, maybe one of you can help me.

    I'm using YEP_SkillCore to hide/show some skills.
    Using a skill notetag, I can set a condition wich will hide/show a skill.

    I have trouble using the condition with a game switch (for MV).

    This one works:
    Code:
    <Custom Show Eval>
      if (user.level > 50) {
        visible = true;
      } else {
        visible = false;
      }
    </Custom Show Eval>

    But this one with a swith won't work:
    Code:
    <Custom Show Eval>
      if $gameSwitches.value[1501] == true {
        visible = true;
      } else {
        visible = false;
      }
    </Custom Show Eval>

    Is that 2nd code wrong?
    If not then surely it's the plugin not managing switches (unless I try a lower number switch).
  12. @Narch yes, the code is wrong. You wrote $gameSwitches.value[1501] and you should have written $gameSwitches.value(1501)
  13. @Llareaian

    I tried several combinations, with the switch 18. None of them was concluant

    Spoiler
    With "[ ]", skill is always hidden
    With "( )", skill is always shown

    If In the previous skill I delete the working condition with (user.level > 50), then the following item will be shown whatever I do.

    What seems to work is to write like this: if ($gameSwitches.value(18) == true)
    The previous item condition will not affect that second item with the switch condition

    I'm illiterate with code, do you think I can roll safely using your fix and my fix in combo like that?
  14. Whoops, I totally missed the fact that you were missing parentheses around your conditional. Yes, you need to have it in a format like ($gameSwitches.value(18) == true).
    Narch said:
    The previous item condition will not affect that second item with the switch condition
    I'm not sure what you mean by that. If it's working, great. If not, try to rephrase that part and I'll see if I can help.

    So, to sum up, it should look like:
    Code:
    <Custom Show Eval>
      if ($gameSwitches.value(1501) == true) {
        visible = true;
      } else {
        visible = false;
      }
    </Custom Show Eval>
  15. Yeah I explained too much.

    That last bit of code is working and is what I needed. Thanks for your help!
  16. Hey! Not sure if this is the right place to ask..
    I'm looking at setting the MHP of an actor to a specific value using a script call

    I can use this to + or - from the parameter but i cant figure out how to set it
    $gameActors.actor(actorId).addParam(paramId, n);

    Any suggestions?
  17. Hey guys, I'm making a custom menu with pictures. I like to show a picture (via new sprite), when the cursor is on a item (index). I manage to get the index by using SceneManager._scene._itemWindow.index(), but how to get the item name or something to say what picture to show?

    Another thig, I'm trying to hide a picture when the victory (from battle) is active, how to do this? Something likeSceneManager._scene._statusWindow.visible ?
    If that is impossible, how can I check if the numbers of enemies is 0, to hide the picture on a battle?

    Thank you!
  18. Another thing, I make a drawText on a bitmap, but when I open my menu, the text only shows after I open the menu for the 2nd time.
    Can someone tell me a fix for this?

    My code is:

    Code:
            this._personagem1 = new Sprite();
            this._personagem1.bitmap = ImageManager.loadPicture($gameParty.members()[0]._name);
            this._personagem1.bitmap.drawText($gameParty.members()[0]._level, 40, 40, 50, 50, 'center');
            this._personagem1.bitmap.fontSize = 50;
            this._personagem1.x = Graphics.width - 590;
            this._personagem1.y = 32;
            this.addChildAt(this._personagem1, 2);
  19. I'm working on a little plugin to have a message window appear while in a shop, so that a message appears if a particular item is selected to sell. I just overloaded some of the functions from Scene_Shop:

    Code:
    Scene_Shop.prototype.create = function() {
        Scene_MenuBase.prototype.create.call(this);
        this.createHelpWindow();
        this.createGoldWindow();
        this.createCommandWindow();
        this.createDummyWindow();
        this.createNumberWindow();
        this.createStatusWindow();
        this.createBuyWindow();
        this.createCategoryWindow();
        this.createSellWindow();
        // Add message window to prototype so it can appear
        this.createMessageWindow();
    };
    
    Scene_Shop.prototype.onSellOk = function() {
        this._item = this._sellWindow.item();
        this._categoryWindow.hide();
        this._sellWindow.hide();
        this._numberWindow.setup(this._item, this.maxSell(), this.sellingPrice());
        this._numberWindow.setCurrencyUnit(this.currencyUnit());
        this._numberWindow.show();
        this._numberWindow.activate();
        this._statusWindow.setItem(this._item);
        this._statusWindow.show();
        if( this._item.id = 23 )
        {
            $gameMessage.setFaceImage( 'aelwyn', 5 );
            $gameMessage.setBackground( 0 );
            $gameMessage.setPositionType( 2 );
            $gameMessage.add( "Look at me talking!" );
            Game_Interpreter.prototype.setWaitMode( 'message' );
        }
    };
    
    Scene_Shop.prototype.createMessageWindow = function() {
        this._messageWindow = new Window_Message();
        this.addWindow(this._messageWindow);
        this._messageWindow.subWindows().forEach(function(window) {
            this.addWindow(window);
        }, this);
    };

    And this mostly works. If the player selects the specific item to sell, the message window pops up correctly. But what I can't figure out is how to then make the message window go away. Using a mouse, clicking on the message window will close it. Or after the shop window closes, the message window can then be closed normally. However, if using just the keyboard on the shop screen, a key press affects the shop window only. So for example, pressing escape cancels the sale, but doesn't do anything to the message window.

    I seem to be missing a step that changes focus to the message window so that a key press affects the message window to close it. I tried moving the if block that creates the message window to different points within the onSellOk function, but the effect is the same. I've also tried creating the message window both with and without setWaitMode to see if that makes a difference.

    What am I missing to get the message window to close correctly?
  20. scanime said:
    I seem to be missing a step that changes focus to the message window so that a key press affects the message window to close it.
    I believe you want to add a this._messageWindow.activate()