Game logic - AI Behavior – Ylands
Jump to navigation
Jump to search
m (Formatting) |
Lou Montana (talk | contribs) m (Text replacement - "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|19}}}}" to "{{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}}") |
||
(7 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
=Description= | =Description= | ||
*AI behaviour is the game logic for controlling the behaviour of [[Ylands Actors|Actors]] (NPCs, Animals, Mutants, and Monsters). Click on the Actor to change its properties, including assigning AI behaviour logic using the eyedropper. | *AI behaviour is the game logic for controlling the behaviour of [[Ylands:Actors|Actors]] (NPCs, Animals, Mutants, and Monsters). Click on the Actor to change its properties, including assigning AI behaviour logic using the eyedropper. | ||
=Properties= | = Properties = | ||
[[Image:Ylands_AIBehaviour.png|right|400px|]] | [[Image:Ylands_AIBehaviour.png|right|400px|]] | ||
===Behaviour type=== | === 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. | *'''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 [[Ylands Zone|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. | *'''Loiter''' - The Actor walks randomly in a limited area (Sphere, Capsule, or Block [[Ylands:Zone|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 [[ | *'''Patrol''' - The Actor walks between [[Ylands:Game_logic_-_Reference_point|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=== | === 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). | 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=== | === Aggressivity === | ||
*'''Aggressive''' - The Actor will chase the detected player and return to normal behavior after the Actor is outside the Detection Radius. | *'''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). | **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). | ||
Line 24: | Line 24: | ||
*'''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. | *'''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. | ||
===Note=== | === Note === | ||
*If no AI Behaviour is assigned, the Actor will Patrol without Reference Points (movement in random directions with pauses). They will be aggressive or flee based on their default. For example, rabbits will flee and all Mutants will be aggressive. | *If no AI Behaviour is assigned, the Actor will Patrol without Reference Points (movement in random directions with pauses). They will be aggressive or flee based on their default. For example, rabbits will flee and all Mutants will be aggressive. | ||
=AI Behaviour Events= | = AI Behaviour Events = | ||
*[[ | *[[Ylands:Tile_-_On_AI_Behavior_Assigned|On Behaviour Assigned]] | ||
=Related Instructions= | = Related Instructions = | ||
*[[ | *[[Ylands:Tile_-_AI_agresivity_setting|AI Aggressivity Setting]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_agresivity|AI Get-Set Aggressivity]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_entity|AI Get-Set Entity]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_fear_distance|AI Get-Set Fear Distance and Get-Set Fear Level Increase Factor]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_agresivity_distance|AI Get-Set Aggressivity Distance and Get-Set Aggressivity Level Increase Factor]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_flee_radius|AI Get-Set Flee Radius]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_combat_range|AI Get-Set Combat Range]] | ||
*[[ | *[[Ylands:Tile_-_AI_-_Get-set_detection_radius|AI Get-Set Detection Radius]] | ||
*[[ | *[[Ylands:Tile_-_Move_to_target|Move to Target]] | ||
*[[ | *[[Ylands:Tile_-_Attack_target|Attack Target]] | ||
---- | ---- | ||
{{Ylands | {{Navbox/Ylands}} | ||
{{DEFAULTSORT:{{#sub:{{PAGENAME}}| | {{DEFAULTSORT:{{#sub:{{PAGENAME}}|13}}}} | ||
[[Category: Game Logic]] | [[Category: Game Logic]] | ||
[[Category: Ylands 0.15]] | [[Category: Ylands 0.15]] |
Latest revision as of 14:21, 24 November 2023
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
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.
Note
- If no AI Behaviour is assigned, the Actor will Patrol without Reference Points (movement in random directions with pauses). They will be aggressive or flee based on their default. For example, rabbits will flee and all Mutants will be aggressive.
AI Behaviour Events
Related Instructions
- AI Aggressivity Setting
- AI Get-Set Aggressivity
- AI Get-Set Entity
- AI Get-Set Fear Distance and Get-Set Fear Level Increase Factor
- AI Get-Set Aggressivity Distance and Get-Set Aggressivity Level Increase Factor
- AI Get-Set Flee Radius
- AI Get-Set Combat Range
- AI Get-Set Detection Radius
- Move to Target
- Attack Target