Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
56
Reaction score
11
First Language
English
Primarily Uses
RMMV
Hello, I'm trying to make it so that critical hit's inflict a state on a target. I found this tutorial by Yanfly to apply buffs and debuffs with critical hits, and I thought I could just replace the debuff with a state, however it doesn't seem to be working even if I use the provided code or a new project with no plugins other than the ones required. Am I doing something wrong, or is the tutorial just outdated? And if so is there another way to do this?
 

sunnyFVA

how a demon do
Veteran
Joined
Nov 6, 2021
Messages
41
Reaction score
45
First Language
English
Primarily Uses
RMMV
To my knowledge, there should be no problems with following that tutorial right now. I don't know of any changes that would make it inoperable.

We can't know what went wrong with your attempt to adjust the code without seeing it, but my speculation would be that addState only takes one argument (the database ID of the state) as opposed to addBuff taking two (the ID of the param to modify and a duration in turns). Turn duration is an innate property of states, so it isn't defined when you add the state this way. Try removing the "turns" variable definitions and any references to them.

edit: Not sure if you already accounted for this, but the tutorial text also seems to have a typo at the start. The full first line should read: <Custom Establish Effect>
 
Last edited:

Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
56
Reaction score
11
First Language
English
Primarily Uses
RMMV
To my knowledge, there should be no problems with following that tutorial right now. I don't know of any changes that would make it inoperable.

We can't know what went wrong with your attempt to adjust the code without seeing it, but my speculation would be that addState only takes one argument (the database ID of the state) as opposed to addBuff taking two (the ID of the param to modify and a duration in turns). Turn duration is an innate property of states, so it isn't defined when you add the state this way. Try removing the "turns" variable definitions and any references to them.
I tried and it still doesn't work. Also even if I don't edit the code, it doesn't even apply the buffs/debuffs
 

sunnyFVA

how a demon do
Veteran
Joined
Nov 6, 2021
Messages
41
Reaction score
45
First Language
English
Primarily Uses
RMMV
Sorry, I noticed after posting, but did not edit quickly enough. There also seems to be a typo in the tutorial code. Hopefully I'm not just telling you something you already know, but the full first line should read: <Custom Establish Effect>
 

Quintus

Veteran
Veteran
Joined
Nov 9, 2017
Messages
56
Reaction score
11
First Language
English
Primarily Uses
RMMV
Sorry, I noticed after posting, but did not edit quickly enough. There also seems to be a typo in the tutorial code. Hopefully I'm not just telling you something you already know, but the full first line should read: <Custom Establish Effect>
Ah, that was the problem. Thank you!
 

Latest Threads

Latest Profile Posts

I've been trying to get certain devs' and artists' permission to use their characters in a certain plugin demo I've been working on. I got permission for 3 characters thus far... I'm hoping I can get at least 5 by the end of next week.
By far, the weirdest flex I've ever seen on the internet is "I don't have the attention span to read what you wrote, but I REALLY want the world to know I don't have that attention span!".
Why... the FACK... do I work in customer service?!?!
Excuse me while I go question allllll my life choices.
DamageEvil_6.png added!
index.php

Forum statistics

Threads
125,778
Messages
1,173,427
Members
164,934
Latest member
_CnZ_
Top