Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  
Pages: 1 [2]

Author Topic: Better sytem for "Dwarves Stay Inside" PLEASE!  (Read 1379 times)

sweitx

  • Bay Watcher
  • Sun Berry McSunshine
    • View Profile
Re: Better sytem for "Dwarves Stay Inside" PLEASE!
« Reply #15 on: July 22, 2008, 12:14:51 pm »

I was reading this thread...
http://www.bay12games.com/forum/index.php?topic=20368.0
When I got an idea for a better system for "Dwarf Stay Inside".  The idea is similar for the Depot Access in the game.  In this case, a point (or several) in the map can be marked as "Safe Spots".  The safe spots then mark in a Depot Access style fashion (except using one tile wide access) and room designation fashion (only update the pathing map when requested, don't update with every changes in pathing) any squares they can reach (or any square that can reach the safe spot).  A separate designation can mark certain location as "Unsafe Zones", which will behave like a wall for the Safe Spot access check.  There will be a total of 2 zones: Safe, Unsafe
Safe Zones - Counts as inside by the "Dwarves Stay Inside" order
Unsafe Zones - Counts as outside, any point not reachable from a "Safe Spots"
I think this system could offer several advantage.
1. Using a few safe-spots (one in the meeting hall, for example), allow designation of any areas without having to designate a large map manually.
2. Using room-designation style update, where the pathing map is only updated when you tell it to the zones.  This should eliminate any computation required during peace time (until you choose to update it, then the game computes it once).
3. As raised by http://www.bay12games.com/forum/index.php?topic=20368.msg218884#msg218884.  The game can keep store a second accessibility map (one which is not updated at all unless requested to).  When the "Dwarf stay Inside" command is activated, the game's preliminary check will make the pathing check against the two map, and if one of them failed, not allow the dwarf to go there.  This could mean that civilian pathing could take somewhat twice as long during siege time(it having to check two maps initially). 
4. And order to "Dwarf Stay Inside" could also trigger any civilian dwarf (or dwarf that should stay inside) caught outside to path to one of the Safety Zone (or in Toady's job allocation system, the Safety Spot designate dwarfs with an Outside tag to come towards it, ignoring the Unsafe zone limitation until they reach the Safe Spot).

It would be nice if Toady could fix the entrance dance.  The above system will still cause a dance at the boundary.
Or maybe using the above to designate burrows... hm...
Logged
One of the toads decided to go for a swim in the moat - presumably because he could path through the moat to my dwarves. He is not charging in, just loitering in the moat.

The toad is having a nice relaxing swim.
The goblin mounted on his back, however, is drowning.

LegacyCWAL

  • Bay Watcher
    • View Profile
Re: Better sytem for "Dwarves Stay Inside" PLEASE!
« Reply #16 on: July 22, 2008, 03:05:37 pm »

Much of my opinion on the subject has already been stated in this thread, and I would love a better way of keeping my civilians from running to their doom over a XXPig Tail SockXX.  In the meantime though, I wanted to point out that there is another way to work around the entrance dance by actually taking advantage of it.

If you dig a skylight a good ways from your "real" entrance - and thus well away from the battle zone - the dwarves will hit that and do the entrance dance there, instead of where they're in the line of fire.

To illustrate (crudely):

<-FortFortFortFort |skylight| HallHallHallHallHallHallHall |                        | Killing zone
<-FortFortFortFort |skylight| HallHallHallHallHallHallHall | entry chokepoint | Killing zone
<-FortFortFortFort |skylight| HallHallHallHallHallHallHall |                        | Killing zone

The idiot corpse-looters will come out of the fort, hit the skylight, and turn around at the start of a nice, long, trap-filled, still-underground hallway, as opposed to waiting until they're in a gobbo crossfire before turning around.  You can even put your trade depot behind the skylight so that they can keep loading/unloading if a siege comes while a caravan is parked there.

Of course, it requires planning in advance and/or an unscheduled, potentially multi-Z-level ceiling-removal, but hey, it works.
« Last Edit: July 22, 2008, 03:09:47 pm by LegacyCWAL »
Logged
HIDE THE WOMEN AND DROWN THE CHILDREN, THE BARON HAS ARRIVED.
Pages: 1 [2]