kingtitan Posted May 18, 2011 Share Posted May 18, 2011 Does anyone know how I can make the allowed number of friendly hits on companions or other friendly npc infinite or just ridiculously high? Im really tired of getting in close quarter fights and my companions decide to turn on me because i accidentally hit them one too many times. I saw a mod that makes it 20 hits, but I want it even higher. Any help is greatly appreciated! Link to comment Share on other sites More sharing options...
fg109 Posted May 18, 2011 Share Posted May 18, 2011 SetIgnoreFriendlyHits Link to comment Share on other sites More sharing options...
kingtitan Posted May 18, 2011 Author Share Posted May 18, 2011 I meant a mod not a console command. Look at this mod. I want to create something like this except with a number greater than 20. Link to comment Share on other sites More sharing options...
fg109 Posted May 18, 2011 Share Posted May 18, 2011 Can't you just do it yourself? The thing is, this has to be set for each NPC. So unless someone knows exactly which companions you have, it's kind of hard to make a mod for it. For the mod you linked to, I see that it's CM based, which I guess means that it only works for CM partners. So it probably just modified the partner script in the CM partners mod. If the only companions you have are CM companions, then that's easy. Just open up the CMPartners.esp, look for the partner script, and add the line "SetIgnoreFriendlyHits 1" to it somewhere. A good place for it might be in the OnLoad block. Otherwise, I suppose you can try out this quest script: scn example array_var temparr ref tempref short tempshort Begin GameMode if (temparr == 0) let temparr := ar_Construct array endif while (tempshort < ar_Size temparr) let tempref := temparr[tempshort] tempref.SetIgnoreFriendlyHits 0 let tempshort := tempshort + 1 loop ar_Erase temparr let tempshort := 0 let tempref := GetFirstRef 35 while (tempref) if (tempref.GetCurrentAIPackage == 1) tempref.SetIgnoreFriendlyHits 1 ar_Append temparr tempref endif let tempref := GetNextRef loop End It should work mostly like what you want... What it does is to detect any NPCs in the same cell as the player and checks to see if their current AI package is set to following someone. It doesn't check that it's following the player, just that it's following someone. Any NPC that is following someone is set to ignore friendly hits, and then saved to an array. Every time the script runs (default is every 5 seconds), all the NPCs in the array is set back to not ignoring friendly hits, and the whole thing starts over again. This is so that if the NPCs have switched AI packages or else no longer in the same cell won't be stuck with ignoring friendly hits. The reason is because some NPCs follow the player around for a while as part of a quest, but later goes back to doing other things (eg Maglir). Link to comment Share on other sites More sharing options...
kingtitan Posted May 18, 2011 Author Share Posted May 18, 2011 Ok that actually makes a lot of sense. Thanks for showing me that quest script and I'll get right on it! Link to comment Share on other sites More sharing options...
Recommended Posts