Umbranix Posted July 16, 2014 Share Posted July 16, 2014 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 More sharing options...
orian34 Posted July 16, 2014 Share Posted July 16, 2014 add a line that gives you 5 sanity when planting pinecone Link to comment Share on other sites More sharing options...
Umbranix Posted July 16, 2014 Author Share Posted July 16, 2014 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 More sharing options...
orian34 Posted July 16, 2014 Share Posted July 16, 2014 Look at Hero in the Dark mod there is a character that gets sanity when planting plants !just go to the prefab files and get the druid.lua Link to comment Share on other sites More sharing options...
Mobbstar Posted July 16, 2014 Share Posted July 16, 2014 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! Link to comment Share on other sites More sharing options...
Recommended Posts
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.