CombatExtended-Continued / CombatExtended

Combat Extended mod for RimWorld
370 stars 250 forks source link

[Bug]: Darkness Accuracy Malus has unexpected behavior #3415

Open Neitherman opened 5 days ago

Neitherman commented 5 days ago

Rimworld version: 1.5.4104 rev435 Combat Extended version: 15.6.0.0 Combat Extended source (Steam, GitHub, etc.): Steam Your operating system: Windows 10 Your mod list: Harmony Core Royalty Ideology Biotech Combat Extended

Description For any difference in light condition between two pawns (Brightly Lit to Lit, Lit to darkness), the relative darkness penalty difference is always the same (8% between the two). On top of that, there is unexpected behavior when pawns are on the edge of lit and dark zones.

The recorded Darkness malus is as such:

Brightly Lit vs Lit - 21% vs 29%
Brightly Lit vs Dark - 42% vs 50%
Lit vs Dark  - 71%  vs 79%
Dark to Dark - 100% vs 100%

There are also cases where pawn straddling the line of lit to dark areas start showing incoherent darkness maluses. For example, a pawn in a brightly lit cell with dark cells on his side can fire at another pawn in a brightly lit cell surrounded by brightly cells with no malus. However the pawn firing back at him has suffers from the 29% malus.

Expected behavior Consistent malus behavior when adjacent tiles aren't the same lighting level Possibly more noticeable difference in term of malus? Someone hiding out in pitch darkness would probably have quite the advantage over someone lit under a flare. Whereas someone lit by the sun would have not that much of a disadvantage against one lit by a lamp

To reproduce Put a pawn under a roof during peak light hours. Put a second pawn out in the sun. Check darkness malus in dev mode when trying to aim their gun at one another. Try with different light conditions, roofing, presence of walls next to the pawn, pawn relative positions too seem to cause different darkness maluses.

Screenshots & log dumps Strange Behavior: image image image

Complete the following checklist I hereby verify that I have done the following:

Neitherman commented 5 days ago

Another example of this incoherent behavior allowing for some... very weird abuse image image

SamaelGray commented 2 days ago

More test results showing the system's odd behavior: https://discord.com/channels/278818534069501953/303988654492090370/1284194752031494224