morpheus562 Posted April 12, 2022 Author Share Posted April 12, 2022 47 minutes ago, Guest Graion@Work said: it's at the start of the debug file. I looked at it this morning and I couldn't find the source of that spell though (it's not C0Warlock nor Shadow Adept). It could be Eve of War, I haven't looked at that one. However I am not sure what to think of this list. Eve of War and Vanishing of Skie Silvershield isn't EET compatible, so it could be that some tampering is the reason of the breakage. Additionally, Google kept suggesting me Insect Plague instead of Pestilence of Insects. True, I see the mods and component numbers; however, a weidu log tells me the name of the actual component (so I don't have to manually hunt it down) and mod version. I'm really interested in seeing the 5e spellcasting file because it will actually tell my the exact spell name. Quote Link to comment
Enigmajazz Posted April 12, 2022 Share Posted April 12, 2022 @morpheus562 My Weidu.log has a lot of ?????, I think because I deleted some mod folders after it had been installed to save time when backing up the install. I can try and sort this out if needed, I think if I put the files back and then try again to install this mod it should restore the names, do you know if that would work and do you need me to do that? However I have identified the source of the spell, it is plague.spl from the bg1npcSoa mod, the first component that adds the watergardens, I think. It is a wizard scroll in the store opened by talking to Amber I think from looking at the files. It is not listed in spell.ids. I think this is the right file for list of the cloned spells. I have modified Eve of War and Vanishing of Skie Silvershield with the EET mod converter and a few tweaks to make them work in EET. Don't think they should do anything to these spells. d5zclons.2da Quote Link to comment
Enigmajazz Posted April 12, 2022 Share Posted April 12, 2022 @morpheus562 I have reproduced this on clean install of BG2 with the water garden component of NPC1SOA, 5e Casting and Enhanced Powergaming scripts if that helps. It is the same spell causing the issue just with different dz number as less mods installed. Quote Link to comment
morpheus562 Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) 5 hours ago, Enigmajazz said: @morpheus562 I have reproduced this on clean install of BG2 with the water garden component of NPC1SOA, 5e Casting and Enhanced Powergaming scripts if that helps. It is the same spell causing the issue just with different dz number as less mods installed. I am trying to find the NPC1SOA mod without any luck. Where can it be found? The dropbox that appears to have it is down. Edited April 12, 2022 by morpheus562 Quote Link to comment
Enigmajazz Posted April 12, 2022 Share Posted April 12, 2022 @morpheus562 This one works for me: https://www.dropbox.com/s/mub3ozbrj1tiews/BG1NPC SoAToB_v13.5.rar?dl=0 Quote Link to comment
morpheus562 Posted April 12, 2022 Author Share Posted April 12, 2022 @subtledoctor is it me, or does BG1NPC SoAToB seem to add spells in a non-standard way? Per @Enigmajazz, it is not being added to the Spell.ids; however, they are picked up by your 5e spellcasting mod. Quote Link to comment
Graion Dilach Posted April 12, 2022 Share Posted April 12, 2022 @Austin this is on you, you're the maintainer here. But I think this is the second time this mod comes up with spell handling...ah yeah. Quote Link to comment
subtledoctor Posted April 12, 2022 Share Posted April 12, 2022 If there is a scroll with an opcode 147 effect that lets you learn a wizard spell, then 5E casting will catch it and incorporate it into the system. Since a player could learn the spell, we want 5E casting to support it. (The fact that it is not in SPELL.IDS doesn't really matter that much - it means sorcerers cannot learn it, but that doesn't bother me for these purposes since sorcerers do not use the 5E method. If a spell can be memorized in your arcane spellbook, we want to support it.) So, so far, I don't see anything wrong here. The question is, why does this lead to a syntax error when installing enhanced scripts? If I had to guess, I'd say that even though you don't put the spell in any scripts, you do scan through all spells to determine what is in the game, and what should therefore be put in scripts. This probably fails on the scan. Maybe you limit the scan to stuff in SPELL.IDS? And then you go through the 5E index of spells? In which case it might catch something in the latter scan that wasn't in the former scan, and choke? Just a guess. If this is the case, then maybe the scan of SPELL.IDS can be eliminated? The simple rule is All sorcerer spells are in SPELL.IDS since that set of spells from which the game allows you to choose.* Mages learn spells at character generation from the sorcerer set, but in-game they learn from scrolls, and a scroll might teach you a spell that is not in SPELL.IDS. So the set of possible mage spells may be broader than the set of sorcerer spells. All cleric and druid spells are likely in SPELL.IDS since the game adds all such spells to your spellbook when you level up.** So when scanning through arcane spells specifically, you might want to include anything learnable from a scroll. * (Unless you use OlvynChuru's UI mod relating to this.) ** (Additionally, various cleric & druid kits may add special memorizable spells that are not in SPELL.IDS... this is potentially a very broad and amorphous set... I'm working on a function to find and catch all these spells. Something like: check kitlist.2da for the kit tables of every divine caster; check those kit tables for anything starting with GA_; check every resulting spell for whether it is a memorizable priest spell.) Quote Link to comment
morpheus562 Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) 19 minutes ago, subtledoctor said: If there is a scroll with an opcode 147 effect that lets you learn a wizard spell, then 5E casting will catch it and incorporate it into the system. Since a player could learn the spell, we want 5E casting to support it. (The fact that it is not in SPELL.IDS doesn't really matter that much - it means sorcerers cannot learn it, but that doesn't bother me for these purposes since sorcerers do not use the 5E method. If a spell can be memorized in your arcane spellbook, we want to support it.) So, so far, I don't see anything wrong here. The question is, why does this lead to a syntax error when installing enhanced scripts? If I had to guess, I'd say that even though you don't put the spell in any scripts, you do scan through all spells to determine what is in the game, and what should therefore be put in scripts. This probably fails on the scan. Maybe you limit the scan to stuff in SPELL.IDS? And then you go through the 5E index of spells? In which case it might catch something in the latter scan that wasn't in the former scan, and choke? Just a guess. If this is the case, then maybe the scan of SPELL.IDS can be eliminated? The simple rule is All sorcerer spells are in SPELL.IDS since that set of spells from which the game allows you to choose.* Mages learn spells at character generation from the sorcerer set, but in-game they learn from scrolls, and a scroll might teach you a spell that is not in SPELL.IDS. So the set of possible mage spells may be broader than the set of sorcerer spells. All cleric and druid spells are likely in SPELL.IDS since the game adds all such spells to your spellbook when you level up.** So when scanning through arcane spells specifically, you might want to include anything learnable from a scroll. * (Unless you use OlvynChuru's UI mod relating to this.) ** (Additionally, various cleric & druid kits may add special memorizable spells that are not in SPELL.IDS... this is potentially a very broad and amorphous set... I'm working on a function to find and catch all these spells. Something like: check kitlist.2da for the kit tables of every divine caster; check those kit tables for anything starting with GA_; check every resulting spell for whether it is a memorizable priest spell.) Thank you! Before 5e spellcasting, I never iterated through Spell.ids and instead ran checks on if mod x is installed, then I want to add spells a, b, and c to my scripts and so on down the line. With 5e spellcasting since spell names are dynamically created, I needed to do a two part conversion to get it to run both normal spells (for sorcerers) and the 5e spellcasting spells. To do this I run a first part like this: Spoiler ACTION_FOR_EACH 5e_prebuff IN CLERIC_PROTECTION_FROM_EVIL_10_FOOT WIZARD_STONE_SKIN CLERIC_IRONSKIN CLERIC_AID WIZARD_PROTECTION_FROM_MAGIC_ENERGY CLERIC_FREE_ACTION CLERIC_NEUTRALIZE_POISON CLERIC_PROTECTION_FROM_FIRE CLERIC_DEATH_WARD CLERIC_CHAOTIC_COMMANDS CLERIC_NEGATIVE_PLANE_PROTECTION WIZARD_GHOST_ARMOR WIZARD_SHIELD WIZARD_BLUR WIZARD_RESIST_FEAR CLERIC_REMOVE_FEAR CLERIC_PROTECT_FROM_EVIL CLERIC_ARMOR_OF_FAITH CLERIC_BLESS WIZARD_LUCK WIZARD_PROTECTION_FROM_THE_ELEMENTS WIZARD_PROTECTION_FROM_NORMAL_MISSILES CLERIC_PHYSICAL_MIRROR WIZARD_SPELL_SHIELD WIZARD_GREATER_SPELL_DEFLECTION WIZARD_SPELL_DEFLECTION WIZARD_MINOR_SPELL_DEFLECTION WIZARD_MIRROR_IMAGE WIZARD_DISPELLING_SCREEN CLERIC_CHANT CLERIC_DRAW_UPON_HOLY_MIGHT CLERIC_DEFENSIVE_HARMONY CLERIC_SHIELD_OF_THE_ARCHONS CLERIC_AURA_OF_FLAMING_DEATH CLERIC_GLOBE_OF_BLADES CLERIC_BLADE_BARRIER CLERIC_STRENGTH_OF_ONE WIZARD_PROTECTION_FROM_ENERGY CLERIC_MAGIC_RESISTANCE WIZARD_MESTILS_ACID_SHEATH WIZARD_FIRE_SHIELD_RED WIZARD_HASTE WIZARD_IMPROVED_HASTE CLERIC_RIGHTEOUS_MAGIC WIZARD_SPELL_TRAP BEGIN LAF RES_NUM_OF_SPELL_NAME STR_VAR spell_name = ~%5e_prebuff%~ RET spell_res END COPY ~enhanced-powergaming-scripts/baf/upload/mocore.baf~ ~enhanced-powergaming-scripts/baf/upload/mocore.baf~ REPLACE_TEXTUALLY CASE_INSENSITIVE ~RES(%5e_prebuff%~ ~RES(%spell_res%~ END This first part ensures I grab the correct spell name (SPWIxxx.SPL or SPPRxxx.SPL), since those are dynamically created with mods. Would the way BG1NPC SoAToB adds spells impact the way RES_NUM_OF_SPELL_NAME runs? On the tail end of the install, I will iterate through all spells converted into 5e from the list you create and then update them into their "final form": Spoiler ACTION_IF 5e_spellcasting BEGIN COPY_EXISTING ~d5zclons.2da~ ~override~ COUNT_2DA_COLS cols COUNT_2DA_ROWS cols rows FOR (row = 1; row < rows; ++row) BEGIN READ_2DA_ENTRY row 0 cols ind_num READ_2DA_ENTRY row 1 cols mem_spl SPRINT $5e_spells_array(~d5z%ind_num%i~)~%mem_spl%~ END BUT_ONLY COPY ~enhanced-powergaming-scripts/baf/upload/mobasic.baf~ ~enhanced-powergaming-scripts/baf/upload/mobasic.baf~ PHP_EACH 5e_spells_array AS new_spl => old_spl BEGIN REPLACE_TEXTUALLY CASE_INSENSITIVE ~%old_spl%~ ~"%new_spl%"~ END COPY ~enhanced-powergaming-scripts/baf/upload/mocore.baf~ ~enhanced-powergaming-scripts/baf/upload/mocore.baf~ PHP_EACH 5e_spells_array AS new_spl => old_spl BEGIN REPLACE_TEXTUALLY CASE_INSENSITIVE ~%old_spl%~ ~"%new_spl%"~ END COPY ~enhanced-powergaming-scripts/baf/upload/moskd.baf~ ~enhanced-powergaming-scripts/baf/upload/moskd.baf~ PHP_EACH 5e_spells_array AS new_spl => old_spl BEGIN REPLACE_TEXTUALLY CASE_INSENSITIVE ~%old_spl%~ ~"%new_spl%"~ END END Edited April 12, 2022 by morpheus562 Quote Link to comment
subtledoctor Posted April 12, 2022 Share Posted April 12, 2022 From what I can see, neither of those two snippets should result in the syntax error posted above. The BG1NPCSOA spell should not be affected by the first snippet since it is not in the specified list. (RES_NUM_OF_SPELL_NAME would indeed choke on it if you tried to do it, because it has no IDS name or number... but that doesn't seem to be the problem here.) I'm stumped. EDIT - looking at the 2nd snippet, I don't get why you have ~"..."~ there. What is the point of those quotation marks? Seems like it should just be REPLACE_TEXTUALLY CASE_INSENSITIVE ~%old_spl%~ ~%new_spl%~ But still, that doesn't explain why it would error out on this particular spell. EDIT 2 - oh, unless you want to insert those quotes into the script? Looking again at the error code, and at the fact that the spell was added by a mod, I'll go out on a limb and speculate that it is the last spells in the 5E system? I.e. there is no D5470I.SPL in enigmajazz's game. So maybe... something about the last spell failing? But still, 1) you say that spell shouldn't even appear in any scripts so why is it there? and 2) why does the last spell fail only with this spell from the BG1NPCSOA mod? It's really weird. Quote Link to comment
Graion Dilach Posted April 12, 2022 Share Posted April 12, 2022 (edited) I can only agree with past myself here - BG1NPCSOA should receive compat code with the IWDification/SCS spell library. I'm willing to wrap that up if that matters when I find time, but this needs to happen because this is what seems to cause all our problems. I can easily imagine that the issues are caused by some bitrot in it's own take on those spells. Edited April 12, 2022 by Graion Dilach Quote Link to comment
morpheus562 Posted April 12, 2022 Author Share Posted April 12, 2022 (edited) 9 minutes ago, subtledoctor said: From what I can see, neither of those two snippets should result in the syntax error posted above. The BG1NPCSOA spell should not be affected by the first snippet since it is not in the specified list. (RES_NUM_OF_SPELL_NAME would indeed choke on it if you tried to do it, because it has no IDS name or number... but that doesn't seem to be the problem here.) I'm stumped. EDIT - looking at the 2nd snippet, I don't get why you have ~"..."~ there. What is the point of those quotation marks? Seems like it should just be REPLACE_TEXTUALLY CASE_INSENSITIVE ~%old_spl%~ ~%new_spl%~ But still, that doesn't explain why it would error out on this particular spell. EDIT 2 - oh, unless you want to insert those quotes into the script? Looking again at the error code, and at the fact that the spell was added by a mod, I'll go out on a limb and speculate that it is the last spells in the 5E system? I.e. there is no D5470I.SPL in enigmajazz's game. So maybe... something about the last spell failing? But still, 1) you say that spell shouldn't even appear in any scripts so why is it there? and 2) why does the last spell fail only with this spell from the BG1NPCSOA mod? It's really weird. The quotation marks are needed from a scripting perspective because it is cast as a SpellRES("xxxx") versus a Spell(xxxx). Just a nuance with scripting that was intentional. I am very much scratching my head over here as to what could be causing this too since it shouldn't even be grabbing this spell (when it looks like my scripts should be grabbing either Stoneskin or Iron Skins at that point in the script). To add to the confusion, the spell causing issues is grabbed midway through your list and is a few hundred off from the last one. I think at this point I just say my scripts are not compatible with this mod until more digging can occur as to what exactly is going on. Edited April 12, 2022 by morpheus562 Quote Link to comment
subtledoctor Posted April 12, 2022 Share Posted April 12, 2022 21 minutes ago, Graion Dilach said: BG1NPCSOA should ... this needs to happen because this is what seems to cause all our problems. I mean, is that mod very popular? My recollection is that it adds a bunch of BG1 NPCs but they are all totally one-dimensional. (I didn't even know it adds a bunch of stuff with no modder prefixes and spells that don't follow normal spell conventions.) By contrast, many BG1 NPCs have dedicated mods adding them to BG2, and those individual mods are well-written, recently-updated, and generally better in every way. Is my understanding mistaken? Quote Link to comment
morpheus562 Posted April 12, 2022 Author Share Posted April 12, 2022 All dropboxes that host the mod didn't work when I tried. I do not know how to find it without asking someone else who has it on hand. Quote Link to comment
Enigmajazz Posted April 13, 2022 Share Posted April 13, 2022 Ok I have commented out the Plague.spl and the scroll and reinstalled on clean install, a similar error occurred with black.spl, which is something called den's globe of darkness. I commented this out and enhanced powergaming scripts installed perfectly. So it looks like these two specific spells from npc1soa cause the problem and the rest don't have any issues. Both of these spells cause an AC and Thaco penalty and plague causes disease and black causes blindness. I think I will try the full install again with these commented out, and see how it goes. I can't see how commenting out those two spells will cause any problems. 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.