Bay 12 Games Forum

Please login or register.

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

Author Topic: Kobold baiting  (Read 2063 times)

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Kobold baiting
« on: October 05, 2018, 01:46:55 pm »

Recently I had to bait me some kobold, so took the opportunity and made some research.
I knew that kobolds look for the most expensive item to steal when they enter the map, so made a dfhack script to help locate such items and prepare baits (http://www.bay12forums.com/smf/index.php?topic=172291.0). It turned out that kobolds are more honourable than most thieves, and also more picky customers than anticipated.

Typically when kobold enters a map, it paths to the tile with most expensive available (what is available - see below) item. When it enters such tile undetected, it takes the most expensive item on it and paths to the edge of the map, trying to escape. If there are no such items (because they are relocated, destroyed, or made unavailable in another way) it redirects to the next one. Kobold also redirects when it faces an obstacle which wasn't there when it entered the map. If kobold is detected, it typically runs away and leaves the map, fighting only when necessary. The same kobold or a group of kobolds can try to steal items years after years. For example my fortress was regularly raided by a pair of thieves, a father and daughter. After the father was killed by one visitor, the daughter is the one conducting raids, usually every year or so. Returning kobolds increase stats, particularly sneaking.

The path to the item must be "pathable", i.e. possible to traverse on foot, without climbing and jumping, and surprisingly without a locked door. Kobolds respect boundaries and do not path to items behind locked doors, and if they bump into locked doors (because it was locked after the path was chosen), they will redirect to the tile with other available item. They do it despite ability do open locked doors - when they have no choice they pick open doors, but this happens usually when escaping.

The item chosen is the most expensive on map, given the path to it is clear, except if it:
  • belongs to category not stolen by kobolds (see below)
  • is in the inventory of a person
  • is built into a building (including being displayed on pedestal, or loaded into a trap)
  • is in a job (kobolds don't steal items with the "in_job" flag, such items cyan TSK marker usually), even if no dwarf is assigned to it


Kobolds can steal items on ground, in inventory of a container (like minecart), in a building (usually a workshop when no stockpile is available). Kobold don't care if the item is forbidden or belongs to other civ (it is forbidden to YOUR dwarves, after all). If the tile or container has more than one item, kobolds steal only the most expensive one available to them and leave others be.

Some categories of items are not taken by kobolds. I suppose it may be due to their big mass, except food (which either isn't interesting to them, or they count the value of a single roast, not the whole stack). I have checked only several, most expensive categories, so they are not definite.

Kobolds steal:
finished goods (like rings, amulets and even unbuilt stationary instruments), armour, weapons, trap components, clothing, cloth (adamantine if you have it) and many other items.

Kobolds don't steal:
furniture (doors, floodgates, thrones, tables), mechanisms, food (roast stack) and possibly other items.

Additional observations:
  • kobolds can be detected by people and animals, but this is chance based. The same kobold can be detected 20 tiles away from a dog, and on other occassion can sneak successfully 2 tiles away from the same dog, and 2 tiles away from the cat on the other side of the entry. Usually they are detected a bit closer than 20 tiles.
  • kobolds are in peace with all civs formally, but it doesn't prevent them from being lethally pursued by dwarves or goblins. This is dangerous for them, because they often arrive at the same time as the goblin siege.
  • whether the kobolds (or goblins) arrive is decided in the beginning of each season. If they weren't visiting for a while, there is a good chance they will visit. It's hard to say what is the chance exactly, but you can exploit savescumming if you want, by saving shortly before the season ends (several hours is enough). From my observations the chance for a kobold visit (assuming the last one was long ago) is somewhere between 25-50% in the season, and chance for the goblin visit (which also can be savescummed to occur) is about one order of magnitude smaller. Maybe not as much as 10 times smaller, but close enough to see the difference. Goblins can come a couple of days or hours earlier or later (probably because they can come from different places), while kobolds usually come at the same time (for example in the late afternoon of the second day of the season, probably because they come from the same camp).


To sum it up, the most surprising seems kobolds' reluctance (inability?) to steal from locked rooms, and from pedestals, which is contrary to what real-life thieves do. Also they eschew furniture, which real thieves are quite interested in, though this can be by explained by lack of trucks (furniture is really heavy and slows down movement). Additionally, kobolds like true gentlemen won't steal items which are needed to do a job.

So if you want to protect your precious from skulking vermin, put it in a museum or lock it behind a door!
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Kobold baiting
« Reply #1 on: October 06, 2018, 02:03:54 am »

Now I wonder...

Since they are able to steal from a minecart, but are trap-avoid, this might be a way to get them trapped.

EG, a mine cart is loaded with worthless but heavy stone, just under the threshold to trip the pressure plate it is parked on. You place the "bait" into the minecart, which trips the plate,  The plate controls doors into the room, holding them open, and allowing the path to be clear. (we can use redundant floodgates instead of doors, to prevent door unlocking in the escape phase.)

Once kobold takes the item from the minecart, the cart is then no longer heavy enough to depress the plate, and the doors slam shut a few ticks later (before kobold can escape the room)

It should be possible to trap undetected kobolds this way, and do it reliably.
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Kobold baiting
« Reply #2 on: October 06, 2018, 03:38:15 am »

The door slam shuts 100 ticks later. It might be better idea set plate to trigger on minecart once the item is removed; then it should trigger a hatch/cavein/etc. immediately. Ex, like this:

z1:
 . . .
˘C . ← Track/Minecart with goods/Pressure plate set to lowest-weight minecarts linked to hatch and support below.
 . . .

z0:
^^^
^S^ ←support surrounded by cage traps
^^^

On another note, I figured they would just steal the whole minecart, so Saiko Kila's research is welcome.
« Last Edit: October 06, 2018, 03:39:57 am by Fleeting Frames »
Logged

wierd

  • Bay Watcher
  • I like to eat small children.
    • View Profile
Re: Kobold baiting
« Reply #3 on: October 06, 2018, 03:43:21 am »

The idea that a 1z fall is non-fatal, and that trap-avoid is disabled when STUN is in effect?
Logged

Fleeting Frames

  • Bay Watcher
  • Spooky cart at distance
    • View Profile
Re: Kobold baiting
« Reply #4 on: October 06, 2018, 03:45:28 am »

Yup (you'd likely want them in cage trap and a notification anyway). It's just lever and bridge replaced with track/plate/cart/goods and hatch in Dorf_of_the_Fortress' gremlin trap.

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Kobold baiting
« Reply #5 on: October 06, 2018, 04:14:41 am »

I thought they would steal the minecart (like giant keas usually do), but apparently kobolds use different rules for stealing. This is probably because kobolds don't really have stealing traits as a species - it's their civ (entity) thing which compels them to perform criminal acts. Also, if the reason they don't steal some items is their inherent size or mass, minecarts are rather heavy. Average empty wooden minecart weighs more than the heaviest copper armour piece.

Also, I would try to catch kobolds using caveins and cage traps. This can be combined with the "hidden bars trap" (pity they don't steal from museum, would be more climatic). For example the minecart trap causes the room to be cut off ("hidden bars" part), trapping the kobold, while you then manually trigger the cavein+cage trap combo. This could be better for safety of dwarven workers, maybe.

One problem is that stolen items tend to be light (adamantine armour or weapons, artefactic jewellery), which requires more precision for selecting ballast for the minecart.

Logged

Sver

  • Bay Watcher
  • An army marches on its oiling and waxing
    • View Profile
Re: Kobold baiting
« Reply #6 on: October 06, 2018, 07:23:08 am »

The idea that a 1z fall is non-fatal, and that trap-avoid is disabled when STUN is in effect?

STUN is not enough, I recall. Trap-avoid is certainly disabled when the creature is paralyzed (with webs or otherwise) or unconscious though.
Logged
DF Combat Reworked
No overpowered force transfer, no easy life without a kidney, more functional variety among the weapons and other improvements.

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Kobold baiting
« Reply #7 on: October 06, 2018, 09:29:48 am »

I went for the simple solution - cave-in trap, activated by the pressure plate. It was success, the kobold was caught in the cage during first attempt, and even wasn't injured. My simple setup was made on surface, on flat area, and good, because the cage with the kobold travelled a nice distance after it was caught (4 tiles), propelled by shockwave, similarly the minecart. If the cage hit the obstacle, chance is the kobold would be injured or released.

The experimental setup was as follows (top view):

 TTTTT
2TTT1T#
 TT*T#S
 TTTTT#
 TTTTT
 
     3

T = cage traps
* = track, pressure plate (set to 750-800), minecart with bait
S = support linked to pressure plate, also has a floor tile built above
# = floor tiles Z-level above, I left the ground level empty (dirt)
1 = cage trap which caught the thief (it came from this direction according to my monitoring, probably was going to return the same way)
2 = place where the cage with the kobold landed finally
3 = place where the minecart landed finally

No sure how far the kobold runs before the shocwave hits it, I've built 23 trap cages. The pressure plate was set to trigger at 750-800. The minecart with all items was weighing 801, the bait item was about 3. Pressure plate was linked to the support with four tiles one z-level above, which were designed to make a "shockwave" or cloud.

When the kobold took the bait, there were two announcements:
Something has collapsed on the surface!
and a moment later:
There is a kobold hidden away here.
The cage was flying at the moment, obscured by the dust cloud, and finally stopped in place marked as "2". The minecart moved to "3".

And bait item (iron amulet)? Still in kobold's inventory, so it can be reused!
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Kobold baiting
« Reply #8 on: October 06, 2018, 10:15:04 am »

Cave-ins stun creatures not immune to stunning, and that's sufficient for trapping them in cages, which is what Gremlin traps are based on (a lever on a floor on a support. The Gremlin pulls the lever, which removes the support which causes it to fall onto traps one level further down surrounding the support). I've had Gremlin escape by (presumably) manage to move away from the floor before the cave-in (and not be flung down by the collapse), though. My latest design has a two tile floor collapse, rather than a single tile one.
Logged

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Kobold baiting
« Reply #9 on: October 08, 2018, 04:17:31 am »

Cave-ins stun creatures not immune to stunning, and that's sufficient for trapping them in cages, which is what Gremlin traps are based on (a lever on a floor on a support. The Gremlin pulls the lever, which removes the support which causes it to fall onto traps one level further down surrounding the support). I've had Gremlin escape by (presumably) manage to move away from the floor before the cave-in (and not be flung down by the collapse), though. My latest design has a two tile floor collapse, rather than a single tile one.

Maybe it's one of the cases where activation of effector (support) depends on the order of building, with one tick difference, which could be enough to make the critter move away. In case of my kobold, there were two sparring messages before the first announcement (about something collapsing) and the second one (the kobold hidden away), and all were in a block of sparring messages (so many messages in a short time).

I run the experiment again, and this time kobold came from the west, and the cage and minecart were thrown differently. Here it is, the number is the tick number:


1 kobold enters the baiting tile (from the west this time, opposite the support)
2 kobold steals the bait, support disappear, floors left hanging
3 hanging floors collapse (disappear, replaced by blocks), clouds created, collapse announcement
4 clouds spread, kobold still in the baiting tile
.
7 cloud spread, kobold still in the baiting tile, not yet engulfed by cloud
8 cloud spread to the baiting tile and the kobold
9 kobold unaffected yet, blocks (from ex-floors) fall to the ground, but still in motion
.
12 kobold moves east (towards the original support), is caught in the cage, its unconscious counter rises to 455 (from zero), cage not moving yet, minecart becomes airborne and is in the same tile as the kobold, kobold hidden away announcement
13 kobold unconsciousness falls to 454 (will be falling every tick from now on), both cage and minecart moved two tiles south and one tile west from the previous tick
14 cage and minecart still in the same tile as in previous tick, some blocks (from tiles) move away from the "point of impact"
.
17 one block thrown backo into air, the same position as it was in the beginning
18 cage and minecart moved one tile west
19
20 cage and minecart move one tile east (the same as they were in ticks 13-17)
21
22 cage and minecart move one tile east and two tiles north (the same as they were in tick 12)
.
26 cage and minecart move one tile south and two tiles west (they weren't here yet)
27 cage and minecart move one tile south and one tile east (third time here)
28 cage and minecart move one tile south
.
31 cage and minecart move one tile east
32 cage and minecart move one tile east
33 cage and minecart move two tiles north
.
39 cage and minecart move one tile north
40 cage and minecart move one tile west (starting position, as in tick 12)
.
44 cage and minecart move one tile east (as in tick 39)
45
46 cage and minecart move one tile west and one tile north
.
49 cage and minecart move one tile east, and this is their final position
50+ the blocks also came to the rest, and the cloud has later dissipated

Additionally, the clouds in tick 3 are created both under the falling floors (ground level) and in their places (in the air). Clouds were composed of yellow sand (on the ground, probably because the soil is yellow sand) and black sand in air (and one tile doubled by yellow sand cloud, possibly thrown from below). This black sand cloud is interesting, because there is no black sand on the map.

Overall, the kobold was for quite a ride, like in a roller-coaster. I suppose the clouds of dust throw the items around.
Logged

PatrikLundell

  • Bay Watcher
    • View Profile
Re: Kobold baiting
« Reply #10 on: October 08, 2018, 04:36:18 am »

Unless you go through a lot of extra effort, there is only one order in which to build the Gremlin trap central parts: support, floor on top of the support, lever on top of the floor, and finally link lever to support, but it might well be that this creates a one tick delay.

I would suggest the black sand in your (impressively detailed) examination might come from the air biome.
Logged

Shard1697

  • Escaped Lunatic
    • View Profile
Re: Kobold baiting
« Reply #11 on: October 08, 2018, 07:55:27 pm »

I'm surprised that kobolds don't steal food.
Logged

Dozebôm Lolumzalěs

  • Bay Watcher
  • what even is truth
    • View Profile
    • test
Re: Kobold baiting
« Reply #12 on: October 08, 2018, 10:54:32 pm »

I'm pretty sure that it was only said that they don't steal roasts.
Logged
Quote from: King James Programming
...Simplification leaves us with the black extra-cosmic gulfs it throws open before our frenzied eyes...
Quote from: Salvané Descocrates
The only difference between me and a fool is that I know that I know only that I think, therefore I am.
Sigtext!

Saiko Kila

  • Bay Watcher
  • Dwarven alchemist
    • View Profile
Re: Kobold baiting
« Reply #13 on: October 09, 2018, 03:08:29 am »

Unless you go through a lot of extra effort, there is only one order in which to build the Gremlin trap central parts: support, floor on top of the support, lever on top of the floor, and finally link lever to support, but it might well be that this creates a one tick delay.

I haven't seen a gremlin for ages, so don't remember how fast they are, but now I think there are two other possible mechanisms for their escape:
1. They can grasp, so it is possible they grabbed the ledge instead of falling down. It sometimes happens with invaders and other critters. But I don't know if they would be able to pull themselves up and climb out before being stunned by the cloud. Maybe the cloud wasn't there yet, because it was blocked by the floors.
2. They could be thrown out by the explosion. It could be combined with the first point - if they grasped they ledge, they would not fall immediately, but they cloud would both stun and throw them afterwards.  But the grasping is not needed. The expanding cloud is much faster than the falling objects.

I would suggest the black sand in your (impressively detailed) examination might come from the air biome.

This sand is random or what-would-be if the soil wasn't eroded? I tried cave-ins in ocean, mountain and glacier biomes, and it seems that if there is no soil, the dust cloud created in the air is composed of some (random?) soil anyway. And if there is soil on the map, it can be both this map soil and something other, possibly random. Plus snow in case of glacier, and sometimes stone dust, but only on the tile below the "impactor" tile. I haven't experimented too much, but apparently it is not possible to create cave-ins without dust.

I'm surprised that kobolds don't steal food.

I was surprised until I checked that they don't have stealing tags in their definition. Kobolds as a species are not thieves - their civilisation, meagre how it is, is thieving. Additionally kobolds are bone eaters, which means they can eat skeletons for food, and generally are carnivores - they don't eat other things. Since they don't need food, and don't want food, they probably won't steal it either. I checked only roasts for sure, because other food items are too cheap, and kobolds always prefer more expensive items.
Logged

Dozebôm Lolumzalěs

  • Bay Watcher
  • what even is truth
    • View Profile
    • test
Re: Kobold baiting
« Reply #14 on: October 09, 2018, 11:34:37 am »

Have you tried using tiletypes to place a dirt wall where you saw the sand cloud? If it's the same type, then that strongly indicates that it's the biome.
Logged
Quote from: King James Programming
...Simplification leaves us with the black extra-cosmic gulfs it throws open before our frenzied eyes...
Quote from: Salvané Descocrates
The only difference between me and a fool is that I know that I know only that I think, therefore I am.
Sigtext!
Pages: [1] 2