How to Optimize Pathfinding for Large Populations in Stonehearth Mods?

Hello

I have been experimenting with a mod that increases the population cap in Stonehearth and one big challenge I am running into is pathfinding performance. :innocent: Once I have a lot of citizens & animals moving around; the game starts to slow down noticeably, especially when they are navigating complex terrain with multiple levels, ladders & narrow paths. I am wondering if there are ways to make pathfinding more efficient for large populations.:upside_down_face:

I understand that Stonehearth already uses optimizations like caching and A* pathfinding; but I am curious if there are modding techniques / settings that can reduce CPU load without breaking AI behavior. :slightly_smiling_face: For eg; is it possible to adjust update frequency for idle units, simplify collision maps / set priority zones for movement?:thinking: This could help maintain smooth gameplay even in busy towns.

I would like to hear from other modders or developers who have tried scaling up the population and found ways to keep performance stable.:slightly_smiling_face: Checked Step by Step Guide to Modding in Stonehearth guide for reference. While researching optimization; I came across what is a DevOps Engineer and realized that some of their workflow & performance-tuning practices might also help in managing pathfinding efficiency in Stonehearth.:innocent:

If there’s a guide or documentation that explains how Stonehearth’s pathfinding system works internally, that would be a huge help for figuring out where to optimize.:thinking:

Thank you !!

Wow. Right at the first line we can see this post is wrong. You faked a post (looks like a.i. too) just to insert your blog link in there?

3 Likes