Jump to content

Recommended Posts

I'm very new to this with little to no knowledge of lua coding. I'm trying to make my first character mod and want them to be immune to winter. I have no idea how to go about this. I don't really care if they can be frozen by attacks or not, I just want them to be fine without a coat.

Any and all help is greatly appreciated!

@Dragonbot03

Temperature is controlled with the temperature component.  This resides on the server instance, so in your character's master postinit callback function you'd edit the component.

It'd look something like:

inst.components.temperature.mintemp = 10

Where 10 is just some arbitrary number above 0.

The screen overlay effects start happening at temperature 5 with the sound effect.  Characters start visibly shivering at temperatures below 0.

So anything above 5 would work.

  • Like 1
  • Thanks 1
9 hours ago, CarlZalph said:

@Dragonbot03

Temperature is controlled with the temperature component.  This resides on the server instance, so in your character's master postinit callback function you'd edit the component.

It'd look something like:


inst.components.temperature.mintemp = 10

Where 10 is just some arbitrary number above 0.

The screen overlay effects start happening at temperature 5 with the sound effect.  Characters start visibly shivering at temperatures below 0.

So anything above 5 would work.

Y'know, that makes a lot of sense. It's working perfectly, thank you!!

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
  • Create New...