Game logic - AI Behavior – Ylands

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " it's" to " it is")
(Clarified and reorganized to match the current properties window)
Line 1: Line 1:
=Description=
=Description=
*AI behaviour is a game logic allows to set up behaviour to entities (animals, NPC). Double click on animal on NPC to select AI behavior logic.
*AI behaviour is the game logic for controlling the behaviour of [[Actors]] (NPCs, Animals, Mutants, and Monsters). Click on the Actor to change its properties, including assigning AI behaviour logic using the eyedropper.
 
[[Image:Ylands_AIBehaviour.jpg|right|400px|]]


=Properties=
=Properties=
[[Image:Ylands_AIBehaviour.png|right|400px|]]
==Behaviour type==
*Stand - The Actor stands in one place, idling. The Actor will still move slightly, like it is breathing. If the player enters the detection radius, it will react according to the Aggressivity settings. Once the player is no longer within the detection radius of the Actor, the Actor will return to the original position, but not the original rotation.
*Loiter - The Actor walks randomly in a limited area (Sphere, Capsule, or Block [[Zone]]) centered on the original point. NPCs will move constantly within the zone, but the other Actors will pause occasionally to do their respective animations. The Actor's speed can be changed to: Run, Trot, Walk, or can be left at Default.
*Patrol - The Actor walks between reference points. The reference points can be used: In Order, Ping Pong (back and forth), or Random Order. The Minimum/Maximum Time Spent in the Idle State can be set between 0 and 30. If there are no reference points set, the Actor will walk in random directions but still pause occasionally according to the Idle settings. For this mode, the Actor's speed can also be changed to: Run, Trot, Walk, or can be left at Default.


<b>Aggressivity settings:</b>
==Detection Radius==
*Aggressive and stand options - AI will chase detected player, returns to standing in a set point after disengaging.
Use the slider or type in a value to set the detection radius between 0 and 50. By default, the detection radius is 15. This radius will determine when the Actor detects the player (unless the Aggressivity is set to Ignore Player).
*Aggressive and loiter\patrol options - AI will chase detected player, returns to loitering in a set point after disengaging.
*Flee on sight and stand option - AI will run from detected player, will return to standing in a set point after player is outside of detection radius.
*Flee on sight and loiter\patrol option - AI will run from detected player, returns to loitering in a set point after player is outside of detection radius.
*Ignore player - No action, just ignore player even if it is near.
*Non-aggressive and stand option - AI has neutral behaviour, just staring at player.
*Non-aggressive and loiter\patrol option - AI stops walks and start staring at player.  
 
=Radius and distance=
*Detection radius - the radius at which the AI detects the player.
*Flee radius - the radius at which the AI will walk
*Minimum fear distance - the distance from which AI can start to run away from the player.
*Minimum aggressivity distance - the distance of aggressivity, when the player is closer to the AI.
 
=Behaviour type:=
*Stand - stands on the waypoint, idling.
*Loiter - walks randomly in a limited area around waypoint.
*Patrol - walks in selected zone. Possible to set up between reference points.
 
=Other settings=
*Combat range - defines radius in which AI will chase player before disengaging.
 
 


==Aggressivity==
*Aggressive - The Actor will chase the detected player and return to normal behavior after the Actor is outside the Detection Radius.
**Minimum Aggressivity Distance - the distance where the Actor will start active aggressively. If this value is greater than the Detection Radius, the Actor will start acting aggressively as soon as the player is detected. This can be set between 0 and 100 (3 by default).
**Aggressivity Level Increase Factor - how aggressive the Actor will be. It can be set between 0 and 50 (3 by default).
**Combat Range - defines radius in which the Actor will chase the player before disengaging. It can be set between 0 and 200 (50 by default).
*Flee on sight - The Actor will run from the detected player and return to normal behavior after the Actor is outside the Detection Radius.
**Flee radius - the distance the Actor will run away. It can be set between 0 and 200 (50 by default).
**Minimum fear distance - the distance from which the Actor will start to run away from the player. It can be set between 0 and 100 (5 by default).
** Fear Level Increase Factor - how fearful the Actor will be. It can be set between 0 and 50 (5 by default).
*Ignore player - The Actor will not react to the player even if it is near.
*Non-aggressive - The Actor will rotate to stare at the player. If the Actor is set to loiter or patrol, the Actor will stop moving before turning to face the player.
----
----
{{Ylands scripting navbox}}
{{Ylands scripting navbox}}

Revision as of 05:43, 12 November 2020

Description

  • AI behaviour is the game logic for controlling the behaviour of Actors (NPCs, Animals, Mutants, and Monsters). Click on the Actor to change its properties, including assigning AI behaviour logic using the eyedropper.

Properties

Ylands AIBehaviour.png

Behaviour type

  • Stand - The Actor stands in one place, idling. The Actor will still move slightly, like it is breathing. If the player enters the detection radius, it will react according to the Aggressivity settings. Once the player is no longer within the detection radius of the Actor, the Actor will return to the original position, but not the original rotation.
  • Loiter - The Actor walks randomly in a limited area (Sphere, Capsule, or Block Zone) centered on the original point. NPCs will move constantly within the zone, but the other Actors will pause occasionally to do their respective animations. The Actor's speed can be changed to: Run, Trot, Walk, or can be left at Default.
  • Patrol - The Actor walks between reference points. The reference points can be used: In Order, Ping Pong (back and forth), or Random Order. The Minimum/Maximum Time Spent in the Idle State can be set between 0 and 30. If there are no reference points set, the Actor will walk in random directions but still pause occasionally according to the Idle settings. For this mode, the Actor's speed can also be changed to: Run, Trot, Walk, or can be left at Default.

Detection Radius

Use the slider or type in a value to set the detection radius between 0 and 50. By default, the detection radius is 15. This radius will determine when the Actor detects the player (unless the Aggressivity is set to Ignore Player).

Aggressivity

  • Aggressive - The Actor will chase the detected player and return to normal behavior after the Actor is outside the Detection Radius.
    • Minimum Aggressivity Distance - the distance where the Actor will start active aggressively. If this value is greater than the Detection Radius, the Actor will start acting aggressively as soon as the player is detected. This can be set between 0 and 100 (3 by default).
    • Aggressivity Level Increase Factor - how aggressive the Actor will be. It can be set between 0 and 50 (3 by default).
    • Combat Range - defines radius in which the Actor will chase the player before disengaging. It can be set between 0 and 200 (50 by default).
  • Flee on sight - The Actor will run from the detected player and return to normal behavior after the Actor is outside the Detection Radius.
    • Flee radius - the distance the Actor will run away. It can be set between 0 and 200 (50 by default).
    • Minimum fear distance - the distance from which the Actor will start to run away from the player. It can be set between 0 and 100 (5 by default).
    • Fear Level Increase Factor - how fearful the Actor will be. It can be set between 0 and 50 (5 by default).
  • Ignore player - The Actor will not react to the player even if it is near.
  • Non-aggressive - The Actor will rotate to stare at the player. If the Actor is set to loiter or patrol, the Actor will stop moving before turning to face the player.

Template:Ylands scripting navbox