Setting up a scope or an AoE
The tags scope: data
and aoe: data
can be used into skills, items and weapons notebox to define how the scopes and the AoEs of these database objects are supposed to be. Where data
is one of the following informations:
circle(range)
orcircle(min, range)
square(range)
orsquare(min, range)
line(range)
orline(min, range)
cross(range)
orcross(min, range)
path
: The area is created based on the path from the current battler to the cursor cellcustom(id)
: Use a custom area. See bellow.
range
is basically the size of the area and min
is the minimal range.
The following image shows the scopes circle(2)
, square(1)
, line(2)
and cross(2)
.
And this one is obtained with circle(4,3)
. The minimal range is 3, as you can see.
Custom Scopes
There is a way to create custom shapes. You aren't limited to primitive shapes like circles and squares. The possibilities are endless. Custom scopes are defined in the configuration file
at this location: Lecode.S_TBS.Config.Custom_Scopes
.
Each element in this section is in that format:
"ID": {
data: "cell1, cell2, cell3, ..."
},
Here's an example:
"rush": {
data: "[cx+3,cy],[cx-3,cy],[cx,cy+3],[cx,cy-3]"
},
The content of data is a list of cells, given that cx
and cy
are the coordinates of the map cursor.
The easiest way to fill this parameter is to use my tool: AoE Creator. It generates for you the content of data
, based on what you drew.
To use the created custom scope, simply apply the tag scope: custom(id)
or aoe: custom(id)
where id if the identifier of your custom scope.
Directional Scopes
With custom scopes you can make directional scopes. A scope who is shaped differently based on the direction of the user. Use this format in the configuration file:
"ID": {
data_right: "cells when the user faces right",
data_left: "cells when the user faces left",
data_up: "cells when the user faces up",
data_down: "cells when the user faces down"
},
Example:
"ice_fury": {
data_right: "[cx,cy],[cx+1,cy],[cx+2,cy]",
data_left: "[cx-2,cy],[cx-1,cy],[cx,cy]",
data_up: "[cx,cy-2],[cx,cy-1],[cx,cy]",
data_down: "[cx,cy],[cx,cy+1],[cx,cy+2]"
},
Scope Options
Use the tag scope_options: string1, string2, ...
in skills and items noteboxes to apply some options to your scopes.
The following scope options are available:
through_obstacles
: the scope doesn’t take in count obstacles. The line of sight is ignored.include_center
: to include the center in the scope. Skills that can be used on the caster like healing skills must use this option.need_free_cell
: specify that the object can only be activated on a free cell. A free cell means that there isn’t an obstacle or a battler in it. It’s useful to skills like teleportation.
AoE Options
Similar to scope options. Use aoe_options: string1, string2, ...
this time. The options are:
need_free_cell
: to exclude obstacle cells from the AoE.exclude_center
: to exclude the center of the AoE in the selection.line_of_sight
: to enable the line of sight on the AoE. Check the skill Fire Arrows in the demo to see its usefulness.
Move Scope Options
(WIP, this tag is mostly useless given that the options don't behave well with the move scope)
It's possible to apply options to the move scope. Use the tag move_scope_options: string1, string2, ...
and the same options as in the section Scope Options.
Scope Restrictions
It's possible to restrict a scope to only target some battlers. Use the tag scope_select: type
, where type
can be:
allies
: Only allies in the scope are selectable.enemies
: Only enemies in the scope are selectable.flaggedEntity(ID)
: Only the flagged entity can be selected.actorId(ID)
: Only the designated actor can be selected.enemyId(ID)
: Only the designated enemy can be selected.summons
: Only summons can be selected.own_summons
: Only the caster's summons can be selected.enemy_summons
: Only enemy summons can be selected.
Combine Scopes
It's also possible to combine scopes. Separate each of the scopes with ;
.
Example: scope: circle(3);line(4)