Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Safety Minded  (Read 1729 times)

BubbaBrown

  • Bay Watcher
    • View Profile
Safety Minded
« on: June 09, 2010, 12:26:02 pm »

Dwarves need to be a little more safety minded.  It's just getting annoying and a bit ridiculous to have dwarves running to gather items... right into goblins... just after passing someone who was running from them.  Ants have better communication skills.

There should be a means of temporary job or task suspension based on radius around any known or spotted hostile enemy.  That alone would reduce the amount of civilian charging into danger.  And yes, I've tried burrows:  They are too restrictive, complicated, annoying to setup for what should be a simple process.  I've tried other methods including forbidding items, etc, etc...  Quite simply, there's no replacement for simple avoidance behavior.  I'll even take the old "Everyone inside" command.  Simple, but effective.

Another way would be allowing the definition of "safety points" to alter the pathfinding of the dwarves.  You drop a few "safety points" in various places around your fortress.  That way instead of running in a random direction into the woods or something stupid... they'll run to a safety point where you'll either have traps or troops waiting for the enemies.  It could be coupled with an Alarm to force those outside of drop their tasks outside and make their way to a safe point.

I like the occasional "diplomatic encounter" with civilians and goblins, but it gets old after the first 10 and I'm tired of dedicating a Mason's Workshop to coffins.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #1 on: June 09, 2010, 02:58:00 pm »

You can already do this with burrows.

Create a safe zone burrow. This would be a burrow in a heavily defended room that has its own supply of food and water.

When there is an attack order civilians to be restricted to this burrow.

They will hide in your bunker until the danger has passed, or until the danger reaches the bunker and paints it red with dwarven blood.
Logged

Fourdots

  • Bay Watcher
  • ....
    • View Profile
Re: Safety Minded
« Reply #2 on: June 09, 2010, 03:56:01 pm »

You can already do this with burrows.

Create a safe zone burrow. This would be a burrow in a heavily defended room that has its own supply of food and water.

When there is an attack order civilians to be restricted to this burrow.

They will hide in your bunker until the danger has passed, or until the danger reaches the bunker and paints it red with dwarven blood.

Ah, but if they're interrupted on the way there they'll still run in a random direction, perhaps even away from the safe zone. The point of the suggestion seems to be to get dwarfs to run intelligently, instead of simply panicking and trying to get away.

Bunkers only really work if you can get all your dwarfs there before the attackers get to them.
Logged

marcusbjol

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #3 on: June 09, 2010, 04:10:52 pm »

Sending civilians out to get stuff with living enemies on the map gets dwarves killed.  Many of them.  Loosing a woodcutter due to an ambush is entirely different than loosing 10 dwarves because wood hauling wasn't disabled immediatly.  If you have more than a dwarf or 2 exposed on the map, station a squad there.

The options to control behavior are basically disabling hauling or enabling a burrow.  The burrow is the one who limits movement, the other limits what they will do (but not where they go).  The nice thing about using the burrow method is it will interrupt any hauling commands and force them back to the burrow. 

I recommend haveing 2 burrows:  Living area (Everywhere that is safe (i.e. behind a raised drawbridge)) a Castle (defences which includes the trade depot).  To easily select an area (my inside area block shaped) start at the up and top left corner and then go down the bottom right (the selection will span z-levels).  Make a new alert level called Hostiles.  Assign the Castle + Living the Hostiles alert.  When enemies come, switch the civilian alert status to Hostiles and they will all run inside.  If your castle is about to be breached, disable the Castle from the hostile alert and when they get inside, raise the drawbridge.
« Last Edit: June 09, 2010, 04:23:41 pm by marcusbjol »
Logged

Mir

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #4 on: June 09, 2010, 04:39:44 pm »

Except if the threat is between them and the burrow. Then they keep running back into the threat, only to run away again, over and over until either they or the threat dies.

It would be nice to not have to sacrifice him, and allow the intruders to run into my traps/military instead. I suppose one could create a second burrow way off in a corner of the map, and assign only that one dwarf to it to get him to get the hell away from the threat... I didn't think of that at the time. I've just started playing again with 0.31.05 (I stopped some time pre-40d), and I haven't gotten used to the burrow stuff yet. I'll try it next time.


And so unfolds the dramatic story of my first ambush on a new fort, and my trial-by-fire learning of the new military/burrow/alert system.

