XAS ( Xiderowg Action System) Tutorial em Português
ACTION BATTLE SYSTEM

To understand the battle system it’s necessary to have understood the Tools system. First create tools like weapons, magic or items, as it was explained in the tools tutorial

____________________Buttons system that activates the tools__________________
Initially there’s 6 pre-defined buttons to use
|
|
Description |
Attack |
Keyboard key C |
The character attacks with the equipped weapons. (Sword, Arc, etc…) |
Skills |
Keyboard key S |
Uses the skills of the hero |
Shield |
Keyboard key Z |
Uses shield ability, when a shield is equipped |
Item |
Keyboard key D |
Use items that can be used |
Change Ability |
Keyboard key Q |
Shortcut to change the skill in the map |
Change Item |
Keyboard key W |
Shortcut to change the item in the map |
All the buttons above can use any type of tool independent of the button that you’re using, either items, magic, weapons etc…
____________________EQUIPPING TOOLS.__________________
WEAPONS
In script previously define which weapons will activate the tools when equipped.
WEP_ID_TOOL = { A=>B , A=>B , A=>B, ... }
In the place of the A put the weapon’s ID and in the place of the B define the tool ID.
SKILLS
To equip the abilities just to the skill menu and to select skill desired, the ID of the SKILL is equal the ID of the tool, therefore if you to select SKILL ID 5 you will automatically selecting Tool ID 5
ITEMS
In the items case it’s necessary to previously define in script which item corresponds to a certain tool ID.
XASITEM_ID = { A=>B , A=>B , A=>B ,... }
In the place of the A put the Items ID and in the place of the B define the tool ID.
SHIELD
For the shield previously define in script, in the same way that defines the use of the weapons.
SHIELD_ID_TOOL = { A=>B , A=>B , A=>B, ...}
____________________Creating enemies events__________________
Basically an enemy event must be composed by 3 pages.
First Page - Put the enemy’s graphic and its movement

Second Page - In Conditions active the Variable 4 with the value of the Enemy’s troop. It’s the enemy troop‘s ID and not enemy’s ID, therefore put only one enemy to each enemy troop…

Third Page - In this page we will define the enemy’s actions when the enemy event enters the area of the Sensor action. The area of sensor action is the area that is activated when the enemy if approaches the hero, more ahead we will explain in details the sensor. The first thing that we will make in this page is to activate the Self Switch D
after this it’s time to define the IA or the or the enemy’s action, for this define the movement of the enemy event as Custom.

Inside of the Menu Route, beyond the normal commands of movement Moves, you will be able to use the following codes that must be inserted in command SCRIPT
Code (SCRIPT) |
Info |
shoot(X) |
It makes the enemy to use a tool. In the place of the X put the ID of the tool |
attack_on |
Ativa dano por contato, se o herói encostar no evento inimigo receberá dano. |
attack_off |
It deactivates damage for contact. |
shield_disable! |
Active shield, leaves the enemy invulnerable |
shield_enable! |
Deactivates shield |
Example of a creation of an enemy event.

____________________Action Sensor __________________
Action Section is the invisible area that is around of the hero.

When the enemy enters the area of the sensor, the commands of page 3 of the enemy will be activated automatically. To define the size of the area must define the variable ID10 with the value that will correspond to the area of the Sensor, that is, for each type of situation you will be able to define the action area specifies, this is important mainly when we create battles with the heads where the combat area is bigger.
____________________Tools that have a cost of an Item __________________

To define if the tool will have item cost, go in too the XRXS - XAS script and find these lines:
ITEM_COST = {A=>B , A=>B , A=>B, ... }
A B 
In the place of the A it put the ID of the Tool and in the B put the ID of the item of the data base.
____________________Size of the enemies__________________
XAS allows you define the size of an enemy, this means that bigger enemies will be more easy to hit because it has a bigger body and the smaller enemies will have a smaller area because they has smaller bodies.

To define the size of the enemies go to the XRXS - XAS script and it look for these lines:
BODY_SQUARE = {A=>B, A=>B, A=>B, ...}
In the place of the A put the ID of the enemy troop and in the place of the B it put the value of the size of the enemy.
____________________Invulnerable enemies to certain tools. __________________
It is possible to define that certain enemies are invulnerable to certain tools, this is useful to create enemy that is invulnerable to magic only, enemies that are invulnerable to weapons or what you desire, to define the invulnerabilities go in to the XRXS - XAS scripts and look for these lines:
SHILED_ACTIONS = {A => [ B, B, B,...] , A => [ B, B, B,...] , ... }
In the place of the A put the ID of the enemy troop and in the place of the B it put the ID of the Tool.
____________________Invulnerable enemies to certain directions __________________

It is possible to define that certain enemies are invulnerable to certain directions.
SHILED_DIRECTIONS = {A => [ B ], A => [ B ], A => [ B ], ...}
2 = Frontal Defence
4 = Left Defence
6 = Right Defence
8 = Back Defence
In the place of the A put the ID of the enemy troop and in the place of the B put the invulnerabilities directions
____________________Activating Automatic Switches. __________________
In XAS it’s possible to activate automatic switches when the enemies die, this function is very important mainly in the battles against bosses where is necessary to activate a scene as soon as he dies. To define which switches will be set in automatic and its respective enemy go to the XRXS - XAS script and look for these lines:
DEFEAT_SWITCH_IDS = {A=>B , A=>B , A=>B, ...}
A B 
In the place of the A put the ID of the enemy troop and in the place of the B put the ID of the Switch. To conclude when the enemy ID dies the switch ID will automatically be set in to motion.
____________________GAME OVER. __________________
The activation of the Game Over can be automatic or by common events. In the automatic activation as soon as characters dies it will be activated the Game Over. To activate the automatic Game Over define the line below, using the script, as true. Define as false to deactivate.
AUTOGAMEOVER = true
In the case of Game Over by events, that is useful case you want the character to teleport to a city when he dies or to present a special animation of Game Over, you will have to define the AUTOGAMEOVER as false and in the code below define which Switch will be activated when the character dies, and it’s this Switch that will activate the Common Event that will set in to motion an action that you pre-defined in the data base.
GAMEOVER_SWITCH_ID = X
____________________POSITION OF ATTACK AND HIT____________________
To make the characters or the enemy have a position to HIT (get damage) the extra images of chars in HIT position will be necessary and that they will have to be named like this:
CHARACTERNAME_HIT.png
Put in the name of the character and the suffix _HIT

For the attack position that’s exclusive to the enemies and that will be activated when the action option attack_on is activated, we should name the enemy character like this:
ENEMYCHARNAME_ACT.png
Put the name of the enemy character plus the suffix _ACT |