Shinjikro Posted February 26, 2019 Share Posted February 26, 2019 So i'm creating character tweaks for my friend and I got to his wes changes and he wants the sanity of wes's balloons to go from 5 to 4 buuuut I can't figure out how to change it ^^' I looked through wes.lua, balloons.lua etc. Sooo if somone could tell me where to look or how to change it that would be very appreciated Second he wants wes's balloons to draw more aggro/ be more effective at it, and I have 0 idea on how to go about doing that or even start on that, so if somone could also help me with that.. that would also be great, thank you! P.S im very new to modding (basically have made character tweak mods and that's it) and im still learning and want to continue to learn ^^' sorry if this seems like a very dumb question lol Link to comment Share on other sites More sharing options...
BakaSchwarz Posted February 26, 2019 Share Posted February 26, 2019 In actions.lua there is this function: ACTIONS.MAKEBALLOON.fn = function(act) if act.doer ~= nil and act.invobject ~= nil and act.invobject.components.balloonmaker ~= nil and act.doer:HasTag("balloonomancer") then if act.doer.components.sanity ~= nil then if act.doer.components.sanity.current < TUNING.SANITY_TINY then return false end act.doer.components.sanity:DoDelta(-TUNING.SANITY_TINY) end local x, y, z = act.doer.Transform:GetWorldPosition() local angle = act.doer.Transform:GetRotation() local angle_offset = GetRandomMinMax(-10, 10) angle_offset = angle_offset + (angle_offset < 0 and -65 or 65) angle = (angle + angle_offset) * DEGREES act.invobject.components.balloonmaker:MakeBalloon( x + .5 * math.cos(angle), 0, z - .5 * math.sin(angle) ) return true end end act.doer.components.sanity:DoDelta(-TUNING.SANITY_TINY) is what you want to change if you want to reduce the sanity drain from crafting a balloon. When you say more aggro i guess you mean to make the range of the "pop" wider? In that case you want to edit the DoAreaAttack function inside balloon.lua: local function DoAreaAttack(inst) inst.components.combat:DoAreaAttack(inst, 2, nil, nil, nil, { "INLIMBO" }) end If we look into the implementation of this function inside combat.lua, we see that the second parameter is the range: function Combat:DoAreaAttack(target, range, weapon, validfn, stimuli, excludetags) 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