Jump to content

Character mod coding help!


Megski

Recommended Posts

I'm not sure if what I'm trying to do is even possible, but here goes:

 

The idea behind the character is that she's good at sewing, and can make higher quality clothing items. I was thinking of maybe allowing a few more uses with the sewing kit, as well. I was also trying to figure out how to modify the sanity loss during rain, but I can't seem to find any lines about it anywhere.

 

I've tried a couple different things that SEEMED like what I wanted to put in the coding, but when I went to test it, the game closes itself as soon as a world is generated with the character. In short, I can't figure this out for the life of me, so any help would be appreciated!

Link to comment
Share on other sites

Hey megski, I might have some answers. The sewing kit and clothing items are all indvidual items in game and I am afraid that you can't affect the stats of them without changing the prefabs seperatly, but that would change the stats of all of the items without you yourself being the one crafting them. However if you wish to still persue the idea I suggest making custom items with recipes in you mod so that your character is the only one to craft them. Example: is like how webber is the only one to be able to craft spider cacoons. This way you can craft custom clothing and share with the people that have the same mod loaded on the server.

 

As for the sanity loss during rain the umbrella has a component called waterproofer. I am sure that if you use this as well as a effect to restore sanity to compensate for the lost then you should have the same effect.

 

inst:AddComponent("waterproofer")

 

inst.components.waterproofer:SetEffectiveness(TUNING.WATERPROOFNESS_MED)

 

hope this helps

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