1. Forum moved (you can use login and pass from old forum)
  2. Many discussions moved to the bugtracker

High Priority Task: Unit Behavior

Discussion in 'Data' started by Istrebitel, Apr 5, 2017.

FilmBoy84
Best Answer FilmBoy84, Oct 21, 2017
OK, doing some playtesting with Vanilla and BETA versions of Apocalypse i've found some interesting things. Agents on Normal or Safe behaviour... Go to Full Post
  1. Istrebitel

    Istrebitel Well-Known Member Official Developer Administrator
    64/112

    Joined:
    Aug 8, 2016
    Messages:
    189
    Likes Received:
    80
    Best Answers:
    1
    This is going to be most complicated task yet. So whoever does this will contribute a LOT towards making OpenApoc 1.0.

    We need to implement unit behavior. And for that we need to know how it works. Behavior is what units do automatically, like taking cover, strafing etc, based on their behavior setting (nice/neutral/angry face icon).

    Answering this would require study of how agents/aliens act based on their behavior settings, and writing a sort of small paper, describing what was observed: what kind of behavior is possible, and how frequently it happens / what triggers it. And probably then there would be more questions from me and requests to study it further to figure out the details.
     
    makus likes this.
  2. Best Answer:
    Post #2015 by FilmBoy84, Oct 21, 2017
    Alternative Answers:
    Post #2019 by FilmBoy84, Oct 23, 2017
    Post #2020 by FilmBoy84, Oct 23, 2017
  3. Yataka Shimaoka

    Yataka Shimaoka Well-Known Member Tester Translator/Writer
    18/28

    Joined:
    May 3, 2017
    Messages:
    48
    Likes Received:
    29
    Best Answers:
    0
    Well based on my gaming experience, I noticed that when a unit is set on the safest mod, it will move to cover, and when exposed to an enemy, they won't fire back. The normal mode unit is somehow a bit of a safe mod, they still move to cover but will moves out of it to fire back. The baddass mode is pretty much obedient, they won't move to cover when being fired upon and will shoot at the enemy relentlessly
     
    makus likes this.
  4. Istrebitel

    Istrebitel Well-Known Member Official Developer Administrator
    39/56

    Joined:
    Aug 8, 2016
    Messages:
    189
    Likes Received:
    80
    Best Answers:
    1
    Well yes, aggressive is basically "no AI", normal is "partial AI" and cautious is "full AI".
    In aggressive the only AI unit does is leaving hazards (if standing in fire/gas or hit with enzyme will run away).

    What we need to find is logic (either disassembled or figured out by studying the game) to implement for that AI. Like, how it chooses where to hide? How it chooses whether to hide or not? How often does it strafe out of cover to take potshots? Which position it chooses to strafe to? etc
     
  5. Yataka Shimaoka

    Yataka Shimaoka Well-Known Member Tester Translator/Writer
    18/28

    Joined:
    May 3, 2017
    Messages:
    48
    Likes Received:
    29
    Best Answers:
    0
    Uh, I believed that they move to the best possible cover in the area that can withstand strong weapon blows rather hiding behind a cover that gets destroyed easily, I guess.

    On a second test I made, it proved me wrong! So basically troops move to an area where their IS cover regardless of it's defence value
     
    Last edited: Jun 24, 2017
  6. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    Votes: 6
    OK, doing some playtesting with Vanilla and BETA versions of Apocalypse i've found some interesting things.

    Agents on Normal or Safe behaviour settings on Vanilla and BETA will:
    *Hide behind other agents that are kneeling and shoot over their heads
    *Agents placed at a corner to a corridor will move back and forth between hiding "in cover" and exposing themselves around the corner to shoot/view
    *Agents jump over 1-tile "gaps" in floors if it gets them to cover
    *Agents will jump down a maximum of 1 tile if it gets them away from fire to another floor or if injured to get them to a safer place
    *Agents will strafe back and forth whilst moving in and out of cover, even along a line of kneeling agents and shooting over their heads
    *Agents will run away from fire
    *Agents with a partially "stunned" value will run out of smoke to avoid being "gassed" further, this means that they can expose themselves to weapons fire but minimise the risk of falling unconscious
    *Agents with no "stunned" value will remain in smoke to utilise it as cover though often go prone or kneel if both stances are selected
    *Agents equipped with trackers (beta only) or scanners will "enhance" the behaviour of other agents in their squad (No effect on other squads). For example, agents in cover will respond to a blip by moving around corners to look down corridors or into rooms.
    *Agents raise weapons in readiness in response to alien cries
    *Agents raise weapons in readiness in response to nearby explosions, civilian screams and the sound of burning
    *Agents respond to alien cries as per the documentation i have given in the relevant thread


    Unique to BETA (Does all of the above plus these behaviours too):
    *Anthropods and Skeletoids will swarm together, attack in groups, then quickly retreat before agents have time to respond. I rarely encounter single units of these types in the Beta, if I do they are often trying to exit (see below) or looking for more Aliens to group up with.
    *Aliens will methodically move through through a map in groups of 2-5 until they find X-COM, they then retreat, CRY FOR HELP (which attracts other aliens of all types) and attack again this makes them hard to fight as you always face numbers of aliens and killing a few forces them to retreat and regroup. It's very "Cat and Mouse" and a joy to play for an experienced player but a nightmare for casual players who will find it too hard (Guess this is why such behaviour was removed)
    *If there are two or less Anthropods/Skeletoids on a map they will head towards the map exits and fall back to the cityscape, this doesn't end the mission as all other alien types remain until X-COM knocks them out or kills them, but it does allow the Aliens to keep foot soldiers in Mega-Primus for a longer time before they expire (as per the alien life cycle)
    *Cult of Sirius use EXCESSIVE amounts of incendiary weaponry spamming incendiary grenades and incendiary missiles of various types this is different to vanilla where they spam explosive weapons. The cult is a fearsome opponent as a result and their behaviour causes buildings to collapse as they burn around your agents; this often lags the game which may be why the CoS was changed to using Explosive weaponry? I wonder if BETA behaviour could be reintroduced now we have better CPUs (maybe as an option)
    *Aliens with disruptor weaponry will fire randomly in the direction they believe X-COM to be hiding (or have previously seen agents), other aliens using the covering fire of their colleagues will then attempt to flank agents and come in to kill from behind
    *Aliens SPAM brainsuckers; i've faced waves of the things from the first battle!
    *Aliens crouch, go prone and move around a lot more to use cover in a similar manner to the vanilla X-COM agents

    It appears from BETA play that the intent was to have a similar AI to X-COM for the aliens but it was drastically nerfed or removed in part by release to make play easier for newcomers to the game regardless of difficulty mode.

    I'll keep playtesting :)
     
    Last edited: Oct 21, 2017
    FilmBoy84, Oct 21, 2017 Best Answer
    #5
    Skin36 and makus like this.
  7. makus

    makus Designer, forum admin Administrator Designer/Artist
    64/112

    Joined:
    Sep 24, 2014
    Messages:
    216
    Likes Received:
    38
    Best Answers:
    2
    Yep that true its very correct n detailed observation about beta behavior ! GJ
     
    Last edited: Oct 22, 2017
  8. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    Votes: 3
    OK, back with some more Alien behaviour. This time with the Spitters.

    Vanilla and BETA will:
    *In Tactical Missions relating to Cityscape activity, spitters will wander around, when there are more than two **mobile** aliens on the map, trying to kill civilians (their main function it appears) and sniping at X-COM. If there are few aliens on the map, spitters will try to hide, often in obscure places of the map and in smoke until agents find them.
    *In UFO recovery, spitters will frequently hide in the upper levels of the UFO trying to avoid engaging X-COM and not really being utilised by the aliens. If they do travel to the lower decks or outside it is with Anthropods or Skeletoid allies. This behaviour seems bugged; spitters are sitting ducks in UFO missions and should be more active IMHO having the AI waste them by sitting in the upper levels makes no sense.


    Unique to BETA (Does all of the above plus these behaviours too):
    *As per the Vanilla release, in tactical missions relating to cityscape activity, spitters will retreat to obscure places of the map to hide when the number of aliens are low. However, if X-COM take more than a few minutes (in real-time) or around 10 turns (in TB) to find the spitters, they will retreat to an exit and use the cityscape to infect another building keeping the presence of aliens in the cityscape for longer. They may or may not travel to the same location as escaping Anthropods and Skeletoids so it is possible that missions in which X-COM does not clear the map will result in lots more alien incidents in the cityscape later, albeit with weaker alien numbers.
    *Spitters tend to group together en-masse (as the lore suggests that they can) and it is not uncommon to find five or more together
    *Aliens "tagged" with a tracker gun will try to escape from combat to the cityscape; it appears the intent was to allow for players to follow aliens around the city much in the same way we were meant to be able to follow the VIPs of organisations (for which the cells were created). However, the Spitter is NOT meant to be an intelligent creature, so this may be why in Vanilla they simply sit around in cover waiting to be found.
     
    makus likes this.
  9. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    Votes: 3
    And straight back in with a post on observed Brainsucker activity :Popcorn:

    Vanilla and BETA will:
    *Brainsuckers can appear on maps at the start of a mission without having hatched from a pod
    *Brainsuckers will run around the map until they find an X-COM agent, though they often "pause" and become inactive, this is likely a bug.
    *Brainsuckers will attempt to run and leap on to the first agent they encounter to brainsuck them


    Unique to BETA (Does all of the above plus these behaviours too):
    *Brainsuckers will form in groups and rush at X-COM agents in waves
    *Aliens armed with Brainsucker launchers will, if failing to find X-COM quickly, fire off all their pods, wait for them to hatch, then follow the wave of brainsuckers towards X-COM agent areas and armed civilians/gang members/police.
    *Lone brainsuckers that cannot find another alien will attempt to leave the map to further alien infection of the city via the cityscape. This can result in alien activity missions in which there will only be a lone brainsucker, that can retreat again if not killed quickly. Forming a chain of alien activity missions across the cityscape until the brainsucker infects a civilian, VIP, X-COM or is killed; something that can be really frustrating if you are not quick to kill the alien. I guess this may be why the feature was removed from brainsucker behaviour but it's still pretty cool nonetheless and compliments the "cat and mouse" behaviour of other aliens in the beta.
    *Brainsuckers WILL attack armed civilians to control them (I love this feature, so much more realistic to lore) and then direct those civilians towards known X-COM locations. There is however a bug in which brainsuckers occasionally try to attack UNARMED civilians which is pointless apart from adding to the civilian casualty figures.
    *Brainsucked civilians or gang/police members that cannot form into groups will attempt to leave the map if they are injured and cause more alien incidents later. They can also trigger gang/police wars if a gang member is brainsucked and attacks a rival gang when returning to the cityscape
    *Brainsucked civilians or gang/police members that are "tagged" with a tracker can be used to follow organisations that are being infiltrated by the aliens as when returning to the cityscape it appears that "tagged" units will try to fall back to the nearest building owned by a parent organisation or attack a building hostile to that organisation. I've followed a brainsucked unit across the cityscape to attack one of my bases only minutes later, and having found more allies from the parent organisation before moving in!
     
    makus likes this.
  10. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    A request from @makus requires that I try and get a save with an Overspawn in the city, now that i have discovered the vanilla bug regarding UFO growth and overspawn (as posted in the appropriate thread) I've started playing again, this time under easy (as it has the raised city).

    Here's a recording of the first alien incident mission in the Osiron slums. Note there's lots of behaviour listed above in this video

    *Brainsucker gets "stuck" and promptly shot after recovering from stun.
    *Agents strafing and hiding around corners
    *Brainsucker cry from the right of the screen (in darkness) allowing me to locate the last brainsucker and kill it winning the mission (cries can be used like this in vanilla, fortunately, my agent did not panic this time around as i sent him down a corridor alone).
    *Anthropods working alone and not in groups as they did in beta
    *Agents will react to alien sightings and fire whilst running, in this case saving me from a leaping brainsucker



    I'll post more videos as i find more examples of observed behaviours as i try to get to week 8 of play without cheating to get the overspawn


    Beta Footage in which the aliens sabotage their own brainsuckers by destroying the escape route to the cityscape for a lone brainsucker. Also shows Anthropods sending two units to attack X-COM, massing, then attacking in a second wave.
     
    Last edited: Oct 23, 2017
    makus likes this.
  11. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    OK, another behaviour update. This time regarding the Alien's use of SMOKE grenades and going prone to crawl forwards when under fire.

    A few playtests of both vanilla and beta reveal that the aliens will start to use smoke grenades regularly after week 2 or once disruptor tech arrives in the aliens arsenal (tied to X-COM score and in lore presumably having got them from gangs or the CoS as they even appear on UFOs).

    Anthropods and Skeletoids appear to have enough intelligence to throw smoke grenades before an attack then run in for the kill.

    In the beta footage below (which gives the best example, though the behaviour is in vanilla too), a skeletoid even throws a smoke grenade behind one UFO door (making me thing they are about to emerge from there) but flanks around and exits via the other door before throwing another two smoke grenades and then attacking (and quickly being killed). Just one skeletoid performs this attack as (unknown to me) the aliens are massing in the UFO for another three waves of attacks. This starts from about 3:40 in the video ;)

    At around 6:40 also note the skeletoid going prone and crawling towards the X-COM agents who are attacking it...

    Finally at approximately 8:10, look how one of the agents successfully dodges not one, but two entropy missiles that the aliens have kept hidden till the end of the mission (i didnt even know they had started to equip them at this point). So entropy missiles can be dodged just as vehicles dodge missiles...

     
    Last edited: Oct 24, 2017
    Skin36, Yataka Shimaoka and makus like this.
  12. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    OK, back in with another unit behaviour video, this time X-COM raids an ALLIED Megapol station.

    Note the following (Observed in both VANILLA and BETA):
    *Megapol does not fight back until a significant number of officers are dead (which is tied to the organisation relations)
    *Megapol spams officers that will group, throw grenades, attack, retreat, regroup and attack in another wave (much like the aliens)
    *Megapol uses stun and smoke grenades as well as standard explosives
    *Megapol buildings contain equipment that can be looted; even Elerium!!
    *Megapol uses it's own equipment, unless X-COM has sold alien weapons to the "city" in which case some Megapol officers carry disrupter weapons (not shown in this video but observed in other playthroughs)
    *X-COM agents can spot capturable equipment within a certain radius, even without LoS (Most likely a bug)

     
    Yataka Shimaoka and makus like this.
  13. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    This time we have a MarSec raid against Allied Marsec.

    Note the following (Observed in both VANILLA and BETA):
    * Marsec is very reserved in committing units, MarSec agents retreat from direct conflict and do not group and attack in waves like Aliens, CoS or Megapol
    * Marsec attempts to flank the player then blast them with missiles (I lose a squad in the video below whilst dealing with other Marsec units that are running from me to a second group of Marsec Agents that emerge from my left flank)
    * Marsec equipment is used by all Marsec units. They do not appear to purchase alien tech from X-COM like Megapol does.
    * Marsec will use Alien tech if they become controlled by the Aliens.

     
    Yataka Shimaoka and makus like this.
  14. Yataka Shimaoka

    Yataka Shimaoka Well-Known Member Tester Translator/Writer
    18/28

    Joined:
    May 3, 2017
    Messages:
    48
    Likes Received:
    29
    Best Answers:
    0
    Found an odd behavior of the poppers, in the demo version, they will hide, wait till anthropods or skeletpoids to pin down your agents before attacking, while in vanilla, they'll just attack you head on
     
    makus and FilmBoy84 like this.
  15. FilmBoy84

    FilmBoy84 Well-Known Member Tester Researcher
    18/28

    Joined:
    Oct 9, 2017
    Messages:
    62
    Likes Received:
    87
    Best Answers:
    9
    Yes, the same behaviour is in Beta. It's a much more effective use of poppers by the aliens and not easy to combat for first-time players.
    I guess this is why the behaviour was modified for some final release versions.

    Versions with the partially working "Learning AI" do use this strategy, but only after week 6 by which time poppers are easily one shotted by devastator/disruptor fire... So it's rare to see it succeeding.

    Best demonstrated under vanilla during battleship UFO investigations... Once you get through those tunnels and into the UFO entrance (but past the megaspawn) there are often poppers held in reserve there...


    EDIT:

    New Behaviour Observed under Vanilla AND Beta2:

    • Agents, Aliens and Others will all turn to face nearby sounds such as footsteps of other units... Not just their cries... This allows them to spot enemies sooner. - Tested by leaving agents in one spot facing all to the SE of the map. When the aliens approached the agents turned automatically towards the sound of them moving. Some agents also used that prompt to look for cover and use it.
    • Agents that have wounds will move to cover and if equipped with a medkit AND a free hand will attempt to heal themselves if in Evasive/Cautious Mode. Aggressive Mode ignores this behaviour. If the agent does not have a free hand they do not reach for a medkit in their equipment.
     
    Last edited: Dec 4, 2017
    Yataka Shimaoka and makus like this.

Share This Page