Jump to content

Help Making a Custom Character


Recommended Posts

I had since removed the line of code but the first file I posted still has it.

inst.components.sanity.custom_rate_fn = sanityfn
local function sanityfn(inst)local delta = 0if TheWorld.state.isday thendelta = -0.25 elseif TheWorld.state.isdusk thendelta = 0.5 elseif TheWorld.state.isnight thendelta = 0.95 endreturn delta end

I grabbed it from the file I had posted before. this code caused a lot of problems in my mod. I am also currently trying to make the weapon for her, everything works perfectly except for one thing, I cannot see the inventory image nor the item swap image so I believe I have some major coding errors in that one.

Link to comment
Share on other sites

local function sanityfn(inst)local delta = 0 if TheWorld.state.isday then delta = -0.25 elseif TheWorld.state.isdusk then delta = 0.5 elseif TheWorld.state.isnight then delta = 0.95 end return delta 

end
inst.components.sanity.custom_rate_fn = sanityfn

This is the code that is "fixed".

Link to comment
Share on other sites

local function sanityfn(inst)
	local delta = 0

	if TheWorld.state.isday then 
		delta = -0.25 
	elseif TheWorld.state.isdusk then 
		delta = 0.5 
	elseif TheWorld.state.isnight then 
		delta = 0.95 
	end 

	return delta 
end

inst.components.sanity.custom_rate_fn = sanityfn

Try that one

Link to comment
Share on other sites

Now there is one more thing, She is supposed to have a weapon called cruel moon I have it done artwork and everything but it doesn't show up which seems to be a common problem on the thread I was following . What I mean is the inventory image doesn't show up nor does the swap image but the ground image does, I followed the instructions completely but I got a feeling I am missing something pretty big which is causing this problem.  I have it separate from her right now and will attempt to transfer everything when it is ready.

CruelMoon.zip

Link to comment
Share on other sites

Alright new question, Is there a way to have a custom Description of an item from each of the characters. For instance when you describe something like a flower as wilson he says something about but other character say something else? I'm not very good at explaining stuff.

Link to comment
Share on other sites

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
 Share

×
  • Create New...