ABS Party Members Settings - KageDesu/Alpha-ABS-Z GitHub Wiki

⚠️ Information actual for version 0.8.9 and above
⚠️ ABS Party Members AI system still in development and not flawless

ABS Party Member (next ally) - it's party member that will be controlled by AI, it can fight and moving on his own

How setup ABS Party Member

In Alpha ABS Z all ABS party members parameters should be in Note section in block from <ABS> to </ABS>

abs party member Note settings

If you want activate AI for party member and use all default parameters, just add <ABS> to Note

ℹ️ All parameters is optional, if parameter is not specified, used default value

Examples

Simple setup:

<ABS>
activateWhen:seeEnemy
bestTarget1:any
</ABS>

Complex setup:

<ABS>
activateWhen:seeEnemy|playerInDanger
bestTarget1:playerOpponent
bestTarget2:any
bestTargetGroup:further
supportInPriority:1
supportSkills:310
bestHelp1:lowHp
inBattleMoveData:2, 3, 3, 0
</ABS>

Behaviour Settings

AI activation condition

activateWhen:S - activate AI when certain condition (S) is valid, deafult is seeEnemy

Available values:

seeEnemy //when ally sees enemy
gotDamage //when ally got any damage
playerGotDamage //when player got any damage
playerInDanger //when any enemy targeting player
playerAttacksSomeone // when player attacks someone
playerAction // when player use certain skill (even without damage or target)
condition // custom user condition

ℹ️ You can use | (or) and & (and) for combine conditions

Examples:

activateWhen:playerGotDamage
activateWhen:playerInDanger|playerGotDamage
activateWhen:playerInDanger&playerGotDamage&seeEnemy

extraActivateCond:S - extra condition body expression, if you have condition for activateWhen:S
ℹ️ You can use a for refer to this Ally battler or b for refer to Player's battler

Examples:

activateWhen:seeEnemy&condition //see enemy AND condition (below)
extraActivateCond:a.hpRate() < 0.5 //when ally have less then 50% HP

activateActionId:X - specified player skill ID, if you have playerAction for activateWhen:S

Examples:

activateWhen:playerAction //when player performs action (skill)
activateActionId:434 //exactly! when playe performs skill with ID 434

AI target select conditions

bestTarget1:S - condition (S) for target choice, default is any

Available values:

any
none //this ally can't attack anyone
damaged //enemy that have less then 100% HP
full //enemy with 100% HP
playerTarget // last enemy that been attacked by player
playerOpponent // enemy that attacks player (have player as target)
notMyOpponent // any enemy that not have this ally as target
myOpponent // any enemy that have this ally as target
condition // custom user condition

ℹ️ You can use | (or) and & (and) for combine conditions

Examples:

bestTarget1:playerTarget|damaged
bestTarget1:full

bestTarget2:S and bestTarget3:S - same but they have a lower priority of choice.
They are taken into account if the previous condition is not met.

Examples:

//Try select any damaged enemy
bestTarget1:damaged
//If not have any damaged enemy, then select any, but not my opponent.
bestTarget2:notMyOpponent
//If second condition not met also, then select any enemy.
bestTarget3:any

extraTargetCond:S - extra condition body expression, if you have condition for bestTargetX:S
ℹ️ You can use a for refer to this Ally battler or b for refer to Player's battler or t for refer to the Enemy battler

Examples:

bestTarget1:condition //see enemy AND condition (below)
extraTargetCond:t.hpRate() < 0.2 //when enemy have less then 20% HP

bestTarRefreshTime:X - time in frames (60 = 1 second) for refresh best target choice. Default is 60. Even if Ally selected best target, after bestTarRefreshTime frame he will try select another target by all conditions. ℹ️ You can set higher value for allow ally keep and attack selected target as long as possible and don't mind about other enemies

skillsPriority:X,X,... - using skills priority list. Optional. Default is empty (not any priority).

ℹ️ Not skills chain, but priority for selection when all conditions for using skill is met (enought mana, distance and ect...)

Examples:

