Zombies obsessed with barricades

Discussion and development of scenarios and campaigns for the game.

Moderators: Forum Moderators, Developers

Post Reply
RaustBD
Posts: 262
Joined: May 29th, 2010, 8:11 pm

Zombies obsessed with barricades

Post by RaustBD »

UPDATE: After all the barricades were destroyed they still are barely interested in attacking the main character. What's going on?

Right, so, I've got a problem with my zombie apocalypse campaign, Zombie Plan.

The main character can only "recruit" barricades, which can't move, and are intended to keep zombies out of buildings temporarily.

However, I think i've accidentally triggered some fault in the game's AI, because the zombies simply cannot be bothered to attack anything BUT barricades.
sitting duck.png
sitting duck.png (244.18 KiB) Viewed 1707 times
Here's the protagonist, with "zombie food" written all over his face...
Ignore me.png
and here's a picture of two turns later. Notice how they're not the slightest bit inclined to attack him.
just not interested.png
just not interested.png (296.85 KiB) Viewed 1707 times
And the NEXT turn, note how there's no more room to attack the barricade, and yet the zombies haven't even so much as taken a single step towards me.


At first I thought that the barricades, with no evasion and normal defenses, simply represented a much better outcome for the "do the most damage possible on this turn" paradigm. So I fixed it by reducing them to 10 hp and buffing up their defenses so that they could only do 1 damage per hit. And I did that before doing this test, and it doesn't seem to have made a bit of difference. But it seems like it's a problem with the protagonist himself. Surely if the AI were trying to do the most damage possible, they'd at least TRY to attack me if there was no more room around the barricades.

Anybody have any insight into this problem?

User avatar
averyimaginativename
Posts: 245
Joined: August 21st, 2010, 12:40 pm
Location: /dev/null

Re: Zombies obsessed with barricades

Post by averyimaginativename »

Take a look at some of the targeting code in HttT, like this:

Code: Select all

#define HIGH_PRIORITY_TARGETS
    [target]
        id=[your unit here]
        value=100
    [/target]
#enddef
UMC Story Images web gallery

On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.

RaustBD
Posts: 262
Joined: May 29th, 2010, 8:11 pm

Re: Zombies obsessed with barricades

Post by RaustBD »

averyimaginativename wrote:Take a look at some of the targeting code in HttT, like this:

Code: Select all

#define HIGH_PRIORITY_TARGETS
    [target]
        id=[your unit here]
        value=100
    [/target]
#enddef
Thanks a ton! But what's the default priority system for enemy AI?

User avatar
Mountain_King
Translator
Posts: 569
Joined: May 31st, 2010, 7:54 pm

Re: Zombies obsessed with barricades

Post by Mountain_King »

Weak/weakened units. I would bet if your hero was missing a single hitpoint the zombies would go after him.
Projects: Ice Age Fun, Japhel's Journey (same link), Shameless Crossover Excuse (Maintainer), and Age of Dinosaurs!
Is cothabhálach an aistriúcháin Gaeilge mé.
EXTERMINATE!!!!

RaustBD
Posts: 262
Joined: May 29th, 2010, 8:11 pm

Re: Zombies obsessed with barricades

Post by RaustBD »

Okay wow, I just got an idea for a priority system that resembles classic zombie behavior.

I looked at the targeting AI, and it looks like, though I could be mistaken, I can make zombies suddenly become aggressive upon gaining proximity to a unit. That's great for my purposes, but it depends on one thing: can the ai be made to wander aimlessly if there are no units nearby?

User avatar
averyimaginativename
Posts: 245
Joined: August 21st, 2010, 12:40 pm
Location: /dev/null

Re: Zombies obsessed with barricades

Post by averyimaginativename »

Somebody better at WML might be able to offer something more elegant, but you could use a random number to generate movement goals along these lines.

Code: Select all

{RANDOM 1...10}
[if]
   [variable]
        name=random
        equals=n
   [/variable]
   [then]
      [goal]
           ...
      [goal]
   [/then]
[/if]
UMC Story Images web gallery

On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.

User avatar
melinath
Posts: 1298
Joined: May 20th, 2009, 7:42 am

Re: Zombies obsessed with barricades

Post by melinath »

In Brent I have a [wandering_monsters] template tag that achieves an effect like this. It probably goes a little too far - in its current state, the monsters will only attack if they happen to end up directly next to the main character. Also, I haven't touched that code recently, so YMMV.

Post Reply