Goonstation Forums
[PR] Forensics Rewrite - Printable Version

+- Goonstation Forums (https://forum.ss13.co)
+-- Forum: Discussion (https://forum.ss13.co/forumdisplay.php?fid=6)
+--- Forum: Ideas & Suggestions (https://forum.ss13.co/forumdisplay.php?fid=8)
+--- Thread: [PR] Forensics Rewrite (/showthread.php?tid=23514)



[PR] Forensics Rewrite - github_bot - 01-05-2025

PULL REQUEST DETAILS




[CODE QUALITY] [EXPERIMENTAL] [INPUT WANTED]

About the PR
(Note: this project is still a WIP) The main feature of this PR is the creation of forensic holders, which are meant to encapsulate all the evidence related to the history of an object. These holders contain a list of groups that specify how different types of evidence should behave, and then finally the forensics data which store information on a specific event that occurred with that object. It also allows IDs related to forensics to be stored by reference rather than by value with the idea of reducing time spent on copying and comparisons.

The PR also comes with a number of new types of forensics evidence to test and showcase this new system. Each piece of evidence can be given a timestamp to show when it occurred. Fingerprints can be stored with a mask that only displays partial prints. DNA can be given a form that specifies the difference between evidence coming from blood, hair, or saliva. IDs can be tied to individual organs and paired together, allowing for retina scans and footprint pairs that can be changed by swapping out one or both organs/limbs. You can also pair different types of evidence together. Objects can report their current state to a forensics scan directly or point to other objects that should be included in the report (such as worn clothing).

A list of features currently included:
- Scanner IDs left behind during scans and teleportation (teleportation only with cargo transporters for now)
- Evidence tied to organs, such as retina scans, footprints, and should probably be extended to fingerprints
- Mark fabricated, imported, and photocopied items to show how they were created
- A new forensics training trait for detectives and security assistants. This trait allows a player to see timestamp estimations for each piece of evidence. The accuracy of these time estimations can vary based on multiple factors.
- Scan a safe to reveal what the first character of its combination is.

TODOs:
- [ ] Most of the old forensics stuff is still there in some form and needs to be fully replaced.
- [ ] Blood is only half working at the moment and still needs a decent amount of work to replace.
- [ ] Update security logs to use the new system. Not sure how in-depth this should be.
- [ ] Forensic scan reports need formatting improvements.
- [ ] Store types of IDs into a dictionary and check for duplicates
- [x] Fingerprints tied to limbs.
- [ ] Update the fingerprinter. Can be reworked later.

[Image: da39e017-76c2-4b73-8c4e-672dc8d3f963]
[Image: ef61a802-841c-415f-a042-0479e87bd532]
[Image: 138b70aa-cacc-4cc1-a730-2b4d011d0b53]


Why's this needed?
Creates a structured system for creating, storing, and passing around forensics data. Makes forensics significantly easier to work with in general.

Changelog



Code:
changelog
(u)LorrMaster
(*)Forensics has been overhauled


PULL REQUEST DETAILS


RE: [PR] Forensics Rewrite - Cal - 01-05-2025

oh fuck yes


RE: [PR] Forensics Rewrite - Kateaclysm - 01-05-2025

This is awesome. Absolutely love this.


RE: [PR] Forensics Rewrite - Lefinch - 01-05-2025

This was a cool idea in discussion and this implementation looks pretty sensible. This is something you could replicate just by keeping a notepad open and copying it all over, just in-game and a little more smooth, which are both an immersion bonus and a suggestion this isn't going to create some horrid balance issue.

How is it assigning prints to people? Is it directly using SECMATE data to do that or is it being manually entered by the person collecting evidence? Both are fine, but might have interesting interactions with someone fudging/deleting secmate records later on. If it's automatically updating the sudden change of names tied to evidence might be a big hint. I don't think this is a bad thing, you could frankly do the same right now with your personal notes/notepad when you cross-reference it. I'm more asking out of curiosity.

The safe combo thing, is that currently a thing anywhere else? If not, it seems a little odd to include. I appreciate it has some fun forensic flavour to it but reducing the safe cracker game to three characters over four might want to be watched during its implementation. It might not make any kind of crazy difference at all, but I'm just trying to scrutinize things here.

Bottom line is though making forensics a simpler and more engaging tool for security is a win for me as an antag. I like leaving evidence trails (and fudging them) so making more use of it is a bonus. Looks great.


RE: [PR] Forensics Rewrite - LorrMaster - 01-05-2025

Quote:How is it assigning prints to people? Is it directly using SECMATE data to do that or is it being manually entered by the person collecting evidence? Both are fine, but might have interesting interactions with someone fudging/deleting secmate records later on. If it's automatically updating the sudden change of names tied to evidence might be a big hint. I don't think this is a bad thing, you could frankly do the same right now with your personal notes/notepad when you cross-reference it. I'm more asking out of curiosity.

I haven't even touched security records yet, so that implementation is still up in the air. It's important to note that evidence is divided into two parts. The first is "forensic_data", which represents all the data tied to a specific event. Such as an individual piece of DNA evidence, which would have a *reference* to a DNA ID along with whether it is blood, hair, tissue, etc. A specific fingerprint would have a reference to the fingerprint ID + a reference to the ID of the glove that the person was wearing (+ information on how the fp should be masked). The second part is the ID itself which is the "forensic_id" datum. This is created by whatever object it is attached to via a proc meant to create that kind of ID. The ID text is just there for the player, it is really the datum reference to that ID that the code cares about.

So an eye will have a "forensic_id" variable, which will usually either reference a "default_retina_id" of a bioholder or be created by the eye itself if that is not applicable. A person has two eyes, so living mobs have a proc that will check a person's eyes at that time and returns a datum that pairs them both together. A doctor may then perform a scan with their health analyzer, which will create a new datum that holds a reference to the IDs of the targets eyes and the ID of their DNA at that moment (changing a person's DNA later on requires that a new ID value be created, since all the previous pieces of data evidence assume that their existing ID will not change). Let me know if that explanation makes sense.

Quote:The safe combo thing, is that currently a thing anywhere else? If not, it seems a little odd to include. I appreciate it has some fun forensic flavour to it but reducing the safe cracker game to three characters over four might want to be watched during its implementation. It might not make any kind of crazy difference at all, but I'm just trying to scrutinize things here.

The safe combo thing is mostly just there to show that objects can add their own text to a forensics scan outside of the normal forensics system. So a bell could have a counter for the number of times it's been rung and then display that number if someone performs a forensics scan on it. Mobs show how much ethanol is currently in their bloodstream in the same way. It's less a feature of the forensics system itself and more that since a report is just text, you can just throw in whatever else you want into them. Hints for safe cracking could require forensics training using a single if statement, for example.


RE: [PR] Forensics Rewrite - Lefinch - 01-05-2025

It does make sense! Thanks for the reply!


RE: [PR] Forensics Rewrite - mona - 01-06-2025

extremely cool.

> "Mark fabricated, imported, and photocopied items to show how they were created"
not totally sold on this but extremely minor in the scheme of everything else. mostly thinking about ruck kits here; if i understand how this would work and what it'd apply to, for example, a phaser gets marked as fabricated versus imported, you know that it's in the ruck kit and can lock it ASAP versus someone picked it up from the debris field or cargo was having a good day. personally i think the level of origin determination we have right now is decent (ruck kits sharing a network list of items; colors for certain tools from various fabs), but i'd also be happy to be sold on the implementation here. assuming i understood it correctly? ultimately though this is a discussion above my paygrade since i think it boils down to "how much investigative power does a detective/sec assistant deserve" and if the answer is "we'd like to move the detective towards being unique and more useful than firing his gun at george in the bar between drinking bottles of bo jack's", then that's fine.

also not 100% on the retina scans but that's just personal flavor and i don't have any meaningful reason of why that would help guide the implementation or anything.

love the timestamps, broadly think the footprint/organ matching for sets could be cool in some cases, and the glove masking here is way better than current. looking forward to this one regardless of whatever questions i have on the very particulars! thank you for this.


RE: [PR] Forensics Rewrite - LorrMaster - 01-06-2025

Quote:if i understand how this would work and what it'd apply to, for example, a phaser gets marked as fabricated versus imported, you know that it's in the ruck kit and can lock it ASAP versus someone picked it up from the debris field or cargo was having a good day.
Yes, that is exactly the case. I think it makes sense that security would be able to figure out the origin of an item if they wanted to based on whatever structure or residue is left behind. Maybe later on down the road someone could lock that behind a "deep forensic scan" of some sort so that security doesn't get that information without specifically looking for it. I think it would make more sense for antags to be able to disconnect a ruck kit from the rest of the station or find a more roundabout way of importing equipment for when security wises up.

Quote:also not 100% on the retina scans but that's just personal flavor and i don't have any meaningful reason of why that would help guide the implementation or anything.
I don't think that retina scans are likely to come up in a typical round, but there is a small chance that they could which is why I personally like them. I also didn't mention that most types of eyes generate different types of IDs. So an experienced detective might be able to tell the difference between the ID of a normal eye, a robotic eye, a cow eye, a secHUD eye, and a laser eye.

Quote:love the timestamps, broadly think the footprint/organ matching for sets could be cool in some cases, and the glove masking here is way better than current.
One thing I am worried about with glove masks is where the balance might be in how much of the base print to reveal. One character isn't useful unless if you know where it is, three or even two characters might be enough to give it away. Need to do some math here to get it right.


RE: [PR] Forensics Rewrite - Dr. Puggers - 01-20-2025

I'm an avid user of the clipboard. I pretty much do this in a painstaking way (by hand).

The thing I'm most worried about would be the chat clutter. If it's possible to separate the info you're getting?
Either it be in a new window popup so the chat doesn't scroll it up or that you miss out on something important as you scroll to keep the text stationary or if you're scanning a person, targeting the head to show their person's fingerprints/gloves, retinas, dna and targeting the body to show bloody clothes, gunshot residue, footprint etc.

But yeah! I absolutely adore forensics in this game and wish there was more stuff to do with it.