luthienanarion Posted July 25, 2012 Share Posted July 25, 2012 scn scriptName ref currentactor ref numactors begin gamemode set numactors to getnumrefs 42 1 0 if(numactors > 0) set currentactor to getfirstref 42 1 0 label 10 if(currentactor) if(currentactor.hasperk Perk1 == 0) currentactor.addperk Perk1 currentactor.addperk Perk2 currentactor.addperk Perk3 currentactor.addperk Perk4 currentactor.addperk Perk5 endif set currentactor to Pencil01 set currentactor to getnextref set numactors to numactors - 1 if(numactors > 0) goto 10 endif endif endif end ; gamemode This script assumes that an actor will not have Perk1 without the rest. Attach it to a quest (as a quest script) and it will check all surrounding NPCs each time the script fires, at intervals set by the delay time for the quest. Offhand, I'm not entirely certain that perks actually have effects on NPCs or which effects work while others do not. It was a subject of research when someone was trying to make ED-E avoid traps by giving him the Light Step perk. Link to comment Share on other sites More sharing options...
avianmosquito Posted July 25, 2012 Author Share Posted July 25, 2012 (edited) scn scriptName ref currentactor ref numactors begin gamemode set numactors to getnumrefs 42 1 0 if(numactors > 0) set currentactor to getfirstref 42 1 0 label 10 if(currentactor) if(currentactor.hasperk Perk1 == 0) currentactor.addperk Perk1 currentactor.addperk Perk2 currentactor.addperk Perk3 currentactor.addperk Perk4 currentactor.addperk Perk5 endif set currentactor to Pencil01 set currentactor to getnextref set numactors to numactors - 1 if(numactors > 0) goto 10 endif endif endif end ; gamemode This script assumes that an actor will not have Perk1 without the rest. Attach it to a quest (as a quest script) and it will check all surrounding NPCs each time the script fires, at intervals set by the delay time for the quest. Offhand, I'm not entirely certain that perks actually have effects on NPCs or which effects work while others do not. It was a subject of research when someone was trying to make ED-E avoid traps by giving him the Light Step perk. I think they do. I'm pretty sure legionarries have the "travel light" perk, because they all got a lot faster when I increased its effect. So, now that I have NVSE... how do I implement this script? I can't just use the GECK, can I? EDIT: Nevermind. Found it. This work for creatures? Because I'm trying to use a feral ghoul for testing, and it's not working. Edited July 25, 2012 by avianmosquito Link to comment Share on other sites More sharing options...
luthienanarion Posted July 25, 2012 Share Posted July 25, 2012 Change the 42 in GetNumRefs and GetFirstRef to 200. 42 only iterates through NPCs, while 200 iterates through all actors. You would use 43 for creatures only. Link to comment Share on other sites More sharing options...
avianmosquito Posted July 25, 2012 Author Share Posted July 25, 2012 (edited) Change the 42 in GetNumRefs and GetFirstRef to 200. 42 only iterates through NPCs, while 200 iterates through all actors. You would use 43 for creatures only. Alright, still not working. Feral ghouls are spawning with no DT, NPCs with bats are not bypassing my DT. Do I need to start a new game or something? EDIT: Just tried starting a new game. Still doesn't work, and my new character's hands turned bright pink for no apparent reason.Worse yet, my new character is spawning without a DT, which means that the old script that gave them these perks doesn't work either.Thought I had that one working, but I think it only applies to existing games and doesn't work for new ones. Which is irritating, because I really need a way around that. EDIT2: The issue with the hands is unrelated, but the rest still doesn't work, and it turns out the old player-specific script I've been using works fine, but for some reason when the perks are added to the player they don't do a damned thing if it's a new game, only if it's an existing one. Which baffles me. Meanwhile, think if I changed it from adding perks to directly adding the abilities themselves it would work? Edited July 25, 2012 by avianmosquito Link to comment Share on other sites More sharing options...
luthienanarion Posted July 25, 2012 Share Posted July 25, 2012 Adding the abilities should work. Like I said, perks on anything but the player seem to be hit-or-miss. Link to comment Share on other sites More sharing options...
avianmosquito Posted July 25, 2012 Author Share Posted July 25, 2012 (edited) Adding the abilities should work. Like I said, perks on anything but the player seem to be hit-or-miss. Even with the player, they seem to be hit or miss. Everything but the bludgeoning works for all actors. Tested with the goodsprings bighorners and the shopkeeper chet on a new game, as well as feral ghouls and Alice McBride on an existing one. In the mean time, the bludgeon system will just have to be left only working for the player until I have a way to make it work as intended. Edited July 25, 2012 by avianmosquito Link to comment Share on other sites More sharing options...
Recommended Posts