subtledoctor Posted March 16, 2021 Share Posted March 16, 2021 (edited) Is there any way to modify their sudden appearance on the streets of Athkatla? I need to apply a spell at level-up (triggered in the kit ability table), and it needs to be based on the player's wizard level, and it just occurred to me that if the spell is innate, it will use the wrong level for dual-classed characters. So it needs to be a wizard spell. But if it is a wizard spell, then the Cowled Wizards will rain fire on some poor schlub who just wants to level up. Is there any way to whitelest spells so they don't trigger that reaction? It's SUPER annoying. (If anyone from Beamdog passes by here, maybe think about exempting some spells from that behavior? Maybe use hidespl.2da, or another similar mechanism?) Edited March 16, 2021 by subtledoctor Quote Link to comment
lynx Posted March 17, 2021 Share Posted March 17, 2021 I thought this was scripted. Is then there somewhere a detailed rundown on the spawn progression / mechanic? Come to think of it, I haven't though about the similar low rep scenario either. Quote Link to comment
Allbrother Posted March 18, 2021 Share Posted March 18, 2021 (edited) Did you work it out? There's a script in the city areas .bcs' that triggers the enforcers and I tried fiddling with it, but couldn't get it to leave 1 spell alone. Would be curious see how if you solved your issue IF SpellCast([PC],0) !GlobalTimerNotExpired("SpellsBad","GLOBAL") Global("BribedCowled","GLOBAL",0) GlobalLT("CowledWarning","GLOBAL",7) THEN RESPONSE #100 CreateCreatureObjectDoor("COWENF2",LastTrigger,0,0,0) // Cowled Enforcer SetGlobalTimer("SpellsBad","GLOBAL",ONE_HOUR) END The enforcer's dialogue increments the CowledWarning global and spawns Zallanora when it reaches 6 and the trigger above stops it afterwards Edited March 18, 2021 by Allbrother Quote Link to comment
kjeron Posted March 18, 2021 Share Posted March 18, 2021 !SpellCast() is broken, so you can't specify individual spells to ignore. It works okay by itself, but when paired with SpellCast(), it is generally ignored. IF SpellCast(Player1,0) !SpellCast(Player1,0) THEN This returns true for any wizard spell, despite the obvious contradiction. Quote Link to comment
Allbrother Posted March 18, 2021 Share Posted March 18, 2021 Yep, that was the first thing I tried while fiddling. But that trigger seems to be all kinds of busted, because the second thing I tried was a separate block that sets a new global to 1 on casting a specific spell and inserting a check for it in the above block, only to find out that every spell set that global to 1 for some reason. Then the third thing I tried was adding an effect to the spell itself to set that global to 1 and then back to 0 two rounds later, but that just resulted in the mf teleporting in 12 seconds late... At which point I said f that and promptly gave up. Quote Link to comment
subtledoctor Posted March 18, 2021 Author Share Posted March 18, 2021 So, for context, this is because I track spell slots with proficiency values, and the way to increase spell slots at each level is to cast a spell with a bunch of op233 effects, with 50 different headers so the correct value of the proficiency is applied at the right level. In order for the caster level to apply the correct spell header, the 233 spell must be an arcane spell for arcane casters, and a divine spell for divine casters. If it was an innate spell then the caster level might be incorrect for multi- and/or dual-class characters. But if the 233 spell is an arcane spell, then it would trigger the Cowled Wizards if a wizard or bard levels up while outdoors in the city. Not good! However, quite for a different reason, I stopped applying that 233 spell in kit tables on level-up, and instead I apply it when you 'prepare spells' in your spellbook. (Which, in this mod, works differently then in the base game.) So this is no longer an issue, and I have moved on to addressing other issues, like how to make casting work smoothly for a sorcerer/shaman multi. But in general it would be good to be able to mod this. Would it be possible to add a condition to that check... something like !CheckSpellState([some_new_spellstate]) Then if we want to exempt a wizard spell from triggering the CW, we could have it set that spellstate for a couple seconds. Or if, say, I want my divine sphere system to include a wizard spell by casting it with 146 instead of brute-cloning it, I could have the priest spell with the 146 effect set that spellstate. Could also maybe use a global variable... there's an opcode to set GVs, right? Quote Link to comment
kjeron Posted March 18, 2021 Share Posted March 18, 2021 (edited) You would need to add a new script block before (or after) the current one: IF OR(6) CheckSpellState(Player1,NEW_SPELLSTATE) CheckSpellState(Player2,NEW_SPELLSTATE) CheckSpellState(Player3,NEW_SPELLSTATE) CheckSpellState(Player4,NEW_SPELLSTATE) CheckSpellState(Player5,NEW_SPELLSTATE) CheckSpellState(Player6,NEW_SPELLSTATE) THEN RESPONSE #100 Continue() END and modify the current script check: IF SpellCast([PC],0) !CheckSpellState(Player1,NEW_SPELLSTATE) !CheckSpellState(Player2,NEW_SPELLSTATE) !CheckSpellState(Player3,NEW_SPELLSTATE) !CheckSpellState(Player4,NEW_SPELLSTATE) !CheckSpellState(Player5,NEW_SPELLSTATE) !CheckSpellState(Player6,NEW_SPELLSTATE) !GlobalTimerNotExpired("SpellsBad","GLOBAL") Global("BribedCowled","GLOBAL",0) GlobalLT("CowledWarning","GLOBAL",7) THEN RESPONSE #100 CreateCreatureObjectDoor("COWENF2",LastTrigger,0,0,0) // Cowled Enforcer SetGlobalTimer("SpellsBad","GLOBAL",ONE_HOUR) END The Spellstate will need a duration of at least 2 ticks. Just checking if the spellstate isn't set when the spell is cast isn't enough. It needs to have at least one other script block return true, otherwise it will still trigger when the spellstate effect expires, no matter how long the spellstate lasts (unless you save&reload or leave the area). Edited March 18, 2021 by kjeron 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.