Smart vs Stupid Zombies

Started by Phobos, October 19, 2014, 05:12:04 AM

Previous topic - Next topic
To make zombies smarter you can change the UnitType value in the ODF to "Trooper" or "pilot". This will make them strafe shots at close range and they are harder to shoot in the head with high move speeds.

To make zombies more stupid and charge at the player without trying to dodge shots change the UnitType to "assault". When combined with slower move speeds this resembles the classic zombie more but they are much easier to kill. I haven't tested the other unit types such as "support" yet.

This works for any AI not just zombies btw and is most noticeable on Hard difficulty.

That's quite interesting. I'm guessing 'support' will make them more hesitant and docile.

May 15, 2015, 09:55:22 AM #2 Last Edit: July 25, 2015, 07:31:23 AM by Phobos
From http://www.swbfgamers.com/index.php?topic=4594

Quote from: tirpider on May 25, 2012, 12:25:28 PM
I grepped through the odf's for BF1 and 2 for "UnitType" and made this list:

//possible unit types:
//"assault" or "Assault"
//"pilot"
//"repair"
//"scout" or "Scout"
//"support"
//"trooper" or "Trooper"
UnitType = "assault"

I don't know if case affects it or not, so I included the variations.
They certainly affect the behavior of the unit, but I imagine the SetTeamAggressiveness setting will have more of an impact on how reckless they are.

-edit
I grepped through the lua files for SetTeamAggressiveness.
The lowest value I saw was 0.7
The Highest was 1.0  (most common one as well.)

UnitType Information
- Assault classlabel will tell AI to place landmines (if they have that weapon) on the Mine hintnodes for maps placed in ZeroEditor. It also makes the AI more 'stupid' and they will not strafe sideways when being aimed at by enemies.
- Pilot is like Trooper, the AI will be most aggressive and use tactics such as strafing. In addition this unit type can also heal vehicles automatically.
- Repair has not been tested yet.
- Scout is almost as aggressive as Pilot/Trooper, but will play more defensively and retreat sometimes more often. They utilize Sniper hintnodes placed in ZE and will sometimes go prone in certain areas. They also strafe to dodge enemy shots.
- Support has not been tested yet.
- Trooper is the most aggressive unit type which will use strafing tactics to dodge enemy shots.

Also to maximize zombie aggression, use these LUA
SetDenseEnvironment("false")
SetTeamAggressiveness(IMP, 1.0) -- zombie faction

Quote from: Snake on May 25, 2012, 01:39:53 PM
I have already set all of them to assault which is what was in the Luke .odf but they still run away from grenades and still act too nonchalant. Maybe I can increase their speed slightly to make it harder.. Still, I wish there was a way to take away their "grenade sense".
this would be nice, they retreat from melee sometimes too.

Edit
SetHistorical()
SetPlayerTeamDifficultyHard(2)
SetEnemyTeamDifficultyHard (6)

It's possible adding this to a mission LUA will increase the difficulty of enemy faction defined by the missionlist.

John Northan - Lead Programmer
Quote
Welcome to my developer diary. My name is John Northan and I'm a programmer on Star Wars Battlefront at Pandemic Studios, specializing in game Artificial Intelligence. My plan is to give you an insight into several challenging technical issues that we've worked on whilst developing Battlefront: creating a massive battlefield sensation, encouraging emergent AI environment interaction, and developing distinct soldier behaviors, such as assault, scout and repair.
One of the great sensations to come from watching the Star Wars movies are the massive battle sequences. We want the player to feel like they are in the midst of those battles, such as down on the surface of Hoth running amongst giant AT-ATs or taking a defensive position in the snow trenches. To achieve this, we need to simulate great numbers of soldiers, ground-based vehicles, and flyers. In Battlefront's single player experience, the majority of these entities need to be controlled by AI. The AI for each entity is calculated at several different layers. At the highest level, the strategic AI, examples of the types of critical decisions that need to be made are: which command post to attack, which enemy to engage, which weapon is most appropriate, and whether to interrupt a current action because a thrown grenade has just been spotted. At the lower levels, the controller AI, examples of the types of immediate decisions that need to be made are: how fast and in what direction to move, where to aim a weapon in order to hit a moving target, and whether to alter course in order to avoid a collision.
The technical difficulty in juggling all this strategic and control AI for a large number of soldiers and vehicles is that it must all be achieved with low CPU usage. For example, in Battlefront, we allow the AI about five to ten percent of CPU time. One of our solutions was to realize that high-level strategic decisions could be made much less frequently than the lower level controls. Decisions, therefore, are made at differing time intervals, dependent upon their urgency. For example, when a soldier is running through a battlefield, he needs only to evaluate which command post to attack every few seconds, whereas he needs to make weapon aiming decisions continuously.
One of the leading-edge AI techniques in use in games at the moment is for characters to react to the environment intelligently. Examples of this are soldiers in combat seeking cover behind barriers or snipers hiding out on rooftops. This emergent behavior is achieved in Battlefront by the placement of hint nodes within the world. We have a variety of hint nodes that our Level Designers can populate the word with, such as "cover" nodes to designate strategic positions to fire on the enemy from, "snipe" hints for concealed, long-range firing positions, and "minefield" hints for areas where mines could be laid. It is the emergent use of these hints that can give an AI-controlled soldier the appearance of intelligent environment use.
We have put much time during the development of Battlefront into distinct soldier behaviors. When running through a battlefield, it is possible to notice each behavior: there will be trooper soldiers directly engaging the enemy, sniper soldiers staying hidden at the periphery of the battle, assault soldiers attempting to outflank and destroy enemy vehicles, and repair soldiers busy healing the wounded. The trooper soldiers have the most variety of behavior. Upon spotting an enemy, they will select a method of attack, based upon factors such as weapon availability and enemy mobility. For example, a trooper soldier armed with just a pistol will try to get up close to a target, dodging and weaving, whereas a trooper armed with a long-range rifle will go prone, reducing the potential for shot error. Troopers will use cover hints to use natural environmental barriers to hide from the enemy. If a cover position is compromised the soldier will run for another barrier from which to take cover.
Sniper soldiers tend to avoid direct combat. They prefer to look for strategic snipe positions, from which they can pick off enemy soldiers with a precise, long-range rifle. If their snipe position is discovered, they will pull out a pistol and make a fighting retreat. Assault soldiers seek out enemy vehicles. At long range, they will go prone and fire a low-error shot at their target. If the vehicle approaches they will attempt to outflank, heading to the backside of the vehicle, where it tends to be most vulnerable. Repair soldiers will follow other soldiers into battle, re-supplying them with ammo, and healing them if injured. Of course, if fired upon, they will interrupt their healing behavior and immediately engage in combat.
That's the quick and comprehensive look into the world of Infantry-based AI! We've also developed many other behaviors and stylized nodes to handle such things as the many, many different types of vehicles or emplacements that can be used! It would be silly to describe all of our secrets, though, wouldn't it!
Keep a look out for these soldier behaviors and more whilst you're mowing them all down in the Battlefront!