Jump to content

Gatherer shuttles to house


zoot
 Share

Recommended Posts

Sometimes a unit gathering wood will go (seemingly empty-handed) to the nearest house, "touch" it, turn around and then walk back to continue gathering.

Can't really show you any screenshots of the behavior, other than these two of the unit going to the house and back:

bd3u0.png

DZ2Mu.png

Link to comment
Share on other sites

Does this happen with all civs/on all maps? Is it one of your units or an AIs? (I assume it's one of yours, but it's better to look stupid asking unnecessary questions than to avoid helping when a simple question can change things ;) )

Also, have you checked e.g. "when it happens"? E.g. does it do it in the middle of gathering, just after it has finished gathering and tries to go back, etc. It does seem like it might be a unit that's just been at a drop site, then come back, found that there were too many gatherers and thus it couldn't get to the trees, tried to find some other tree nearby (behind the houses), and then there had opened up a spot in the first place. But I doubt that's what happened, again I just want to get the stupid questions out of the way ;)

Link to comment
Share on other sites

Does this happen with all civs/on all maps? Is it one of your units or an AIs? (I assume it's one of yours, but it's better to look stupid asking unnecessary questions than to avoid helping when a simple question can change things ;) )

Also, have you checked e.g. "when it happens"? E.g. does it do it in the middle of gathering, just after it has finished gathering and tries to go back, etc. It does seem like it might be a unit that's just been at a drop site, then come back, found that there were too many gatherers and thus it couldn't get to the trees, tried to find some other tree nearby (behind the houses), and then there had opened up a spot in the first place. But I doubt that's what happened, again I just want to get the stupid questions out of the way ;)

Relevant questions ;) That was one of my units, yes. I have experienced it on at least two different maps with two different civs.

I have not experienced it enough times to know exactly what happens, but I'm 99% certain that the unit was targeting / walking towards the house specifically, not some trees further away. (I shot the first screenshot in the expectation that he would turn around once he reached the house, and he did.)

I don't think the unit actually drops resources "at the house." It's a pathfinding thing that I see a lot, where a unit seems to take a circuitous path from time to time.

He was indeed not carrying any resources (I could tell from the counters). But I'm very certain that the house was his destination - particularly because in all three cases I've seen it, the unit walked to the nearest house, not just some random house/building.

It could be some total freak of chance, but that is not what I am inclined to believe.

Link to comment
Share on other sites

Why not use selection state to debug the orders? That should make it very clear what's happening. Alt+D > Display selection state, then select the unit in question. You can check the target ID to see if it's really going to the house or not. For shuttling, it should only use entities with a ResourceDropsite component, assuming everything is working as designed.

Link to comment
Share on other sites

I've experienced this odd behavior quite of bit while testing my AI bot, I can't seem to make out what actually triggers it yet. I'm pretty sure its coming from Engine's pathfinding and not from my script that is causing this behavior. I'm still investigating.

So far it only happens during the GATHER.APPROACHING status. It sometimes pass its destination goal and touch a house then come back to its destination point and begin gathering.

I'll report more findings as I observe more.

Link to comment
Share on other sites

I very much suspect this is a generic pathfinding issue that isn't dependent on any particular order.

When I was working on gates, I'd often use the Romans sandbox as a testbed, and it was quite common for builders to wander off in odd directions after finishing a wall segment, mostly inside the FORMATION.WALKING order.

Link to comment
Share on other sites

  • 3 weeks later...

I have a 'sandbox' here (attached) for anyone who wants to give debugging what may or may not be the same issue a shot:

1r6DFl.jpg

There's about three kinds of movement repeatedly going on in this scene:

- Units that decide to go somewhere else, like attacking an enemy base (not interesting).

- Units that are trying to gather from the tree they can't reach.

- Units that weirdly move, apparently empty-handed, towards the Mill, touch it, and then resume their attempt to reach the tree.

quicksave-0087.0adsave.zip

Edited by zoot
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...