XCOM 2
48 ratings
[WotC] Per-Turn Will Loss
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
480.778 KB
9 Jan, 2021 @ 5:51pm
9 Jan, 2021 @ 6:05pm
2 Change Notes ( view )
You need DLC to use this item.

Subscribe to download
[WotC] Per-Turn Will Loss

Description
Description


Replaces the Will Loss from discovering an enemy pod with a turn-based Will Loss mechanic.
All code is available on GitHub[github.com].

DISCLAIMER: THIS MOD IS NOT INTENDED FOR USE WITH LONG WAR OF THE CHOSEN
I give no guarantees that doing so will not break something.
  • Adapted for use in the base version of WotC from the Turn-Based Will Loss mechanic present in LWotC.
  • Adds a turn-based Will Loss mechanic with a configurable turn frequency and will loss.
  • Disables the default Pod Sighted Will Loss event from the base game.

This mod's default configuration bases the amount of will lost on the rank of the soldier affected.
This attempts to simulate the increased psychological effect the prolonged conflict has on your troops.
  • There is a minimum will loss of 3, so expect that until your soldiers reach at least Sergeant.
  • The higher their rank, the more will they can lose each turn the will loss event occurs.
The starting turn and frequency are configurable, and default to start on turn 2, then every 3rd turn after.

Included in this mod are additional modifications to many of the default will loss events.
These are taken largely in part from the configs for LWotC and include:

Civilian Died:
  • Slightly reduced per-mission max will loss from this source.

Soldier Wounded:
  • Slight reduction in panic chance.
  • Fixed backwards logic by switching from PercentHealthLost to MaxWill as the calculation stat.
  • Soldiers can only become Panicked or Obsessed, and will not become Shattered or go Berserk.

Squadmate Wounded:
  • Significantly reduce the chance to panic on a squadmate being wounded.
  • Soldiers can only become Panicked, and will not become Shattered or go Berserk.

Squadmate Died:
  • Soldiers can only become Shattered, and will not become Panicked, Obsessed, or go Berserk.

Bondmate Died:
  • Gives a small chance to not to panic for soldiers with high will.

Squadmate Captured:
  • Moderate reduction in panic chance.
  • Soldiers can only become Panicked, and will not become Shattered or go Berserk.

Bondmate Captured:
  • Gives a small chance to not to panic for soldiers with high will.

Squadmate Panicked:
  • Reduced the chance of chain panics significantly.
  • Soldiers can only become Panicked or Obsessed, and will not become Shattered or go Berserk.

Squadmate Mind Controlled:
  • Slight reduction in panic chance.
  • Soldiers can only become Shattered, and will not become Panicked or go Berserk.

Squadmate Unconcious:
  • Removed the will loss from a squadmate being rendered Unconscious.

Spectre's Horror Ability:
  • Moderate reduction in panic chance.
  • Horror No longer reduces the will of its' target.
  • Soldiers can only become Panicked, and will not become Shattered or go Berserk.

Compatibility


Modifies the config of X2EventListener DefaultWillEvents and may conflict with other mods that do the same.
  • Safe to add mid campaign.
  • Safe to remove mid campaign.
    Modifies the config of X2EventListener DefaultWillEvents and may conflict with other mods that do the same.
  • No class overrides, yay!

Configuration


You can configure this mod by editing XComPerTurnWillLoss.ini, and the XComGameCore.ini located in the MoreWillRollEdits/ subdirectory.
  • XComPerTurnWillLoss.ini has configurable values for the Per-Turn Will Loss mechanic.
  • XComGameCore.ini disables the default Pod Reveal Will Loss event.
  • MoreWillRollEdits/XComGameCore.ini adds additional config edits from LWotC. Feel free to comment out, delete, or change the name as described in the file to disable the additional changes.
  • I used robojumper's WotC: Show Will Loss to help test this mod. I highly recommend it any time you work with will loss modifications.

Requirements


This mod has no dependencies (besides WotC).

Known Issues


None as of yet. Let me know if you find any problems.

Credits


Thanks to the regulars of the XCOM 2 Modding discord for all their help answering my questions.
Thanks especially to paledbrook for giving me the idea to make this mod, and for the code this mod is adapted from.

