Jump to content

Recommended Posts

So I'm creating a character and got pretty much all the basics down, but I'm wondering how I'd make him so he is buffed during winter (higher health, sanity, hunger) but drastically loses health when damaged by fire and also loses sanity around fire (including campfires).

Also, I'd like to start him off with an ice staff that lasts permenantly, how would I go about doing that?

So... a magical snowman? :razz:

 

The winter thing is probably the hardest because you need to check for winter somehow.

EDIT: you can listen for an event[1] by the season manager. The current season is "data.season" and should be "SEASONS.WINTER" for winter.

inst:ListenForEvent("seasonChange",function(world,data) SOME_CODE_HERE end, GetWorld())

 

Fire damage is the easiest. Just set the multiplier higher.[2]

inst.components.health.fire_damage_scale = 2 --double, you can change the number how you want. 1 is normal

 

Sanity aura around certain prefabs (such as houndfire, campfirefire, etc.) can be done using prefabpostinit.[3] Or you could try to change the sanity of your character directly. That would be a bit more complicated.

 

As for the staff... you should probably copy the respective Lua file (staff.lua) from data/scripts and modify it. It contains all staves, so you can safely remove anything that isn't part of the blue staff or common data.

 

Oh, this is not for Together, is it? I have no experience with that game.

Edited by Mobbstar

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...