xTheFallenOnesx Posted September 20, 2015 Share Posted September 20, 2015 I'm having an issue adding any Perk to my characters, I'm trying to add Wendy's Resistance to sanity drain from monsters and darkness, And willows increase in sanity when near fire, but when i tried adding them to the characters i either got errors or when trying those specific perks in-game they just didn't workI'm new to Modding in general and would like to learn more, but everything im trying fails and i don't know how most of this works, Anyone want to assist or try to help me learn sometime? This is for my friends character, mine is in another post with much more custom Perks and such i have little idea on how to go about these lua files outside of following a video. Link to comment https://forums.kleientertainment.com/forums/topic/57983-customvanilla-perk-addition-issues/ Share on other sites More sharing options...
Mobbstar Posted September 20, 2015 Share Posted September 20, 2015 Learn to read the log.txt, it ALWAYS says why the game crashed, the part in question is indent so it should be easy to find.Use print("sampletext") to mark certain functions if you're not sure whether they ever fire. Link to comment https://forums.kleientertainment.com/forums/topic/57983-customvanilla-perk-addition-issues/#findComment-674458 Share on other sites More sharing options...
xTheFallenOnesx Posted September 20, 2015 Author Share Posted September 20, 2015 Well i can post why the game crashes, But i don't know if what i am even doing is wrong. I can add certain things like below, And it just won't work, the game won't crash. Same goes for Wendy's Sanity buff where she doesn't get drained from monsters or darkness, It doesn't crash it just doesn't work and again i am VERY new to this local prefabs ={ "willowfire",} local function sanityfn(inst) local x, y, z = inst.Transform:GetWorldPosition() local delta = 0 local max_rad = 10 local ents = TheSim:FindEntities(x, y, z, max_rad, { "fire" }) for i, v in ipairs(ents) do if v.components.burnable ~= nil and v.components.burnable:IsBurning() then local rad = v.components.burnable:GetLargestLightRadius() or 1 local sz = TUNING.SANITYAURA_TINY * math.min(max_rad, rad) / max_rad local distsq = inst:GetDistanceSqToInst(v) - 9 -- shift the value so that a distance of 3 is the minimum delta = delta + sz / math.max(1, distsq) end end return deltaend local function common_postinit(inst) inst:AddTag("pyromaniac")end local function master_postinit(inst)inst.components.sanity:SetMax(TUNING.WILLOW_SANITY) inst.components.sanity.custom_rate_fn = sanityfn inst.components.sanity.rate_modifier = TUNING.WILLOW_SANITY_MODIFIER inst:ListenForEvent("sanitydelta", onsanitydelta)end Link to comment https://forums.kleientertainment.com/forums/topic/57983-customvanilla-perk-addition-issues/#findComment-674556 Share on other sites More sharing options...
Mobbstar Posted September 20, 2015 Share Posted September 20, 2015 That's the whole file? I think you may be missing something at the end EDIT: Furthermore, if you are talking about Together you should post in the Together mod forum. Link to comment https://forums.kleientertainment.com/forums/topic/57983-customvanilla-perk-addition-issues/#findComment-674561 Share on other sites More sharing options...
xTheFallenOnesx Posted September 20, 2015 Author Share Posted September 20, 2015 No those were just the parts i tried to make the perks work as it was all i seen Mentioning Sanity and Fire. I removed them from my lua already because all it did was load the game normally and not apply the perks, And yes i am talking about Together, there is another forum for that? ;~;EDIT: I have been in the Don't Starve forums without Realising it, My bad i thought it might have been the same Link to comment https://forums.kleientertainment.com/forums/topic/57983-customvanilla-perk-addition-issues/#findComment-674564 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.