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

Sometimes I wonder why I still try and recruit others to help with my games. It never works.
ScreenShot_10_3_2022_4_27_17.png
welp, thanks to Luna MV, I was able to add the Balloon as a window... thus allowing me to edit the font color and outline... so now it looks like comic bubbles above characters. I have NO idea why I couldn't get this to work through more conventional means, but here we are.
CUTE CUTE CUTE.gif
I cannot cease doing cute art
War and Wonder is a 100% choice-based open-world visual novel.
1664821313732.png
1664821466359.png
1664821547746.png
Going live soon on Twitch, and will continue Fortunastreet's game "Verloren". For those who are curious, you are welcome to join ;)

-> Franz' Twitch channel

Forum statistics

Threads
125,749
Messages
1,173,223
Members
164,911
Latest member
KyzerKiba
Top