SneakyGemini Posted April 10, 2014 Share Posted April 10, 2014 Hi everyone i'm reasonably new to modding and I would like to make Spider type monsters ignore Chester. However i'm having some trouble finding exactly where spider type monsters determine if a target is attackable or not so after manually searching the .lua files for a few hours I thought maybe I could just ask a more enlightened individual.. xD Thanks anyone who can help out, I greatly appreciate it. (Reasons for this: I play as webber quite often lately and find it annoying to have spiders as pets when they are so aggressive toward my beloved chester) Link to comment https://forums.kleientertainment.com/forums/topic/34605-requesting-mod-assistance/ Share on other sites More sharing options...
Heavenfall Posted April 10, 2014 Share Posted April 10, 2014 (edited) The most important function is this in spider.lua, you could add an excemption to inst.prefab=="chester" (edit: sorry, that's guy.prefab) where appropriatelocal function NormalRetarget(inst) local targetDist = TUNING.SPIDER_TARGET_DIST if inst.components.knownlocations:GetLocation("investigate") then targetDist = TUNING.SPIDER_INVESTIGATETARGET_DIST end return FindEntity(inst, targetDist, function(guy) if inst.components.combat:CanTarget(guy) and not (inst.components.follower and inst.components.follower.leader == guy) then return guy:HasTag("character") end end)end Edited April 10, 2014 by Heavenfall Link to comment https://forums.kleientertainment.com/forums/topic/34605-requesting-mod-assistance/#findComment-449962 Share on other sites More sharing options...
SneakyGemini Posted April 10, 2014 Author Share Posted April 10, 2014 Thanks for the tip! I should be able to work it out from here. Link to comment https://forums.kleientertainment.com/forums/topic/34605-requesting-mod-assistance/#findComment-450254 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