Ludeon Forums

RimWorld => Bugs => Topic started by: colinfang on February 05, 2022, 01:16:28 AM

Title: [1.3.3200] Some scenarios are not considered Guilty
Post by: colinfang on February 05, 2022, 01:16:28 AM
At the moment the game has 2 paths to trigger a guilty check.
- 1. When a pawn is downed and his `pawn.GetLord().LordJob` is of particular types, e.g. `LordJob_AssultColony`, via `GuiltyOnDowned`
- 2. When a pawn damages a player pawn.

I notice some scenarios feel like guilty actions but the current logic fails to mark guilty.

For example, in a quest of "Orbital Drone Hack", `LordJob` is `LordJob_AssultThings` which somehow is not considered `GuiltyOnDowned` from the first path.
Hence the game relies on the second path to determine the guilt of an enemy. Now lets look at the following cases

- An enemy hits my slaves. The code checks `pawn.HomeFaction.IsPlayer`, but slaves belong to their original faction. So in this case the game would consider the attacker innocent.

- An enemy is downed before he manages to deal any damage to my pawn. E.g. he hasn't got a chance to attack, his attack misses, his attack is dodged. The guilty check is in `Pawn_HealthTracker.PreApplyDamage`,  as long as the damage doesn't take place, he is considered innocent.

Title: Re: [1.3.3200] Some scenarios are not considered Guilty
Post by: glass zebra on February 05, 2022, 04:16:08 PM
Weirdly enough, shooting one of your own pawns which has a shield belt and therefore also takes 0 damage does flag your own pawns as guilty.
Title: Re: [1.3.3200] Some scenarios are not considered Guilty
Post by: colinfang on February 06, 2022, 02:25:47 PM
Quote from: glass zebra on February 05, 2022, 04:16:08 PM
Weirdly enough, shooting one of your own pawns which has a shield belt and therefore also takes 0 damage does flag your own pawns as guilty.

Just had another look and you are right. Damage mitigation by armor occurs AFTER `PreApplyDamage` so it doesn't prevent enemy from getting guilty.

I corrected the bug report above.
Title: Re: [1.3.3200] Some scenarios are not considered Guilty
Post by: Pheanox on February 15, 2022, 01:13:55 PM
I'm going to add this to my other bug report I made recently about some issues with the guilty status that glass zebra reported as well to make sure we have a general overview/sanity check of the guilty system.