Files
Aurora.3/code/datums/components
FenodyreeAv 3f97096fe1 Fixes projectile accuracy checks (#22285)
Fixes projectiles always hitting.

When a projectile rolled a 'miss', and returned Null as it's bodypart to
hit, it was being defaulted to hit the torso.

This meant that a low accuracy weapon, was not more likely to miss than
a high accuracy one.
In fact, low accuracy was a significant buff, because it made your shots
scatter to random limbs 30% of the time.
There was also no reason ever to aim for the torso, shooting the head or
hands was mechanically correct.

This is why mercs one handing the STS in burst mode were breaking so
many hands.

<img width="386" height="226" alt="image"
src="https://github.com/user-attachments/assets/a0c2992f-ca5b-41cb-84c9-c6a3f74e09d0"
/>
This is the table of the chance to hit the torso, after this fix.

Point blank shots (range 1 and 2) always hit.

Almost all lasers have 2 accuracy (when wielded, if they are 2 handed)
Almost all ballistics have 1 accuracy (likewise when wielded, if
possible)

Snipers have up to 4 accuracy. (When scoped)

Burst fire imposes an accuracy malus, the STS-35 is the heaviest malus
outside of admin spawn guns like the L6 SAW.

burst=5, burst_accuracy=list(1,0,0,-1,-1)

This means the first shot of the burst is accuracy 1, then it falls off.

If you aim for a different body part, these are the base chances to
miss:
	BP_HEAD = 70,
	BP_CHEST = 10,
	BP_GROIN = 20,
	BP_L_LEG = 40,
	BP_R_LEG = 40,
	BP_L_ARM = 40,
	BP_R_ARM = 40,
	BP_L_HAND = 60,
	BP_R_HAND = 60,
	BP_L_FOOT = 60,
	BP_R_FOOT = 60

There is a minimum 30% chance to hit, regardless of any modifiers.
2026-04-23 00:35:06 +00:00
..
2026-04-08 15:52:13 +00:00
2026-04-11 14:24:24 +00:00

Datum Component System (DCS)

Concept

Loosely adapted from /vg/. This is an entity component system for adding behaviours to datums when inheritance doesn't quite cut it. By using signals and events instead of direct inheritance, you can inject behaviours without hacky overloads. It requires a different method of thinking, but is not hard to use correctly. If a behaviour can have application across more than one thing. Make it generic, make it a component. Atom/mob/obj event? Give it a signal, and forward it's arguments with a SendSignal() call. Now every component that want's to can also know about this happening.

See this thread for an introduction to the system as a whole.

See/Define signals and their arguments in __DEFINES\components.dm