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 Posts

Latest Profile Posts

There was a tutorial on how to draw anime eyes. Just draw Among Us. So I tried.
Screenshot_107.jpg
DamageActor3_7.png added!
index.php

Making a "characters first appearance" drawing for my game. Now I just have to finish the sprite art animation for her grand entrance.​
ScreenShot_9_24_2022_7_56_24.png
New area being started today. It leads to one of the games 2 optional bosses.
A secret desire of mine: I want to make a horror game based on Celtic mythology. I've seen plenty of Greek, Japanese and Norse mythology-based horror games, but I don't think I've ever seen a Celtic-based horror game anywhere...

Forum statistics

Threads
125,537
Messages
1,171,792
Members
164,607
Latest member
DemiDevil
Top