Characters to stay in the middle of pathways or off of walls

I notice hearthlings and “badguys” path the most efficient way. Could there be a way to tell the pathing tool to always keep off walls so that the character doesn’t clip quite so much? If the block comes down to 1x1, then either run a secondary “sidways shuffle” motion or just say bugger it, and clip the character though the 1x1 path.

Biggest thing is when I go to the trouble of making stairs 4 block wide and every heathling grinds his body down the one wall. Kinda silly.

I figure now would be a good time to think of this as the AI was getting a twerking.

6 Likes

1st idea would be to bind hearthlings to roads, so they would use roads as higher priority for pathfinding
try to walk on road up to the smallest distance and then leave it. They could add a 5% speedbuff while walking on solid roads. So the player has a reason to build efficient routes, beside the optical effect.
2nd idea especially for stairs: a premade building tool for stairs (and roads), which builds minimum 3 blocks wide, but only the middle part counts as walking area. Hearthlings would walk always centered and don’t grind the walls.
3rd idea is to increase the hitbox of hearthlings, so the invisible hitbox grinds on the walls, while the visible part has few pixels space. But this could create other weird visual bugs, there hearthlings would fit visualy but the hitbox blocks 'em…

Roads are a bit faster, so they already take higher priority.[quote=“Zardimooo, post:2, topic:20105”]
2nd idea especially for stairs: a premade building tool for stairs (and roads), which builds minimum 3 blocks wide, but only the middle part counts as walking area. Hearthlings would walk always centered and don’t grind the walls.
[/quote]I’ve done this manually before [using roads for the center and floors/slabs for the outside]. It would be nice to have it as a proper tool.

[quote=“Zardimooo, post:2, topic:20105”]
3rd idea is to increase the hitbox of hearthlings, so the invisible hitbox grinds on the walls, while the visible part has few pixels space. But this could create other weird visual bugs, there hearthlings would fit visualy but the hitbox blocks 'em.
[/quote]That could work. It might be possible to code them with two hitboxes, so they’d try to have the larger one with extra room didn’t hit anything, but if needed use the smaller, tight-fitting one to squeeze through smaller spaces. Of course, two hitboxes probably means twice the potential for bugs.

2 Likes

Never mentioned that hearthlings prefere roads… need to keep an eye on it. I think they should also buff floors or simply introduce buffs/debuffs for more kind of ground, like debuff on swampy ground…

2 Likes

Most passing is assign a value to each block for them to pass through if the passing AI looked at the blocks and saw that the block has material right next to it on a level 1 or 2 blocks higher than that block it could put a negative 2 on that block. That would make the hearthlings pathing AI choose the next block over so in that for wide stairway they would usually used the center two blocks. And I don’t know if stoneharth uses it but I’ve always found it to increase the speed passing a eyes to assign numbers in a database to every block in relation to the blocks near them. So instead of every pathing AI going through and reassigning numbers each time it’s looking so if you have 8 hearthlings you’ve got eight different passing is assigning all the numbers themselves. You would have them just looking in the database and every time you do a train at it it updates that block of the world and its correlation to the blocks near it.