MarilouXD Posted April 10, 2018 Share Posted April 10, 2018 (edited) Hey I made a character mod with a starting mod item it's working kind fine but if I equip the item it looks like my character is holding the air. It doesn't appear on the hand neither the ground when I drop it but it doe's damage. I have checked the scripts but because I'm a noob at modding I can't figure out in which script is the problem. Any ideas? P.S. Another question. Can I add sanity loss when the character sees/it's close to a specific thing? Alice.rar Edited April 10, 2018 by MarilouXD Link to comment Share on other sites More sharing options...
Lumina Posted April 10, 2018 Share Posted April 10, 2018 Attach a .zip of your mod, it will probably help. Also, explain how you created your item, because the problem could be very dependant of the method used. About the sanity loss : local function sanityfn(inst) local x, y, z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, TUNING.SANITY_EFFECT_RANGE, {"mole"}) local delta = 0 for k, v in pairs(ents) do local distsq = math.max(inst:GetDistanceSqToInst(v), 1) delta = delta - TUNING.SANITYAURA_SMALL / distsq end return delta end and inst.components.sanity.custom_rate_fn = sanityfn This goes in your character.lua file. The first part as a function, the second part in the master_postinit. Replace "mole" by whatever the prefab you want is. Link to comment Share on other sites More sharing options...
MarilouXD Posted April 10, 2018 Author Share Posted April 10, 2018 (edited) 1 hour ago, Lumina said: Attach a .zip of your mod, it will probably help. Also, explain how you created your item, because the problem could be very dependant of the method used. About the sanity loss : local function sanityfn(inst) local x, y, z = inst.Transform:GetWorldPosition() local ents = TheSim:FindEntities(x, y, z, TUNING.SANITY_EFFECT_RANGE, {"mole"}) local delta = 0 for k, v in pairs(ents) do local distsq = math.max(inst:GetDistanceSqToInst(v), 1) delta = delta - TUNING.SANITYAURA_SMALL / distsq end return delta end and inst.components.sanity.custom_rate_fn = sanityfn This goes in your character.lua file. The first part as a function, the second part in the master_postinit. Replace "mole" by whatever the prefab you want is. I know it's ****ty but it's my first mode and I'm a little frustrated I just found some scripts and mixed them up all together Edited April 10, 2018 by MarilouXD Link to comment Share on other sites More sharing options...
K1NGT1GER609 Posted April 11, 2018 Share Posted April 11, 2018 Judging by what was inside the scml file it was a completely new file, which in turn wouldn't be accepted by the game (can't create stuff in thin air and expect the game make it, other wise there would be some interesting mods on the workshop). So after a few minutes I pretty much fixed it up to the wand format that's in the modding tools, tutorials and examples section of the downloads. I left the zip file for you and you tinker with the wand file. Alice.zip Link to comment Share on other sites More sharing options...
MarilouXD Posted April 11, 2018 Author Share Posted April 11, 2018 11 hours ago, K1NGT1GER609 said: Judging by what was inside the scml file it was a completely new file, which in turn wouldn't be accepted by the game (can't create stuff in thin air and expect the game make it, other wise there would be some interesting mods on the workshop). So after a few minutes I pretty much fixed it up to the wand format that's in the modding tools, tutorials and examples section of the downloads. I left the zip file for you and you tinker with the wand file. Alice.zip I believe you say about the knife scml file because the item i used to "paint" over it, it wasn't accepted (something was wrong with the names and the autocompiler wouldn't make the animation) Thank you anyway me and my new wand/knife are grateful 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