XCOM 2
134 ratings
Its Just A Scratch
   
Award
Favorite
Favorited
Unfavorite
File Size
Posted
Updated
42.572 KB
13 Feb, 2016 @ 4:36am
16 Feb, 2016 @ 2:36am
2 Change Notes ( view )

Subscribe to download
Its Just A Scratch

Description
Prevents Infirmary time unless your soldier's health falls below their Base Health.

Examples:
Soldier has 10 health and 100 total health.
If at any point during the mission, your health drops below 10 health, you will get infirmary time = to that lowest health,
If your health never drops below 10 health, then no infirmary time.
Also, the time in the infirmary should be based on your remaining health vs your base health.
The base game considers remaining health vs total health

That's how it should work. If you're seeing something different please let me know so I can look into it.

I'm looking into hooking flash to indicate base health vs max health with the health pips, but it's buried in native code so .... IDK yet.



Classes overrode:
+ModClassOverrides=(BaseGameClass="XGStrategy", ModClass="JASStrategy")
++ModClassOverrides=(BaseGameClass="XComGameStateContext_StrategyGameRule", ModClass="JustAScratchStateContext_ScratchGameRule")

Strategy game rule because that's when the game puts soldiers in the infirmary after a mission.
XGStrategy because it calls a the static function of strategy game rule that I had to override. And it calls it by hard coded class name. Basically inside gamestate_unit, the game resets health to make sure you get infirmary time if you took any damage. Unfortunately you can't touch gamestates so I can't mess with that. So I just put the health back the way it was right before the infirmary check.

Also, standard boiler plate, it's a first release and not well tested. Back up saves, it could break everything.

Fixed bug that full healed crit wounded soldiers.
Added safeguard to never set health to 0. It shouldn't happen, but never too safe.
Popular Discussions View All (1)
0
9 Jul, 2016 @ 8:25pm
Mod Takeover/Update
Kemwer
57 Comments
Element UK 31 Aug, 2017 @ 9:25am 
Please make a version of this for WotC, It's badly needed for those of us who hate the fatigue and injury system
Element UK 31 Aug, 2017 @ 9:24am 
Emporor, you must have a mod causing conflicts then coz its fine for others and should have no affect on sparks
Plays Terrible Games 6 Jul, 2017 @ 12:11pm 
WARNING, DO NOT USE THIS MOD IT WILL TOTALLY BREAK YOUR SPARKS ABILITY TO REPAIR. GET AN UPDATED ALTERNATE FROM THE COMMENTS BELOW.

Please keep this message or one like it on the top page of the comments.
Dragon32 24 Jan, 2017 @ 1:07am 
@Kaerius:
Use robjumper's update version, which he's linked below. Not sure if that works with LW 2 but it's a definite improvement over this original. You can remove it from a save game without crashing. That's a big one.
Kaerius 23 Jan, 2017 @ 4:58pm 
This mod causes the infiltration bug in LW2(there may be others that do too, and this one does).
robojumper 5 Jul, 2016 @ 2:29am 
I copied his code and made it compatible with shen's last gift.
https://steamhost.cn/steamcommunity_com/sharedfiles/filedetails/?id=717919318
Idejder 4 Jul, 2016 @ 9:23am 
Maybe if the mod owner comes back we can use this again. Or if someone adopts it please post!
Nitewolf 4 Jul, 2016 @ 6:41am 
And sadly I think this is another great mod that was abandoned by its author. Maybe someone can adopt it?
Death 4 Jul, 2016 @ 2:17am 
Can confirm, this mod prevents SPARK units from repairing while stationed in engineering.
Sakarbik 2 Jul, 2016 @ 6:02am 
I think this mod conflicts with the new SPARK unit. I have this installed and, when i send my SPARK to repair, it doesn't get repaired at all, even if i have it for weeks. It's very annoying, could you confirm it or get it to work properly?