Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dwarves only run from enemies when they can find a path  (Read 713 times)

RavingManiac

  • Bay Watcher
    • View Profile
Dwarves only run from enemies when they can find a path
« on: May 06, 2009, 11:10:48 pm »

Basically, your dwarves will run away from goblins/megabeasts/wild bunnies only when the game can find a path between them. This will allow for proper arena battles with spectators, in addition to 'has witnessed the slaughter to enemies' happy thoughts.
Logged
Thief:"Quiet kitty, Qui-"
Cat:"THIEF! Protect the hoard from the skulking filth!"
The resulting party killed 20 dwarves, crippled 2 more and the remaining 9 managed to get along and have a nice party.

Aquillion

  • Bay Watcher
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #1 on: May 07, 2009, 04:32:35 am »

Right.  And when they encounter enemy archers...?
Logged
We don't want another cheap fantasy universe, we want a cheap fantasy universe generator. --Toady One

RavingManiac

  • Bay Watcher
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #2 on: May 07, 2009, 07:24:57 am »

Then they run
Logged
Thief:"Quiet kitty, Qui-"
Cat:"THIEF! Protect the hoard from the skulking filth!"
The resulting party killed 20 dwarves, crippled 2 more and the remaining 9 managed to get along and have a nice party.

Warlord255

  • Bay Watcher
  • Master Building Designer
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #3 on: May 07, 2009, 09:39:34 am »

Sounds reasonable enough.

Though the eventual inclusion of climbing enemies brings up even more questions...
Logged
DF Vanilla-Spice Revised: Better balance, more !!fun!!
http://www.bay12forums.com/smf/index.php?topic=173907.msg7968772#msg7968772

LeadfootSlim on Steam, LeadfootSlim#1851 on Discord. Hit me up!

RedWarrior0

  • Bay Watcher
  • she/her
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #4 on: May 07, 2009, 03:03:40 pm »

Besides this, make enemies that are injured to a certain (intense) degree not cause interruptions. I hate when there's a goblin missing his lower body , both eyes, and an arm that's causing all my dwarves to shit themselves.

Sounds reasonable enough.

Though the eventual inclusion of climbing enemies brings up even more questions...
Well, if constructions could also be decorated...

"This is a granite wall. It menaces with spikes of pitchblende."

Or just put an item/building "spike wall" or something like that in.
I can see it... at mason/carpenter workshop or a forge, you would make a "portable wall". Then you would build spikes at a carpenter's workshop or forge, then somehow assemble them.
Logged

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #5 on: May 07, 2009, 03:46:13 pm »

This is already listed as a very old bug:

# 000039 □ [dwarf mode][combat]   melee opponents shouldn't scare siege operators through fortifications

And in fact this would be pretty easy to fix -- the code that makes civilians get scared should first check whether the thing they're getting scared by is in the same map component.  This wouldn't handle the situation where the goblins can get in but only by a long and circuitous path, since they'd still be in the same component.  But it would help a lot.
Logged

Vattic

  • Bay Watcher
  • bibo ergo sum
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #6 on: May 07, 2009, 04:35:49 pm »

This could also mean that cornered creatures might go crazy and charge their opponents.

This wouldn't handle the situation where the goblins can get in but only by a long and circuitous path, since they'd still be in the same component.  But it would help a lot.
This wont be a popular suggestion but when in the same component it could check how far away the opponents are using the pathfinding script. They then wouldn't run away until the distance is bellow a certain threshold.

Sieges don't seem big enough at the moment to worry me about the hit this might place on fps but if it would cause problems could it not be optimised by only checking once in so many steps. Rather than checking the distance between each dwarf and each goblin it could group dwarves and goblins who are close to each other and only check the distance between the groups.
Logged
6 out of 7 dwarves aren't Happy.
How To Generate Small Islands

Funk

  • Bay Watcher
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #7 on: May 07, 2009, 04:40:47 pm »

dwarves shoud be less scared if there are more/the same number troops to foes around, some foe more count for scareing than others
 /if thay have a weapon/armor on them then less scared(i.e. if you have a axe then a deer is not going to scare you but a bear will)
number of kills make them less scared
Logged
Agree, plus that's about the LAST thing *I* want to see from this kind of game - author spending valuable development time on useless graphics.

Unofficial slogan of Bay 12 Games.  

Death to the false emperor a warhammer40k SG

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Dwarves only run from enemies when they can find a path
« Reply #8 on: May 07, 2009, 04:48:49 pm »

This wont be a popular suggestion but when in the same component it could check how far away the opponents are using the pathfinding script. They then wouldn't run away until the distance is bellow a certain threshold.

Well, you wouldn't necessarily have to do an extra pathfinding check.  The dwarves should get scared when the goblins are getting close, which means the goblins are (probably) already pathing toward them.  So after a goblin has pathed toward a dwarf and is moving along that path, the dwarf can monitor the remaining distance and not get scared until that distance reaches a threshold.  A dwarf that is being approached can also update nearby dwarves that a goblin is getting close, so even if only one dwarf from a group of siege operators is being approached, the entire group can flee one by one according to their individual bravery etc.
Logged