Player doesn't receive 20 mp when Recoup Losses is active if infantry model becomes a crawling casualty instead of dying.
Reason:
Short answer:
In Company of Heroes you don't always die when you are killed.
Long answer:
Theoretically, whenever an infantry entity dies, its death_actions should trigger. Recoup Losses adds "recoup_losses_active" to all infantry entities and all the affected entities have requirement action in their death_actions that checks for that upgrade. If it's present, the player gets +20 mp. Problem happens when instead of dying, the entity becomes a casualty. It seemingly doesn't trigger death_actions. Casualty dying (either by themselves or enemy) doesn't trigger them either. Or maybe casualties don't have death_actions at all or aren't even defined as entities? Honestly, I have no idea. Maybe some more experienced modders could chime in.
Gameplay-wise it has pretty considerable impact. "make_casualty" critical has weight of 25 and is applicable to all weapon types except flame. Simply put, roughly 25% of the time when an infantry model dies with Recoup Losses active, OKW gets no Manpower.
Solution: I tried adding modify_resources action in "make_casualty" critical, thinking that if you don't get +20 mp on death_actions then you could get it when "make_casualty" is triggered. For some unexplained reason, this causes the +20 mp to trigger twice when entity becomes a casualty. Removing the modify resources action from death_actions altogether and adding them to all involved criticals causes same problem. In my humble opinion, casualties are magical.
Instead, I modified "make_casualty" to check for "recoup_loses_active" upgrade on entity. If it isn't present, then make them a casualty as usual. If it is present, the make them dead instead.
It's a very simple fix that guarantees that player receives +20 mp every time an infantry entity dies when the ability is active. This of course comes with a side effect of OKW's infantry always dying instead of becoming casualties when Recoup Losses is active. I think it's a small price to pay for consistency, considering how no Allied ability directly interacts with casualties (like Wehrmacht's casualty interrogation).
Video evidence of bug:
Instead of receiving back 300 mp (20 mp times 15 Volksgrenadiers), I received only 160 mp (which shows just how bad my RNG can be). This test is easy to replicate and I encourage others to try it.
Mod with solution:
https://drive.google.com/file/d/1VcMdcyGTLtsmzGt3d8O70-d3PbIQmmeS/view?usp=sharing
Recoup Losses doesn't work if unit becomes casualty
17 Jan 2021, 21:55 PM
#1
Posts: 208
17 Jan 2021, 22:10 PM
#2
Posts: 13496 | Subs: 1
nice find
18 Jan 2021, 01:38 AM
#3
Posts: 930
wait, is this ability coming back?!
if not, who cares?
if not, who cares?
18 Jan 2021, 06:29 AM
#4
Posts: 208
My mistake, I posted this in Bugs instead of Modding forums. I'll ask a mod to move the thread.
18 Jan 2021, 06:43 AM
#5
Posts: 999 | Subs: 1
wait, is this ability coming back?!
if not, who cares?
well, i do. as do a lot of modders i'd assume, so thanks Olekman not only for the discovery, but also for providing a solution for the problem!
IIRC a comeback of the ability isn't too unlikely, either, as quite a lot of people advocated for replacing rapid conscription and other similar abilities with some clone of recoup losses. probably not in this patch, but maybe in a future Commander revamp... time will tell.
18 Jan 2021, 06:50 AM
#6
Posts: 208
well, i do. as do a lot of modders i'd assume, so thanks Olekman not only for the discovery, but also for providing a solution for the problem!
IIRC a comeback of the ability isn't too unlikely, either, as quite a lot of people advocated for replacing rapid conscription and other similar abilities with some clone of recoup losses. probably not in this patch, but maybe in a future Commander revamp... time will tell.
That's actually one of the reasons why I looked into it. Sander93 mentioned in his personal balance thread that he would like to replace Rapid Conscription and Relief Infantry with Recoup Losses mechanics. Plus, I was working on my own rework of Rapid Conscription and it shares some mechanics with Recoup Losses, so naturally this bug came up on my radar.
18 Jan 2021, 07:44 AM
#7
Posts: 999 | Subs: 1
Yeah, I've always preferred the RC mechanic over that of getting a free squad, especially during the later stages of the game where unvetted cons or osttruppen are more a bane than a boon to your unit composition. Really wouldn't mind to see it coming back eventually...
PAGES (1)
1 user is browsing this thread:
1 guest
Livestreams
67 | |||||
37 | |||||
35 | |||||
20 | |||||
13 | |||||
10 | |||||
1 | |||||
635 | |||||
12 | |||||
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.653231.739+13
- 2.838223.790+1
- 3.35057.860+15
- 4.590233.717+6
- 5.278108.720+29
- 6.306114.729+2
- 7.645.928+5
- 8.922406.694+1
- 9.1118621.643-1
- 10.265138.658+2
Replay highlight
VS
- cblanco ★
- 보드카 중대
- VonManteuffel
- Heartless Jäger
Einhoven Country
Honor it
10
Download
1243
Board Info
0 post in the last 24h
2 posts in the last week
28 posts in the last month
2 posts in the last week
28 posts in the last month
Registered members: 49388
Welcome our newest member, KETTA
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, KETTA
Most online: 2043 users on 29 Oct 2023, 01:04 AM