Referenced LWotC Source Code by paledbrook of the LWotC Team.
XCOM 2 WOTC API Copyright (c) 2016 Firaxis Games, Inc.
14 Comments
Stukov81-T.TV 25 Aug @ 11:27am 
FlatWillLossChance just means either
Chance - Will (if it is true) for example. 133% - 50 will = final 83% chance
or just the chance (if false) - 80% chance remains 80% no matter the will
Havoc199 25 Aug @ 11:12am 
Will removing WillEventRollStat_SquadmateRank from all the lines in both XComGame and XComPerTurnWillLoss break the game?
Can I just remove that modifier or it doesnt work that way?
I see JustNU below offered some other modifiers, I assume I can use WillEventRollStat_Flat, in which case do I need to change FlatWillLossChance=false to True?

It is absolutely nonsensical to me that hardened veterans lose will faster than rookies.
JustNU 12 Aug @ 8:40pm 
WillLossStat=WillEventRollStat_SquadmateRank
is the config option related to this behaviour (the mod does a little trick and sends unit as its own squadmate for this)

there are several WillLossStat enums in the game's code, that can be used instead, but i cant guarantee they will actually work

WillEventRollStat_PercentageHealthLost - current hp / max hp (so, less will loss with less hp? i guess)
WillEventRollStat_MaxWill - get max will, not the current one
WillEventRollStat_BondLevel - since you cant be bonded to yourself, i dont think this one will do anything? could even crash the game, actually
WillEventRollStat_Flat - flat 1.0 as starting value
WillEventRollStat_CHPercentageHealthLost - ( max hp - current hp ) / max hp (this one seems to properly scale with less health giving more will loss)
WillEventRollStat_CHTurnCountDecimal - 1.0 + (current turn count / 10) (is 1.1 at turn one, 2.0 at turn 10 aka 2 times more, or in simpler terms, more turns = more will loss)
JustNU 12 Aug @ 8:39pm 
did some code diving due to confusion about soldier ranks, tldr:

it takes the index of soldier's rank as a initial value (before any multiplier or asserting min/max will loss), aka the higher soldier's rank, the more will lose is
...just like the desc says, indeed
Lei 24 Jul, 2024 @ 1:17am 
i also want to keep the will loss on pod, but every turn will gain / up of certain amount (configurable). i think this is the most acceptable solution as we need to keep cycle the soldier we have, but also the cycle it's not for long
zachary.deca.stl 9 Oct, 2021 @ 6:34pm 
and if so is there a way to reduce will on missed shots on aliens and when being shot at no matter if your hit or not?
zachary.deca.stl 9 Oct, 2021 @ 6:32pm 
if i wanted to keep the will loss on pod and make this a will gain system would i just make it a negative number?
pepoluan 30 Apr, 2021 @ 11:43am 
@Thalioden and @Cypher10, I might be wrong, but reading the mod's .ini, it seems that every promotion, multiplies will loss by 0.9. So maybe what the author was trying to say is that, because MaxWill does not change with promotion in WotC (you need a Covert Action to do that), a way is devised to allow higher-ranked soldiers to "lose will more often" before reaching minimum.

In other words, Rookie with a will of 60 and loss of 3/turn will totally run out of will in 20 turns, while a Squaddie with same will of 60 should experience a loss of 0.9 x 3 = 2.7 will/turn, totally running out of will in 22 turns.

@Kinetos can you confirm this?
Stukov81-T.TV 12 Apr, 2021 @ 6:18am 
I was not a fan of the soldier rank variant either so I tried

PerTurnWillRollData=(WillLossChance=1, FlatWillLossChance=false, WillLossStat=WillEventRollStat_MaxWill, WillLossStatMultiplier=0.05, MinimumWillLoss=1, MaxWillPercentageLostPerMission=0.45)

which was pretty nice allready, but i do want to punish low will soldiers even more so now i have:

PerTurnWillRollData=(WillLossChance=1, FlatWillLossChance=false, WillLossStat=WillEventRollStat_CHTurnCountDecimal, WillLossStatMultiplier=2.6, MinimumWillLoss=1, MaxWillPercentageLostPerMission=0.50)

I hope that works, it looks good so far!
Cypher10 16 Feb, 2021 @ 5:53pm 
I agree with Thalioden, I feel like I am not understanding that statement in the mod. The way I understand, higher rank soldiers will lose more will than lower ranked soldiers, is that correct, and if so, by how much more as well as the logic behind that?