Zombies obsessed with barricades
Moderator: Forum Moderators
Zombies obsessed with barricades
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.
Here's the protagonist, with "zombie food" written all over his face...
and here's a picture of two turns later. Notice how they're not the slightest bit inclined to attack him.
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?
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.
Here's the protagonist, with "zombie food" written all over his face...
and here's a picture of two turns later. Notice how they're not the slightest bit inclined to attack him.
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?
- averyimaginativename
- Posts: 245
- Joined: August 21st, 2010, 12:40 pm
- Location: /dev/null
Re: Zombies obsessed with barricades
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.
On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.
Re: Zombies obsessed with barricades
Thanks a ton! But what's the default priority system for enemy AI?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
- Mountain_King
- Translator
- Posts: 569
- Joined: May 31st, 2010, 7:54 pm
Re: Zombies obsessed with barricades
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!!!!
Is cothabhálach an aistriúcháin Gaeilge mé.
EXTERMINATE!!!!
Re: Zombies obsessed with barricades
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?
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?
- averyimaginativename
- Posts: 245
- Joined: August 21st, 2010, 12:40 pm
- Location: /dev/null
Re: Zombies obsessed with barricades
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.
On an indefinite Wesbreak for health reasons - please only try to get my attention for UMC story images website issues.
Re: Zombies obsessed with barricades
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.