Jump to content

Need help editing an existing prefab


Recommended Posts

So I am just beginning to play around with editing and mod creation.

 

My current goal is to edit the "pinecone" prefab and the "plantable" component in such a way that planting a pinecone increases sanity by 5 points.

What is the easiest way I could go about accomplishing this? Any help is appreciated!

Link to comment
Share on other sites

orian34, what should that line look like and where should it be placed in the code is pretty much my question, I've tried multiple separate lines and none have seemed to work yet. I'm very new to LUA right now.

Link to comment
Share on other sites

Best is to look at other mods/game functions that do similiar stuff, until you understand it enough.

For example: evil flowers have a negative sanity aura, so look for anything that says "sanity" in "flower_evil.lua" and think about whether that could be the wanted piece of code.

If you need more hints:

You are looking to add a sanity-aura to the pine cones.

That is theoretically seen not the best, since you can also look for pine cones around the player and calculate a sanity aura in order to make the mod more compatible with other mods. But that is more difficult, so editing a existing prefab is what you should do for now.

 

EDIT: Actually, this is really late, but I think I missed the point. PM me if you read this! :p

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