It's hard to say it's unintended behavior if you modded the spell to remove its primary purpose.
Either way, there's a solution. I think the reason Mislead is rigged to always turn the caster invisible is because it uses the simulacrum opcode, and the Mislead version of that effect is hardcoded to cause constant invisibility, much like the Project Image version. Your removing the invisibility effect did nothing because it is the simulacrum opcode, not the invisibility opcode, that causes the constant invisibility. Enemies are supposed to attack the decoy instead of the caster, and constant invisibility (while the decoy lasts) makes that happens.
I think the most balanced way to handle it is to use Spell Revisions to reduce its duration or simply bring the Mislead clone into battle, so the enemy may destroy it and remove the constant invisibility themselves. Or you could accept Mislead as a powerful spell. It does, after all, share the same spell level as Protection from Magical Weapons, and is roughly as strong (it's weaker or stronger depending on the circumstances).
If you want to tweak the spell to nerf it, your best bet is to remove the simulacrum opcode, retaining the invisibility effect, and then add a summoning opcode to create a decoy. This decoy would not automatically have the caster's appearance, but it would temporarily get enemies to target the clone, while still allowing them to target the caster if the caster should reveal him or herself. I think that's the behavior you're trying to get.
This is a situation when the term "nerfing" comes close. People often don't like when pre-EE things get nerfed. The most recent situation involved Poison Weapon, which created discussions (btw, the current implementation is fine, my assassin in BGEE in the party still kills 28% of enemies).
Mislead trick has been known for years and has been serving to people who like it. And those people who don't like this particular sort of cheese, - they just don't use it. I wouldn't say it's a bug - but you of course are free to make a feature request about changing how the spell works.
I am suggesting that the current behavior be implemented in a better way. ... I would like to make a clone, which cannot attack or cast spells or use items, and I would like the clone and the caster to be able to be visible at the same time. Near as I can tell, there's no way to do this with Simulacrum, because you cannot target a Simulacrum with effects. (And even if you could find a way to affect the Simulacrum with, say, Set Final APR = 0... oh wait even that wouldn't work because the Set Final APR opcode itself is bugged and does not work in spell effects. )
Set APR = 0 is the same as Set Final APR = 0. It is the exception, once APR hits zero it cannot be increased without removing the effect.
As for targeting a Simulacrum with effects, they will inherit any effects on the caster with timing mode 9(permanent), so for a simple solution:
If you want to remove the Level Drain from it: (cannot prevent it as its a hardcoded effect). A once per 2 second Use Eff on Condition, timing mode 9, with Remove Effects by Opcode(Level Drain) in the External Eff, right after the Modify APR effect. Once per 2 seconds so it is removed from the caster before its first trigger.
Are we sure the spell isn't working as intended? Casting it pre-battle and hiding the clone somewhere always seemed like such an obvious use of the spell, I can't imagine the developers didn't intend it. Considering the level of the spell, it wouldn't be worth casting if the invis wore off just like Improved Invisibility does. The short duration and possibility of the clone getting killed to end the effect early just seems like balancing factors for the spell.
Honestly, unless you're abusing backstabbing, the spell really isn't that great. Most difficult enemies see through invisibility anyways, and SCS mages will dispel it right away. Why bother recoding the game just to nerf one spell that's only really useful to niche builds that are mainly used by min-maxers, anyways? It's not like there aren't tons of ridiculously powerful spell combinations out there to make one immortal.
Shadow Door isn't generally considered good enough, why would you cast essentially the same thing, but with one useless, one-hit clone?
@subtledoctor: I actually never use Mislead for constant invisibility. I've used it for bard songs and backstabbing, but I didn't even know how to abuse Mislead for untargetability until recently. It's not one of the exploits I use. And I usually don't use an exploit much after it plays a big role in a run.
I mention using the monster summoning opcode because it's the only change I know how to make. Just trying to provide a solution. I'm sorry if I don't have one.
This won't resolve your current issue, but if you plan on modding Mislead, you might know that the MISLEAD.spl is cast on every Mislead clone, and therefore can be used to tweak said clones. Just in case you want to give Mislead clones +6 Hackmasters or insta-cast Dragon's Breath spells.
Or make them MORE balanced, I guess, if you're into that for some reason.
The point is not to nerf the spell or to change the current behavior. The point is to make any technical changes necessary to ALLOW players to fix the behavior IF THEY WANT TO.
I mean, the whole point of the spell is to become invisible and have enemies attack the illusion instead of you. Kind of like Mirror Image, except in this case you can go in one direction while the image lures the enemy in a different direction. And where Mirror Images are destroyed by a single hit, the Mislead clone can take a beating before expiring.
That's a perfectly useful spell.
As the enemies don't attack anyway an invisible character it is useful, but less than Improved Invisibility. Is dispelled in the same ways and also physically killing the clone. Useful, but less than a spell of an inferior level. Not as Infravision, but very marginally useful, the clone is not even a good cannon fodder and using it so will make the mage reveal himself in a very short time.
To me it seems pretty clear that it's a bug; it just happens to be a bug that several outspoken players happen to like. And I guess the devs agree. That's fine for those players, but it doesn't seem right that players who don't like the bug have no recourse at all. Make it moddable!
Using something in a way that exploits at extreme levels the AI weakness, if it is not the only possible use, doesn't make automatically that something a bug. Fireball is not bugged, but you can use it to bomb enemies without them reacting. If something is "bugged" that something is the player, who indulge in very cheap tactics. Keeping the clone in sight of the enemy, disrupting the casters that try to dispel him and protecting him from the physical attackers is a challenging and rewarding way to use the mislead clone. Leaving the invisibility effect as it is and leaving to the enemies the chance to destroy the clone and reveal the real mage make the power of Mislead appropriate for its level.
Since I fail in seeing any usefulness in a clone that can only move I regard Mislead as a spell in the invisibility line. Improved Invisibility retains certain advantages (mainly the untargetability), after that an attack reveals the mage. Mislead, higher level, retains also the invisibility, but give to the enemy one more way to reveal you.
Imo is not a bug, but any technical changes necessary to ALLOW players to fix the behavior IF THEY WANT TO are welcomed.
Mislead without forced Invisibility: Functionally all this does right now is remove the "Set Image Type" effect from the Mislead Clone - this is the effect that forces Invisibility upon the caster. You can add any other effects you want to affect the mislead clone to "SPWI607A.spl", and it will only affect the Mislead Clone created by this spell. You can then duplicate all the "SPWI607..." files under another filename to create variations that won't interfere with each other. This way you aren't changing "MISLEAD.spl", which would affect every clone created through the effect without variation. "MISLEAD.spl" only carries about half of the effects applied to a Mislead Clone anyway, the rest are added internally, but they can still be removed through opcode 337 if desired.
@subtledoctor@kjeron: I don't fully understand it, but testing confirmed @kjeron's version works. The caster is still invisible, but attacking or casting a spell allows the caster to be attacked, just like a normal Improved Invisibility spell, but with a clone on top.
Really? So, could this be added as part of, say, Charm Person, so that you would be unable to have the charmed enemy attack their friends (which is not supposed to happen per the spell description)??
Yes. But, after some testing what I wrote isn't entirely correct anymore. It would prevent Modify APR effects present in the original game. Equipped +APR(Belm), equipped Set APR(Sling/Crossbow), Warrior APR bonuses, Specialization APR bonuses, and Haste/Improved.
But, it can be overridden by items using the new Set Final APR(HALB13.itm), as well as spells that Modify APR directly(Boon of Lathander,Offensive Spin). You can give immunity to effect(Modify APR) for the duration right after Setting it to 0 to prevent the latter, not much you can do about the former without causing potential issues.
Fun fact and non-mod evidence that it needs fixing: The Chelsey Crusher(HALB13.itm) enables you to attack while using ShadowStep. UAI/FighterDual required.
Um... I just discovered a way to create a full-level simulacrum with all the same spells as the caster.
Just add a "project image" opcode to the MISLEAD.spl file, and set it to "simulacrum." The Mislead clone will then create a simulacrum of itself which suffers no level drain and no loss of its spell slots, though the new clone will have no items equipped. It will also have SCS mage HLAs, which normally aren't available for clones.
If you tack on the "remove creature" opcode at the end of Mislead, then the Mislead clone will vanish but its full-leveled simulacrum will persist.
@subtledoctor I can tell you you're not doing anything wrong, the effects of the "MISLEAD/PROJIMAG/SUMULACR" ARE able to bypass immunities. Strangely though, you can use opcode 206 to be completely immune to the spell itself, but not Opcode 101 to be immune to a specific effect of it. Opcode 337 can be used to remove the Disable Spellcasting effect.
I have found a way to prevent(rather than remove) the Hard-coded Level Drain of Simulacrum: "7eyes.2da". This should also work for the Remove Spell Opcode. The file is missing from BG1/2EE, but if copied over from IWDEE it works just fine. First, you will need to add a custom SpellState to "SPLSTATE.ids", find an unused value ( <256) and assign it a relevant label. Then add the following line to "7eyes.2da", and identify which #ROW it is added as(starting from 0): CUSTOMLABEL #SPELLSTATE #STRINGREF 216 * * * * * * * * 216 is the Level Drain opcode. CUSTOMLABEL can be anything without spaces, it does not need to match the SPELLSTATE's label, just #SPELLSTATE needs to match the value in SPLSTATE.IDS. The StringRef will be displayed in the message box when it triggers(when the Level Drain is prevented), even if its an empty string(-1). In "SPWI804", Simulacrum, add this effect: Opcode: 335 Target: Self Parameter1: #SPELLSTATE Parameter2: #ROW Timing: 9 Resource: None Special/Eye Group: -1 before the Project Image Effect, then remove it by opcode after the Project Image Effect. You can target this specific effect(and not those from the actual Seven Eyes spell) with Opcode 337 by using this effecs param2 value as Opcode 337's param1 value.
Edit: Be careful with immunity to 172 though, the game currently uses it to remove the Slayer Change and Pocket Plane abilities from the PC's images in SIMULACR and PROJIMAG.
@kjeron: If 337 can remove hard-coded clone-based effects by opcode, then you could create more than three different types of clones besides the base Mislead, Simulacrum, and Project Image spells. You'd just need to add a Cast Spell opcode with an .eff file on illusionary-gendered critters, using a small area-effect projectile on self, with a 1-second delay. That's how I created my old Shadow Stealer kit, which involved creating friendly clones of hostile critters.
So, to create two different copies of Mislead, you'd have one that just uses the clone opcode, and then the other would have both the clone opcode and an extra spell on self. That extra spell would use 337 to mess around with the resulting Mislead clone.
The only thing I think Images they are truly incapable of is scripting knowledge who they are a copy of or who created them, the way a summoned creature does through "LastSummonerOf(Myself)". There are ways to fake it and get a very close approximation, but nothing direct.
This spell creates an image of the caster which seems utterly real according to all five sense of onlookers. But this is not a duplicate; the image TAKES the caster's appearance, leaving the caster without any appearance at all!
This isn't just a good in-universe justification for the super invisibility. It is also incredibly creepy. I just imagine the image breaking free and running off with your appearance, leaving you forever out of sight.
Comments
Either way, there's a solution. I think the reason Mislead is rigged to always turn the caster invisible is because it uses the simulacrum opcode, and the Mislead version of that effect is hardcoded to cause constant invisibility, much like the Project Image version. Your removing the invisibility effect did nothing because it is the simulacrum opcode, not the invisibility opcode, that causes the constant invisibility. Enemies are supposed to attack the decoy instead of the caster, and constant invisibility (while the decoy lasts) makes that happens.
I think the most balanced way to handle it is to use Spell Revisions to reduce its duration or simply bring the Mislead clone into battle, so the enemy may destroy it and remove the constant invisibility themselves. Or you could accept Mislead as a powerful spell. It does, after all, share the same spell level as Protection from Magical Weapons, and is roughly as strong (it's weaker or stronger depending on the circumstances).
If you want to tweak the spell to nerf it, your best bet is to remove the simulacrum opcode, retaining the invisibility effect, and then add a summoning opcode to create a decoy. This decoy would not automatically have the caster's appearance, but it would temporarily get enemies to target the clone, while still allowing them to target the caster if the caster should reveal him or herself. I think that's the behavior you're trying to get.
Mislead trick has been known for years and has been serving to people who like it. And those people who don't like this particular sort of cheese, - they just don't use it. I wouldn't say it's a bug - but you of course are free to make a feature request about changing how the spell works.
As for targeting a Simulacrum with effects, they will inherit any effects on the caster with timing mode 9(permanent), so for a simple solution: If you want to remove the Level Drain from it: (cannot prevent it as its a hardcoded effect).
A once per 2 second Use Eff on Condition, timing mode 9, with Remove Effects by Opcode(Level Drain) in the External Eff, right after the Modify APR effect. Once per 2 seconds so it is removed from the caster before its first trigger.
Honestly, unless you're abusing backstabbing, the spell really isn't that great. Most difficult enemies see through invisibility anyways, and SCS mages will dispel it right away. Why bother recoding the game just to nerf one spell that's only really useful to niche builds that are mainly used by min-maxers, anyways? It's not like there aren't tons of ridiculously powerful spell combinations out there to make one immortal.
Shadow Door isn't generally considered good enough, why would you cast essentially the same thing, but with one useless, one-hit clone?
I mention using the monster summoning opcode because it's the only change I know how to make. Just trying to provide a solution. I'm sorry if I don't have one.
This won't resolve your current issue, but if you plan on modding Mislead, you might know that the MISLEAD.spl is cast on every Mislead clone, and therefore can be used to tweak said clones. Just in case you want to give Mislead clones +6 Hackmasters or insta-cast Dragon's Breath spells.
Or make them MORE balanced, I guess, if you're into that for some reason.
Is dispelled in the same ways and also physically killing the clone. Useful, but less than a spell of an inferior level.
Not as Infravision, but very marginally useful, the clone is not even a good cannon fodder and using it so will make the mage reveal himself in a very short time.
Using something in a way that exploits at extreme levels the AI weakness, if it is not the only possible use, doesn't make automatically that something a bug.
Fireball is not bugged, but you can use it to bomb enemies without them reacting.
If something is "bugged" that something is the player, who indulge in very cheap tactics.
Keeping the clone in sight of the enemy, disrupting the casters that try to dispel him and protecting him from the physical attackers is a challenging and rewarding way to use the mislead clone. Leaving the invisibility effect as it is and leaving to the enemies the chance to destroy the clone and reveal the real mage make the power of Mislead appropriate for its level.
Since I fail in seeing any usefulness in a clone that can only move I regard Mislead as a spell in the invisibility line. Improved Invisibility retains certain advantages (mainly the untargetability), after that an attack reveals the mage. Mislead, higher level, retains also the invisibility, but give to the enemy one more way to reveal you.
Imo is not a bug, but any technical changes necessary to ALLOW players to fix the behavior IF THEY WANT TO are welcomed.
Functionally all this does right now is remove the "Set Image Type" effect from the Mislead Clone - this is the effect that forces Invisibility upon the caster. You can add any other effects you want to affect the mislead clone to "SPWI607A.spl", and it will only affect the Mislead Clone created by this spell. You can then duplicate all the "SPWI607..." files under another filename to create variations that won't interfere with each other.
This way you aren't changing "MISLEAD.spl", which would affect every clone created through the effect without variation. "MISLEAD.spl" only carries about half of the effects applied to a Mislead Clone anyway, the rest are added internally, but they can still be removed through opcode 337 if desired.
But, after some testing what I wrote isn't entirely correct anymore. It would prevent Modify APR effects present in the original game. Equipped +APR(Belm), equipped Set APR(Sling/Crossbow), Warrior APR bonuses, Specialization APR bonuses, and Haste/Improved.
But, it can be overridden by items using the new Set Final APR(HALB13.itm), as well as spells that Modify APR directly(Boon of Lathander,Offensive Spin). You can give immunity to effect(Modify APR) for the duration right after Setting it to 0 to prevent the latter, not much you can do about the former without causing potential issues.
Fun fact and non-mod evidence that it needs fixing: The Chelsey Crusher(HALB13.itm) enables you to attack while using ShadowStep. UAI/FighterDual required.
EDIT: No, there's no such opcode. And granting immunity to the "disable spellcasting" opcode doesn't work, either.
Just add a "project image" opcode to the MISLEAD.spl file, and set it to "simulacrum." The Mislead clone will then create a simulacrum of itself which suffers no level drain and no loss of its spell slots, though the new clone will have no items equipped. It will also have SCS mage HLAs, which normally aren't available for clones.
If you tack on the "remove creature" opcode at the end of Mislead, then the Mislead clone will vanish but its full-leveled simulacrum will persist.
Opcode 337 can be used to remove the Disable Spellcasting effect.
I have found a way to prevent(rather than remove) the Hard-coded Level Drain of Simulacrum: "7eyes.2da". This should also work for the Remove Spell Opcode.
The file is missing from BG1/2EE, but if copied over from IWDEE it works just fine.
First, you will need to add a custom SpellState to "SPLSTATE.ids", find an unused value ( <256) and assign it a relevant label.
Then add the following line to "7eyes.2da", and identify which #ROW it is added as(starting from 0):
CUSTOMLABEL #SPELLSTATE #STRINGREF 216 * * * * * * * *
216 is the Level Drain opcode. CUSTOMLABEL can be anything without spaces, it does not need to match the SPELLSTATE's label, just #SPELLSTATE needs to match the value in SPLSTATE.IDS. The StringRef will be displayed in the message box when it triggers(when the Level Drain is prevented), even if its an empty string(-1).
In "SPWI804", Simulacrum, add this effect:
Opcode: 335
Target: Self
Parameter1: #SPELLSTATE
Parameter2: #ROW
Timing: 9
Resource: None
Special/Eye Group: -1
before the Project Image Effect, then remove it by opcode after the Project Image Effect. You can target this specific effect(and not those from the actual Seven Eyes spell) with Opcode 337 by using this effecs param2 value as Opcode 337's param1 value.
Edit: Be careful with immunity to 172 though, the game currently uses it to remove the Slayer Change and Pocket Plane abilities from the PC's images in SIMULACR and PROJIMAG.
So, to create two different copies of Mislead, you'd have one that just uses the clone opcode, and then the other would have both the clone opcode and an extra spell on self. That extra spell would use 337 to mess around with the resulting Mislead clone.