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

Make radioactive material radioactive #34436

Open
wants to merge 5 commits into
base: master
Choose a base branch
from

Conversation

minus1over12
Copy link
Contributor

@minus1over12 minus1over12 commented Jan 14, 2025

About the PR

Uranium is now weakly radioactive.

Why / Balance

People expect uranium to be radioactive.

Technical details

Yaml was changed to make uranium and related entities radioactive. The ore rocks look like they have high intensity in code (2.3), but are actually very low because the rock's radiation shielding weakens it immensely.

Media

Uranium in hand producing radiation

Requirements

Breaking changes

Changelog

🆑 WarPigeon

  • add: Uranium is now slightly radioactive.

@github-actions github-actions bot added size/S Denotes a PR that changes 10-99 lines. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. and removed size/S Denotes a PR that changes 10-99 lines. labels Jan 14, 2025
Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank for the contribution!

praise: Your PR looks good, and I don't see any issues that would block this code-wise.

issue (blocking): I am wondering the problems that were brought up in #29545 have been addressed.

Bananium used to be radioactive, but it was removed as you could create a pile of them next to a radiation collector for essentially infinite power.

That PR even mentions the lack of uranium's radioactivity, and states that's a good thing, as it would have the same infinite power problem.

thought: Also, is there any thing that may require mappers may need to think about when placing the uranium on a map?

For maps that place it in the engineering vault, they made need to have extra considerations like moving it away from the plasma to minimize radiation damage.

suggestion (non-blocking): It also seems that lighting is inconsistent between the uranium sources. I believe that if it is radioactive, it should glow green as an indicator. Some of the uranium sources already do this, but not all (e.g. the sheets).

question: Also, is there any formula behind the slope values, or was that simply something you tested and worked well?

@Aeshus Aeshus added P3: Standard Priority: Default priority for repository items. T: New Feature Type: New feature or content, or extending existing content DB: Beginner Friendly Difficulty: Great for beginners. Unambiguous in scope, and explains how to achieve the result. A: Cargo/Salvage Area: Cargo department or Salvage. A: Engineering Area: Engineering department, including Atmospherics. and removed S: Untriaged Status: Indicates an item has not been triaged and doesn't have appropriate labels. labels Jan 15, 2025
@minus1over12
Copy link
Contributor Author

praise: Your PR looks good, and I don't see any issues that would block this code-wise.

Thanks!

issue (blocking): I am wondering the problems that were brought up in #29545 have been addressed.

Bananium used to be radioactive, but it was removed as you could create a pile of them next to a radiation collector for essentially infinite power.

That PR even mentions the lack of uranium's radioactivity, and states that's a good thing, as it would have the same infinite power problem.

I will test with this a bit and get back to you. I can scale down the stackable item's radiation values if it turns out to be useful for power.

thought: Also, is there any thing that may require mappers may need to think about when placing the uranium on a map?

For maps that place it in the engineering vault, they made need to have extra considerations like moving it away from the plasma to minimize radiation damage.

Engineers have radiation resistant hard suits to slow down the damage, and I also tried to address this using the slope values. Mappers may want to consider moving engineering's uranium into a lead box to neutralize the radiation threat.

suggestion (non-blocking): It also seems that lighting is inconsistent between the uranium sources. I believe that if it is radioactive, it should glow green as an indicator. Some of the uranium sources already do this, but not all (e.g. the sheets).

I can add this.

question: Also, is there any formula behind the slope values, or was that simply something you tested and worked well?

I set $\text{intensity}$ to $0.1$ since that is the smallest number in game Geiger counters show.

For $\text{slope}$, the goal was to meet a player expectation (uranium is radioactive) without making it too useful as a demon core. I went with an assumption on how the game is doing the calculation ($\text{rads} = \text{intensity} - \text{slope} * \text{distance}$) and the thought that a full stack of uranium should not have an effect more than $1$ tile away; hence the slope of $3$ since I was using an intensity of $0.1$. From testing, this seemed to be correct. I am highly open to nerfing this further if 1 tile is too much.

No free power for engineering
@github-actions github-actions bot added the size/S Denotes a PR that changes 10-99 lines. label Jan 15, 2025
@minus1over12
Copy link
Contributor Author

Changes the slope from 3 to 300 on the items, which:

  • Makes mapping no longer a concern, as uranium is now only dangerous when held.
  • Prevents the demon core scenario.
  • Makes it not useful for power.

@minus1over12
Copy link
Contributor Author

Added the glow effect from the ore item to the sheets. I am leaving the rocks dark since I don't want to detract from the value of the mineral scanner.

Uranium glowing

image

@minus1over12 minus1over12 requested a review from Aeshus January 15, 2025 04:56
@github-actions github-actions bot added the S: Needs Review Status: Requires additional reviews before being fully accepted label Jan 15, 2025
@HyperB1
Copy link
Contributor

HyperB1 commented Jan 15, 2025

And radium (which is a million times more radioactive than uranium) still emits no rads...

@MozarteanChaos
Copy link

And radium (which is a million times more radioactive than uranium) still emits no rads...

As far as I'm aware, radium currently only exists as a liquid reagent, rather than a solid material. I don't think any liquids passively emit radiation at present, and it doesn't look like this PR changes that.

@slarticodefast
Copy link
Member

Personally I like there being some more dangers to watch out for when mining. And at the moment we don't have a lot of radiation sources.
The problem when bananium was radioactive was that carrying a bag full of it around could be used to quickly and stealthily perma kill someone without them noticing. Ideally there would be some sort of warning sign of radiation poisoning, like vomiting at a certain damage threshold so you don't have to keep an eye on your health bar at all times.
Making uranium weakly radioactive should be fine though in my opinion.

@Aeshus Aeshus self-assigned this Jan 15, 2025
@ilovehans10
Copy link

Ideally there would be some sort of warning sign of radiation poisoning, like vomiting at a certain damage threshold so you don't have to keep an eye on your health bar at all times.

you taste metal
you suddenly feel hot
your muscles spasm uncontrollably
you feel lightheaded
you feel nauseous
a clump of your hair falls out

I tried to base all of these off of symptoms shown by victims that were directly exposed to high dosages of radiation like Cecil Kelley.

@Aeshus
Copy link
Contributor

Aeshus commented Jan 15, 2025

Ideally there would be some sort of warning sign of radiation poisoning, like vomiting at a certain damage threshold so you don't have to keep an eye on your health bar at all times.

you taste metal you suddenly feel hot your muscles spasm uncontrollably you feel lightheaded you feel nauseous a clump of your hair falls out

I tried to base all of these off of symptoms shown by victims that were directly exposed to high dosages of radiation like Cecil Kelley.

I think that would be better suited for another PR, as it is a more general problem.

Glowing should be a small indicator, though the same problem existed for Bananium and the Cancer Mouse, so it's not really a new problem.

Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for making my requested changes!

praise: I think the changes all look good, and I couldn't create infinite power with the sheets when testing in-game.

question (non-blocking): Should we make uranium glass and its descendants radioactive as well (e.g. uranium shiv)? This should probably be done in a separate PR, as that may have more balance ramifications.

note: And as slarticodefast and ilovehans10 brought up, the lack of warning signs of radiation is quite a problem.

I think that should be done in a different PR as this has been a problem for quite a while and isn't directly related to this change. Things like the Singularity and Cancer Mouse are highly deadly in their radiation damage, yet don't have any direct symptoms.

Just like the other radiation sources, I believe having our current visual indicator (Cancer Mouse glows green, Singularity is the singularity) should be sufficient for now. Plus, the uranium sheets are basically hot potatoes right now and aren't a significant risk unless you carry them around for a good amount of time.

Comment on lines 584 to 586
- type: RadiationSource
intensity: 0.1
slope: 300
Copy link
Contributor

@Aeshus Aeshus Jan 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

suggestion (blocking): Slarti has suggested that we go back to slope 3, as they don't think that it would be too big of a problem with the radiation collectors. Sorry for making you revert that!

@slarticodefast
Copy link
Member

Yeah, I guess the warning signs from radiation damage should be done in a separate PR.
I did not test it in-game yet, but a slope of 300 sounds a little too extreme if the falloff is linear.

  • In case you do want to use radiation for something, for example triggering artifacts or giving someone radiation damage you would need perfect accuraccy to the point where it may feel bugged.
  • This might actually make it more dangerous because the geiger counter will no longer detect it
  • I think an effective radius of roughly one tile is reasonable

@Aeshus
Copy link
Contributor

Aeshus commented Jan 15, 2025

Yeah, I guess the warning signs from radiation damage should be done in a separate PR. I did not test it in-game yet, but a slope of 300 sounds a little too extreme if the falloff is linear.

  • In case you do want to use radiation for something, for example triggering artifacts or giving someone radiation damage you would need perfect accuracy to the point where it may feel bugged.

Yeah, that’s true. I think this would need to be solved as it seems pretty important to not cause unneeded confusion.

Currently it’s kept so low as to stop it from generating power using the radiation collectors. The underlying problem wasn’t solved since Bananium’s radioactivity removal. A stack or two can basically power a whole station.

  • This might actually make it more dangerous because the geiger counter will no longer detect it

Geiger counters that are on your person will still detect it just fine, and you are in no danger if you are not directly holding them.

  • I think an effective radius of roughly one tile is reasonable

I think if we could stop the power generation problem, this would be the appropriate distance.

@slarticodefast
Copy link
Member

slarticodefast commented Jan 15, 2025

Currently it’s kept so low as to stop it from generating power using the radiation collectors. The underlying problem wasn’t solved since Bananium’s radioactivity removal. A singular stack, when split into a pile, can basically power a whole station.

I don't think it's that much of a problem in this case since the intensity is relatively low compared to bananium and with all the uranium you could just run a bunch of super pacmans instead, which would also power the whole station.

@Aeshus
Copy link
Contributor

Aeshus commented Jan 15, 2025

Currently it’s kept so low as to stop it from generating power using the radiation collectors. The underlying problem wasn’t solved since Bananium’s radioactivity removal. A singular stack, when split into a pile, can basically power a whole station.

I don't think it's that much of a problem in this case since the intensity is relatively low compared to bananium and with all the uranium you could just run a bunch of super pacmans instead, which would also power the whole station.

True. I think Bananium was intensity 1, while this is only intensity 0.1.

A Slope 3 should be fine then, as that seemed to have the desired effect earlier.

I'll go look into maybe seeing how we can maybe whitelist radiation sources for powergen as there's also the damaged RTG problem for infinite power.

@minus1over12
Copy link
Contributor Author

Brought the slope back to 3, if it becomes an issue we can always make a hotfix to bring it up to 50.

Optimally we would have 3 different types of radiation (alpha, beta, gamma) and change the effects based on that. However, that is out of scope for this PR.

Copy link
Contributor

@Aeshus Aeshus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

issue (blocking): After discussing with some other maintainers, there may be an issue with the fact that the uranium rocks may harm the mobs on the vgroid if they happen to spawn in proximity to it.

This is probably for the best as the current radiation system tries to send rays from the radiation sources to all mobs within 50 tiles, so this could potentially add unnecessary strain to the server.

Slarticodefast suggested that it can just be explained by the rocks shielding the radiation.

suggestion: The solution is just (unfortunately) revert the rock change.

@Alpaccalypse
Copy link
Contributor

FYI, this inspired me to try some things myself and I can across what seems to be a pretty consistent bug, that if you have intensity set to 0.1, no radiation seems to be generated at all, or at least you take 0 toxin damage and the geiger counter doesn't register anything. #34456

@Aeshus
Copy link
Contributor

Aeshus commented Jan 15, 2025

FYI, this inspired me to try some things myself and I can across what seems to be a pretty consistent bug, that if you have intensity set to 0.1, no radiation seems to be generated at all, or at least you take 0 toxin damage and the geiger counter doesn't register anything. #34456

I think we've tracked the reason down, though I can confirm that the 0.1 is the cutoff. Any stacks larger than 1 will work fine, but if it is exactly 1, it will not register any radiation.

The solutions would either be to change the <= in the link to just < (to be more in line with the describing CVAR comment, see issue for info), or just set all of the intensities to any value greater than 1.0f.

if (rads <= MinIntensity)
return null;

It may be a little out of scope for this no C# PR, but the change seems small enough and is more of a bug-fix that I think it could be fine (though I can't really make any definitive statement).

@ElectroJr
Copy link
Member

While it'd be nice feature, and more realistic, for uranium to be radioactive, I don't think it should be made radioactive, mainly because it'd probably be pretty bad for performance if there's a decent number of sheets and ores around the station (unless its much rarer than I assume it is).

It'd probably require a radiation rewrite. Either to make it better handle many sources by using some kind of radiation tilemap instead of iterating over sources & receivers, or at the very least to rewrite so that it no longer assumes that there's more receivers than sources. E.g., at the moment it needs to call Irradiate() 6400 times per radiation tick if there's 80 players & 80 sheets.

A compromise might be to make it radioactive only if it is also unstable and rapidly decays away to effectively limit the total number that can exist at any one time, but that obviously also has significant balance consequences and removes some of the realism.

@minus1over12
Copy link
Contributor Author

minus1over12 commented Jan 16, 2025

there may be an issue with the fact that the uranium rocks may harm the mobs on the vgroid if they happen to spawn in proximity to it.

Valid consideration. While I think it would make sense for space creatures to have evolved resistance to solar radiation (and by extension what Uranium can put out), I'll leave that for a different place and remove the radiation from the rocks.

the current radiation system tries to send rays from the radiation sources to all mobs within 50 tiles

While not something I am going to touch in this PR, I don't see why it is hardcoded for 50 instead of calculating the maximum effective distance and using that as a limit. See next comment.

mainly because it'd probably be pretty bad for performance if there's a decent number of sheets and ores around the station (unless its much rarer than I assume it is).

I don't see sheets and ores around that often. Engineering always gets a stack at round start, but otherwise it's limited to what salvage can get from mining. And this if anything will encourage people to put uranium into lathes instead of leaving it out to irradiate people.

It'd probably require a radiation rewrite.

Based on the hardcoded 50 tile range issue, the code probably needs an optimization pass over it anyway. See next comment.

It may be a little out of scope for this no C# PR

I vote that C# is out of scope for no C# PRs.

@minus1over12
Copy link
Contributor Author

minus1over12 commented Jan 16, 2025

Update: the code does check for if the ray will have any effect right after it checks the 50 tile distance limit, so it will stop itself from calculating rays needlessly.

        // get direction from rad source to destination and its distance
        var dir = destWorld - sourceWorld;
        var dist = dir.Length();

        // check if receiver is too far away
        if (dist > GridcastMaxDistance) // ← This checks if the entities are more than 50 tiles apart.
            return null;

        // will it even reach destination considering distance penalty
        var rads = incomingRads - slope * dist;

        // Apply rad modifier if the source is enclosed within a radiation blocking container
        rads = GetAdjustedRadiationIntensity(sourceUid, rads);

        if (rads <= MinIntensity) // ← Distance effectiveness check is here. Also slightly incorrect as @Aeshus pointed out.
            return null;

@minus1over12 minus1over12 requested a review from Aeshus January 16, 2025 01:01
@slarticodefast
Copy link
Member

slarticodefast commented Jan 16, 2025

I don't see sheets and ores around that often. Engineering always gets a stack at round start, but otherwise it's limited to what salvage can get from mining. And this if anything will encourage people to put uranium into lathes instead of leaving it out to irradiate people.

Might be fine since we did not have those problems with bananium either when it was radioactive

@Aeshus
Copy link
Contributor

Aeshus commented Jan 16, 2025

Electro has made a PR for some radiation system changes that should hopefully alleviate some of the performance concerns.

#34459

@ElectroJr
Copy link
Member

I don't see sheets and ores around that often. Engineering always gets a stack at round start, but otherwise it's limited to what salvage can get from mining. And this if anything will encourage people to put uranium into lathes instead of leaving it out to irradiate people.

I didn't take into account that this would be pretty effective at incentivising people to get rid of sheets as quickly as possible, so that would definitely help. I don't really have a feel for how common uranium sheets/ore are, but if they're really not all that commonplace it's probably fine? I just checked midround on lizard, and it seems like there were only 10 so it seems ok

SS14 Loader_BjAzXMU92u

Update: the code does check for if the ray will have any effect right after it checks the 50 tile distance limit, so it will stop itself from calculating rays needlessly.

Currently that code is actually abysmally slow for what it should be doing, but that's a separate issue. Though even if if a check is cheap, it can still hurt performance just because it gets run a large number of times, especially if it scales badly like radiation does.

I vote that C# is out of scope for no C# PRs.

Sure, but, that could still result in a PR being blocked until C# issues get fixed. Though like I said probably fine here.

@Djungelskog2
Copy link

is it still dangerous if dragged or shoved in a locker or crate near you? I feel that should probably be a thing

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: Cargo/Salvage Area: Cargo department or Salvage. A: Engineering Area: Engineering department, including Atmospherics. Changes: No C# Changes: Requires no C# knowledge to review or fix this item. DB: Beginner Friendly Difficulty: Great for beginners. Unambiguous in scope, and explains how to achieve the result. P3: Standard Priority: Default priority for repository items. S: Needs Review Status: Requires additional reviews before being fully accepted size/S Denotes a PR that changes 10-99 lines. T: New Feature Type: New feature or content, or extending existing content
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants