Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Caravan charges orcs instead of fleeing to nearby map edge  (Read 599 times)

Derakon

  • Bay Watcher
    • View Profile
Caravan charges orcs instead of fleeing to nearby map edge
« on: October 17, 2009, 06:54:22 pm »

The orcs attacked while my first caravan was at the depot. Since I clearly couldn't let them run out my main fort entrance, I dug an emergency exit that emerges five squares from the edge of the map. When trading completed, the merchants ran down the emergency exit, as planned. Of course, the orcs also said "Ah hah! Another way into the fortress! To the emergency exit, brothers!" The merchants had a bit of a head start, so they should have made it clean away. And in fact, the two wagons and the liaison came out of the tunnel and then went straight for the edge, as expected. The two pack animals and their merchants, though, emerged from the tunnel and then decided to run towards the orcs instead. This involved them moving away from the closest map edge. I can only assume that they'd picked a different place to exit the map, but why?

The most annoying bit of this is that the two pack animals also had all of the trade goods I'd given the merchants, which means their profits are basically -20k this year. I'm not getting much next year...
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels

orbcontrolled

  • Bay Watcher
    • View Profile
Re: Caravan charges orcs instead of fleeing to nearby map edge
« Reply #1 on: October 17, 2009, 08:27:56 pm »

As a general rule, it would be nice if merchants would always flee to the nearest map edge when attacked by a superior force.
The unarmed merchants could head straight for the nearest edge, and the guards could stay and engage the enemy until the last civilian escaped, before running away themselves.
Logged

Quietust

  • Bay Watcher
  • Does not suffer fools gladly
    • View Profile
    • QMT Productions
Re: Caravan charges orcs instead of fleeing to nearby map edge
« Reply #2 on: October 17, 2009, 10:55:07 pm »

Caravan pack animals seem to be a bit of an oddity when they leave the depot - they seem to choose the map edge closest to the depot by a straight line rather than through actual pathfinding, so they'll take extravagantly long paths just to get to a particular map edge. Pretty much the only way to prevent this is to block off all other possible paths.

With wagons, it's a lot easier to restrict them to a single valid path, especially if said path goes through a thick forest.
Logged
P.S. If you don't get this note, let me know and I'll write you another.
It's amazing how dwarves can make a stack of bones completely waterproof and magmaproof.
It's amazing how they can make an entire floodgate out of the bones of 2 cats.

Derakon

  • Bay Watcher
    • View Profile
Re: Caravan charges orcs instead of fleeing to nearby map edge
« Reply #3 on: October 18, 2009, 01:07:44 am »

Guess I'll have to set up some drawbridges around the backdoor, then...

This is still a bug that should be fixed, though. That, and the traders really should balance their loads better; the wagons were moving a good two-three times faster than the pack animals because all of my goods were on the latter and very little of their goods were on the former.
Logged
Jetblade - an open-source Metroid/Castlevania game with procedurally-generated levels