Skip to content

Action

Add or create an action

In Combatant settings, click + below the Actions table. The panel that opens lists each existing action by name and icon.

To use an existing action, select it and confirm your choice. NovelStudio adds it to the combatant's Actions table. You can use it as is without writing code.

To create an action, select an existing action and click Duplicate. The new action copies the original settings and formulas, which you can then edit.

Select an action in the Actions table to open its settings.

Action tab

Use this tab to configure the selected action. The settings vary by action type.

Action settings and list of available variables

Icon

Choose the action icon. You can also import your own icon file.

Name

Enter the action name. Use the language button in the field to choose which language to edit. You can set a different name for each language.

Type

Choose the type of action from Attack, Ability, Magic and Item.

Position

Choose whether the action is performed at range or up close. This setting determines which animation plays during the action.

Area

Set who the action can affect. It can affect a single opponent, a group of opponents, or all characters in the arena.

Color

Choose the color the target flashes when hit.

Impact sound

Choose the audio file played when the target is hit.

Charging sound

Choose the audio file that plays during the charge phase, just before the character attacks. An Attack action starts immediately and skips the charge phase.

Motion sound

Choose the audio file that plays as the character moves toward the target. This setting appears only for actions that involve moving toward the target.

Impact Sprite

Choose the animated sprite to show on the target on impact. For a custom sprite, enter the number of animation frames. Choose a display size from Large, Medium and Small.

Charging Sprite

Choose the animated sprite to show during the charge phase. For a custom sprite, enter the number of animation frames. Choose a display size from Large, Medium and Small.

Duration

The default duration is 0. For a temporary effect, such as a change to a target's stat, enter the number of turns the effect lasts.

Cost

The cost is what the character spends to use the action. It defaults to 0.

The Cost setting has two fields. In the first, choose the variable. In the second, enter the amount to subtract from it.

For example, for a Magic action that costs 5 magic points, choose MP in the first field and enter 5 in the second.

Element

Choose the attack's element, such as Fire or Ice. Damage can be doubled, reduced, absorbed or canceled depending on the target's reactions to elements. These reactions are set in the Battle tab of the target's character sheet.

Hit Formula

Write a JavaScript formula to decide whether the action hits its target. The actions included in NovelStudio contain example formulas.

For example, use the accuracy of the character performing the action and the target's evasion to calculate the chance to hit. Then compare that chance to a random number.

The formula must assign a value to success. Use true if the action hits and false if it misses.

To draw a random integer, use random(max). Replace max with an integer. The function returns a random integer between 0 and that value.

Effect Formula

Write a JavaScript formula to calculate the action's effect. Add the calculated amount to a target variable or subtract it. If the action hits several characters, the formula can change the variable for each target. For example, a physical attack can use the attacker's strength to calculate how much HP to subtract from the target.

When writing either formula, refer to the table of available variables on the left. It lists variables for the character performing the action and for the target, such as HP, MP, their maximum values, strength, and defense. Scroll down to see the game's variables.

Variance %

Set how much the result of the effect formula can vary at random. The variance is expressed as a percentage. The default is 20%, and the maximum is 100%.

Action probability

This tab appears below Action when the action belongs to an AI-controlled combatant.

The AI uses the combatant's remaining HP to choose between available actions. The three fields set the weight of this action at different HP levels.

HP 100%

Set the action's weight when the combatant has 100% of their HP.

HP 50%

Set the action's weight when the combatant has 50% of their HP.

HP 25%

Set the action's weight when the combatant has 25% of their HP.

Each field defaults to 1. You can enter any value of 0 or higher, with no upper limit. The greater the weight compared with other available actions, the more likely the AI is to pick this action. If two actions are available, an action with a weight of 5 is five times as likely to be picked as one with a weight of 1.