Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Search and destroy  (Read 1145 times)

Hyndis

  • Bay Watcher
    • View Profile
Search and destroy
« on: February 20, 2009, 10:55:00 pm »

Currently there are two settings for military squads; stay close to station and chase enemies.

What if there were a third option? Something that would turn a soldier basically into a hunter, or at least the same kind of behavior, chasing enemies all over the map, and getting aggro on the enemy the instant it steps on to the map?

This offers intriguing possibilities for soldier-based defense on open maps, where you cannot rely on choke points to defend, or if there is very hostile and dangerous wildlife that frequently visits the map, and hunters just aren't up to the task. Continually invaded by hordes of zombie elephants? Set all of your soldiers on search and destroy, and they'll seek out these extra-evil elephants and deal with the matter. Hopefully. Or there could be horrific carnage over bloody socks.


And by adjusting hostile or neutral to wildlife, dwarves could function very similarly to hunters, or they could ignore the wildlife and only chase down things such as goblins or dragons.

The upside to this is that it would allow a more hands-off approach to fortress defense, particularly for open fortresses that don't rely on Choke Points of Doom(tm) as the entrance, and the soldiers will more aggressive take to the field to do their thing.

The downside is that soldiers would scatter in all directions to hunt down goblins, as goblins appear all over the map. However, this could also be an upside, as right now multi-legendary dwarves are nigh-unstoppable killing machines. Sending them out, possibly alone against an entire squad, would mean you're at risk of casualties. However, that just makes combat more interesting!

Another upside would potentially be the ease of adding this feature in. The code for hunter behavior is already in the game, so extending the hunting behavior and making it work for invaders and/or wildlife seems like it would be a simply enough task. Or at least, simpler than having to write an entirely new thing.
Logged

Tormy

  • Bay Watcher
  • I shall not pass?
    • View Profile
Re: Search and destroy
« Reply #1 on: February 21, 2009, 07:32:06 am »

Sounds interesting, but do you realize that a military command like this would mean: lot of dead dwarven soldiers probably?  ;D
However now that I think about it...perhaps once the morale of the enemy army is broken, and they begin to run away/flee...a command like this would be nice to have.  :)
« Last Edit: February 21, 2009, 07:33:41 am by Tormy »
Logged

Chthonic

  • Bay Watcher
  • Whispers subterrene.
    • View Profile
Re: Search and destroy
« Reply #2 on: February 21, 2009, 08:32:37 am »

I had a fortress once where something like this happened . . . I'd abandoned and reclaimed a couple of times on the site, and the hunters from each of the previous incarnations of the fortress, instead of sitting around all catatonic-like, kept hunting.  They were stealthed so I couldn't see them most of the time, but every now and then a random deer or mountain goat would meet a grisly end.  Same rule went for invaders . . . who didn't last long because these autonomous special forces ranger SEAL dwarves kept gaining experience as they slaughtered indiscriminately.
Logged

DennyTom

  • Bay Watcher
  • !!Urist!!
    • View Profile
Re: Search and destroy
« Reply #3 on: February 21, 2009, 08:44:30 am »

You can do this now - set your squad to chase enemies and harass wild animals and set it's patrol route all around the map.

Now your squad will follow that route and kill everything they find except friends.

Only disadvantage is that on bigger maps that patrol route will be long as hell. Dividing map in several sectors, one sector for one squad will do the job. I would only recommend building barracks, dining room and food store for each squad near their sector and connect them with underground supply routes.
Logged
It is so much easier to measure life in experience points...

Hyndis

  • Bay Watcher
    • View Profile
Re: Search and destroy
« Reply #4 on: February 21, 2009, 01:37:49 pm »

Sounds interesting, but do you realize that a military command like this would mean: lot of dead dwarven soldiers probably?  ;D
However now that I think about it...perhaps once the morale of the enemy army is broken, and they begin to run away/flee...a command like this would be nice to have.  :)

