I think you may need to use target.result().removedStateObjects() for this in a post-apply notetag.
The official VisuStella notetag help thread
RPG Maker MZ SupportWith my custom resolution (1056x808) I cant seem to figure out how to move the Y position of portraits on the Status screen?
I managed to find where I could move it in the main menu code, but I couldnt figure it out after playing around in the code. Am I just dumb?
I managed to find where I could move it in the main menu code, but I couldnt figure it out after playing around in the code. Am I just dumb?
Hey, is there a way to change the amount of EXP an enemy yields based on a variable? It would be a one-time thing for certain bosses. I know I can do it with eventing after the battle, but I wanted the EXP to show up on the victory screen. I just had the idea of a passive state being temporarily applied, but the trait effects aren't really variable-friendly. Any thoughts?
If it's for a one-off enemy that you'll never encounter again, you can cheese this by changing the exp data for the enemy json directly:
$gameTroop.members()[0].enemy().exp = $gameVariables.value(1)
So if you had 10 in the variable, that's how much exp the enemy would be worth.
Again, you can only do this for an enemy you'll encounter once and never again, because you're editing the data for every copy of the enemy that's created from it.
The other way to work around this would be to simply create a copy of that enemy in your database, fill in whatever different experience, and use that version of the enemy in your boss troop.
How would you fill in the exp for a database version of an enemy if the value needs to be changeable, though? Maybe I'm missing something.
Oh, I wasn't thinking changeable in terms of dynamically determining it during play. I was just thinking in terms of it being a different value for one fight than it normally is.
If the OP means a value that's not predetermined, clearly your hack is the way to do it.
@Trihan @ATT_Turan
Thank you both for your suggestions. So, my boss's EXP is determined by how "smart" the player was in going through the dungeon. If they were efficient and didn't trigger many traps, they would get a better reward. So, in that sense, yes, the EXP is dynamic based on gameplay.
Where exactly would I put that script? I have no experience editing the JSON files directly, sorry if it's obvious. You just said "the enemy JSON," but Enemies.json doesn't seem to reference $gameTroop.
Thank you both for your suggestions. So, my boss's EXP is determined by how "smart" the player was in going through the dungeon. If they were efficient and didn't trigger many traps, they would get a better reward. So, in that sense, yes, the EXP is dynamic based on gameplay.
Where exactly would I put that script? I have no experience editing the JSON files directly, sorry if it's obvious. You just said "the enemy JSON," but Enemies.json doesn't seem to reference $gameTroop.
Okay, so it's a bit of a hierarchy. enemies.json contains the core enemy data. Game_Enemy is a class that creates its members from the data in enemies.json. Game_Troop is a class that's a collection of Game_Enemy instances, among other things.
So $gameTroop.members()[x] gives you the Game_Enemy, calling its .enemy() function gives you the actual data object the json represents, and .exp is the experience value derived from the json data.
If you put the line I gave you in a turn 0 troop event, it'll modify that value, which is what will be used to calculate exp gain when you beat the boss. Ordinarily this would be a temporary measure as the exp value would revert to what it is in the data after you close the game and rerun it, but because it's for a boss this limitation doesn't matter, since you won't fight it again after you beat it.
So that's what you meant by editing the JSON. That's a lot simpler than I was thinking. Thanks a lot!
I'm terrible at this stuff, anyone able to help with any of these?😛
When user removes a state from self or ally they gain 4% of max MP.
User's MAT is increased or decreased based on user's MP%.
Something like 10% bonus for each 10% of mana. 50% being 0% bonus.
0% MP = -50% MAT (Not that it matters at this point xD)
-
40% MP = -10% MAT
50% MP = No bonus
60% MP = +10% MAT
-
100% MP = +50% MAT
Would also prefer for each stage to show an icon.
Something like 10% bonus for each 10% of mana. 50% being 0% bonus.
0% MP = -50% MAT (Not that it matters at this point xD)
-
40% MP = -10% MAT
50% MP = No bonus
60% MP = +10% MAT
-
100% MP = +50% MAT
Would also prefer for each stage to show an icon.
Using an elemental spell grants the user 2 separate buffs.
Buff 1: Increases the damage of two different elements by 33%.
Buff 2: Decreases the damage of two different elements by 33%.
If it helps, the elemental ids are 2,3,4,5,8 and 9.
Buff 1: Increases the damage of two different elements by 33%.
Buff 2: Decreases the damage of two different elements by 33%.
If it helps, the elemental ids are 2,3,4,5,8 and 9.
Hello!
Can someone please explain to me, how I use the Item Accessibilty Notetag to check if a user has learned a specific skill in order to be able to use the item?
I figured its something like
if user.hasSkill(X) {
enable == true }
but since I have no clue about JS I can't get it right 🙁
EDIT: Ok found the solution!
It's just:
<JS Item Enable>
enabled = (user.isLearnedSkill(X)
</JS Item Enable>
Wasn't that hard after all 🙂
Can someone please explain to me, how I use the Item Accessibilty Notetag to check if a user has learned a specific skill in order to be able to use the item?
I figured its something like
if user.hasSkill(X) {
enable == true }
but since I have no clue about JS I can't get it right 🙁
EDIT: Ok found the solution!
It's just:
<JS Item Enable>
enabled = (user.isLearnedSkill(X)
</JS Item Enable>
Wasn't that hard after all 🙂
This doesn't need anything to do with notetags. You can put it directly in the effects for the skill, under the Remove State effect you put a Recover MP 4% effect.
You could put a bunch of passive states on the actor and have the appropriate conditions on them, e.g.:
Code:
<JS Passive Condition>
condition=user.mpRate()>=.8 && user.mpRate()<.9;
</JS Passive Condition>
I don't understand why this has anything to do with notetags or plugins. If it's a damage-dealing spell, you'd put
a.addState(2); or whatever in the damage formula.I wrote that badly.
Cleric has an skill called Bless. It removes all negative states. (I also want this skill to not be useable unless the target has one of these negative states, but that is another issue^^)
I want a passive state that makes it so when the cleric removes a negative state with Bless, the cleric gets +4% MP (not the target).
I did something similar but didn't know what code to make it so the stacks didn't....stack 😛 Will try this.
I don't understand why this has anything to do with notetags or plugins. If it's a damage-dealing spell, you'd put a.addState(2); or whatever in the damage formula.
I was thinking more of a passive, all classes share or can learn the same spells. So I'd like a passive for only 1 class that changes how it interacts with those same spells.
So every time Elementalist (who has this passive) uses a spell with the element id of 2,3,4,5,8 or 9. It gains these buffs.
I'll sort that out later willibab if you still haven't had a solution.
Cheers!
The Mana Mastery one seem to work 😛
Feel free to ask if something is unclear, I seem to be poor at conveying what I have in my head sometimes ^^
Code:
<JS Targets>
var states=[1, 3, 4, 8];
targets=$gameParty.aliveMembers().filter(member => states().forEach(state => member.states().indexOf(state)>=0));
</JS Targets>
That should make Bless only target actors who have a negative state (which you listed between the brackets after "states").
I still don't see a need for a separate passive state, just put in Bless:
Code:
<JS Post-Apply>
user.gainMp(user.mmp*.04);
</JS Post-Apply>
Unless the passive state is an add-on? Like, your cleric can learn Bless, then later they learn, like, Improved Bless that gives the MP regen? You still wouldn't need a passive state, just add to the code above
if (user.isLearnedSkill(X)) where X is the ID of the Improved Bless.I'm presuming these are damage spells. So you'd do:
Code:
<JS Post-Damage As User>
var state1=0, state2=0;
switch (this.item().damage.elementId)
{
case 2:
state1 = 16;
state2 = 5;
break;
case 3:
state1 = 18;
state2 = 3;
break;
}
if (state1>0)
{
user.addState(state1);
user.addState(state2);
}
</JS Post-Damage As User>
You use the format above and fill in all of your numbers. The number after case is the ID of the element. Then you set state1 and state2 equal to the two buffs you want to get from casting that element. Each element is going to have the case, two states, and break.
The bless skill seems to be useable regardless of if the state is on a target or not. (I did mean for it to be an add-on but testing without it first.)
<JS Targets>
var states=[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 18, 19, 20, 22, 23, 26, 27, 28, 29, 30];
targets=$gameParty.aliveMembers().filter(member => states.forEach()(state => member.states().indexOf(state)>=0));
</JS Targets>
(I assumed this should be in the skill notetag? I tried it as a passive state too just incase.)
<JS Post-Apply>
user.gainMp(user.mmp*.04);
</JS Post-Apply>
I use the skill as a replacement command for guard but it didn't change when I tried it as a regular skill either.
var states=[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 18, 19, 20, 22, 23, 26, 27, 28, 29, 30];
targets=$gameParty.aliveMembers().filter(member => states.forEach()(state => member.states().indexOf(state)>=0));
</JS Targets>
(I assumed this should be in the skill notetag? I tried it as a passive state too just incase.)
<JS Post-Apply>
user.gainMp(user.mmp*.04);
</JS Post-Apply>
I use the skill as a replacement command for guard but it didn't change when I tried it as a regular skill either.
The volatile elements works great, thanks 😛
I probably borked something up trying to be super efficient with the JavaScript array functions. This is more basic and should definitely work...if not, something is screwy.
Code:
<JS Targets>
var debuffs=[4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 15, 18, 19, 20, 22, 23, 26, 27, 28, 29, 30], i, j;
targets=undefined;
if (user.isLearnedSkill(X))
{
for (i=0; i<$gameParty.aliveMembers().length; i++)
{
for (j=0; j<debuffs.length; j++)
{
if ($gameParty.aliveMembers()[j].states().includes(debuffs[j]))
break;
}
if (j==debuffs.length)
targets.push($gameParty.aliveMembers()[i]);
}
}
</JS Targets>
Hmm, it's somehow worse now. You can target and use it on anyone still but it doesn't do anything nor does the MP gain trigger. Strange 😳
Tested it with minimum plugins too.
Tested it with minimum plugins too.
Original thread: https://forums.rpgmakerweb.com/threads/the-official-visustella-notetag-help-thread.125717/