Ellye's State Damage

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
Made by request (http://forums.rpgmakerweb.com/index.php?/topic/47564-poison-damgage-based-on-attack-rather-than-percentage/).


This plugins allows you to setup damage formulas for you States, just as if they were skills.

For now, it supports up to four parameters that can go in the [Note] field of any state:

<formula:FORMULA_HERE><element:ELEMENT_ID><variance:VARIANCE_PERCENT><heal>Substitute FORMULA_HERE for a damage formula, in the exact same format you would use in the Skills entries.

Element_ID should contain the number of an Element (Types). It defaults to 1 if you omit it.

Variance is the % of variance in the damage. It defaults to 0 if you omit it.

If you put the heal tag, the skill will heal instead of dealing damage.

Creating this was surprisingly insightful, and I kinda of purposefully avoided the easy way out of this one (having the Maker create a Skill and reference that skill via the state notes, for it to be applied every turn; I think that feels too clunky when navigating the database).

And I'm pretty sure that the way I used to display damage numbers is not the correct way to do it. So I'll very likely come back to update and polish this plugin in the future. I already know some parameters that I want to add to it, later.

Do let me known of any bugs (or any major incompatibility) that this one might have.

Legal:

Free for any kind of use.

I don't give any warranty.

 * Version: 2015-11-20-2232
 *
 * CHANGE LOG:

 * 2015-11-20-2232 - Normal attack states should also get the caster paramaters properly now.

 * 2015-11-19-2359 - Fixed decimal damage.

 * 2015-11-19-0021 - Release of Version 2 Beta - changed how the damage is applied, needs a lot of testing.

 * 2015-11-08-0156 - Changed the _stateCaster array to no longer store direct object references, since that could easily result in infinite data loops. Thanks, Bobstah.

 * 2015-11-05-1029 - Added tags <drain>, <mp_drain>, <mp_heal>, <mp_damage>, <can_critical>.
 * 2015-11-04-2327 - Made this compatible with Yanfly's Cooldowns.
 * 2015-11-03-3442 - Fixed _stateCaster information being unintentionaly shared between battlers.

 * 2015-11-01-1141 - Added collapse animation for enemies that die due to status effects.

 * 2015-10-31-1802 - Fixed a bug that made the plugin not work properly in many cases.

 * 2015-10-31-1434 - Fixed a crash at turn end.

 * 2015-10-31-1225 - Fixed a few potential crashes.

 * 2015-10-31-0221 - Beta Release.

Download:

http://pastebin.com/TiJxL4xi
 
Last edited by a moderator:

omfgkevin

Veteran
Veteran
Joined
Dec 21, 2012
Messages
53
Reaction score
3
First Language
English
Primarily Uses
Thanks for this! In the formula I can just write like 50 or something for just straight up base damage right?

EDIT: Also, I keep getting an undefined is not a function? I tried copy pasting the example state, and it didn't work.
 
Last edited by a moderator:

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
Thanks for this! In the formula I can just write like 50 or something for just straight up base damage right?
Yes, something like

<formula:50>will deal exactly 50 damage (barring elemental resistence or stuff like that).

EDIT: Also, I keep getting an undefined is not a function? I tried copy pasting the example state, and it didn't work.
Let me check, I might have uploaded the wrong version. Sleepness does that.

When are you getting the error? As soon as you launch the game, or during battles? Are you using some other plugin?

If you can, press f8 after the error pops up, and send me a screenshot of what shows up in the console window. Thanks!
 
Last edited by a moderator:

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
817
First Language
English
Great stuff, but it crashes after the turn ends. If you remove the "variance" it no longer crashes, buuuuuut, this happens:

Stateserror.png
Looks like it's registering the damage multiple times. :)
 
Last edited by a moderator:

lolshtar

Master of Magic thatknow nospell
Veteran
Joined
Apr 13, 2013
Messages
694
Reaction score
101
First Language
French
Primarily Uses
RMMV
Use Victor's Custom Slip Effect as a reference, easily the most useful script in Ace when it comes to DoTs/HoTs
 

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
Weird, seemed to work fine here, though on a completely fresh project.

Are all of you also having those same issues when trying this plugin on a New Project? Just to help me isolate what's happening. Thanks!
 
Last edited by a moderator:

Fernyfer775

Veteran
Veteran
Joined
Oct 6, 2013
Messages
1,317
Reaction score
817
First Language
English
I found the culprit. Yanfly's battle core is causing the damage to hit multiple times.
 

Cel

Veteran
Veteran
Joined
Oct 28, 2015
Messages
88
Reaction score
56
First Language
Swedish
Yes, can confirm. Yanfly's battle core freaks it out making it hit multiple times. Any possibility for a compatibility patch?
 

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
Sure, I'll try to take a look at Yanfly and see what's happening. I think I imagine what it is already.

Any specific parameters that you guys are using?

Edit: I've made a few changes to the script that might prevent a few possible crashes.
 
Last edited by a moderator:
Joined
Oct 26, 2015
Messages
531
Reaction score
1,027
First Language
English
Primarily Uses
I've just tried your plugin, and keep getting the same error at the end of the turn.

ReferenceError

battler is not defined

I've tried it in a fresh project with only this plugin, it still crashes.

I even tried a test battle where the only skill used by either side is "attack", still crashes when the turn ends.
 

omfgkevin

Veteran
Veteran
Joined
Dec 21, 2012
Messages
53
Reaction score
3
First Language
English
Primarily Uses
Yes, something like

<formula:50>will deal exactly 50 damage (barring elemental resistence or stuff like that).

Let me check, I might have uploaded the wrong version. Sleepness does that.

When are you getting the error? As soon as you launch the game, or during battles? Are you using some other plugin?

If you can, press f8 after the error pops up, and send me a screenshot of what shows up in the console window. Thanks!
After updating to the newest ones, the error (as before) usually gets an error after the state attempts to activate (so after I attack, the state applies, and then after the enemies attack, it errors when the state "should" tick for damage).

Now it says Battle is not defined.
 

PlatypusOfDoom

Villager
Member
Joined
Aug 24, 2012
Messages
24
Reaction score
5
Wow, thanks for taking the time to make a plugin for this, Mellye. This is definitely a much more efficient solution to the issue than what I was doing ;)
 

