Require variable control note tag inside skill note tags.

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,325
Reaction score
320
First Language
English
Primarily Uses
N/A
Hello! Here I am yet again needing assistance on a problem.

The basic run down is I have weapons that have skills identical in function to each other, most differences are how many attacks are involved, sound effects etc all made possible with VS battle core.
Now in order for me to minimize cluttering my database with clone common events and skill sets I've devised a way to include branching results that give a defensive state and animation, the only problem is I absolutely need my skill note tag to add a set value to a variable ID.

The problem is I don't know how or where to find a plugin to handle this, now alternatively I can do this with common events yes but that infringes on my goal to minimize the database, (I already have a ton going on and they are organized)

If I achieve this I could make 120 common events/skills into 12 skills.

Thanks for taking the time.
(Also just realized this may be more of a plugin request rather than MZ support but I wasn't entirely sure where it bordered since I am not particularly sure about note tags in general)
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,778
Reaction score
5,578
First Language
English
Primarily Uses
RMMZ
Just add a JS pre/post-damage tag with $gameVariables.setValue(id of your variable, $gameVariables.value(id of your variable) + value to add to it);
 
Last edited:

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,325
Reaction score
320
First Language
English
Primarily Uses
N/A
Interested in testing this out but I might need a bit more information on this method.
If you're able to show me a screen cap of what you mean I'll be onto it straight away because I don't understand what a JS pre/post damage tag is.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,778
Reaction score
5,578
First Language
English
Primarily Uses
RMMZ
Interested in testing this out but I might need a bit more information on this method.
If you're able to show me a screen cap of what you mean I'll be onto it straight away because I don't understand what a JS pre/post damage tag is.
It's a feature of the VS plugins. In the notebox of the skill, put

JavaScript:
<JS Post-Damage>
  $gameVariables.setValue(1, $gameVariables.value(1) + 5);
</JS Post-Damage>

That, for example, would add 5 to variable 1 when the skill is used.
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,947
Reaction score
4,789
First Language
English
Primarily Uses
RMMV
I don't understand what a JS pre/post damage tag is.
It's in the instructions for the VisuStella Battle Core you said you're already using :wink:
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,325
Reaction score
320
First Language
English
Primarily Uses
N/A
<JS Post-Damage> $gameVariables.setValue(1, $gameVariables.value(1) + 5); </JS Post-Damage>
So what I have down is:

<JS Post-Damage>

$gameVariables.setValue(81, $gameVariables.value(81) + 1);

</JS Post-Damage>
In terms of variable operation is this actually adding 1 to variable 81? or setting it to 1?

It's in the instructions for the VisuStella Battle Core you said you're already using :wink:
I've actually got really lost in the wall of text and couldn't find the specific area to locate for this instance.

I just realized aswell- I'm after making this special effect happen irregardless if the skill hits or misses.
I'd like to make the defending effect happen eitherway.
 
Last edited:

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,778
Reaction score
5,578
First Language
English
Primarily Uses
RMMZ
So what I have down is:

<JS Post-Damage>

$gameVariables.setValue(81, $gameVariables.value(81) + 1);

</JS Post-Damage>
In terms of variable operation is this actually adding 1 to variable 81? or setting it to 1?


I've actually got really lost in the wall of text and couldn't find the specific area to locate for this instance.

I just realized aswell- I'm after making this special effect happen irregardless if the skill hits or misses.
I'd like to make the defending effect happen eitherway.
Yes, that code would add 1 to the value that's already in variable 81. If you just wanted to set it to 1, you'd do

$gameVariables.setValue(81, 1);
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,325
Reaction score
320
First Language
English
Primarily Uses
N/A
OK so i've made changes to the note tag, and i've been testing out the different codes such as pre-start turns and post etc and I can't get an effect going, when I actually manually set a value in the turn window within the battle test the desired effect works so that tells me that the note tag isn't working quite as intended yet, so that leaves me to figure out how else to get this note tag working with VS Battle core.


Untitled.png

I'm not entirely sure why this effect isn't working.
 

Trihan

Speedy Scripter
Veteran
Joined
Apr 12, 2012
Messages
5,778
Reaction score
5,578
First Language
English
Primarily Uses
RMMZ
Pre-start turn fires at the start of the *unit* turn, not the individual action being carried out by the battler. Does that make a difference to you?
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,325
Reaction score
320
First Language
English
Primarily Uses
N/A
I'm not seeing any effect to give a real answer, but if it helps my intention is that when the user uses this skill it sets the variable to a value- then uses a different skill which later checks if that value is set for that specific skill's attack sequence with a conditional branch and applies the defend state as the conclusion of the turn.

(It's actually 2:42 AM and I should be going to sleep now so i'll be immediately checking back on this when I wake)
 

ATT_Turan

Forewarner of the Black Wind
Veteran
Joined
Jul 2, 2014
Messages
6,947
Reaction score
4,789
First Language
English
Primarily Uses
RMMV
my intention is that when the user uses this skill it sets the variable to a value
So you in fact don't want to use Pre-Start Turn. You in fact can't put Pre-Start Turn on a skill:
Battle Core Documentation said:
trait object (actor, class, weapon, armor, enemy, or state).
That's why it's doing nothing in your tests.

I think when you've gotten some sleep and can read the instructions better you'll get it :wink:

You are using the online documentation with hyperlinks and formatting and illustrations, right?
 

Skurge

Archtross Dev
Veteran
Joined
Jul 12, 2015
Messages
1,325
Reaction score
320
First Language
English
Primarily Uses
N/A
My issue is I'm unsure what to use and if me having 2 common events called is conflicting with them, plus I don't see any js codes that are used for skills.

I am looking through the documentation too and the online MZ script lists but what I am doing just isn't working the way I want it to.
 

Latest Threads

Latest Posts

Latest Profile Posts

That moment when I am listening to another instructor teach and I am thinking…I have been doing this for almost 30 years…I know this material…I teach this material…and you are confusing the crap out of me…let alone the students. What the actual $&@#! are you talking about? :eek:
Help me make a choice. Which one makes more sense?
A. Range style 1.pngDiamond shape
B.Range style 2.png Square shape
I created a skill that can only be used if there are enemies within the player's range. When the player's range is 2, which one do you think is more appropriate to describe the range area?
Just once I would like to see some innocent person stumble upon a body in a crime show and instead of scream they sigh and just say, "Found another one."
Can we get like a RPGM VXA Pro edition with all the limits gone!!
I drew @TheoAllen 's Cecilia~

yVLlTmK.png

Forum statistics

Threads
128,349
Messages
1,193,807
Members
168,844
Latest member
webhost98
Top