I had a couple of dwarves outside. Not only was my main refuse pile outside (now fixed), I also had several small farm plots of the above ground plants going just outside my entrance. I hadn't realized you could no longer grow Plump Helmets on underground soil (need muddied rock), so I had to set up an emergency food source.

So anyway, several dwarves carting the remains of recently slaughtered donkeys out to the garbage pile spot a troup of Goblin Marksmen coming to deliver some Fun to the fort. In the contemplative time offered me by the automatic pause, I set about creating a burrow that was deep inside my fort. I assigned everyone to it, and triggered the alert. Urist McGarbagehauler and Urist McBerrypicker drop their loads and immediately stump back past my line of traps and war dogs to the safety of the fort.

The goblins, being the dutiful Fun couriers they are, follow the fleeing Urists firing off the occasional arrow and charge straight into my meager defenses. A little under half the ambush got caged or crushed and the remaining seven went to town on my war dogs. While the goblins were distracted with a little canine combat, Urist McDeadmeat the fisher dwarf returns from his peaceful, relaxing adventure in the surrounding forests to find his route home blocked by goblins. Not wanting to hog any of the Fun from the war dogs in the entrance, he continued to dance at the edge of sight, taunting the poor goblins about their mothers. Fast forward a few days, and all of the dogs are dead.

The goblins finally take notice of McDeadmeat and decide to see if he'll sign for the Fun they're delivering. McDeadmeat flees, and after a little bit of running around he almost makes it back home. However, the goblins cut him off at the entrance and manage to immobilize him with a couple of arrows. Then they proceeded to unload their entire stores of ammo into him, turning him into a dwarven pincushion. But McDeadmeat is made of sturdy stuff, and still lives! Now that they're out of arrows, they all walk up and politely ask him to sign for the delivery. Urist, always the considerate dwarf, says he's had enough fun for one day and refuses to sign. So, the goblins give him a gang-land beatdown, spraying teeth and blood everywhere. The beating continues for seriously something close to half a season before McDeadmeat finally succumbs to hunger. Hunger!

The remaining goblins then signed the delivery papers themselves, left the package at the door, and promptly left the area.


Suffice it to say, I suspect that maybe damage values and stuff could use some tweaking :D
« Last Edit: June 09, 2010, 04:41:36 pm by Mir »
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #5 on: June 09, 2010, 04:40:24 pm »

I recommend haveing 2 burrows:  Living area (Everywhere that is safe (i.e. behind a raised drawbridge)) a Castle (defences which includes the trade depot).  To easily select an area (my inside area block shaped) start at the up and top left corner and then go down the bottom right (the selection will span z-levels).  Make a new alert level called Hostiles.  Assign the Castle + Living the Hostiles alert.  When enemies come, switch the civilian alert status to Hostiles and they will all run inside.  If your castle is about to be breached, disable the Castle from the hostile alert and when they get inside, raise the drawbridge.

I generally have 3 burrows, plus an additional burrow for each cavern layer.

The main burrow is the safe area of my fortress. This is basically the "stay indoors" command.
I create another burrow that encompasses the entire surface of the map. My military is assigned to defend this burrow, so they will seek and destroy all invaders.
I then have a retreat burrow. Its a burrow within my fortress that is basically just my dining hall. There is ample food, booze, and a well in there. The farms are also accessed through the dining hall. Dwarves can in theory live here forever.

Unless there is a clear threat on the map civilians are not restricted, so they can go anywhere. If there is a threat I first confine them to the safe sections of the fortress. If there is a very severe threat where my miltiary is unable to contain it, I order all dwarves to retreat to the dining hall for the last stand. All animals are also confined to the dining hall, so that if anything opens the door they're instantly attacked by hundreds of animals. Each animal by itself isn't much of a threat, but hundreds of them can take down nearly anything just by sheer quantity of attacks. 99% of the attacks do no damage, but get enough attacks and the 1% that do hit will kill it.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #6 on: June 09, 2010, 04:41:13 pm »

Except if the threat is between them and the burrow. Then they keep running back into the threat, only to run away again, over and over until either they or the threat dies. I suppose one could/should create a second burrow way off in a corner of the map, and assign only that one dwarf to it to get him to get the hell away from the threat... I didn't think of that at the time. I've just started playing again with 0.31.05 (I stopped some time pre-40d), and I haven't gotten used to the burrow stuff yet. I'll try it next time.

