Poisonings & burninations

I’ve seem an interesting request in the RPG Maker Web forums today: the ability to set up custom damage formulas for Poisons and similar states effects.

By default on the RPG Maker MV editor, you can easily set up a state effect that deals damage (or heals) every turn, but the number can only be based on a percentage of the character maxHP.

That’s pretty limitating. Effects that cause a %damage in RPGs are pretty much always problematic: if its any meaningful %, every kind of boss has to be immune against it (or else it gets completely overpowered against them). If its a small %, it’s useless.

So being able to set a damage formula, like the ones we use for general skills, make sense.

This seemed like it would be a pretty straight-forward plugin to code. Well, it turned out to be a rehash, for me, of how the Game_Action and Game_Item classes work, and I’m pretty sure I still implemented everything in an extremely clunky way (even more so the way I handled sprites update for damage numbers).

I’m pretty sure I’ll come back to this script sometime down the road and basically re-do everything in a cleaner, more functional way. Also, I already know some parameters and functionalities that I want to add to it, in the future. For now, I need to focus on my Active Time Battle System, so the only support I’ll be able to give to this one here will be bug fixing.

Anyway, onwards to the results:

burnIt supports the following arguments in the [Note] field:

  • <formula:FORMULA_HERE>
  • <element:ELEMENT_ID>, defaults to 1.
  • <variance:VARIANCE_PERCENT>, defaults to 0.
  • <heal>, if present this means that the state will heal instead of damage.

Download:
http://pastebin.com/TiJxL4xi

Priorities / Roadmap

Though this isn’t a hard rule, in general my priorities for how to spend my time on my battle system currently are:

  1. Correcting any bugs that pop up (unless they are really complex while also only affecting very specific corner-cases, in this case I might lower their priority a bit).
  2. Finishing the CTB module (turn order prediction and better interaction with skills and items that affect the turn order, plus instant jump from turn to turn).
  3. Casting times and interrupts.
  4. General quality of life improvements, like more parameters for configuring UI and such (but those that are really quick to implement I end up doing before working on other stuff, though).
  5. Optional true-active ATB Mode (ATB keeps flowing while player is selecting input).
  6. Ability to better interact with the turn “slots” in battles, for CTB (i.e: have special stuff happens at specific slots, special buffs, etc.)
  7. Compatibility with other plugins – it’s something I keep in mind while coding (I tend to avoid completely overriding methods that are likely to be used by other popular plugins), but I don’t actively seek it out too much for now (I haven’t actually even looked at any other plugin yet). When I get to this point in my project, I might consider doing “Compatibility Patches” if the need arise.
  8. General performance. I frankly don’t tend to worry much about that, and to be honest this will only change if it ever starts being a notable issue.

Status Effects in my ATB System

I’ve been dealing with a conundrum in my Active Time Battle System: status effects. Or, to be more precise, their durations.

In a standard, non-ATB, battle, status effects marked to be removed during the end of a turn are pretty-straight forward and follow those guidelines:

  • They are generally applied on resolution of some action – i.e: after the use of “Guard” or the casting of “Poison”, etc, is complete.
  • At the end of a turn, after every Battler, including party member and troop enemies, has acted, the game subtracts 1 turn from the duration of every state and checks if any status effects on any Battler has a duration left of 0 turns. Those that do are removed.

So, if Therese uses the default Guard skill, that applies the Guard state for 1 turn and is marked to be removed at the end of a turn: she’ll gain that state and keep it until after everyone else has acted in this turn. At the end of the turn, its duration will be subtracted from 1 to 0, and it will be removed.

Well, in an ATB we have a problem. Turns are no longer rounds where everyone gets to act, so I presented a parameter called End-of-Turn Effects that could be used to simulate “turns” for status effects and such, based on the fixed Turn Timer. But I made it disabled by default – and, with it disabled, “end of turn” happened as soon a Battler finished its action.

So if, in my ATB with default parameters, Therese used Guard, what would happen would be the following: she would cast the skill, gain the Guard state, then her turn would end, the Guard state would be reduced to 0 and it would be removed. Instantly, basically, she would never get to use it.

At first I proposed that the duration of such status effects could be increased by 1, as the end result would be the desired effect. It would last until her next action. I later even hard-coded that in a way: I made status effects last until they reach -1 instead of 0, effectively lasting one more turn.

But after further consideration, this isn’t the right approach.

Rewind back to the RPG Maker MV Database editor for States, and let’s remember that we have this:

autoremovalThis option is actually of relatively little relevance for the standard RPG Maker combat. It defines whether a state duration should be checked at the end of the turn or at the end of the action.

One may notice that, with my default plugin settings, “end of turn” and “end of action” are actually the same thing. That was my primary mistake here. My default parameter should be to have those two be different things, and “End of Turn” effects should take place and the end of the turn timer indeed.

That option to differentiate states that should be cleaned at “Turn End” vs “Action End” becomes very relevant for my ATB System, if we use the concept of turn timer for turns and keep actions just for actions. To make it all work, we just need to extend their differentiation a bit: “Action End” effects will count down not at turn end, but at action end;  while “Turn End” effects will count down at the end of our virtual turns.

Because, this way, the entire system start making sense. Do you want a Stun to last for 1 action? Set it to 1~1 and Action End. Do you want Poison to last for a fixed time, independent of how many action that might be? Set it for 5~5 and Turn End. Do you want Guard to last through the end of your current action, until your next one? Set it for 2~2 and Action End.

Speaking of poison, there do is a related question here: should Regeneration and Poison effects happen at Turn End or at Action? Up until now, this decision was tied to the same parameter that handled status effects, but now I’m separating it so that the Maker is free to chose how he prefers those effects to work.

I realize now that there never was a “bug” regarding states and my plugin; instead there was a bad choice of default parameters and my unwillingness to accept that a item from the default database would need to be changed to work properly in my combat.

In conclusion:

  • I’m reversing the last “fix” I did for state effects, because it was never a real fix. It “fixed” guard while everything remained (even more) counter-intuitive.
  • States set to Turn End will have their duration counted down at the end of each Turn Timer, and cleaned when they reach zero, at the end of a Turn Timer.
  • States set to Action End will have their duration counted down at the end of each Action (or lack of action, in case of Stun, Paralysis or similar) and cleaned when they reach zero, also at the end of each action (so a character Stunned for 1 action will lose exactly 1 action, as intended).
  • The End-of-Turn Effects parameter will now deal the effects of Regeneration and Poison damage, but not with the actual duration of status effects.

TL;DR:

If you want a State to count down per action taken, you set it up as Action End.

If you want a State to count down per virtual turn, you set it up as Turn End.

Starting a blog!

Some months ago, I had the idea of doing a rather large-scale Battle System project for RPG Maker VX Ace. But as I was just getting started, RPG Maker MV got announced, and I decided to wait; the new technologies intrigued me.

A few days ago, the wait was finally over when MV launched, and I felt like it was totally worth it. Working with MV feels much better!

I lost count of the hours on my first day with it, and ended up with a simple Active Time Battle system, that got surprisingly popular.

Thanks to the fantastic feedback from the community, including bug reports and suggestions, I’ve been able to build upon and improve that initial system. Ideally, I want to have a script that can be truly powerful and easy to use for developers, and fun and engaging for players.

This battle system overhaul is a relatively large project with all the features I plan to implement, but it’s also not my only project for MV. So I’ve decided to set up a blog; figured this might be a better way to post news about my work and keep it all neatly organized in a cozy place.