Pfft. You say that like carnage is a bad thing.

Also, morale is already in the game. If your dwarves are heavily outnumbered and only one or two die, they can flee. Having more dwarves so they're not outnumbered as much reduces the chance this will happen, both that you will have the casualties in the first place and that the rest will flee. After all, losing 1 out of 5 dwarves is a 20% loss rate, which tends to cause panic. Losing 1 out of 20 is a 5% loss.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: Search and destroy
« Reply #5 on: February 21, 2009, 01:40:05 pm »

You can do this now - set your squad to chase enemies and harass wild animals and set it's patrol route all around the map.

Now your squad will follow that route and kill everything they find except friends.

Only disadvantage is that on bigger maps that patrol route will be long as hell. Dividing map in several sectors, one sector for one squad will do the job. I would only recommend building barracks, dining room and food store for each squad near their sector and connect them with underground supply routes.

Ehh, thats kind of clunky though. The hunter AI is pretty decent, particularly on smaller maps. Try embarking on a 2x2 map with a bunch of dwarves trained as wrestlers an ambushers, then recruit them all as hunters. Also embark with some cheap weapons and armor for them to use. Notice the behavior on this, where they will very actively and aggressively clear the map of any non-dwarf. And consider what the results would be if these weren't groundhogs they were hunting, but goblins.
Logged

Pilsu

  • Bay Watcher
    • View Profile
Re: Search and destroy
« Reply #6 on: February 22, 2009, 04:10:00 am »

You'd need psychic abilities to find invaders that efficiently. Hunters already cheat
Logged

LegoLord

  • Bay Watcher
  • Can you see it now?
    • View Profile
Re: Search and destroy
« Reply #7 on: February 22, 2009, 04:47:58 pm »

He didn't say they would automatically find the goblins; that would be as you say, pilsu, but it is obviously not how things will always work with hunters, and then the OP's idea will work nicely.
Logged
"Oh look there is a dragon my clothes might burn let me take them off and only wear steel plate."
And this is how tinned food was invented.
Alternately: The Brick Testament. It's a really fun look at what the bible would look like if interpreted literally. With Legos.
Just so I remember

Footkerchief

  • Bay Watcher
  • The Juffo-Wup is strong in this place.
    • View Profile
Re: Search and destroy
« Reply #8 on: February 22, 2009, 05:07:41 pm »

He didn't say they would automatically find the goblins; that would be as you say, pilsu, but it is obviously not how things will always work with hunters, and then the OP's idea will work nicely.

The feasibility of longer-range "aggro" targeting isn't really that certain though.  I think floodfills are currently used for that, and the CPU cost could rise with the square or even cube of the aggro range, depending on the terrain and attacker's movement ability.

Possibly you could do something a little more direct like periodically give all hostile creatures in a map component a chance of "noticing" each other, decreasing with the straight-line distance between them.  LOS-based targeting would be ideal, of course.
Logged

Hyndis

  • Bay Watcher
    • View Profile
Re: Search and destroy
« Reply #9 on: February 22, 2009, 06:05:17 pm »

I was thinking just recycling the hunter AI would be enough. Hunters already only attack critters that are visible. If there isn't anything attackable that is visible and accessible, the hunter just moves to your meeting zone and works on his social skills.

No need to make it overly complicated, with detection checks and whatnot, the regular hunter AI (though slightly modified so that the soldiers will seek goblins in addition to wildlife, assuming they're set to attack wildlife).

Its also not cheating as when there is a goblin attack, megabeast, or a zombie groundhog, they're already instantly visible to the player. This just removes the bit of micromanagement required to send squads to chase them down, trading the need to micromanage for a higher risk to the welfare of your soldiers. Due to the random nature of things, it could be quite possible for a single dwarf to face multiple goblin squads on his own.

But this might also help with military turnover. Currently once you've got a triple-legendary dwarf he's pretty much invincible. This would make them work for their champion status.  ;D
Logged