Just need to be smart about building your fortress.

Dwarves will try to run away from hostiles. If there are hostiles between the dwarves and safety then the dwarves are probably doomed anyways.
Logged

marcusbjol

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #7 on: June 09, 2010, 05:05:52 pm »

Having an intelligent run path is very hard computationally.   In nature, animals respond to danger(fight or flight) first then seek safty(the flight response might take a rabbit off a cliff). It takes time to process where safty is, and that split second can mean life or death.  We are talking about civilians out on the field of battle.  They are not trained to be effective on the field of battle, so you should not expect them to respond intelligently.

It might be better to use the (M)ilitary -> (A)lerts to assign burrow restrictions based on alert levels instead of manually assigning them via the Burrow interface.



Logged

deoxy

  • Bay Watcher
  • Insert witty comment here.
    • View Profile
Re: Safety Minded
« Reply #8 on: June 09, 2010, 06:21:58 pm »

Suffice it to say, I suspect that maybe damage values and stuff could use some tweaking :D

That was a great little story.  And the moral was good, too (quoted above).
Logged

BubbaBrown

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #9 on: June 09, 2010, 09:05:43 pm »

Having an intelligent run path is very hard computationally.   In nature, animals respond to danger(fight or flight) first then seek safty(the flight response might take a rabbit off a cliff). It takes time to process where safty is, and that split second can mean life or death.  We are talking about civilians out on the field of battle.  They are not trained to be effective on the field of battle, so you should not expect them to respond intelligently.

It might be better to use the (M)ilitary -> (A)lerts to assign burrow restrictions based on alert levels instead of manually assigning them via the Burrow interface.

True.  But, animals still will tend to run into areas that are typically safer than their current situation.  The safety points wouldn't any more computationally expensive than a dwarf doing path find to pick up an item in the field.  The only thing I want dwarves to do is to tear off and run towards shelter rather than purely random into the woods.  There's been many times a dwarf has been spooked at the front gate of my trap lined entryway path and they seem to run everywhere BUT back the way they came.  It stands to reason that when you approach your front door from inside and find something nasty waiting for you there outside... You don't run outside to the side of it, but will run back into your house deeper.

Burrows, in my opinion, tend to be overkill and an over-engineered work around to which path-finding tweaking beacons would work well enough.  A few beacons with simple effects coupled with an alert state system (that's completely unmarried from the military system in its current state) that can activate and deactivate these beacons in any combination would allow for some amazing flexibility and functionality.  Give a decent rule language for more specific things and you replace and enhance a majority of the current systems.

Also, the military system is just simply hosed.  I've have never gotten it to work right to any real extent.  I can see the intent to the design, but the presentation is abhorrent.  There needs to be a redesign of whole system, but that's another discussion.
Logged

fanatic

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #10 on: June 10, 2010, 02:28:14 am »

Having an intelligent run path is very hard computationally.   In nature, animals respond to danger(fight or flight) first then seek safty(the flight response might take a rabbit off a cliff). It takes time to process where safty is, and that split second can mean life or death.  We are talking about civilians out on the field of battle.  They are not trained to be effective on the field of battle, so you should not expect them to respond intelligently.

It might be better to use the (M)ilitary -> (A)lerts to assign burrow restrictions based on alert levels instead of manually assigning them via the Burrow interface.

Would it be that hard to set it up a bit like traffic areas ?

1)Safe
2)Normal
3)Hazardous
4)Deathtrap

Then startled dwarves should try to path to the Safe or Normal zones whenever possible, even if it means running past the enemy (hey if they're agile AND know where they are going they stand a good chance!)

now the icing on tha cake would be dwarves updating these zones as they spot potentially dangerous cratures (hazardous for non-agressive wild animals, deathtrap for aggressive enemies, safe for dining rooms/bedoorms)
« Last Edit: June 10, 2010, 02:29:50 am by fanatic »
Logged
fanatic cancels play DF : gone berzerk at framerate.                                                  x1000
------------------------
Pour magma first - ask questions later!

fanatic

  • Bay Watcher
    • View Profile
Re: Safety Minded
« Reply #11 on: June 10, 2010, 02:29:06 am »

EDIT double post removed
Logged
fanatic cancels play DF : gone berzerk at framerate.                                                  x1000
------------------------
Pour magma first - ask questions later!