skillsPriority:310 //always try using skill with ID 310 first, then any others
skillsPriority:200,420 //always try using skill with ID 200 first, then skill 420 (if 200 can't be used right now, not enought mana for example), then any others

bestTargetGroup:S - condition (S) for single target choice from group (if more then one target meets bestTargetX condition). Default is empty (random target)

Available values:

nearest //nearest to this ally
further //further from this ally
weakest //have lowest ATK
strongest //have higher ATK
lowHp // enemy with lowest HP value
highHp // enemy with higher HP value
nearestToPlayer // nearest to player
furtherFromPlayer // further from player

Examples:

bestTargetGroup:strongest

AI support conditions

If you want AI also give player some support (heal or buffs) you can configurate this parameters

supportInPriority:Z - 1 - support target will be always in priority. 0 - this ally will choice between attack enemy or support player. Default is 0.

supportSkills:X,X,... - support skills and using skills priority list. Default is empty (ally can't support at all).

ℹ️ Not skills chain, but priority for selection when all conditions for using skill is met (enought mana, distance and ect...) ⚠️ You should set at least one support skill IF YOU WANT ALLY WILL BE ABLE TO SUPPORTS PLAYER.

bestHelp1:S - condition (S) for target choice for support, default is none (ally don't allow supports)

Available values:

// ℹ️ ally means party member (include player) and ABS Event with same TeamID

any //any ally (include player)
none //this ally don't allow supports (default)
damaged //ally (include player) that have less then 100% HP
full //ally (include player) with 100% HP
player
ally //other ally (not include player)
self // only self
other // other ally (include player), but not self
lowHp //any ally with low HP ( < 20%)
partyMember // only party member ally (not include player)
condition // custom user condition

ℹ️ You can use | (or) and & (and) for combine conditions

Examples:

bestHelp1:player|lowHp
bestHelp1:damaged

bestHelp2:S and bestHelp3:S - same but they have a lower priority of choice.
They are taken into account if the previous condition is not met.

Examples:

//Try support player when he have < 20% hp
bestHelp1:player&lowHp
//If condition is not met, try support any ally with < 20% hp
bestHelp2:lowHp
//If second condition not met also, then select target for support by user condition
bestHelp3:condition

helpCondition:S - extra condition body expression, if you have condition for bestHelpX:S
ℹ️ You can use a for refer to this Ally battler or b for refer to Player's battler or t for refer to the Enemy battler

Examples:

bestHelp1:player&condition //player with condition
helpCondition:t.isStateAffected(3) //if have state with ID 3

ABS Parameters Table

// X - Number value
// Z - Only 1 or 0 value (True = 1, False = 0)
// S - Text value
// A - Script action
// E - Extended Value 

How use E type, read here: Extended Value

Main Group

Parameter Description Values Default
<viewRadius:E> on how many map cells sees ally map cells count 5
<returnRadius:E> how far can the ally move away from the player map cells count 8
<onDeath:A> script action, called when ally is die Script action -

Map Group

Parameter Description Values Default
<heavy:E> If 1 this ally can't be moved by Impulse skills 1

Moving Group

Parameter Description Values Default
<approachMoveData:X, X, X> Ally approach settings (in battle) Start range , Frequency, Speed 3, 5, 4
<inBattleMoveData:X, X, X, Z> In battle moving settings Min Dist to target, Frequency, Speed, Is Can make random move? 1, 3, 3, 0
<noMoveInBattle:E> If 1 - ally can't moving during battle (always stay still during battle) 0
<noApproach:E> If 1 - ally can't approach target during battle 0

Other Group

Parameter Description Values Default
<onSeeTarget: A> Script action, called when ally is see target and start's fight. Example <onSeeTarget:ba_1> Script action -
<onHit: A> Script action, called when ally get hitted (get health damage > 0) Script action -
<onDeathVar: X> +1 to this variable if this ally is die (0 - no any variable, no count) Variable ID 0
<turnAction: A> Script action, called every 1 second Script action -
<turnActionInBattle: A> Script action, called every 1 second when ally in battle (have a target) Script action -

⚠️ **GitHub.com Fallback** ⚠️