How many games have you played where a spider enemy’s bite can poison your heroes, or a huge foe’s bodyslam causes stun? We’ve all seen states in games, but sometimes it’s tough to come up with different ones that really add to our battles. So let’s figure out four different ways we can use states to improve our battle skills for some of our default MZ actors.
A basic understanding of how to set up skills and states will help a lot while we’re working on these skills, so if you need a refresher make sure to check out Driftwood Gaming’s videos on States and Skills.
One thing to keep in mind is that the skills we’ll be making in this tutorial aren’t balanced for a game! We won’t be giving any of them a cost since we want to be able to easily check them while playtesting, so make sure to tweak them so that they’ll fit into your own game’s battles if you decide to use them.
Let’s start by giving Kasey, the party’s magician, a skill that gives herself a state that turns her into a glass cannon during the battle.
We can call the state 0 Costs, 0 Defense (decent naming ideas are not covered in this tutorial) and add in an Icon for it so that we can see when it’s active in-battle. We don’t need to touch any of the other General Settings since we don’t want the state to add any restrictions to Kasey when active. We do need to add some Removal Conditions to make sure the state doesn’t last forever. Since we don’t need the state to carry on after the battle, so let’s make sure the ‘Remove at Battle End’ option is checked, as well as ‘Remove by Damage’ with it set to 100%. That way, once Kasey has been hit in battle the state will wear off.
This state’s Traits are where the magic happens. We’ll set both the Defense and M.Defense Parameters to 0% (100% would be Kasey’s normal defenses), and change the MP Cost Rate Sp-Parameters to 0% as well.
The skill’s setup is pretty straightforward, since the only thing the skill does is add the state we made. We’ll set the Scope to The User so only Kasey is affected by this skill and the Effects section will only add the state we made. Once that’s taken care of we can pretty the skill up with a Description and Animation so our players can know what the skill will do and see it happen in-battle.
Once we’ve added our finished skill to Kasey’s Sorcerer class, we can test it out in battle! When Kasey has the 0 Costs, 0 Defense state, all her skills that require MP can now be used for free… At least until she gets hit by an enemy.
As the party’s healer, Eliot can always use another skill to heal people. And while he’s healing them, why not also give the target a helpful state? So for his skill, let’s have it heal the HP of an ally while also giving them some TP and adding in a state. There are a lot of options for what the state could do, from adding an HP regeneration to increasing the actor’s Defense, but for this one we’ll have one that makes our actor faster.
Let’s name the state Adrenaline, since it’ll be upping the actor’s Agility. We don’t want it to last forever, so let’s check the ‘Remove at Battle End’ option in its Removal Conditions as well as setting its Auto-removal Timing to ‘Action End’ and the Duration to 3~3 so that after the affected actor has had three turns the state will wear off.
Now we can turn to the state’s Traits. Since we want the state to make our actors faster, we need to add in an Agility boost (in this case 200%, since the actor’s normal Agility would be 100%) from the Param section. We can also double their TP Charge Rate so that they’ll gain more TP from their attacks.
Moving onto the skill itself, let’s set its Scope to 1 Ally and give its Damage the ‘HP Recover’ Type so that it’ll heal that ally’s HP. The skill’s Effects will be where we add in the Adrenaline state and give the ally some extra TP.
All that’s left is to add the skill to Eliot’s Priest class, and make sure it works.
Michelle is our party’s heavy hitter, so instead of a state that affects herself or another party member let’s give her a skill that applies the state to an enemy. We’ve all seen skills that apply Poison or Stun to the target, and while those can be fun why don’t we do something a bit different? Let’s make the skill change how much damage it does depending on if the enemy has the state or not.
The state for Michelle’s skill, Static-y, will be simple; in fact it won’t do anything at all. We could add in some negative effects such as a ‘Cannot Move’ Restriction, but in this example we just need the state to exist.
For the skill, we’ll set the Scope to ‘1 Enemy’ and add our Static-y state to the Effects. Since we want to make sure it all works right, we’ll set the chance of the state being added to 100% so the enemy will definitely get the state. The Damage Formula is where we need to focus our attention to get the skill working how we want. We need to find a method to check if the enemy has the Static-y state or not, and do the right damage amount depending on that in the Formula.
Luckily, there’s an easy way to write that out. Much like an event’s Conditional Branch, we can tell the Formula to check if something is true or not with some code:
Condition ? Damage if condition is true : Damage if condition is false
The question mark and colon separate each part of the code, and so our condition we’re checking comes before the ‘?’ and the two possible damage amounts are separated with the ‘:’. Since we want more damage to be done if the enemy has the Static-y state (which is state 35 in our database), our condition will be b.isStateAffected(35). The condition is case-sensitive, so if the skill repeatedly does 0 damage we should double-check our code. To make it easy to tell if the right amount of damage is done, we can set the Variance to 0% so our exact damage amounts will be used and turn off Critical Hits.
All that’s left is to check that it works properly. And as we can see, if the enemy doesn’t have the state then the damage done is 10 and if the enemy does have Static-y inflicted then the skill does 100 damage.
Once we’ve tested it in battle and seen it work, we can tweak the chance the state will be inflicted and the damage done in each case.
So far we’ve been focusing on the Effects section of our skills to add states, but that does have a limiting factor: the state can only be added to the target. What if we want a skill to target an enemy, but also give the user a state? Then we need to dive deeper into the skill’s Damage Formula.
But first, Priscilla’s state. She only has Special skills to choose from normally, so let’s create a state that gives her access to some Magic skills to use. Let’s set up our Removal Conditions so that Magical Girl Powers! lasts 2~3 turns or until the end of battle.
The state’s Traits will focus on adding the Magic Skill Type and a few magical Skills for Priscilla to choose from. Since we’re adding these skills through the state, once it’s been removed from Priscilla she won’t be able to pick or use them in battles.
Priscilla’s skill will be set up similarly to Michelle’s since its Scope is ‘1 Enemy’, but the Damage Formula will be quite different.
Instead of a code to check if a state is there or not, we’ll be using a semicolon to separate the damage done to the target from the adding of the state.
Additional actions ; Damage formula
a.addState(34) will add our Magical Girl Powers! state to the attacker, Priscilla, while the rest of the Formula after the ‘;’ is the actual damage that will be done to the target.
This skill is pretty easy to test, since it’s clear when Priscilla has access to the Magic battle option and when she doesn’t. And once the state wears off, the Magic option will disappear… Like magic!
And with that finished up, we can see all these skills and states in action! Obviously we’d need to add in costs for the skills so that players can’t spam them, but that will be different for each of our games since it depends on the rest of our battle system.
Mixing states and skills can give our battles their own unique spin, so have fun trying new things!
This week our releases are perfect for supporting two of the iconic RPG Maker styles: Creepy Horror with evil silhoutte monsters from Tyler Warren, and Old School Classic with some retro tunes from Joel Steudler! Let's take a look.