Seattleite Posted December 26, 2012 Share Posted December 26, 2012 (edited) SCN EnduranceResistanceScript ref currentactorref numactors begin gamemode set numactors to getnumrefs 200 1 0 if(numactors > 0) set currentactor to getfirstref 200 1 0 label 10 if(currentactor) if(currentactor.hasmagiceffect PlayerDamageResistance == 0) currentactor.addspell PlayerDamageResistance currentactor.addspell PlayerDamageThreshold currentactor.addspell PlayerEnergyResistance currentactor.addspell PlayerFireResistance currentactor.addperk BludgeonIgnoresArmour currentactor.addperk NaturalRegenPerk endif set currentactor to Pencil01 set currentactor to getnextref set numactors to numactors - 1 if(numactors > 0) goto 10 endif endif endif end ; gamemode EDIT: I have proper indentation, but the site just isn't showing it. I don't quite get why. Edited December 26, 2012 by Seattleite Link to comment Share on other sites More sharing options...
luthienanarion Posted December 26, 2012 Share Posted December 26, 2012 (edited) If you want to post a script, use code tags and copy/paste it into the reply box to preserve the indentation. [ code ]some script[ /code ] I fixed a few things in your script. You had a ref variable used to store an integer value, and the HasMagicEffect doesn't work with effects that have no duration.I changed those two things and posted it below: ref currentactor short numactors begin gamemode set numactors to getnumrefs 200 1 0 if(numactors > 0) set currentactor to getfirstref 200 1 0 label 10 if(currentactor) if(currentactor.isspelltarget PlayerDamageResistance) else currentactor.addspell PlayerDamageResistance currentactor.addspell PlayerDamageThreshold currentactor.addspell PlayerEnergyResistance currentactor.addspell PlayerFireResistance currentactor.addperk BludgeonIgnoresArmour currentactor.addperk NaturalRegenPerk endif set currentactor to Pencil01 set currentactor to getnextref set numactors to numactors - 1 if(numactors > 0) goto 10 endif endif endif end ; gamemode I don't know if that will make it work, but make sure that the effects you're referencing already exist in the Editor. If this is your first NVSE-functioning script, make sure that you've loaded the GECK with NVSE. Edited December 26, 2012 by luthienanarion Link to comment Share on other sites More sharing options...
Seattleite Posted December 26, 2012 Author Share Posted December 26, 2012 (edited) If you want to post a script, use code tags and copy/paste it into the reply box to preserve the indentation. [ code ]some script[ /code ] I fixed a few things in your script. You had a ref variable used to store an integer value, and the HasMagicEffect doesn't work with effects that have no duration.I changed those two things and posted it below: ref currentactor short numactors begin gamemode set numactors to getnumrefs 200 1 0 if(numactors > 0) set currentactor to getfirstref 200 1 0 label 10 if(currentactor) if(currentactor.isspelltarget PlayerDamageResistance) else currentactor.addspell PlayerDamageResistance currentactor.addspell PlayerDamageThreshold currentactor.addspell PlayerEnergyResistance currentactor.addspell PlayerFireResistance currentactor.addperk BludgeonIgnoresArmour currentactor.addperk NaturalRegenPerk endif set currentactor to Pencil01 set currentactor to getnextref set numactors to numactors - 1 if(numactors > 0) goto 10 endif endif endif end ; gamemode I don't know if that will make it work, but make sure that the effects you're referencing already exist in the Editor. If this is your first NVSE-functioning script, make sure that you've loaded the GECK with NVSE. The script (which is actually not my first, by the way) is working now, but it turns out my issue isn't just with it. All abilities that give creatures DR count twice for some reason. No idea why, but it's a problem. Edited December 26, 2012 by Seattleite Link to comment Share on other sites More sharing options...
Xaranth Posted December 26, 2012 Share Posted December 26, 2012 The script (which is actually not my first, by the way) is working now, but it turns out my issue isn't just with it. All abilities that give creatures DR count twice for some reason. No idea why, but it's a problem. Known issue with Fallout NV and Fallout 3. An engine bug. Link to comment Share on other sites More sharing options...
Seattleite Posted December 26, 2012 Author Share Posted December 26, 2012 No fix? Link to comment Share on other sites More sharing options...
Xaranth Posted December 26, 2012 Share Posted December 26, 2012 AFAIK, the only fix is to halve your DR/DT for creatures. But you might be able to learn more from google. Link to comment Share on other sites More sharing options...
Seattleite Posted December 26, 2012 Author Share Posted December 26, 2012 AFAIK, the only fix is to halve your DR/DT for creatures. But you might be able to learn more from google. Realised the moment I said it. And it's only DR that's impacted, I checked. I'm halving it right now, and putting in some new values and conditions in the endurance-based DR ability for that effect. Link to comment Share on other sites More sharing options...
Recommended Posts