Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Access to components inside of the GetCost override. #232

Closed
Unshackled-Games opened this issue Sep 12, 2024 · 3 comments
Closed

Comments

@Unshackled-Games
Copy link

After a short discussion in Discord, I wanted to write this Feature Request. It would be very handy to get access to data like nutritious for the GetCosts for a custom handling.

https://discord.com/channels/1093598557480685578/1093599290829590679/1283830094690783384

image

@ajmalrizni
Copy link

Ditto on this request!

Different targets have different properties, and it would make sense for the GOAP agent to take those properties into account when formulating a plan. Ideally, the action's Data object (or the object's fields) would be exposed in the GetCost function. If that's not possible, maybe the same behaviour could be achieved just by passing a sensor/target.

One example of where this could be useful is if an agent is formulating a plan to fix their hunger. The way it currently works, the agent would consider all food options to be equal, possibly leading them to eat small nearby snacks or even possibly rotting food. If the GetCost function can take its target/object data into account, then they could be more motivated to execute a plan to cook a filling meal, because the nutrition value of the food outweighs the effort/cost of cooking a meal.

I think this change could allow for much more expressive AI agents that behave more realistically and intelligently.

crashkonijn added a commit that referenced this issue Sep 13, 2024
…ethod

Added target to GetCost method. Fixes #232
@Racines
Copy link

Racines commented Sep 13, 2024

Indeed, this would be a great addition!

@crashkonijn
Copy link
Owner

This was released in the 3.0.13-beta!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants