Pathfinding issues

General discussion about the game

Pathfinding issues

Postby Shinomond » Sat Jul 26, 2014 1:57 am

It comes down to people with almost no hunger remaining trying to do thing they should not, the constant deaths from starving is what is killing my hapiness. Like how I just lost 18 Townies and 6 Heroes trying to chase evil badgers around the map until they starved to death, if the badger leaves thier line of sight they should stop chasing it. Or how a townie with only 100 hunger remaining will try to travel down to -8 then accross the map to pick up iron, coal, ITEs, or copper I need to craft something and starve in the process when he shouldnt even do it in the first place. Random hunger limits also dont help, as I have been looking into it I have needed to kill select townies that arrive with max hunger bars of 1000 while trying to keep the ones with close to 3000. I have no control to make a person eat when they should, and even with an all cooken meat and fish diet they still starve.

A basic task I set is building a yellow colored roof and placing it, needing two stone and one yellow color, when a townie starts the task they dont stop to eat or sleep unitl it is done. They need to go to -6 to get the stone, so they travel 200 tiles to get one, then 200 tiles back, 200 tiles to get the second, then 200 back, then 30 to get the yellow dye and make the roof tile, then travel another 30 to place it. So at a total trip of 860 tiles and a hunger cost of 3 per tile traveled they need 2580 hunger to complete this job not counting hunger cost of crafting the item. Which can be double the Max hunger of some Townies.

A simple option to set them not work if below X% hunger per group would solve almost all of this. IE i could set my hauling group not to work when below a higher % so they have plenty of hunger to travel.

My basic setup is all my crafting, cooking, and dining room is all within 30 tiles west of the hole I dug, right next to it is my raw material storage, ITE storage, and Guard House. I dont have gold or silver to make better decoration items but I have all the personal rooms, dining rooms, tavern, and paths decorated. North of the hole is my fishing sets and animal farms, east is the tavern and south is the personal rooms. So i think it is fairly centrally located.
Shinomond
 
Posts: 16
Joined: Mon Feb 11, 2013 12:46 pm

Re: Towns future

Postby BlueSteelAUS » Sat Jul 26, 2014 3:38 am

hers your problem

"They need to go to -6 to get the stone, so they travel 200 tiles to get one, then 200 tiles back, 200 tiles to get the second, then 200 back, then 30 to get the yellow dye and make the roof tile, then travel another 30 to place it."

build a stockpiles close to your work area , then they won't have to walk say 800+ tiles to complete the task. and don't tell them to make it until you have stock in the stock pile
and have haulers do a single run a a time to get the blocks.

organize your town properly and there isn't a problem. I have only had a couple of starvation's in the last 12 months of playing. all my own fault. due to not watching the available stocks when building stuff.

i think a better way of stopping the starvation of people if there is food is to make it so that the player can choose whether to just get supplies out of stockpiles/barrels or whether to grab them from anywhere. I think that this would provide a compromise, and not loose the management side of Towns

Towns is after all a management game.
User avatar
BlueSteelAUS
 
Posts: 785
Joined: Sun Dec 11, 2011 10:37 pm
Location: Nanango, Qld, Australia

Re: Towns future

Postby Shinomond » Sat Jul 26, 2014 6:32 am

I have over 200 stone within 30 squares of the crafting bench, same with all my ITEs but I have no control over the AI choice of food or materials. Even a single trip costs 1200 hunger, so how do I ensure only people with enough hunger are traveling down there to get items back up and not the guy with 10 hunger remaining.

And if its a management game I dont see any problems for adding functions/commands for things like "Hey stupid stop what your doing and go eat." or "Eat until your 100% full." or "Dont work if under X% or Z hunger." or "Run away from that monster". I cant manage food intake at all even setting up a small farm underground I have no way of controlling where they harvest from or produce from. They also prepare food and place it on the ground instead of the food buckets I have in the dining room and tavern and I cant force them to stock dining rooms and tavern rooms underground.

EDIT
The more I closely watch them it seems more like bad AI then anything, after following one before he starved, I told to equip new pants and it was taking forever, so when I started watching him he spent the rest life climbing up and down the dungeon ladder I setup in a loop until he starved to death.

Also are you guys running any mods they may be altering this in any way? I am playing default v14d from steam.
Shinomond
 
Posts: 16
Joined: Mon Feb 11, 2013 12:46 pm

Re: Towns future

Postby YetiChow » Sat Jul 26, 2014 9:11 am

Shinomond wrote:I have over 200 stone within 30 squares of the crafting bench, same with all my ITEs but I have no control over the AI choice of food or materials. Even a single trip costs 1200 hunger, so how do I ensure only people with enough hunger are traveling down there to get items back up and not the guy with 10 hunger remaining.

And if its a management game I dont see any problems for adding functions/commands for things like "Hey stupid stop what your doing and go eat." or "Eat until your 100% full." or "Dont work if under X% or Z hunger." or "Run away from that monster". I cant manage food intake at all even setting up a small farm underground I have no way of controlling where they harvest from or produce from. They also prepare food and place it on the ground instead of the food buckets I have in the dining room and tavern and I cant force them to stock dining rooms and tavern rooms underground.

EDIT
The more I closely watch them it seems more like bad AI then anything, after following one before he starved, I told to equip new pants and it was taking forever, so when I started watching him he spent the rest life climbing up and down the dungeon ladder I setup in a loop until he starved to death.

Also are you guys running any mods they may be altering this in any way? I am playing default v14d from steam.


If the trips are taking to long, you need to step in and make it so the trips are shorter. Like I said, break it down yourself - you can't control the townies once you give them the order, but you CAN design the order so they can't possibly screw it up.

You have to think ahead about what challenges the townies will face, because that's something they can't do. If they did... well, there would be barely any game at all, it would be a house building simulator. If that's what you want, it can be modded to change the townies' behaviour; but if you want the vanilla game, you'll need to think about changing YOUR OWN BEHAVIOUR.

For example: when you told the guy to put on new pants, how did you do it? Did you just tell him to auto-equip the best pants on the map? Did you make sure the path was clear first? Did you check where the pants even were? I'm guessing that the answer to the first question is "yes" and all the others are "no" - in which case, I'm not surprised that the townie made a stupid choice.

If you want the townies to make smart choices, you need to be more specific. First off, the big thing to do is restrict their access to the dungeon - in Diablo etc. the shopkeepers don't wander through the dungeons to get stuff, you have to bring it to them... so, if Towns is the reverse of Diablo, then you have to think about how to fill in that role and have someone bring the stuff out of the dungeons. In Towns, that usually means having the heroes clear the dungeon first, and then send some townies to stockpile the loot. That should be their ONLY job, and it should be a short one - they should go down, pick up ONE item, bring it back, and then not be told to go and get another one. In other words, don't give them a crazy big stockpile to fill; set out a small stockpile area and then, when that's full and everyone has rested/eaten, set out another small stockpile. THEN you can tell other townies to use that new loot. Once you get a bit of practice, you'll be able to multi-task - have some people hauling, and another group who use those hauled items just a little bit slower than the first group is hauling them up, so that you don't have workers running into the dungeons to get their resources.

To play Towns, you need to look at ALL the menus, not just start giving orders. Setting the priorities, access levels, production amounts and other such variables is how you control the game. Imagine trying to drive a car where you put it in high gear, then set all the controls (throttle, brakes, engine controls, headlights, radio, windscreen wipers etc.) to their max settings and only keep using the steering... it would be chaos! :lol: But that's just what it's like in Towns if you don't set up the other systems before you start giving orders - the orders are just a steering wheel, the other important controls will be the ones that keep you moving steadily and deal with the environment.

To put that into a better context: say your focus is equipping everyone in spiderite gear (assuming you've already cleared the spider layer, and you have a full blacksmith zone available). Well, spiderite is really common on dungeon floor -1, but it can be found all the way down to the bottom layers... the first thing you should do is limit the townies to layer -1 (you can do that in the townie panel, the level you set there is the lowest level they'll take into account when they're looking for resources). Next, you want to get some of that spiderite out of the dungeon and have it near the blacksmith zone - so you set a stockpile that can hold just enough spiderite for the job, and just enough iron. Then, once the materials are in place and ready to use, you can give the order to make those armour pieces. After that, you should check there's no leftover armour in the dungeons that the townies may want to equip; if there is then you bring that up near the other armours. Finally, you can give the order to equip the armour, and you'll be sure that nobody will starve on the way because the armour is already in the town.

But even then, there are many ways to do that list of tasks. For example, you can use "global priorities" - everyone does step 1, then when it's finished they all work on step 2, then they all work on step 3 etc. OR you can organise the townies into workgroups, so group A does step one, group B does step 2, group C works on step 3... while group T keeps making food, and group Z goes and mines coal, and so on for other important jobs to keep the town running. You could even make it that group A does step 1 while group B harvests food, and then when group A is finished they go mine coal, and group B goes to do step 2 of the armour production chain.

That's how you do management in Towns - it's not about saying "hey, don't do it that way because it's wrong", it's about planning ahead so they'll do it the right way in the first place.
What's that you're eating? A nice, juicy apple? You weren't supposed to eat that you fool, you were supposed to make it into a pie! - last words recorded words of Francis D'Avre before he went looking for snowcherries, but found a hungry Yeti instead.
User avatar
YetiChow
 
Posts: 3149
Joined: Wed Apr 25, 2012 9:26 am
Location: Cramped between a Yeti's small intestine and its stomach... trying not to dissolve!

Re: Towns future

Postby Shinomond » Sat Jul 26, 2014 11:28 am

First this is getting into a long secondary topic so if a mod wants to move this to another location I understand. I am trying to figure out what is causing only me to have this problem apparently. Also another Idea I though of while writing my followup responce was to make hauling an option like gathering/harvesting so I can control it better.

For the Pants I told him to equip the ones I just made at the carpenters by selecting him in the menu and selecting it from the list, he changes his task from Haul to Equip as normal so i assumed it was working. After a little while I noticed them still on the ground and clicked on him to find him traveling from -6 up to 0 then back down to -6 then back up to 0 until he starved to death. Same thing with chasing evil badgers, they ran into town and stole a raw chicken and ran off with all 6 of my heroes and 18 townies chasing after it, when the one they were chasing reached near the edge of the map it turned around and ran back towards town repeating again and again until they all starved. The only solution I saw to that is making a massive maze of traps around the edge of the map to basically turning all sieges into a resource farm.

For now I have setup a small town at the moment with 36 Townies and 6 Heroes, 5 groups of 6 with a group of 6 Guards. When I mine down as soon as I break into the dungoen so the heores can explore I make sure to set all townies to not be able to go down until it is all cleard out then send in my townies when it is safe. The multiple groups also makes it so I can turn on and off thier work loads at will to balance their not enough work, too much work mood. Three groups focus solely on food production. The only problem groups I have are the haulers and crafters, crafters are not using resources in my massive storage a mere 15 tiles from thier station but instead go down to -6 and travel deep into it just to get a single block of stone twice to make a roof tile. I double checked the resource barrels by hand to be 100% sure, and had over 100 onhand 15 tiles away and 30 tiles away for the color. I dont understand how I can manage around that when I cant control where they get materials from. I cant even manage groups seperatly so haulers can go down to -6 to get iron, coal, and copper from my mines while crafters never do.

The only fix I have is to set each hauler as a seperate group and watch thier hunger like a hawk at all times and turn them on right after they eat good food and back off after they make 1-2 trips max and never allow anything else to be crafted until 100% of all items are removed from the dungeon so they cant have any reason to travel down. I even tried a new map with multiple towns to reduce max haul distance and found the the game AI does not allow you to setup multiple towns at all due to no control over what is produced where, so I cant have multiple dungeon entrances with food onhand nearby to reduce travel time since they will travel all the way accross the map for the same resource they have right next to them. Basically I setup Town A and B, Town A can only produce radish, banana, and mushrooms for food, Town B can make apples, pears, wheat products and fish. In Town A a Townie from A harvests the banana then places it on the ground. Then a Townie from B comes and takes it back to A to cook and places it on the ground. Then a Townie from A goes to B to get the freshly cooked banana then takes it back to A to eat. Even though Town A already has cooked banana on hand right next to him. Why did he go accross the map to get the same item, and once he picked it up why did he go all the way back to A to eat it instead of using the dining room right next to him. It seems that when they get hungry or need to craft an item they choose a random item that meets their needs reguardless of distance.

As a real world example like you said Why would you go on a 8-hour narture hike where you couldnt bring food or water and wait until 7 hours after you last meal to start it?
Shinomond
 
Posts: 16
Joined: Mon Feb 11, 2013 12:46 pm

Re: Towns future

Postby miljan02 » Sat Jul 26, 2014 11:43 am

Shinomond wrote:
For the Pants I told him to equip the ones I just made at the carpenters by selecting him in the menu and selecting it from the list, he changes his task from Haul to Equip as normal so i assumed it was working. After a little while I noticed them still on the ground and clicked on him to find him traveling from -6 up to 0 then back down to -6 then back up to 0 until he starved to death. Same thing with chasing evil badgers, they ran into town and stole a raw chicken and ran off with all 6 of my heroes and 18 townies chasing after it, when the one they were chasing reached near the edge of the map it turned around and ran back towards town repeating again and again until they all starved. The only solution I saw to that is making a massive maze of traps around the edge of the map to basically turning all sieges into a resource farm.


This actually sounds like a bug

Shinomond wrote:For ...... .....ast meal to start it?

The fix to your problem is to limit townies to not go to low levels so they will always use the near stockpiles. A note, when townies craft things, unlike other tasks they will not stop until they finish it. So be sure when making stuff that all things is near your stockpiles so they dont go down. If you build roofs set the limit to where your stockpile is and the problem will be fixed. The crafting thing where they do not stop when they are hungry was suggested few times to dev to change it so they can stop working on something and go to eat, but until its implemented limit the dungeon level. (also multiple zone do not work as they do not check what is close because the game would lag like crap, so don't try to make two towns)
miljan02
 
Posts: 68
Joined: Fri Feb 03, 2012 1:19 pm

Re: Towns future

Postby Shinomond » Sat Jul 26, 2014 12:49 pm

I know about the crafting rule to never stop in the middle of a job, that is why I was asking for a right click option to make them stop and go eat or run away from monsters that suddenly appeared during a siege and have no chance of beating.

The crafting structures I have are all within 30 squares at most from the stockplies I need to craft items rather it be ITE's, Color, or Raw Materials. I have even used tons of paved roads to ensure items are placed closer to crafting stations when harvested to reduce travel time when crafting with materials like food and wood. I also only craft items for what I have materials onhand at the surface. I thought this would avoid these kinds of problems as the AI would use the closest items instead of random available.

So I guess the fix for me is to make each hauler in his own group and control them one at a time and never craft anything as long as there are items at lower levels they need to gather, then once everything is on the surface I can craft things with what I have. So I guess multi-tasking for hauling and crafting will have to wait for an update.

Edit:
On a new game to try to find a solution for me I ran into more AI loops. I have the AI set to 4 of 6 currently because at 5 they randomly travel out into the wilderness for no reason at all for a few seconds time before going back to work. This includes Heroes, Guards, all Townies reguardless of job assignment. If I set it to 6 it goes back to the old bug of travel to an item pick it up set it down then go to the station where it was needed to craft something then go back to the original item pick it up set it down and repeat until death. Putting it back to 4 I saw another pathing loop where my ladder down into a mine opened into a large room, on the top and bottom left side was a 1x2 path into the dungeon and a 2x20 stretch of stone in the middle, after a townie grabbed a block of Iron he came back towards the ladder and began running laps aroud the 2x20 section instead of taking it to the surface, even after I mined the stone out he continued until death. I feel like I am missing a mod everybody else is using to improve the AI or something i have is outdated.
Shinomond
 
Posts: 16
Joined: Mon Feb 11, 2013 12:46 pm

Re: Towns future

Postby miljan02 » Sat Jul 26, 2014 1:38 pm

Shinomond wrote:On a new game to try to find a solution for me I ran into more AI loops. I have the AI set to 4 of 6 currently because at 5 they randomly travel out into the wilderness for no reason at all for a few seconds time before going back to work. This includes Heroes, Guards, all Townies reguardless of job assignment. If I set it to 6 it goes back to the old bug of travel to an item pick it up set it down then go to the station where it was needed to craft something then go back to the original item pick it up set it down and repeat until death. Putting it back to 4 I saw another pathing loop where my ladder down into a mine opened into a large room, on the top and bottom left side was a 1x2 path into the dungeon and a 2x20 stretch of stone in the middle, after a townie grabbed a block of Iron he came back towards the ladder and began running laps aroud the 2x20 section instead of taking it to the surface, even after I mined the stone out he continued until death. I feel like I am missing a mod everybody else is using to improve the AI or something i have is outdated.



I never used mods. I really find it extremely strange what you describe. I have pathfinding always on 6. Try reinstalling the game, i don't know how you are getting so many bugs and problems
miljan02
 
Posts: 68
Joined: Fri Feb 03, 2012 1:19 pm

Re: Towns future

Postby caprontos » Sun Jul 27, 2014 12:15 am

miljan02 wrote:
Shinomond wrote:On a new game to try to find a solution for me I ran into more AI loops. I have the AI set to 4 of 6 currently because at 5 they randomly travel out into the wilderness for no reason at all for a few seconds time before going back to work. This includes Heroes, Guards, all Townies reguardless of job assignment. If I set it to 6 it goes back to the old bug of travel to an item pick it up set it down then go to the station where it was needed to craft something then go back to the original item pick it up set it down and repeat until death. Putting it back to 4 I saw another pathing loop where my ladder down into a mine opened into a large room, on the top and bottom left side was a 1x2 path into the dungeon and a 2x20 stretch of stone in the middle, after a townie grabbed a block of Iron he came back towards the ladder and began running laps aroud the 2x20 section instead of taking it to the surface, even after I mined the stone out he continued until death. I feel like I am missing a mod everybody else is using to improve the AI or something i have is outdated.



I never used mods. I really find it extremely strange what you describe. I have pathfinding always on 6. Try reinstalling the game, i don't know how you are getting so many bugs and problems


If you have a save with this happening upload it somewhere and post a link for it in the bug section, and Xavi can look at it and maybe find out whats wrong. I agree with the above, sounds like a bug.. (I've not had any like issues).

As for your people wandering off, try to place a market down near where you want them to stay, that way when they idle they all idle in the market, and don't just wander off..
Image
Cha Cha Cha!
User avatar
caprontos
 
Posts: 3930
Joined: Wed Apr 04, 2012 3:18 am

Re: Towns future

Postby Shinomond » Sun Jul 27, 2014 3:41 am

Where do I find the saved game file? I am not seeing it in the local file library from steam on a Wondows 7 64bit machine. I think I might have one that he can use since it involves a death of a character from my Group 3 that starved on -6 that shound not have been there.

Basic Info was
AI is set to 4 of 6 due to issues with higher AI settings.
Name: Eleanor Dufay, Group 3
Assigned Jobs to Group: Baking and Cooking, Gathering and Harvesting, Mining and Digging, Tilling and Chopping, and Butchering.
Townie died while carring an equipment item dropped from a monster on level -6.
Auto-Equip is turned off for all Townies and Guards.
Also checked to make sure there were no mining orders left on that level for some time.
Shinomond
 
Posts: 16
Joined: Mon Feb 11, 2013 12:46 pm

Next

Return to General discussion

Who is online

Users browsing this forum: No registered users and 9 guests

cron