XCOM 2
Realistic Panic Behavior
56 Comments
Juravis  [author] 10 Aug, 2023 @ 8:38pm 
This mod is not WOTC compatible.
Mask 10 Aug, 2023 @ 4:11am 
While I'm using this mod, my soldier grenaded my 2 dudes after panicking. Are you sure this is working as intended?
Juravis  [author] 21 Oct, 2020 @ 3:50pm 
Some of the panic behavior is hilariously bad
Syro System 21 Oct, 2020 @ 3:48pm 
Thanks for the manual fix for WOTC.

I run a mod that makes soldiers lose more will on missions to force the tired and shaken conditons to happen more often (I want my Long War forced soldier rotation) and that has the extra effect of making panic happen more often.
So, the panic mod you made specifically for WOTC would have been a bit much considering I don't run a huge squad (oversized squads is one of the fastest ways to turn the game into a boring alpha strike fest).

This fix to panic was just what I was looking for, hate when my sniper breaks cover, runs towards the enemy and flanks herself to them upon panicing.
Morale -10 21 Oct, 2018 @ 8:09am 
hope it will work, gonna test it ;3
macelharen 4 Oct, 2017 @ 12:13am 
yet more reasons to shell out cold hard cash =)
Juravis  [author] 30 Sep, 2017 @ 11:15am 
Sorry im not updating the older stuff. Also berserk isnt supported in vanilla, its an XPAC effect.
macelharen 30 Sep, 2017 @ 11:14am 
now that you've made a WOTC version, could you pretty please update this? hopefully it's possible...that berserk thang. yum
Juravis  [author] 23 Sep, 2017 @ 11:18pm 
You have to switch it to beta in steam
p6kocka 23 Sep, 2017 @ 11:17pm 
The sdk shows 53 gb but it's only 1,9 gb big.
Juravis  [author] 2 Sep, 2017 @ 9:38pm 
@Green Raven I granted your wish, but only partially. The SDK is 53GB, and editing two set of INI files sounds like a mess. This makes me not want to mod at all WOTC.
Juravis  [author] 2 Sep, 2017 @ 9:37pm 
If you're wondering, this makes it so you move to cover if flanked, but if youre flanked, youll cower or do nothing.
Juravis  [author] 2 Sep, 2017 @ 9:35pm 
Ok here are the steps to fix this in WOTC manually. I found the goddamn directory.

GO TO:

C:\Program Files (x86)\Steam\steamapps\common\XCOM 2\XCom2-WarOfTheChosen\XComGame\Config

Open DEFAULTAI.INI

DELETE THESE 2 LINES:

Behaviors=(BehaviorName=PanickedMove, NodeType=Selector, Child[0]=PanickedFallBackUnsafe, Child[1]=MoveDefensiveWithLoSUnsafe, Child[2]=MoveDefensiveUnsafe)
Behaviors=(BehaviorName=PanickedAction, NodeType=RandSelector, \\
Child[0]=ShootRandomEnemyForPanic, Param[0]=5, \\
Child[1]=TryPanickedGrenadeToss, Param[1]=1, \\
Child[2]=DoCower, Param[2]=2)

REPLACE WITH:

Behaviors=(BehaviorName=PanickedMove, NodeType=Selector, Child[0]=DoIfFlankedMove)
Behaviors=(BehaviorName=PanickedAction, NodeType=Selector, Child[0]=DoCower)
Green Raven 2 Sep, 2017 @ 7:19pm 
Thank you!:KneelingBow:
Juravis  [author] 2 Sep, 2017 @ 7:13pm 
Ill see what i can do later
Green Raven 2 Sep, 2017 @ 5:57pm 
Please, please update. My only medic was just decapatated by a baatle ax wielding pyscho who lost it when his bondmate died.
Malthus 31 Aug, 2017 @ 9:06pm 
So, does this mod still work as intended? Yesterday I lost one of my best men because one of my soldiers turned into a gibberish fool throwing a grenade into his own comrads instead of hunkering down as a panicked man should do. This is just crazy... It made me run straight for the workshop looking for this mod.And if it is not compatible anymore, please update it. This is just essential ;)
Juravis  [author] 30 Aug, 2017 @ 3:36pm 
Yeah the grenade part is still annoying. You can fix that manually though in the AI code from the base game.
marshmallow justice 30 Aug, 2017 @ 2:47pm 
first non-gate crasher mission, got panicked from across the field, bloke ran through two overwatch's into flanked position, then threw a nade on two of my guys :steamfacepalm:
Juravis  [author] 30 Aug, 2017 @ 2:46pm 
I played some WotC and i didnt get a lot of retarded panics in fact i dont remember the last one i had.
marshmallow justice 30 Aug, 2017 @ 2:23pm 
oh god War of the Chosen forcibly made me remember the horrors of having vanilla XCOM panic AI routines... I miss this one already. Wait it might still work, I removed it before I tested.
abcismasta 15 Feb, 2017 @ 9:56pm 
Okay, thanks!
Juravis  [author] 15 Feb, 2017 @ 9:26pm 
@abcismasta Units arent forced to move, but they usually will in the base game if you install this mod. Each unit gets 1 Panicked Move, then 1 Panicked Action path.
abcismasta 15 Feb, 2017 @ 9:16pm 
I meant before LW2.
Juravis  [author] 15 Feb, 2017 @ 9:15pm 
@abcismasta Read the LW2 Compatibility section.
abcismasta 15 Feb, 2017 @ 9:13pm 
So apparently my game is bugged, I have played almost 300 hours, and the only thing that ever happens when a unit panics is they instantly hunker down. Is that not normal?
marshmallow justice 30 Jan, 2017 @ 5:54am 
It seems to be ok to leave this subbed though, even if it doesn't do anything O-O
Juravis  [author] 29 Jan, 2017 @ 4:33pm 
Panicking isnt very bright, its not a rational phenomenon. I accept some form of irrealism. But running towards the enemy is where i draw the line.
Jhereg 29 Jan, 2017 @ 4:25pm 
Thanks for the reply, shame because just freezing in place when flanked is not very bright either LOL. I figured they had revised the actual code too and renamed them just by looking at the references in yours and theirs.

