The official VisuStella notetag help thread

● ARCHIVED · READ-ONLY
Started by Trihan 1458 posts Page 11 of 73 View original ↗
  1. MrPurpleDreadlocks said:
    Yeah there is a way to do this! You are on the right track! I did something similar with a Necromancer class (only targeting Zombies)
    Thanks for your quick response! I've been looking over the code and I think I'm getting how it works. But could you explain the Pre-Start Action and common event in more detail? What's the temporary variable, and what are all the if statements for? My guess is that this skill is meant to be used by anyone and it's checking to see which actors are involved with the Dual Tech (determined in the Pre-Start Action by $gameVariables.setValue(1,index);). But for my game, each Dual Tech requires a specific pair of actors, and each skill's Action Sequence would only reference those two specific actors. Would I still need all those if statements?

    For example, let's say I have Reid learn a Dual Tech called Twin Slash, where Priscilla is the other required member. No one else has access to this skill. Can I just reference those two ActorID's in the Action Sequence, or do I still need all the if statements?
  2. I'm trying to make an unleash effect that puts a barrier on the ally with the lowest hp%. The first part is easy, make the skill and assign it as a guard unleash. It's getting the skill to auto-target that I'm not sure how to go about.

    I presume it's something like
    <JS Targets>
    targets = [ally.lowesthp];
    </JS Targets>
    But I don't think it's as easy as that.
  3. WilsonE7 said:
    Thanks for your quick response! I've been looking over the code and I think I'm getting how it works. But could you explain the Pre-Start Action and common event in more detail? What's the temporary variable, and what are all the if statements for? My guess is that this skill is meant to be used by anyone and it's checking to see which actors are involved with the Dual Tech (determined in the Pre-Start Action by $gameVariables.setValue(1,index);). But for my game, each Dual Tech requires a specific pair of actors, and each skill's Action Sequence would only reference those two specific actors. Would I still need all those if statements?

    For example, let's say I have Reid learn a Dual Tech called Twin Slash, where Priscilla is the other required member. No one else has access to this skill. Can I just reference those two ActorID's in the Action Sequence, or do I still need all the if statements?

    Great questions! The game variable is intended to grab the index of the party member based off the actorid you put in. So it wouldn't matter where Priscilla is in the position of leader (0), 1, 2, or 3, as long as she is in the active battle party. if you didn't have the index, you could possibly try just the actor id! This was just an example to get you started. I always say trying things out to see if it works is best practice. That's the nice thing about coding, there are a multitude of ways to get the same thing done!
  4. WilsonE7 said:
    Thanks for your quick response! I've been looking over the code and I think I'm getting how it works. But could you explain the Pre-Start Action and common event in more detail? What's the temporary variable, and what are all the if statements for? My guess is that this skill is meant to be used by anyone and it's checking to see which actors are involved with the Dual Tech (determined in the Pre-Start Action by $gameVariables.setValue(1,index);). But for my game, each Dual Tech requires a specific pair of actors, and each skill's Action Sequence would only reference those two specific actors. Would I still need all those if statements?

    For example, let's say I have Reid learn a Dual Tech called Twin Slash, where Priscilla is the other required member. No one else has access to this skill. Can I just reference those two ActorID's in the Action Sequence, or do I still need all the if statements?

    Great questions! The game variable is intended to grab the index of the party member based off the actorid you put in. So it wouldn't matter where Priscilla is in the position of leader (0), 1, 2, or 3, as long as she is in the active battle party. So the condition branches are intended to play out no matter the index! if you didn't have the index, you could possibly try just the actor id! (I tried to have the $gamevariable.value(1) replace the Actor Index variable in Action Sequences, but it doesn't work afaik). This was just an example to get you started. I always say trying things out to see if it works is best practice.

    That's the nice thing about coding, there are a multitude of ways to get the same thing done!

    Starsinger said:
    I'm trying to make an unleash effect that puts a barrier on the ally with the lowest hp%. The first part is easy, make the skill and assign it as a guard unleash. It's getting the skill to auto-target that I'm not sure how to go about.

    I presume it's something like
    <JS Targets>
    targets = [ally.lowesthp];
    </JS Targets>
    But I don't think it's as easy as that.

    So JS Targets is interesting because you have to actually define the target yourself from scratch, so how I would handle it is simliar to Wilson's.

    Code:
    <JS Targets>
    const allies = this.targetsForFriends();
    if (allies.length > 1){
      // Remove the user from the allies array
      allies.splice(allies.indexOf(user), 1);
      //Sorts Allies Array in ascending order of HP (Lowest -> Highest)
      allies.sort(function(c,d){
        return c.hp - d.hp;
      });
      //Removes the first element of Allies. (Lowest HP Ally)
      var ally = allies.shift();
      if (!!ally){
         targets.push(ally);
      }
    }
    </JS Targets>

    Hope this helps! :)

    (Sorry Mods about the double post, was trying to multi-quote! Please merge.)
  5. Thank you!
  6. cchmaster said:
    Hello friends, I have a problem here.

    Weapon Animation doesn't work during action sequence?

    When I use normal attack, it works perfectly, showing my custom weapon. However, during an action sequence, the weapon shown becomes the original one.

    I've run a new project and Visustella's sample project to test this. Both result the same thing. Weapon Animation seems not working in action sequence.

    I think I saw a gif with custom weapon shown in action sequence on Weapon Animation's official page, but it seems to be removed.

    Did I miss something or this function is just not implemented yet?

    OK, I accidentally figured this out. When using "Freeze Motion Frame" with "Show Weapon", it shows the default weapon. Only when using "Motion Type" or other commands from "Move" group, it shows the custom weapon.

    Unfortunately all action sequences are controlled with "Freeze Motion Frame". That's why I couldn't see my custom weapon.
  7. Hi, I was wondering if someone could teach me how to make states stackable in MZ using Visustella. I have all the plug-ins I just can't figure out how to make the state actually stack.
  8. Good day all - I'm working on a translation tool to simulate languages in RPGMZ. I've got the Javascript class running fine and now I'm working on integrating it with the messaging system. I've defaulted to using VisuStella Messaging Core. I'm stuck though in actual implementation and could use some advise or suggestions.

    I've been digging into the Message Core documentation and playing with the Text Code Actions and have been able to take the text entry box and send it to my custom Language class that is stored in a Global Variable and it process it correctly. But how do I display new result - I'd like to replace the original text with "translated" text. Even using a simple static text return statement (something like "return 'Test';") doesn't actually show that return value of "Test". It just displays the text in the brackets.

    Said another way - if I have a Text Code Action block setup as:
    Match: TestTranslate
    Type: set to the string value
    Common Event not used
    And the Javascript set to a minimal static return "return 'Hello World';"

    And the message box uses "\TestTranslate[This should be replaced]"

    In game I get a dialog box that says "[This should be replaced]" ... the return value is not displayed.

    Am I doing something wrong? And in this case the argument[0] value that is passed to the Javascript section is " TestTranslate[This should be replaced]"...with a special character like a box in front of that first T where the space is.

    Thanks for any thoughts - cheers, mike
  9. Alright - I guess I figured it out - using the Text Replacement Actions and splicing the resultant string on the < and >. It's working now!
  10. Hm, can someone explain this one to me? Custom parameters, they have formulas in JS. That I do understand. Now, can I set their values outside of the basic parameters that is available?
    In another words:
    Ive got a Strenght stat, for example. Can I make it to be just 10 at lvl 1 for my character, and then grom with levels or items independently from all other stats? OR there is no way around using basic, vanilla stats from mz, and then hiding them with your new stats?
  11. Hello,

    I can't get slip damage to work on this poison state

    <JS On Add State>

    target._poisonStacks = target._poisonStacks || 0;

    target.setStateDisplay(4, target._poisonStacks);

    </JS On Add State>



    <JS Pre-End Turn>

    target._poisonStacks = target._poisonStacks || 0;

    target._poisonStacks++;

    target.setStateDisplay(4, target._poisonStacks);

    </JS Pre-End Turn>



    <JS HP Slip Damage>

    target._poisonStacks = target._poisonStacks || 0;

    var n = target._poisonStacks;

    damage = Math.floor(n);

    </JS HP Slip Damage>
  12. I'm having a bit of an issue with <JS On Expire State>

    the code im using right now goes like this

    Code:
    <JS On Add State>
    
    target.gainHp(Math.round(this.hp * 0.6));
    
    </JS On Add State>
    
    <JS On Expire State>
    
    target.gainHp(Math.round(-this.hp * 0.375));
    
    </JS On Expire State>

    i had some more complicated stuff but its not really getting the job done
    the issue is; lets say the character's hp was 500/504
    with that snippet, they gain 300 HP as the max HP is increased to 806
    so it becomes 800/806
    the problem i'm having is when the state applies, the max HP increase goes away and the character's hp goes to 504/504 because of the loss of hp bringing down current
    the issue with this is that using this.hp on expire will return 504
    i dont know how to capture the current hp of the character while the state was active before and use that value during expiration
    so that i can apply an hp reduction that keeps the ratio betwen current and max the same when checked against the ratio when the state is active
    its a non issue if the current hp is less than max hp after the state expires
    but for hp between 505-805, if i use the example above, i'm at a complete loss
  13. Hi, @Trihan I'm trying to create a poison state, but the state I made can't kill the target
    may you help me please ?
    my state's notetage setting like the following

    <JS HP Slip Damage>
    damage = Math.max(((user.mat * 4 - target.mdf *2 + user.luk)) / 3 , 1);
    if (damage >= target.hp) {
    target.addState(1)
    };
    </JS HP Slip Damage>
  14. Okay, a lot of stuff's been going on with me lately including losing my job, so I've been slightly adrift. I'm back now though, and ready to tackle all your notetag needs!
  15. Glad to see you back!

    I Posted this in the official plugin thread and havent had a response yet, so I figured I'd try here:

    Has it been mentioned anywhere on how to give the default parameters custom formulas?

    In MV, you could use Yanfly's ExtraParameterControl (or something like that) plugins to give the X and S parameters (like target rate, critical rate, physical damage rate, etc) custom formulas. For example, I liked to have my PDR and MDR decrease as the actors' ATK and MDF went up.

    I'm assuming you'd do this somewhere in the core engine's Parameter settings, I just have no idea where to start:

    Code:
    // Determine the variables used in this calculation.
    let xparamId = arguments[0];
    let base = this.traitsSum(Game_BattlerBase.TRAIT_XPARAM, xparamId);
    let plus = this.xparamPlus(xparamId);
    let paramRate = this.xparamRate(xparamId);
    let flatBonus = this.xparamFlatBonus(xparamId);

    // Formula to determine total parameter value.
    let value = (base + plus) * paramRate + flatBonus;

    // Final value
    return value;
  16. There's a JS:Formula for X and S parameters in the settings for the Core plugin. If you want to have specific formulae for different params, just branch it on the param ID.
  17. Yeah, I think that's the code I posted above. I'm not good at programming so I have no idea what the syntax is or what you mean by "branch it". Would you mind posting an example of what the code should look like and where it should go?

    EDIT: Turns out I probably won't need help after all. Yanfly's Special Parameter Formulas plugin for MV is compatible with MZ. Since it's easy to use (not to mention much more well documented and doesn't require the user to have coding knowledge), I'll just use that instead.
  18. Geez, I am having a issue and I bet its pretty simple to solve but I can't seem to solve it.

    Anyway I am using auto battle function and I've managed to get the actor and enemy skills to work the way I want. However, when it comes to creating a healing skill it doesn't seem to work with Battle A.I conditions at all.

    I am trying to set it up where it only triggers the heal when the user or allies have HP% at 50% or below. So I went with:

    <Any AI Conditions>
    User HP% <= 0.25
    Target is Actor HP% <= 0.25
    </Any AI Conditions>

    Can't seem to get it to work properly. Seems to just randomly heal.

    @Trihan Welcome back and sorry to hear about the job loss.
  19. Austrian said:
    Geez, I am having a issue and I bet its pretty simple to solve but I can't seem to solve it.

    Anyway I am using auto battle function and I've managed to get the actor and enemy skills to work the way I want. However, when it comes to creating a healing skill it doesn't seem to work with Battle A.I conditions at all.

    I am trying to set it up where it only triggers the heal when the user or allies have HP% at 50% or below. So I went with:

    <Any AI Conditions>
    User HP% <= 0.25
    Target is Actor HP% <= 0.25
    </Any AI Conditions>

    Can't seem to get it to work properly. Seems to just randomly heal.

    @Trihan Welcome back and sorry to hear about the job loss.

    I'll take a look at this for you later and see if I can figure out what the issue is.
  20. Hey Everyone! I have a couple simple issues (at least I think.) that may involve editing some stuff within some VisuStella plugins.

    First, I'd like to be able to disable the flashing enemy selection box as pictured here:
    S9DJAoRKjB.gif

    Also, I'm currently using the STB Battle System but would like the enemy selection list that comes up when you're choosing an enemy to attack in the default battle engine, pictured here:
    nw_Z3VyJjDhsb.png

    Could anyone help me remove the flashing selector and add the enemy list when attacking, to the STB Battle System plugin?

    Thank you!