KitKait2001 / roamers

0 stars 0 forks source link

[1.21.1] [NeoForge🦊] Roamers stall when tasks are impossible to complete #9

Closed Cixon closed 1 week ago

Cixon commented 1 week ago

An example of Desert Roamer struggling to find placeable vegetation:

https://streamable.com/hwi9vw

Cixon commented 1 week ago

I understand these things can be hard to diagnose and this is the first 1.21.1 port and NeoForge port but my suggestion is if possible, place a time limit on a goal, if unable to complete the beginning of the first step of a task say, within 4200 ticks or 3.5 minutes, deprioritize difficult/impossible task and move to a totally different task? (with the exception their pathing isn't blocked or slowed, say inWater or collision by block)

OR

Make some tasks more important than others depending on the Roamer's biome. An example of what I mean is, building a farm for a Desert Roamer is at the bottom of the their priority list. They would much rather go out and find another biome to 'Roam' with the goal to achieve the materials required to finish their farm(s).

As of rn, I can probably just give them wheat seeds basekit or something via datapack but I do wish to see improved AI soon! Great work!

KitKait2001 commented 1 week ago

Hello! :) Thanks for testing it! :D

I saw the video, and this is not a bug from what I could see. He had just finished building. Because of the way I wrote the code they will find other tasks in the meantime to do based on what they need in that moment. The goals/tasks are not running parallel to each other, I have the code set up that the goals are added/removed from their AI based on conditions, to avoid competing goals like you said. :)

But yeah, once they finish their build they just wander around lol. However, if you want them to start with seeds you can make a datapack for modifying the roamer's starting gear (I implemented this in this version). This applies to player descendants and also bandit starting gear! I was in the process of writing this on the description but you beat me to it lol! The file structure for the datapack is: "data/roamers/start_gear/file_name.json"

Dm me on Discord and I will share more info on this! :)

Thanks for downloading and for the support! :D