Cel

Veteran
Veteran
Joined
Oct 28, 2015
Messages
88
Reaction score
56
First Language
Swedish
Any specific parameters that you guys are using?
The actual parameters don't seem to matter. It simply triggers repeatedly when it's supposed to trigger once for me. I'll edit this once I've tried your update.

EDIT: This:



Happens to me in combat now, after updating your ATB and States plugins. It always happens at the end of turn 1.
 
Last edited by a moderator:

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
Taking a look at this one now, thanks for the console screenshot!

I've uploaded a new version, should fix the instant crash at least.
 
Last edited by a moderator:
  • Like
Reactions: Cel

Solis

Veteran
Veteran
Joined
Oct 24, 2015
Messages
376
Reaction score
84
First Language
English
Gonna also try it out :)  
 

Cel

Veteran
Veteran
Joined
Oct 28, 2015
Messages
88
Reaction score
56
First Language
Swedish
Taking a look at this one now, thanks for the console screenshot!

I've uploaded a new version, should fix the instant crash at least.
The crash is gone, awesome! Now the state's not triggering at all though.
 

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
The crash is gone, awesome! Now the state's not triggering at all though.
Are you using it together with Yanfly's or just by itself? Or any other plugins?

I think there probably are still some compatibility issues between this and YEP, I'll be taking a look at those.
 

Cel

Veteran
Veteran
Joined
Oct 28, 2015
Messages
88
Reaction score
56
First Language
Swedish
Are you using it together with Yanfly's or just by itself? Or any other plugins?

I think there probably are still some compatibility issues between this and YEP, I'll be taking a look at those.
I'm using a bunch of plugins. The combat ones are your ATB, your state plugin and Yanfly's plugins. I'm assuming the problem is with Yanfly's battle core since it was the one that made states trigger multiple times instead of once.
 

Mellye

Veteran
Veteran
Joined
Oct 24, 2015
Messages
347
Reaction score
279
First Language
Portuguese
I'm using a bunch of plugins. The combat ones are your ATB, your state plugin and Yanfly's plugins. I'm assuming the problem is with Yanfly's battle core since it was the one that made states trigger multiple times instead of once.
Thanks, that's likely it. I'll be taking a look at what's happening and will try to make it compatible.

Also, if it turns out that it's my own other plugin that's the incompatible one, I'll pretend this never happened (XD)

Edit: I fixed the bug that made it not work at all, and it seems to be working with YEP here for me (but I only tested it with default parameters for YEP, maybe there's some parameters that might be causing issues).

If someone still have the same issues, please let me know - and I'd appreciate a list of the parameters you're using in other plugins and such. Thanks!
 
Last edited by a moderator:

Users Who Are Viewing This Thread (Users: 0, Guests: 1)

Latest Threads

Latest Posts

Latest Profile Posts

Would be nice to pick color code that is not exclusively for message event
The Ace attorney series are so great games... But at the same time such a travesty.
Made a video showcasing a plugin (by Lanza) that adds 5 more weather effects to our MV games. :LZYsmile: Namely:
Ash-dust,
bloodrain,
Cherry Blossom Petals,
Hail,
and bubbles.

Forum statistics

Threads
103,239
Messages
998,301
Members
134,729
Latest member
Takufy
Top