Bay 12 Games Forum
Dwarf Fortress => DF Modding => Utilities and 3rd Party Applications => Topic started by: utunnels on May 29, 2015, 10:34:43 pm
-
What am I trying to do is checking whether some dangerous creatures have entered a certain area(burrow or the entire map), and sound the alarm if there's any.
The announcement should be like a standard ambush message. For example, a giant olm has entered your dining hall! The game should pause and zoom to the position of the giant olm.
Is it possible? I know there's a lua api which checks if a point is inside a certin burrow. But it has to be checked frequently, and ignore the same creature within a certain period of time (i.e., if the giant olm stays in your dining hall, you don't want to be spammed by the message).
-
It's definitely possible, although obtaining a list of dangerous creatures would be somewhat difficult and the checks could be noticeably slow if done in a script instead of a plugin.
-
Ignoring all other practical problems, would a simple check for a [LARGE_PREDATOR] tag or maybe even a BODYSIZE threshold be too much overhead? I'm sure anyone would choke on his pretzels seeing an agitated bison tromping around the living room.