Lumina Posted June 10, 2015 Share Posted June 10, 2015 Hello, (First, my english isn't really good so sorry for the mistake) I'm not good at mod but was able to make little mod for personnal use. Nothing elaborate, but i've got an idea i would like to see in game : Making a mod allowing to pick the cactus and spiky bush without taking damage. (And maybe the other similar things, if there is). I would like to see it possible by a "glove" item, (weapon slot) but a hat or armor will be enough if easiest. Could someone help me knowing if the thing is possible and how ? Great thanks ! Link to comment Share on other sites More sharing options...
Seiai Posted June 10, 2015 Share Posted June 10, 2015 http://forums.kleientertainment.com/files/file/1127-dst-equipable-hand-slot/ Link to comment Share on other sites More sharing options...
Seiai Posted June 10, 2015 Share Posted June 10, 2015 (edited) @Lumina,as for the effect of taking no dmg from them, this is the onpickedfunction from the spiky bush (marsh_bush.lua):local function onpickedfn(inst, picker) inst.AnimState:PlayAnimation("picking") inst.AnimState:PushAnimation("picked", false) if picker.components.combat then picker.components.combat:GetAttacked(inst, TUNING.MARSHBUSH_DAMAGE) picker:PushEvent("thorns") endendthe onpicked-function of the cactus (cactus.lua) is a bit bigger, but it also uses picker.components.combat:GetAttacked(inst, TUNING.MARSHBUSH_DAMAGE) to do the dmg. now there's two ways to make your item prevent that. u can either add an AddPrefabPostInit to change the onpickedfunction of all spikybushes and cacti, so they do not do the dmg to players, that have your item equipped, or u can make your item change the players GetAttacked-function on equip to ignore dmg from cacti and spiky bushes, and change it back to the original function on unequip.i think the first way would be the better one.also, if u really only want it for your personal use, and would rather have it the easiest way possible, just comment out the line with picker.components.combat:GetAttacked in the gamefiles themselves.(u might have to redo that after future updates though) Edited June 10, 2015 by Seiai Link to comment Share on other sites More sharing options...
Lumina Posted June 11, 2015 Author Share Posted June 11, 2015 Thank you, i note this and will try. I'll probably not edit the gamefile, because it is possible that if the mod work il would share it with friends. Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now