Jump to content

LUA mod help


sonnyzane

Recommended Posts

I am making a character right now, but i can't figure out how to give my character the Thulecite crown shield ability during the night(charlie time). it would also be nice to know how to change how long it stays, and how much %sanity drain it takes per hit(normal is %5 of damage taken). also, do you know how to make it so you have a light radius at night time(charlie) that doesn't attract pigs?

Link to comment
Share on other sites

I know how to give your character a light radius but it's impossible to prevent it from attracting pigs unless you create a custom tag and include an edited version of the brain/component/behavior file that makes pigs attracted to light.

 

 

For the thulecite crown bit, open the thulecite crown (ruins_hat in hats.lua) prefab file, find the function relating to being attacked (It's probably called something like "onattacked") copy that full section of code (from "local function" to the last "end"), change anything that says owner.components to inst.components and get rid of anything that says onequipped. Don't edit any of the files in the base game, just use them for reference.   

copy both inst.components.armor lines under proc and put them in your character's master postinit. change the tuning value to a different tuning value or a number between one and zero.

if something goes wrong keep experimenting with the other bits of code in the proc section

 

 

Link to comment
Share on other sites

Since i made this i have found a way to fix my lighting problem. The only thing is when i try to add the Thulecite crown bit. Well.....it loads up but it wont add the shield ability. i have worked around with it for a while but it just wont work. although it does load without any crashes.

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

Please be aware that the content of this thread may be outdated and no longer applicable.

×
×
  • Create New...