Shandalar Posted July 14, 2022 Share Posted July 14, 2022 I am trying to detect if a creature has the Defensive harmony bonus applied to them. There is no state or spell state that is applied when the spell is cast, but however a 'proficiency' is modified and is set to 1. I had tried to detect this with the following script but the execution happens constantly until all instances of this spell are depleted. Why can't i detect this spell specifically? Any way around this? Script: // Defensive Harmony IF CheckStat(Myself, 0, CLERIC_DEFENSIVE_HARMONY) HaveSpell(CLERIC_DEFENSIVE_HARMONY) THEN RESPONSE #100 Spell(Myself, CLERIC_DEFENSIVE_HARMONY) END I have also tried with !CheckStat(Myself, 1, CLERIC_DEFENSIVE_HARMONY) also with LT/GT and nothing works for me. I also tried using the id found in the STATS.IDS file for CLERIC_DEFENSIVE_HARMONY, which was 133. This did not work either. Quote Link to comment
Bubb Posted July 14, 2022 Share Posted July 14, 2022 That block works fine on my end. Maybe another mod is messing with the stat? Quote Link to comment
Guest morpheus562 Posted July 14, 2022 Share Posted July 14, 2022 If you have near infinity, I recommend going into the Defensive Harmony spell to ensure it is applying opcode 233 appropriately. Do you have detectable spells installed? Probably pedantic, but there shouldn't be any spaces in: CheckStat(Myself,0,CLERIC_DEFENSIVE_HARMONY) Quote Link to comment
Shandalar Posted July 14, 2022 Author Share Posted July 14, 2022 10 minutes ago, Bubb said: That block works fine on my end. Maybe another mod is messing with the stat? Interesting... I don't have many mods installed and ones that shouldn't be messing with that stats in that way. I use: Dlcmerge Dragonspear UI++ hiddengameplayoptions and my own mod currently. my own mod is the only one that messes with items, but it is only making new items or patching existing ones. I don't mess with internal stats and stuff in mine. Quote Link to comment
Shandalar Posted July 14, 2022 Author Share Posted July 14, 2022 5 minutes ago, morpheus562 said: If you have near infinity, I recommend going into the Defensive Harmony spell to ensure it is applying opcode 233 appropriately. Do you have detectable spells installed? Probably pedantic, but there shouldn't be any spaces in: CheckStat(Myself,0,CLERIC_DEFENSIVE_HARMONY) I used near infinity to find the opcode in the first place. I checked a save where i had previously cast it and can locate it on the creature. Also, I am like 99% sure that whitespace is ignored in this language. I have HUNDREDS of lines of other code that works properly with spaces between the parameters. Quote Link to comment
subtledoctor Posted July 14, 2022 Share Posted July 14, 2022 Maybe the stat doesn't detect as zero if it is not applied? I guess you could try CheckStatLT(Myself,1,CLERIC_DEFENSIVE_HARMONY) or !CheckStat(Myself,1,CLERIC_DEFENSIVE_HARMONY) and/or replace "CLERIC_DEFENSIVE_HARMONY" with "133" to keep it simple. Quote Link to comment
Guest morpheus562 Posted July 14, 2022 Share Posted July 14, 2022 (edited) hmm...let me think. Do you have DS installed? What other spells are active on your character? You are showing us the baf file before it is compiled. What does the .bcs/.bs file look like? Edited July 14, 2022 by morpheus562 Quote Link to comment
Shandalar Posted July 14, 2022 Author Share Posted July 14, 2022 3 hours ago, subtledoctor said: Maybe the stat doesn't detect as zero if it is not applied? I guess you could try CheckStatLT(Myself,1,CLERIC_DEFENSIVE_HARMONY) or !CheckStat(Myself,1,CLERIC_DEFENSIVE_HARMONY) and/or replace "CLERIC_DEFENSIVE_HARMONY" with "133" to keep it simple. Yeah I actually started with !CheckState as mentioned in post, along with just using 133. My brain doesn't know off hand what 133 is but CLERIC_DEFENSIVE_HARMONY makes more sense to my non-cyber brain. I thought there may be a conflict but it doesn't seem so. 2 hours ago, morpheus562 said: hmm...let me think. Do you have DS installed? What other spells are active on your character? You are showing us the baf file before it is compiled. What does the .bcs/.bs file look like? I'm not sure what you mean by DS? You mean SoD? I'm on the most recent version of the game, running from steam v 2.6.6. I did forget to mention I am using this mod that messes with .PVRZ files, its the 'Denoised 4k' assets can't remember full name right now. But i don't think that would impact the IDS file or anything? The spell seems to act as intended for all intents and purposes. Maybe i'll just fully remove all mods and reinstall game and start fresh and see if i can get it to work. If others are seeing the code work then I know its just something on my end and likely (as suggested) that either mods are changing something or something is broken on my end. I'll check that and report back should it not work. Thanks. Quote Link to comment
Guest morpheus562 Posted July 14, 2022 Share Posted July 14, 2022 DS is Detectable Spells. Have you checked the .bcs/.bs files to see if it compiled correctly from the baf? Quote Link to comment
subtledoctor Posted July 15, 2022 Share Posted July 15, 2022 1 hour ago, Shandalar said: My brain doesn't know off hand what 133 is but CLERIC_DEFENSIVE_HARMONY That is stat # 133 - which I gleaned from your screenshot It’s possible the script works with the actual stat # but not the descriptive name. (Also make sure it is CheckStat, not CheckState. Quote Link to comment
Ardanis Posted July 15, 2022 Share Posted July 15, 2022 (edited) SoD, as well as EEs v2.0+ (?) in general, ships with DS package already built in. 18 hours ago, subtledoctor said: Maybe the stat doesn't detect as zero if it is not applied? Nah, it works fine. Quote It’s possible the script works with the actual stat # but not the descriptive name. Also nah, works with both. Edited July 15, 2022 by Ardanis 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.