subtledoctor Posted November 14, 2015 Share Posted November 14, 2015 Question about Weidu's REMOVE_KNOWN_SPELL: can I have it target a class of spells, like all priest spells? Right now I have this: ACTION_FOR_EACH npc IN ~jaheir~ ~jaheir2~ ~jaheir4~ ~jaheir6~ ~branwe~ ~branwe5~ ~faldor~ ~faldor5~ ~yeslic~ ~yeslic5~ ~viconi~ ~viconi4~ ~viconi6~ ~viconi61~ ~quayle~ ~quayle4~ ~quayle6~ ~tiax~ ~tiax4~ ~tiax6~ BEGIN ACTION_IF FILE_EXISTS_IN_GAME ~%npc%.cre~ BEGIN COPY_EXISTING ~%npc%.cre~ ~override~ REMOVE_KNOWN_SPELL ~sppr101~ ~sppr102~ ~sppr103~ ... BUT_ONLY END END Is there some way I can have it just remove every spell that begins with "sppr" ? Like, SET spprs to ( REGEXP ~sppr.*~ ) and then REMOVE_KNOWN_SPELL ~%spprs%~ ...? (For that matter, it would be really great if we could distinguish joinable NPCs so that I could turn that list of CREs into a term that captures all joinable vanilla and mod NPCs...) Link to comment
Mike1072 Posted November 14, 2015 Share Posted November 14, 2015 Use data structures and loops.The code in this file removes spells from and adds spells to joinable NPCs. You should be able to modify it to suit your purpose. Link to comment
subtledoctor Posted November 14, 2015 Author Share Posted November 14, 2015 Thanks! Wow... that's going to take me a few hours to digest. Lots of stuff I don't understand. (I imagine this is a lot easier for programmers. Most modders are probably programmers, huh?) Link to comment
subtledoctor Posted November 14, 2015 Author Share Posted November 14, 2015 Whoa - I think I got it working! I'm not sure how I got it working, but I did. I'm like an idiot savant with this stuff. Thx again Mike! Link to comment
Recommended Posts
Archived
This topic is now archived and is closed to further replies.