V/R

Don
Juravis  [author] 29 Jan, 2017 @ 10:39am 
No they use different branch names I believe. It's overhauled. I'm not saying it's impossible to recode back to how it was, but honestly I'm ready to live with how it works right now. As long as soldiers don't do anything retarded like grenade friends, I'm not changing anything.
Jhereg 29 Jan, 2017 @ 8:41am 
Could I just null out their AI for PCs and then leave your mods AI config lines plussed?
Juravis  [author] 27 Jan, 2017 @ 9:58pm 
I just saw the AI code for LW2, this mod is indeed not compatible. LW2 only makes units Hunker Down immediately.
Jhereg 27 Jan, 2017 @ 3:52pm 
ADVENT Avenger,
With LW 2 installed and lots of panicking troops...not one has moved, all have just hunkered even when flanked. This worked fine before LW 2, but I believe LW 2 is overriding this even when I sub/unsub to make this higher.
If you could look at this I would appreciate it.

V/R

Don
Juravis  [author] 16 Oct, 2016 @ 11:01am 
The step selector will usually move even if its a terrible choice the chance to just stay in place is really low, its not something that controllable unfortunately. Well, not by this.
LightenedDark 15 Oct, 2016 @ 1:42pm 
I assume you mean they always have a chance to move. I've had them stay.

Thanks for the mod, by the way.
Juravis  [author] 10 Oct, 2016 @ 9:11am 
No control over that, units under panic will always move. They'll find the best cover elsewhere.
LightenedDark 9 Oct, 2016 @ 9:38am 
Imagine there is a sectoid that runs up to a point soldier from a pod and panics him.

Is this mod supposed to make the soldier abandon his existing full cover so he finds full cover near the additional enemies in the pod and away from his squad?

That's what just happened to me.
Autumn Sage 25 Sep, 2016 @ 3:53pm 
This is a good mod, i found it a very realistic approach to the panic system
Juravis  [author] 22 Sep, 2016 @ 5:29pm 
That's advanced code. This mod doesnt touch the "tile selector" part of XCOM. That would be insanely hard to implement and break so many things.
mwaters379 22 Sep, 2016 @ 6:02am 
my suggestion to add to this would be: IF THEY PANIC WITHIN 2 TILES OF THE EVAC ZONE, TO RUN TO THE ZONE, NOT AWAY
General Jack Ripper 1 Sep, 2016 @ 6:49pm 
Dear Flying Spaghetti Monster, bless this mod maker and embrace him with your noodly appendages.
Juravis  [author] 1 Sep, 2016 @ 4:09pm 
Aliens do not have regular panic behaviors youd have to code-mod it in, not just AI.
Lehemoth 1 Sep, 2016 @ 12:54am 
Is it possible to make the aliens run for cover and hunker down when panicked as well? Once you get ruler armor it seems a bit silly that the aliens just fire on each other
Danage 23 Jun, 2016 @ 12:05pm 
I understand they can hear it, but for me that shouldn't induce a panic. But I guess for some weaker individuals it could. Well was just an idea. I watched some modding tutorials because I was thinking of making it myself, but it was just way too much work for me, so at the very least I now have a deeper appreciation for what modders actually do and I want to say thank you.
Artuurs 22 Jun, 2016 @ 11:43pm 
Everything and everyone is linked by intercoms, it ONLY makes sense, so yeah, hearing is enough id say.
Juravis  [author] 22 Jun, 2016 @ 7:55pm 
I always figure they communicate by intercom and they can hear everything. But i get what you're saying, and there's no know easy way to implement that. But it could be done.
Danage 22 Jun, 2016 @ 7:47pm 
Is there a way to set the distance from the panicing event from which the soldiers will panic? For example I had a soldier from one side of the map die and a solier from all the way on the other side of the map panic. Seems like he shouldnt really be aware of the death and shouldnt be panicing.
Artuurs 3 May, 2016 @ 12:45pm 
How about also the old panic from the previous game? I find the new panic very retarded, instead of making a soldier useless, a Sectoid making a soldier panic basicaly gives him/her a free attack on said sectoid or someone more near to shoot, and often ive seen that despite panic, the target often gets injured or killed, like, they ruined the Panic ability, it doesnt even last long to be usefull, its so unrealiable, i feel bad for the Sectoids, thus, could we perhaps also get a XCOM EU kind of original panic?
Juravis  [author] 15 Mar, 2016 @ 1:47am 
V3.0 Up, soldiers will now only move if they absolutely have to (Flanked/Exposed)! YAY!
GnaReffotsirk 26 Feb, 2016 @ 10:45am 
Kaldreth, same here. A soldier once was surrounded, after getting shot, he panics and the Ayys just ignore him. lol

Saved his ass.