The Ninja Rpg Wiki
The Ninja Rpg Wiki

AI plays a crucial role in how players play in TNR. The ability to set custom rules will allow you to have control over how your AI fights. Before we begin, we must break down a few basic principles.

  1. AI Rules are read in chronological order, so Rule 1,2,3 are done in that order. The AI will not go from Rule 1 to Rule 3 then to rule 2. So always remember the order in which you place your rules. SEE FIGURE BELOW.
  2. The default rule sets are there as a catch all incase your custom rules don't work. You're unable to change what these rules do or the order of them.
Ruleset



So now that we got that out of the way, lets talk about how you should think when setting up your AI. If you've done any programming or logical thinking, this shouldn't be too difficult for you to grasp. The AI does thing in a logical conditional basis, i.e. If this, then do this.

Conditions:

Conditions are specific questions that you are asking the AI, when adding a condition, you can choose between:

  • Distance higher than
  • Distance lower than
  • Health
  • Rounds

For the first two values for distance, this speaks about the battle grid where the max range is 5. Health is calculated in percentages. Rounds make reference to which round you want the AI to do a specific thing, so on Round 1 Move, Round 5 Clear or Cleanse.

Image

Actions:

Actions are the specified action that you want the AI to do after the condition is met. Actions and Conditions work hand in hand together.

List of actions


Under actions you have Action Settings. You can view these as what is the action targeting.

Action Settings

Combat Flow:

Now when you are setting up your rules and settings, your mindset should be, "okay what would I want to do as I enter battle". As a basic template, your first action would be check to see if I am in-range. So I would set a condition to check distance higher than with the action move towards opponent and then set the range and the settings would be going to closest opponent.

Custom Movement Rule


This would ensure that the AI is always checking for range. Now thankfully if this isn't on your mind, that's fine. The default rules also cover distance for you as well. So you could ignore this, but the default movement value is 2. So if you wanted your AI to only move within range of 4 you would have to set that in a custom rule.

Now what you do after this is really up to your preference. You can select a multitude of options (I'll leave you to experiment with that), but let's assume that you want your AI to use a specific jutsu or item after they are in range. That is possible.

Specific Actions

In the action settings menu, you can set a condition where your AI is below say 30% health, you can have it use a potion, or you can have it use a pierce jutsu or a healing jutsu or even basic heal. For those of you with BEE, you could set it to use Hemocure. These are all possible (Please ensure that actions that target yourself, you change the action settings to self. )

You can play around with this, but the key thing to remember here is specific actions are what you want to happen if a certain condition is met. In the future we will add a round base condition so you can set a specific action to work on a specific round.

Combo Actions:

This specific action is where the magic happens. Whatever item or jutsu you have tagged you can control the order in which your AI uses them. I recommend only tagging jutsu here but you can tag anything that is equipped on your person.

For combo actions, the order in which you tag them is very important as this is the order in which the AI will attempt to use the jutsus if the condition is met.

Combo Actions


Now if a jutsu is on cooldown and your AI still has action points left, it will attempt to use a weapon or use basic attack to complete the action points and end its turn.

Things to Consider:

  • What is the target setting of the jutsu/item/weapon: This is important to keep in mind, if whatever it is that you're using is set to target ground or self it won't work in an action settings that is set to target opponent. The AI has to respect the basic rules of target settings and you are unable to force it to do something that goes against that. If you want your AI to target self, it's best to create a condition and action based around self for that item.
  • Less is more: While you can go crazy, sometimes it's best to have a small amount of rules so you can understand what is happening and not confuse yourself.
  • If all else fails you can always use the action highest power action. The AI will default to using whatever is the highest action cost that is available.
  • AI Action points are the same as users. They all have 100 points each.
  • Trial and Error is good. You probably won't get it right on the first try but experimenting can lead to good results.
  • 40 AP jutsus are not the best to use, while trying to get self buff is a good intention I would not recommend using them as they might not work and you end up stuck.

We are actively improving the AI system so this article will be updated whenever major changes are made. Don't be afraid to share your experience with others and share knowledge.