Could anyone make a small mod that would add a button for turrets to become extremely hostile? I mean shooting wild animals.
(yes, I do know that it sounds like cheesy hunt, but instead I rather want it to make a wide open gate and I do not want wild animals to wander into my base :/)
This is actually a good first mod project, if you're up to the challenge. Use this (https://ludeon.com/forums/index.php?topic=33219.0) tutorial for setup, then modify the methods in "Building_Turret" to return wild animals in addition to hostiles.
Uhhh, I understand the "fish and fishing rod" help type, and I actually do appreciate it, but I have no experience whatsoever, gonna try tho :D
okay I don't even know how to start... I'm not even reading about all the C# stuff because I've read through some XMLs at least a couple times and I just do not understand how the targeting works, I don't even see it
Quote from: dninemfive on January 11, 2019, 12:50:20 AM
This is actually a good first mod project, if you're up to the challenge. Use this (https://ludeon.com/forums/index.php?topic=33219.0) tutorial for setup, then modify the methods in "Building_Turret" to return wild animals in addition to hostiles.
Aaaaah...did you look at Building_Turret? You actually want to look at Building_TurretGun, which has the targeting logic.
Also...you didn't post a link to Harmony, and that's probably what you'd need to modify the default Turret. And by "that's probably what you'd need" I mean you'd probably have to patch an anonymous delegate validator function (AttackTargetFinder.cs, BestAttackTarget(...)). Not even close to appropriate for the faint of heart or low on experience.
Heh. Oops.
OP: If you're up for the adventure of coding, I think the way to do it is to create a type of turret that's specifically anti-wildlife......actually, you can't simply derive from the original class, because TryFindNewTarget() is "protected." Well, F.
Also, you'd have to rewrite a fair bit of targeting code, because everything - EVERYTHING - has checks to make sure the target is hostile.
Just how much do you want this mod ;) It's still doable :p (also, do you care if it shoots your own animals? I think that would be more fun, tbh - make the player work to keep them safe from the really stupid AI...)
--LWM
Weeeell, that doesn't sound any easier... I've never had experience with coding and never even felt a need to learn to code...
Have you ever felt a *desire* to learn?
If not, you may have to ply a programmer with caffeine while they write something ;)
--LWM
PS - Or booze, no judging here. Or caffeine and booze. I don't recommend offering yayo or flake, tho.
yes, I have, but not for coding
That's what I meant ;p
I guess it's just not going to happen...
Oh, I might get around to it, but it won't be until I've solved a few problems in my current mod project. As noted, shooting your own animals sounds very amusing (okay, one could make it only target *non tame* animals). How good are you at drawing/creating textures for modded objects?
never touched it, and I'm not even good at all at pixel art
Heh. Join the club. I am v much impressed by digital artists' work.
Well, you may be stuck with caffeine and patience as your options. I could certainly see making this someday.
--LWM
I think when you meant for turrets to become extremely hostile... I think you mean't the word Aggressive...
TBH The Turrets are very passive, until a raid come in with a club in their Line of sight if the turrets are still able to shoot them... ;)