Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Dorfs getting scared when there's no immediate threat  (Read 917 times)

Ez

  • Escaped Lunatic
    • View Profile
Dorfs getting scared when there's no immediate threat
« on: June 22, 2010, 08:59:03 am »

Not sure if this has been discussed before, I haven't found any topics about it. So anyway:

Dorfs get scared every time they see a hostile creature, unfortunately this also means they get scared even if said hostile creature can't possibly harm them due to being on the other side of a chasm (non-flying) or a river (living, non-swimmer).

Would it be possible to make the dorfs only get scared by creatures that have a clear path to them? It's really annoying to be unable to build a bridge over a chasm only because the workers are afraid of trolls 12 levels below them with no possible way up.
Logged

Foehamster

  • Bay Watcher
  • Zig Frostrushes The Speachless Eater of Saints
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #1 on: June 22, 2010, 12:13:20 pm »

Currently the workaround is to station marksdwarves. I don't mind dwarves being a bit skittish, but there should be more limits than just line-of-sight.
Logged

culwin

  • Bay Watcher
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #2 on: June 23, 2010, 12:11:35 am »

I think it would be tough to program automatically.
I mean, imagine a colossus on the the other side of a wall where it CAN get to the dwarf.
It might not get him immediately (because it's busy smashing a goat or whatever), but it can and will eventually.
There would be a lot of pathfinding calculations.
An easier solution would be the ability to set a "prisoner" label on a creature, or maybe a "no fear" label, which would cause your dwarfs to not be afraid of it (and maybe not attack it either).
Then it would be the player's responsibility for the dwarfs not being scared of the creature.
Great for keeping prisoners in pits in your fortress.
Logged

Ez

  • Escaped Lunatic
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #3 on: June 23, 2010, 06:02:24 am »

Or maybe it would just be easier to make it so only the dorf that's currently targeted by the hostile creature will run away.
Logged

Vester

  • Bay Watcher
  • [T_WORD:AWE-INSPIRING:bloonk]
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #4 on: June 23, 2010, 06:04:39 am »

But then the others will be just standing around while the other one runs for his bearded life!
Logged
Quote
"Land of song," said the warrior bard, "though all the world betray thee - one sword at least thy rights shall guard; one faithful harp shall praise thee."

Ez

  • Escaped Lunatic
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #5 on: June 23, 2010, 01:18:02 pm »

Hm, thinking about it now I guess that using military dorfs to dispose of the threat is probably much more fun than making dorfs fearless.

It doesn't fix the problem with pitted hostile creatures though. I want my pit of thousand gobos, damnit! :D
Logged

SlipshodDorf

  • Bay Watcher
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #6 on: June 23, 2010, 02:02:09 pm »

But then the others will be just standing around while the other one runs for his bearded life!

Or Urist will run out to grab that pig tail sock next to the collosus because he isn't the 'current' target, and once it kills that target, Urist is standing next to him to be crushed to death
Logged

Virex

  • Bay Watcher
  • Subjects interest attracted. Annalyses pending...
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #7 on: June 23, 2010, 06:36:06 pm »

Isn't that what's supposed to happen anyway?


I guess you could make it so that creatures that have been caught don't cause fear unless they actively attack someone. That would at least fix the pit issue.
Logged

Zangi

  • Bay Watcher
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #8 on: June 23, 2010, 06:50:00 pm »

Basically, how Evil Genius does it, but the opposite.
In Evil Genius, you have to tag specific people for mind-numbing, capture or death.

In DF, it would be nice to tag specific creatures as don't fear, don't kill, or whatever.  Even something along the lines of disarm, capture and provide minimal doctoring to prevent death if knocked out instead of finishing off.
Logged
All life begins with Nu and ends with Nu...  This is the truth! This is my belief! ... At least for now...
FMA/FMA:B Recommendation

Wyrm

  • Bay Watcher
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #9 on: June 23, 2010, 06:56:42 pm »

A connection map that is updated live ought to make such a calculation a piece of cake — well, the program would have an easier time of it. A connection map would tell you rather promptly whether a navigatible path exists between two points without having to go through pathfinding. Pathfinding, you see, emits a specific solution — it returns a path that can be followed to get from A to B, but that's not what's needed in this case. All we want is to know if there is a way to get from A to B, but we don't care what that way is. This is comparatively easier to accomplish if we have a connection map.

We already know that Toady maintains a primitive version of this. My version is one of a grander vision. This connection map keeps track of connection by movement type, and keeps track of mutable connections, such as doors and bridges, and updates continuously when they are opened and closed. With such a map, a program can quickly tell whether one spot is accessible to another: the program will know that it is able to move from one accessible region to another using various means of travel, without knowing the exact path across it.

As an analogy, we know we can get to California from Washington state by way of Oregon just by knowing that Oregon shares a border with both. I could not tell tell you the shortest path, but that is irrelevant to the problem at hand.
Logged

darkflagrance

  • Bay Watcher
  • Carry on, carry on
    • View Profile
Re: Dorfs getting scared when there's no immediate threat
« Reply #10 on: June 23, 2010, 07:17:51 pm »

As a corollary to this, what about creatures getting upset due to environmental circumstances. For example, elves might be scared of narrow, enclosed spaces, or humans might be afraid of the dark. Cats might cancel hunting near water, or dwarves might cancel jobs upon sight of the sunlit air for their own reasons (as part of cave adaptation).
Logged
...as if nothing really matters...
   
The Legend of Tholtig Cryptbrain: 8000 dead elves and a cyclops

Tired of going decades without goblin sieges? Try The Fortress Defense Mod