Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[PORT] Fixes things being statistically weighted to drop in security #4990

Merged

Conversation

Absolucy
Copy link
Member

@Absolucy Absolucy commented Jan 20, 2025

About The Pull Request

Port of tgstation/tgstation#88788

Hey, fun fact, get_safe_random_station_turf() is not as random as it seems. The more areas a department has (blame security), there is a much bigger chance for it to land in that department.

Creates a get_safe_random_station_turf_equal_weight() which first picks a department, creates a list of areas from that department, to then pass into get_safe_random_station_turf()

Why It's Good For The Game

Here's get_safe_random_station_turf() ran 1000 times.

204 - Security
105 - Science
106 - Engineering
101 - Medical
61 - Cargo 
118 - Service
7 - Maintenance (This is only the xenobio cuck room, so it doesn't matter)
85 - Command
79 - Hallway
84 - AI Monitored (Vault, AI sat, etc)

As you can see, the probability for choosing a place like security is much higher. Yes, this is funny for things like the CRAB. But the probability for choosing anywhere else (like command) can be less then 10 percent.

Here's with this proc.

Security - 107
Science - 107
Engineering - 105
Hallway - 94
Command - 104
Medical - 109
Service - 106
Cargo - 105
AI_monitored - 127

Changelog

🆑 Absolucy, StrangeWeirdKitten
fix: Things that drop in random places are no longer statistically weighted to drop in security.
/:cl:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Fix fix da bug
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant