So I want to create a skill that adds a state to the target that makes buffs more effective. For example you use a defense buff and it adds 10 defense you use it on someone with this state it adds 15 defense. I'm not really sure how to go about doing this if anyone has any ideas I'd appreciate the help.
need help with making a certain skill/state
JS Plugin RequestsI've moved this thread to Plugin Request. Please be sure to post your threads in the correct forum next time. Thank you.
As the engine works, buffs are fixed percentage effects that can't be changed in any way.
So basically you'll need a plugin to reprogram their options.
I suggest giving more detailed descrptions because the pluginwriter will need that.
As the engine works, buffs are fixed percentage effects that can't be changed in any way.
So basically you'll need a plugin to reprogram their options.
I suggest giving more detailed descrptions because the pluginwriter will need that.
I recommend using Yanfly's Plugins, such as "Buffs & States Core" and "State Categories".
I installed both of those and tried this
[SIZE=12pt]<Custom Apply Effect>[/SIZE]
[SIZE=12pt]if (battler.isStateCategoryAffected(‘multiply’)) {[/SIZE]
[SIZE=12pt]value = true;[/SIZE]
[SIZE=12pt]} else {[/SIZE]
[SIZE=12pt]value = false;[/SIZE]
[SIZE=12pt]}[/SIZE]
[SIZE=12pt][/SIZE]
[SIZE=12pt]if (value == true) { [/SIZE]
[SIZE=12pt]b.mat = b.mat * 4;[/SIZE]
[SIZE=12pt]} else {[/SIZE]
[SIZE=12pt]b.mat = b.mat * 2;[/SIZE]
[SIZE=12pt]}[/SIZE]
[SIZE=12pt]</Custom Apply Effect>[/SIZE]
It works in my head but my syntax must be wrong because I get an unexpected token illegal error
I've only used these scripts very lightly in the past, so I don't necessarily know what's wrong - you'll have better luck, probably, asking in "Plugin Support". But two things stick out to me as potential culprits for this error:
- (battler.isStateCategoryAffected(‘multiply’)) - No idea whether this is correct. But you can test whether it is by changing it to "(true)" - so, if (true) { and save your project and see if you still get the same error. If you don't, you know it's something in this line. If you do...
- b.mat = b.mat * 4; - It strikes me as suspect that you're using "b" here - do the scripts support it to mean the target and does your skill have a target? I'm also surprised to see you explicitly change the value of a MAT stat, which might not have a "set" method. Try removing both of these MAT-setting lines and save and see if you still get the same error. If you don't, you know it's something in this line (try using a.mat and try battler.mat and try self.mat and see if any work; also try looking into some of the script's documentation and figuring out if there's a better way to say you want the state to raise a battler's MAT).
In addition to the above wisdom, I don't believe battler is valid in this scope. Try replacing it with user or target.
Here's an option to think about, although it may complicate your database. Put your bonus into the parameters of a new state (M.Attack * 200%). In the state that you're currently using, you can conditionally check whether or not to add the bonus state. (For example, state 50)
<Custom Apply Effect>
if (user.isStateCategoryAffected('multiply')) {
user.addState(50);
}
</Custom Apply Effect>
Here's an option to think about, although it may complicate your database. Put your bonus into the parameters of a new state (M.Attack * 200%). In the state that you're currently using, you can conditionally check whether or not to add the bonus state. (For example, state 50)
<Custom Apply Effect>
if (user.isStateCategoryAffected('multiply')) {
user.addState(50);
}
</Custom Apply Effect>
Original thread: https://forums.rpgmakerweb.com/threads/need-help-with-making-a-certain-skill-state.67600/