IDontKnow Posted November 7, 2018 Share Posted November 7, 2018 I'm trying to make a creature script in SoA/ToB that identifies Charmed creatures. Does anyone see a problem with this? IF OR(2) See([CHARMED.HUMANOID.0.0]) See([CONTROLLED.HUMANOID.0.0]) THEN It never triggers, and I've tried all the variations of the Charm opcodes (5 & 241) aside from Controlled by Cleric. I'm thinking the charm mechanic doesn't change the EA identifier. Quote Link to comment
Miloch Posted November 8, 2018 Share Posted November 8, 2018 I don't know if I've done it quite like that, but last I checked (and it's been a while), I thought this worked: StateCheck(LastSeenBy(),STATE_CHARMED) Quote Link to comment
IDontKnow Posted November 9, 2018 Author Share Posted November 9, 2018 I'll try using that, then. I haven't decided yet exactly what I want the script to actually do so I'm not even totally sure what I want the triggers to do. The only thing I've settled on is that I want it to be able to differentiate between any number of Charmed/Unconscious/Stunned and so on creatures out of a group regardless of their relative positions for priority targeting. Another option I considered was temporarily forcing a different identifier with opcode 72 (Set IDS State) to allow my See triggers to pick the Charmed creatures out... Is Specific.IDS used for anything? Could it be used for something like that? Quote Link to comment
kjeron Posted November 9, 2018 Share Posted November 9, 2018 Who are you trying to detect as Charmed? Those charmed by you and your allies end up with EA values: 5:[CONTROLLED] (Dire/Domination/Turning) 7:[REALLYCHARMED] (Charm) Those charmed by enemies end up with EA values: 254:[EVILBYCHARM] (Charm) 255:[ENEMY] (Dire/Domination/Turning) Party members charmed by allies do not change EA value, they remain 2:[PC]. Quote Link to comment
IDontKnow Posted November 11, 2018 Author Share Posted November 11, 2018 Well this all started with me being bored and deciding to make a custom Animate Dead spell that would summon a skeletal Fighter, Archer and Mage at higher levels; the Mage's script being the cause of this thread. I wanted the Mage to be able to pick Humanoids out of a group of assorted beasties and use Dire Charm on them before moving to a lower priority and blasting things with other spells. After everything else was dead the Skeletons would attack the Charmed creature. Since the Mage could (theoretically) be summoned by enemies it would have to work against PCs, too. Now that I know things Charmed by Enemies and Allies end up with different EA values I should be able to get the desired behavior with no real difficulty... That said, my EA seems a bit simpler than the one you've posted. Probably since I'm not using BG:EE. My EA doesn't have a # 7 or 254. I checked in the game and the script was able to identify a Charmed party member as EA 255, so I imagine it works the other way around, too. I'll play with the script some more (Eventually) and if I hit a snag I know where to go. Quote Link to comment
Recommended Posts
Join the conversation
You are posting as a guest. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.