I’m currently hard at work preparing A.I. for this project. I was hoping to have it ready to share today – it works, but I am still polishing the code and working on writing the accompanying tutorial. While you wait, I decided I could share the decision making process I followed while architecting this portion of the project to help whet your appetite.
Tactics
Tactics RPG Victory Conditions
Now that we have enemies, we can also provide an actual “goal” for the battle. First we must be able to actually defeat the enemies, as well as risk defeat for our own units. There needs to be a consequence for a unit’s hit points dropping to zero, so we will add a “Knock Out” status effect which disables a unit from acting or taking additional turns. Likewise there should be an effect for defeating all enemy units, or allowing all hero units to perish. These are sample “victory conditions” which we will track, and which will allow the battle to end. Continue reading
Tactics RPG Unit Factory
It’s well past time to add some enemies to the board, but by now we’ve made all sorts of modifications to the “Hero” prefab which haven’t been propogated to the “Monster” prefab. We could spend time manually setting up each new character to have the same kind of structure, but I really don’t want to. Instead, we will use this lesson to lay the groundwork on a more flexible system. We will be making a factory to create and configure new units for us, so that introducing new and unique characters in the future will be a much simpler process.
Tactics RPG Magic
We have enough components to make several abilities, and in this lesson will make a few more. Magic based abilities are often the most powerful in an RPG, so they need a way to be regulated. If players could use them freely the game would end up both boring and monotonous. There should be a reason for players to use different abilities at different times. In order to foster this kind of strategy, this lesson covers the use of magic and magic points.
Tactics RPG Ability Effects
Over the past several lessons we have implemented tempory implementations for the effect of an ability, such as manually implementing an attack damage estimation and application of the damage itself. In this lesson we will be providing a much more complete implementation which allows for very different effects ranging from applying damage to inflicting status ailments and which supports just about anything you would want to do.
Tactics RPG Hit Rate
There is still plenty to do before we have actually implemented a true “attack” ability. In this lesson we will determine what sort of chance there is that the unit will actually hit the target. Sometimes special status effects or abilities might alter the chances of hitting, but at a minimum we will take the angle of attack (front, side or back) into account. It is easier to hit an opponent if they don’t see the attack coming. In addition we will add another UI panel to indicate this new hit rate.
Tactics RPG Status Effects
During our last lesson I suggested possible implementations for a few status effects, such as Haste, Slow and Stop. In this lesson we will actually add them. We will also learn how to manage the way multiple conditions might be keeping a status active. For some variation we will also add a Poison status effect and see how it can be tied to an item as an equip feature – a cursed sword.
Tactics RPG Turn Order
As it is now, turns are completely linear as if our units were all standing in line. In a tactics battle, things are a lot more complex. Units with a higher speed stat should be able to act more quickly in general, but other exceptions to the rule might exist. Final Fantasy Tactics for example would include status effects such as Haste, Slow, or even Stop. In this lesson we will create a new class to determine when each unit on the board gets to take a turn while keeping things flexible enough to account for all of these types of scenarios.
Tactics RPG Ability Area of Effect
To fully select targets for an ability we need a few more steps. We began with specifying a Range. In this lesson we will implent a variety of Area Of Effect components which are applied based off the selection from the range. In addition, each ability may have multiple “effects” – each of which may specify a unique set of valid targets. I will provide a couple of implementations for these as well, so that we can have a completed targeting selection loop in place.
Tactics RPG Ability Range
Abilities such as attacking or using magic are part of a large and complex system. In this lesson we will take the first step toward this implementation by providing several classes that can be used to control the range of any particular one.