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
![avatar of Olekman](/uploads/avatar/13453.png?updated=1611589379)
![Modmaker Badge](/images/badges/badge_MODMAKER.png)
Posts: 208
17 Jan 2021, 22:10 PM
#2
![avatar of Vipper](/images/no_av.png)
Posts: 13491 | Subs: 1
nice find
18 Jan 2021, 01:38 AM
#3
![avatar of zerocoh](/images/no_av.png)
Posts: 930
wait, is this ability coming back?!
if not, who cares?
if not, who cares?
18 Jan 2021, 06:29 AM
#4
![avatar of Olekman](/uploads/avatar/13453.png?updated=1611589379)
![Modmaker Badge](/images/badges/badge_MODMAKER.png)
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
![avatar of MMX](/images/avatars/panzerwerfer.png?updated=1396279640)
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
![avatar of Olekman](/uploads/avatar/13453.png?updated=1611589379)
![Modmaker Badge](/images/badges/badge_MODMAKER.png)
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
![avatar of MMX](/images/avatars/panzerwerfer.png?updated=1396279640)
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)![down](/images/buttons/down_arrow.png)
![down](/images/buttons/down_arrow.png)
1 user is browsing this thread:
1 guest
Livestreams
![]() |
![]() |
![]() |
43 | ||
![]() |
![]() |
![]() |
21 | ||
![]() |
![]() |
![]() |
2 | ||
![]() |
![]() |
![]() |
2 | ||
![]() |
![]() |
![]() |
1 | ||
![]() |
![]() |
![]() |
1 |
Ladders Top 10
-
#Steam AliasWL%Streak
- 1.34057.856+5
- 2.567230.711+11
- 3.279118.703+3
- 4.275145.655+2
- 5.759216.778+18
- 6.282110.719+20
- 7.267159.627+3
- 8.12133.786+2
- 9.13656.708+4
- 10.8312.874+4
Replay highlight
VS
-
cblanco ★
-
보드카 중대
-
VonManteuffel
-
Heartless Jäger
![Einhoven Country](/images/maps/4p_enhoven_country.jpg)
Einhoven Country
![Honor](/images/buttons/HONOR_icon.png)
Honor it
9
![Download](/images/buttons/DOWNLOAD_icon.png)
Download
894
Board Info
160 users are online:
160 guests
1 post in the last 24h
18 posts in the last week
85 posts in the last month
18 posts in the last week
85 posts in the last month
Registered members: 47551
Welcome our newest member, Lanejgau
Most online: 2043 users on 29 Oct 2023, 01:04 AM
Welcome our newest member, Lanejgau
Most online: 2043 users on 29 Oct 2023, 01:04 AM