Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Non-Pet Passable doors dont work  (Read 2084 times)

Thorin Oakenshield

  • Bay Watcher
    • View Profile
Non-Pet Passable doors dont work
« on: November 22, 2009, 10:28:21 pm »

As it says...I set my doors to my meeting all as pet non passable...and it still gets flooded with my animal..how do I get around that?
Logged

quinnr

  • Bay Watcher
    • View Profile
Re: Non-Pet Passable doors dont work
« Reply #1 on: November 22, 2009, 10:34:08 pm »

I believe that when a Dwarf goes into a space, the door opens, allowing the animals to get in...I think. Maybe I'm wrong.
Logged
To exist or not exist, that is the query. For whether it is more optimal of the CPU to endure the viruses and spam of outragous fortune, or to something something something.

Pandarsenic

  • Bay Watcher
  • FABULOUS Gunslinger
    • View Profile
Re: Non-Pet Passable doors dont work
« Reply #2 on: November 22, 2009, 10:53:14 pm »

I believe that when a Dwarf goes into a space, the door opens, allowing the animals to get in...I think. Maybe I'm wrong.
No, you're right.
Logged
KARATE CHOP TO THE SOUL
Your bone is the best Pandar honey. The best.
YOUR BONE IS THE BEST PANDAR
[Cheeetar] Pandar doesn't have issues, he has style.
Fuck off, you fucking fucker-fuck :I

Hagadorn

  • Bay Watcher
  • [NO-GIFTS] [NAUGHTY]
    • View Profile
Re: Non-Pet Passable doors dont work
« Reply #3 on: November 22, 2009, 11:16:13 pm »

Yeh, Pets crowd around the door closest to their desired path.

I think its because doors don't stop things from pathing to where they wanna go. They just stop them.

I've found that multiple doors with a single space between them works... But you gotta un-pet block then to get the pets out...

Cages are the best way of dealing with massive amounts of animals.
Logged
You see, booze is a parasite. It lives off dwarves and compels them to dig into the ground so as to create massive defences to protect it's self. It really shouldn't be called dwarf fortress, Booze fortress would make much more sense.

zchris13

  • Bay Watcher
  • YOU SPIN ME RIGHT ROUND~
    • View Profile
Re: Non-Pet Passable doors dont work
« Reply #4 on: November 22, 2009, 11:59:41 pm »

That just slows them down, dude.
Logged
this sigtext was furiously out-of-date and has been jettisoned

Tallefred

  • Bay Watcher
    • View Profile
Re: Non-Pet Passable doors dont work
« Reply #5 on: November 23, 2009, 12:02:06 am »

Spikes are the best way of dealing with pets.
Logged
This is to make me recognizable.

Sphalerite

  • Bay Watcher
    • View Profile
    • Drew's Robots and stuff
Re: Non-Pet Passable doors dont work
« Reply #6 on: November 23, 2009, 09:49:14 am »

The problem with setting a door to be passable but tightly closed is that the pathfinding code treats it as an accessible space, so animals will attempt to path through it.  When they reach the door some special-purpose clause in the code prevents them from actually traveling through it, so they stand there at the door constantly trying to move through it and killing your FPS with constant pathfinding calls.  Then a dwarf comes through the door, and in the moment the door is open all the pets flood through.  So yes, setting doors non-pet-passable doesn't work well at the moment.
Logged
Any intelligent fool can make things bigger and more complex... It takes a touch of genius --- and a lot of courage to move in the opposite direction.

piesquared

  • Bay Watcher
    • View Profile
Re: Non-Pet Passable doors dont work
« Reply #7 on: November 23, 2009, 03:09:08 pm »

Pathfinding is one of the biggest memory hogs in DF. To deal with this, Toady used an algorithm that assumes that there *is* a path between from where an entity is to where they want to go. This makes things go a little faster... unless there is no path at all, when it's way, way slower.

So there's effectively a list somewhere that lists all the tiles that can be reached from the current tile, updated each time you do something that could change this fact. (It's not actually a list, but suffice to say that when you look at two tiles you can tell if there's a path between them without actually finding the path). There is only one such list: not a seperate one for dwarves and pets.

So a pet-impassible door between a pet and its destination doesn't change the fact that the pet thinks it can get there. So it tries to find a path, finds one, and starts walking. Eventually it hits the door, and can't open it. So it stops moving, and checks "is there a path between here and where I want to go." Again, there's only one list so the computer answers "yes" and tells the pet to go through the door. It tries, and again can't open the door. This continues until the pet decides to go somewhere else, or until the door opens. A "pet-impassible" door is basically a door that requires you to turn a handle, instead of a door that swings when you push it. A pet can't turn a handle, but if someone else (say, a dwarf) comes through and uses the door, the pet can follow through on their heels.

It should also be noted that pets don't obey the "traffic" specifications, though. So if you really want to trap animals you can make a "short" route with a pet-impassible door and a "restricted" designation and a "long" route with a "high traffic" designation (and possibly also pet-impassible for good measure). This would mean the pets would all cluster around the "short" door, but the dwarves would all use the "long" route so nobody would ever open it. You still lose processing power to pets constantly re-calculating their route, but it usually does pretty well at keeping pets trapped. (Pits with no door at all also work, but then dwarves can't get in either.)
Logged