Skip to content

bug: Lure behavior for sheep not working #98

@skaldarnar

Description

@skaldarnar

Context

The https://github.com/Terasology/WildAnimals/blob/develop/assets/behaviors/lure.behavior is currently used for the sheep mobs.
It is intended to give players a way to lure sheep together and eventually flock them in a pen for domestication. Sheep are supposed to
follow a player who is holding a grass item.

Problem

Unfortunately, this luring behavior does not work properly after the refactoring of behaviors onto https://github.com/Terasology/FlexiblePathfinding. The culprit seems to be somewhere in the guard behavior node:

guard: {
componentPresent: "Behaviors:FindNearbyPlayers",
values: ["N charactersWithinRange nonEmpty"],
child: {
sequence: [
{ sleep: { time: 0.1f } },
check_luring_item_in_use,
followCharacter,
{ lookup: { tree: "Behaviors:follow" } }
]
}
}

Goal

Sheep should follow the nearest player in range that is holding a grass item.

If no such player exists, sheep should perform the stray behavior.

Hints

This will require some debugging of the GuardAction from the Terasology engine repo, and in particular the parent class ConditionAction.

Metadata

Metadata

Labels

Category: Gameplay ContentRequests, Issues and Changes targeting gameplay mechanics and contentStatus: Needs InvestigationRequires to be checked for feasibility, reproducability, etc.Topic: AIRequests, Issues and Changes related to pathfinding, behaviors, etc.Type: BugIssues reporting and PRs fixing problems

Type

No type

Projects

Status

In Progress

Status

➡ Next Up (5.4.0)

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions