https://steamcommunity.com/sharedfiles/filedetails/?id=3648890424
This took me a bit longer than I had anticipated. Let me know if you find any bugs.
#NT Thermal
256 messages · Page 1 of 1 (latest)
This is really awesome, thank you.. Will the "Heater" item found throughout Outposts and certain Submarines finally see use with this mod, or will it remain purely decorative?
Bug: Diving Suits don't check for the Condition of a Battery Cell slotted in; Dead Batteries will heat up suits.
Bug: Someone was suffering from Pulmonary Embolism (Blood Clot in a Lung Artery), and it got to the point where their Lungs had to be replaced, so I removed them and installed Cyber Lungs in their place. Their Lung Arteries were still clotted with blood.
She had a fresh set of Lungs at this point, so this is physically impossible.
Lmao not surprised, lemme fix those. Thank you for telling me.
Alright they're almost fixed twin, just let me make sure I didn't break anything else.
Oh no btw, I didn't think of that.
If I did that would probably make any sub that initial Desu made incompatibile. lol but on a real note I think it will break most subs.
Always. I don't know if the PE bug will be easy to fix, though.. Organ Items can only keep track of their Condition, so if you remove PE on the removal of Lungs, you could simply re-insert them to reset that status.
I didn't even think of just removing the lung. Uh
For right now I just made blood clots low key easier and pulmonary embolism slightly less deadly, and also more forgiving.
Oh twin
I so misread your bug
I thought you were saying it was too hard to remove
I still nerfed it
Um. I'll make it so if the lung condition is higher than 50 it will remove the clot.

Oh, huh. Temperature is a crucial element of Barotrauma's world-building; Everyone wears warm, layered clothing with gloves and boots, and Heaters are set up in certain places because the insulation they wear sometimes isn't enough.
With that said, I wish Temperature were an officially-supported gameplay mechanic. It should be.
..I didn't even think of that. That's a perfect fix. Well done.
I'll probably make my own heater item.
Good idea. That way the mod doesn't conflict with Submarines that have massive Heaters as decorations.
😄 Yes we do..
AIght there we go, now gives you a slight amount of internal bleeding if you remove the lungs after 50% lung damage.
Updated the mod, let me know if you find anything else.
😄 Haha, slight..? You have a sense of humor..
🤔 If there are 100 points of Internal Bleeding, and you re-insert the Lungs into the body, wouldn't you have to give the patient a Combat Stimulant so they don't bleed out and die?
Oh, right. I forgot to tell you this before I left earlier today: The Bathhouse Outpost Module of Barotrauma contains a small room with water. It's implied that this is warm water to bathe and swim in, but I'm not sure how you'd make it mechanically-warm from your end.
Hungry Europans adds a #TestKitchen Submarine, which also contains a Pool. 🤷♂️This shouldn't be cold, freezing water either, but, again, I've no idea how you'd make it warm from your mod.
I changed it lol, it's just 50 now, not too bad considering the circumstance.
Yeah, I'll check it out.
Will mod developers be capable of easily adding Proximity Heat items? (A Campfire from a Survival mod, for instance.)
I mean, it's possible, just kind of inconvient from my understanding. I haven't done it. I believe mods such as Enhanced Reactors give heat by a xml range and affliction. In lua I could just get the distance between the player and item, I think.
Well, just for the sake of performance, I'd recommend making it in XML. Neurotrauma is mainly Lua, and that's exactly why your FPS gets tanked down to 5-10 when large amounts of Humans are injured; All of them have afflictions with mod-related checks running every frame, therefore they are not subject to the recent Optimizations the Baro devs made to the Vanilla game.
Another thing: You should take a peek at the "Animated Arms: Adaptive Combat" mod. It uses Lua to add "Plate Slots" to certain Diving Suits (Combat Diving Suit and Slipsuit), allowing you to equip Body Armor Plates for ballistic protection.
Using this knowledge, you can do the same here, adding Battery Slots to Vanilla and Modded Diving Suits alike.
Ooh, thanks for telling me, I'll take a look.
bro
the game is already hard enough in my modpack 💔
i am not adding temps and shi 😭
Lmao
👍 Sure thing.
Is there a "Temp Display" to view my character's current temperature every frame/second, or will the Handheld Thermometer need to be used every time?
One of the reasons I bring this up is because Super Metroid: X-Fusion (2025) had a very unique feature for the Varia upgrade: Instead of giving your suit permanent immunity against cold and hot environments like other games have, a Temperature Display would show up, and you'd begin taking damage at -130° C / -202° F.
If it isn't a thing already, maybe you could add a similar feature to the more advanced suits, like the PUCS or the Exosuit; A display showing both your Internal Body Temperature, and your External Temperature.
That's a really good idea, but I'm not too sure how I would add that.
You just gotta use the handheld thermometer.
Alright. I'll bring it up again if I'm able to think of a way to get it working.
Bug: Pulmonary Edema has the same issue as Pulmonary Embolism; Replacing Lungs does not remove it.
Hopefully, Home & Harbor eases Organ Logic, so weird bugs like this are harder to replicate in the future.
Completely forgot lol. Gimme a sec.
It's okay, I can wait. I'll need to head to bed in a few minutes anyway. (And yeah, I get it. I forget some pretty important things too..)

I think the Temperature of characters should gradually drop if they aren't wearing any Innerwear item, and aren't around a heat source.
Implementation of this has to be done carefully, though. A custom Map won't always take place in a cold environment. Someone could make a scene that takes place during the Summer on Earth, for instance, or a really hot room like a Refinery.
So there needs to be a way for map designers to govern what areas are hot/cold. We can't assume every place is going to be cold, even if that's the case in Vanilla Barotrauma's world of Europa.
Maybe you could take inspiration from the "Tough as Nails" mod for Minecraft in some manner? Dynamically changing the Temp of a character depending on the environment they're in, the heat sources they're around, and the insulation/cooling they wear. It's possible to become too hot from clothing in that mod.
However, it will be difficult to control the heat of all clothing in this game, because there's no real distinction between Commoner Clothes and a Prisoner Jumpsuit.. The Baro devs would have to implement support for that themselves, for there to be the expectation for mod developers to make their clothing items temperature-compatible. (I know this because I wrote a Footsteps script, and I had to manually check if an Innerwear item had Sneakers, Boots or Formal Shoes. It's a pain, as I won't be able to account for every modded item out there.)
I really like that idea, however for the same reasons you mention I think I would struggle to implement that. The closest there is to that in mod is probably just the heating calculations for a room and it's adjacent partners when a fire spawns.
I was planning on adding a ship wide heater at one point but I ended up not.
The problem is that would cause all subs to be built with thermal in mind.
nah
thatd b annoying
slots not being hardcodes would be nice
What do you mean?
oh yeah
asking for a pants slot without knowing this
Still unplayable
itd would break literally every mod that adds clothing for no improvement in anything
of what?
adding skirts pup bet smh
most the outfits have the same pants but with different colors
BTW
Didn't know that.
I thought of a similar idea just now: A simple overlay applied to the screen, which will gradually fade to Light Blue or Bright Orange, depending on how cold/hot your character feels.
I often find it to be unbelievable when my currently-controlled character freezes to death, because they are in what I think is a warm room. If I see a light-blue overlay fading in, I'll know they're actually really freezing in that moment.
I was going to implement that but I couldn't find a way to make it fade in. Here's a unused freezing overlay.
I'll do some more research.
Oh awesome. Taking a peek at Hungry Europans might help, although it is not a script-based mod: When sleeping in beds, a black overlay will quickly cloud your character's vision.
Aight I'll check.
Added it
Just lemme upload it
Fades in and out too
Uploaded, tell me what you think.
Hm.. I can't seem to get wet any longer.
Maybe the Robotrauma compatibility has a bug somewhere?
Hm, okay, so it seems newly spawned characters cannot become wet, whereas the main Crew (Captain, Mechanic, Electrical Engineer, etc.) can.
While observing it from the Crew, however, I didn't find the effect to be strong enough on my end. I could finally begin seeing the overlay when my character went numb, which is too late of an indicator, but maybe I need to do more testing to verify.
I believe this is a NT issue, the mod itself only updates when certain afflictions are applied, which doesn't include any of my afflictions. Applying a human update should fix this issue. I.E placing a bandage, getting hurt so on so forth. I'll look into still tho.
I'll make the overlay a bit stronger.
🤔 Really? Huh, that sounds strange, because it was working for all Humanoid characters perfectly fine before.
This issue has now remedied mostly. Tell me if it persists.
I can see it now, but it's extremely subtle unless you're within a dark environment.
Maybe a slider in the Config would help make adjustment easier, but I don't know if you'd want (or have the time) to implement that.
I'll keep tweaking it.
Thanks. I think it would help if the overlays are Light Blue for cold and Bright Orange for hot, respectively.
I mean they should be, I think it's just the opacity being too low.
Ah, okay. It should be an easy fix, then.
Despite the PUCS being an Environmental Suit, the user still ends up passing out from being overheated within a room of fire, despite not being badly burnt. Is this intentional?
Another thing: I think NT's "Chilled" affliction, along with NT Thermal's "Wet" affliction, should lower your internal temperature ("Wet" already does this, I think), so you can prepare to enter a heated room to buy yourself some extra time within the flames.
(🙂 I can see the overlays very clearly now, by the way. Thank you.)
Chilled should lower your temp, however it's mostly used to minimize Warm I.V fluids when reheating.
As for pucs, yes I know you can still overheat with it, it's not intentional. Once I get the damage modifer of the suit I can't figure out how to distuingish between the fire one and the others. Furthermore I can't even get the value of them.
Also yeah 'Wet' slightly lowers your temp, however it's mainly just a multiplier for water.
Basically I can't get the resistance for burns from suits.
🫤 Ah, yeah.. I ran into a similar issue with an Armor script I wrote.. I had a function that detected how much Gunshot Wound an item reduces, but one day, it stopped working. I put a lot of time into that script, so I felt heartbroken over it for a while.
Here, in case it works for you:
local function GetGunshotReductionFactor(item)
if not item or not item.Prefab then return nil end
if not item.Prefab.ConfigElement then return nil end
for element in item.Prefab.ConfigElement.Elements() do
if element.Name.ToString() == "Wearable" then
for child in element.Elements() do
if child.Name.ToString() == "damagemodifier" then
local afflictions = string.lower(child.GetAttributeString("afflictionidentifiers") or "")
-- Ram-Shackled Debug Messages made in swift desperation.
print("[CT: Functional Armor] Checking armor:", item.Prefab.Identifier)
print("[CT: Functional Armor] afflictions list:", afflictions)
print("[CT: Functional Armor] matched gunshot:", afflictions:find("gunshot"))
if afflictions:find("gunshot") then
local multiplierString = child.GetAttributeString("damagemultiplier")
local multiplier = tonumber(multiplierString) or 1.0
return multiplier
end
end
end
end
end
return nil
end
You'd just have to replace gunshot with burn, but, I don't know if this function even works to begin with. It doesn't for me any longer.
Holy goat?
Lemme test this.
Weird, your script is working, it's just that burn isn't contained in the afflictions list?
Lemme try pucs
Same with pucs
Burns must be stored somewhere else?
Whoa.. That is weird.. It listed everything out except for Burn..
Ohhhhhhh
Stand by
Burn is considered a affliction type, so maybe that breaks it?
Hopefully this is the discovery that fixes it.
🙏

You are the goat
I'll tweak it and implement it later
I'm only going to calculate it once tho on equip. Then store it in my own thermal data section thingy majigy.
Thank you.
What's your steam? I'll add you to the credits.
😮 Oh, it actually works. I'm happy it did.
Here's my Steam profile: https://steamcommunity.com/id/Antinous
Alright just gimme some time to add that and make sure it didn't cause twenty other issues.
local function BurnReductionFactor(item)
if not item or not item.Prefab then return nil end
if not item.Prefab.ConfigElement then return nil end
for element in item.Prefab.ConfigElement.Elements() do
if element.Name.ToString() == "Wearable" then
for child in element.Elements() do
if child.Name.ToString() == "damagemodifier" then
local afflictions = string.lower(child.GetAttributeString("afflictiontypes") or "")
-- Ram-Shackled Debug Messages made in swift desperation.
print("[CT: Functional Armor] Checking armor:", item.Prefab.Identifier)
print("[CT: Functional Armor] afflictions list:", afflictions)
print("[CT: Functional Armor] matched gunshot:", afflictions:find("burn"))
if afflictions:find("burn") then
local multiplierString = child.GetAttributeString("damagemultiplier")
local multiplier = tonumber(multiplierString) or 1.0
return multiplier
end
end
end
end
end
return nil
end
Here it is btw
I just changed the list to use 'afflictiontypes'.
Idk if this will fix your issue tho.
Hm, yeah, if this is running correctly, then the function itself was not the culprit.. Thanks, though. This may be helpful in the future.
sooo thats weird.
I don't know why I'm getting that error.
It wasn't occurring earlier.
nvm lmao
I removed the "local afflictions = string.lower(child.GetAttributeString("afflictionidentifiers") or "")" on accident
Ignore this
Done, tell me what you think.
It's not a complete immunity, just a very large chunk of resistance.
👍 Awesome, that's how it should work. Real-world Firefighters can resist intense heat for a time, but not forever.
I plan on making stasis bags now give hypothermia, or maybe even extreme hypothermia since I believe that's how they work.
Also I added compatibility with enhanced reactors built in, idk if you want to test that or not.
Uh oh. I don't know if the feature is in the mod yet, but it's throwing an error when a PUCS is equipped.
That'll make them even more immersive. Good idea, as long as it doesn't interfere with the intended balance of NT's Stasis Bag.
Speaking of intended balance, could you add a "Lung Removal Causes Internal Bleeding" toggle in the Config Menu? Or a Slider that can go from 0-100?
shit
My bad gang, let me just finish this assignment really quick.
This is why you error handle.
Don't be like me lol.
Can you give me as much info as you can recall btw? I don't know why this would of just broke.
I think I narrowed down the issue
I didn't see the lung thing, yeah I can. It should only occur if you have plumonary embolism, thats the case right?
You seem like you've got a lot of school to do, so it makes sense with your circumstances. (..But yes, it's important to put updates off until you can thoroughly stress-test them.)
I'll take the excuse
I can't recreate it btw.
Well, in-game, I'd just equip the PUCS, and every few seconds, that error would be thrown.
Taking a look at the code, I'm confused as well.. Everything should work, as I have working examples of HasTag() myself, but it doesn't function here? Seems like this is a conditional issue, where more than one variable is affecting the outcome.
Oh, yeah. I didn't initially notice you designed it like that. Thank you.
Sweet.
I think whats happening is that you have some mod overriding the pucs identifer? So the identifier I have in code is different from the index? Or of the sorts.
Whats the mod list?
If I may.
Hm, yeah, I think it could be- Ha, of course it is.. I installed Enhanced Reactors this session to test its compatibility with NT Thermal, and that mod overrides the PUCS, apparently. It offers -80% Heat Stroke Risk and -90% Contaminates.
Ohhhh, was it above NT Thermal? I never tested that.
Yep
Got it
Just put it below Thermal for right now.
I'll fix it.
My bad
Well, I think the proper fix is to add a Battery Slot through Lua. I'll look into how Animated Arms does it, and come back with (hopefully) working code.
It's okay. You couldn't have foreseen this.
I'll check it out right now.
Ah I see
I fixed it, I'm just really silly.
I never checked if the variant existed.
So it just tried to do "".HasTag()
Which obviously doesn't exist.
Whoops.
Now let me see how the gun mod you said does it.
Thank you for reporting.
Alright I uploaded it.
This gun mod is so damn high quality.
Thank you for showing me this lol.
I gotta add this to my campaign.
🫤 What a mess that mod is.. He just shoved everything into the main directory of his project..
I don't know if you were able to find it yet, but the Slipsuit has a Ballistic Plate Slot, and the item wasn't overriden to have an ItemContainer component, so it has to be done with Lua, but.. 🤷🏻♂️where?
Regardless, though, yeah, it is certainly a must-have for this game. It fills in Barotrauma's lack of combative depth.
Sorry I was just having a blast with guns, I haven't even started to look. I'll start now.
Wow
You were not being harsh enough lol.
Oh no, take your time. I completely understand. I did a lot of.. "experimentation" with the mod when I first discovered it as well.
To be transparent, I'm not annoyed with you. I'm just annoyed with the- Yeah, the lack of organization in his mod. He didn't even have the decency to create a Weapons folder.. He just put all his guns within the main folder.
Lol no your good, you said it was the slipsuit that added the thingy majigy?
Yeah. The following items have a Ballistic Plate Slot:
- Light Body Armor
- Medic Body Armor
- Body Armor
- Heavy Body Armor
- Combat Diving Suit
- Slipsuit (<- This seems to be the only one without an
ItemContainer, so it's given a slot through scripting.)
K thank you.
Bug: The Hazmat Suit of Enhanced Reactors is not insulated against Water.
Yeah I know, I'm probably gonna fix it, my thought process was that since it doesn't protect against pressure it probably shouldn't water.
Although the more I think about it the less it makes sense.
I'll fix it rn.
Fixed, update the mod.
Hm.. You update your mod extremely often. It's making me think I should do the same.
The people who use one of my mods have been waiting nearly 3 months for an update now. It's a big update that fixes, improves and adds a lot, but still, 3 months is a long time to wait..
Should I, or would that be unwise, given the focus of the project? Maybe the focus doesn't actually matter, though.. Maybe updating a project weekly is simply the courteous thing to do.
I mean it's up to you, your taking your own freetime to do this.
That's true.. And I don't have all the time in the world to get everything done right away either.
Hey, what power do map designers have with hot/cold areas? Would I be able to make a room super hot or super cold yet? Or would you need to create an item that sets a Hull's temperature to the entered amount?
By the way, could you add a temp command that sets the temperature of a client's Character? It can be done sort of like this:
Game.AddCommand("temp", "Sets your character's temperature.", function(args, client)
local character = client and client.Character or Character.Controlled
if not character then return end
local temp = args[1]
--Set Temperature here.
end,nil,true)
No map makes don't have any ability to control. Your just gonna have to make an item to do that.
I'll add those items in a update later.
Didn't know AddCommand was a thing. I'll do that for sure. 👍
Would I be able to do this now, or is Temperature currently hard-coded into your mod?
I guess the question I'm trying to ask is: How does Temperature work? Is it an invisible affliction that can be altered by other modded items, or is it a standalone variable exclusive to the code?
Temperature is an affliction thats added to Neurotrauma. It can be adjusted through just about anything.
Wow discord just slammed all the code to the right of the text file.
But yes should be able to do it now.
🙂 Awesome, that's perfect. Thank you.
@gilded flame Ydrec wrote this to show me how to display numbers on a client's screen. You can reference this in the making of a dynamic Temperature Meter for advanced suits. Maybe you could display the meter when holding the Handheld Thermometer, at the cost of its Battery.
I'll try to implement this later. Thank you for showing me.
I'm working on it now. I'll post the code here if I can get it functioning.
Got a rough version working. I'll polish it up some more with dynamic text color and then send the code here.
Yoooo, that's actually peak.
I just gotta think of a way that it will work.
Maybe a upgrade for the thermometer?
Or healthscanner.
Hm, yeah.. Maybe an upgrade involving both items would be best.
I think the PUCS should definitely display both Internal Temperature, and External Temperature (Suit Temperature), but I've no idea how the latter works yet. I'm not sure if you added a "Comfort Range" to suits, or simply gave Temperature Resistance to all suits that reduce Burn.
Yeah external temperature kinda exists, but only in the form of room temp, fire and water. Internal temp would be easy. All suits have temperature resistance juts by existing. However I might go back and tweak that.
Well, hopefully Suit Temperature can be displayed as well. It would be really cool to see that your Internal Temperature doesn't change until the Suit Temperature of your PUCS reaches 578°C or so.
Ohh, I mean yeah I could implement that. It's not exactly like that but it's pretty close.
🫤 Hm.. There's this weird bug I'm having trouble with.. The display doesn't go away unless you are no longer controlling a character.
Alright, that weird bug is still in, but aside from that, it's functional. So far, it features:
- Internal Temperature Display in both Celcius and Fahrenheight.
- Dynamic, Gradually-Changing Display Color (Cyan for cold, White for normal, Red for hot.)
LuaUserData.RegisterType('Barotrauma.CharacterHUD')
CharacterHUD = LuaUserData.CreateStatic('Barotrauma.CharacterHUD')
local textblock = nil
Hook.Patch('NTThermal.TempHUD','Barotrauma.CharacterHUD', 'Update', function (instance, ptable)
local character = ptable["character"]
if not character then return end
local temp = character.CharacterHealth:GetAffliction("temperature")
local tempC = temp and temp.Strength -1 or 0
local tempF = tempC * 9/5 + 32
if not textblock then
textblock = GUI.TextBlock(GUI.RectTransform(Vector2(0.1, 0.2), CharacterHUD.HUDFrame.RectTransform, GUI.Anchor.CenterRight), 'text', Color.White, GUI.Style.LargeFont, GUI.Alignment.Right, false, 'GUITextBox', Color.Blue)
end
textblock.Text = string.format("%.1f°C / %.1f°F", tempC, tempF)
if math.abs(tempC - 37) < 0.25 then textblock.TextColor = Color.White
else textblock.TextColor = Color.Lerp(Color.Cyan, Color.Red, math.min(1, math.max(0, (tempC - 30) / 15))) end
end, Hook.HookMethodType.After)
Ohh very nice. I'll take a look in a second. Thank you for this.
Always. Hopefully we can get that bug fixed, and the additional Suit Temp working.
I think I'll add that to the PUCS, a temperature headset and the thermometer when scanning a patient or something along those lines.
Pucs for sure
Maybe even thermometer goggles? So walking past someone displays the temp above there head.
However that would require me to convert global positions of heads to screen position.
Which isn't too hard I think.
Hm.. Maybe this behavior should be added to Vanilla Baro's Thermal Goggles? They already show the Heat Signatures of other characters, after all.
I was coming back here to comment that lol, you beat me to it.
I wonder if I could edit the thermal overlay? Like make them blue if cold and vice versa.
I think this feature will need extensive testing. I'm certain it's possible to add this display to the PUCS, but what happens when you remove the suit?
🤷🏻♂️I don't know how I'd make it go away. The display might just stay there..
There's an idea.. Wait a minute. This.. isn't a thing already? Aren't Thermal Visors meant to show both cold and hot sources? Why wouldn't the Baro devs make it like that?
lol idk
It's just for biological activity.
I think
If that's true.. then they should have made it more realistic.
Bug: Even when you're very far away from a heat source (such as Fire), your Temperature will rise as if you're close to it. This is easily noticeable with the ERC Donjon mod, where you are given a large, open world to explore.
Yeah thats due to how I made heat transfer, I had a feeling that would happen. Was just praying it wouldn't lol.
I'll fix it tomorrow.
I'll also add a config for heat transfer to be safe.
I'm just a lil busy right now with this homework.
I'm just 102 off of the max combinations. I'm addicted.
Well, I think it can wait. This is a non-critical bug, as you'd only ever encounter it in very unique scenarios. (I'm sure you have a ton of work to do anyway.)
I temporarily added a config to enable/disable heat transfer until I think of a better fix.
I'll have to devise a better plan on how heat works later.
You may want to add a "Thermal Blanket" wearable item.
I was kinda already heading in that direction with a heated wet suit that I was planning.
I haven't actually got to adding it tho.