jmerry Posted October 3, 2022 Share Posted October 3, 2022 (edited) 26 minutes ago, subtledoctor said: You can use GET_OFFSET_ARRAY to check whether the spell has a fatigue effect. Why would I need to check for that? I'm running a DELETE_EFFECT anyway - delete the fatigue effect if it's there, do nothing if it isn't. I haven't used GET_OFFSET_ARRAY at all in any of my code. There are some places in which that might be a good idea in place of low-level stuff, but this isn't one of them. Edited October 3, 2022 by jmerry Quote Link to comment
Nathan82 Posted October 3, 2022 Share Posted October 3, 2022 (edited) @jmerry Hello, I dont have that component in mmy current BG EE install, but apart from that and one or two other things its pretty much the same. I used change-log on SPPR712 Your mod is installed right near the end in my current install so any other mods that change Restoration spells will have made their changes before yours, so hopefully the attached zip is useful. Thanks restoration sppr712 change log and weidu log.7z Edited October 3, 2022 by Nathan82 Quote Link to comment
subtledoctor Posted October 4, 2022 Share Posted October 4, 2022 1 hour ago, jmerry said: Why would I need to check for that? I thought you said you want to condition the store change on whether the spell has a fatigue effect. And one reason to use OFFSET_ARRAY/OFFSET_ARRAY2 is that it is much, much faster than the higher-level “_EFFECT” functions. Check every spell un the game, make an array of positive hits, then use the _EFFECT functions on what’s in the array. It’s like an order of magnitude faster than filtering by the “match_” variables in the _EFFECT functions. That doesn’t matter here where you’re only checking one spell, but in general OFFSET_ARRAY has limited but very much nonzero utility. Quote Link to comment
jmerry Posted October 4, 2022 Share Posted October 4, 2022 Rather than directly conditioning on that, I'm conditioning the temple changes on "does my new spell exist". The code I already have conditions making the new spell on whether there's a fatigue effect (through the BUT_ONLY), so that's a convenient proxy that I can use without any extra overhead. And now I've spent far more time writing about it than actually writing the code. From figuring out what my code was actually doing wrong to writing what I'm pretty sure fixes it was a matter of a few minutes, at most. Quote Link to comment
Quester Posted October 11, 2022 Author Share Posted October 11, 2022 Well, despite lots of weirdness going on in my game, I've been having lots of fun with redescovering how much I love Baldur's Gate. However I've now started suffering from the dreaded restartitis. First off, can I just say that I *love* all the variety that having loads of available NPCs brings. I just counted that in BG1, I currently have 55 possible NPCs to choose from, plus 4 more SoD-exclusive, and in BG2, 69 possible NPCs! That said, it's really hard to choose which ones get to travel with my Bhaalspawn. Now, to report some weirdness: There are quite a number of cases of messed up strings appearing. Like, where a spell description is supposed to be, there will instead be a snippet of random text that looks to be a from a quest or dialogue or something. Here are some examples: Spoiler Spell name buggered. Jaheira's summoned beetles (from the spell Beetle Swarm) are called "You played Elminster?" Unshey's quest name is surely not supposed to be this. I don't think the ogre is supposed to say that. Description of Spell Thrust. Description of some unidentified boots. Lots of wonkiness, and I have no idea how to even begin to unravel what causes this. Other kinds of wonkiness: Spoiler The prices for these protection scrolls seem a bit extreme. I mean I know these are very useful and valuable scrolls, but is this really right? 4000 gold for one scroll? Who can afford such exorbitant prices? Spoiler Sirene not only got two different versions of the spell Dancing Lights, but she also got each one four times. What gives? Spoiler There is still weirdness going on with temple cures, despite the fact I got rid of both the ATweaks and the MiH components mentioned previously for this install. Why are all but two of the spells offered grayed out? Spoiler I solved the werewolf quest in one of the houses in Beregost, and Breagar (who's not in the party) gained quest xp. Okay? Spoiler There is a dude outside of the map, in the top left corner. He also looks to be stacked on top of himself several times. Who is he? What is he doing? Spoiler What the hell, was my reaction when I got this bow from an annoying bandit. I have since discovered this is from the mod ExtraExpandedEnhancedEncounters. How could anyone think this is balanced? So what if the bow requires 19 STR to wield? And it's made even more silly by the fact that this is dropped from a bandit named Bimmy. Quote Link to comment
jastey Posted October 11, 2022 Share Posted October 11, 2022 23 minutes ago, Quester said: I solved the werewolf quest in one of the houses in Beregost, and Breagar (who's not in the party) gained quest xp. Okay? I have no idea how that would happen. There is no script for Breagar in the questpack. Actually, there is no xp reward at this stage of the quest at all. Quote Link to comment
subtledoctor Posted October 11, 2022 Share Posted October 11, 2022 1 hour ago, Quester said: There is still weirdness going on with temple cures, despite the fact I got rid of both the ATweaks and the MiH components mentioned previously for this install. Why are all but two of the spells offered grayed out? It appears that you cannot afford most of them - that is my first guess. I don't know why CLW would be grayed out though. It appears you have a custom UI screen for temple stores? My next guess would be that your UI modis trying to do something clever with the presentation (only offer cures that are affordable and/or appropriate to your party's current ailments). 1 hour ago, Quester said: What the hell, was my reaction when I got this bow from an annoying bandit. I have since discovered this is from the mod ExtraExpandedEnhancedEncounters. How could anyone think this is balanced? So what if the bow requires 19 STR to wield? And it's made even more silly by the fact that this is dropped from a bandit named Bimmy. Ha, I remember seeing that in my game. I just threw it away. Some mods add stupid stuff to the game. It's annoying, but what can you do? (FWIW I looked at that bow in NI because I couldn't believe just how stupid it is, and it actually doesn't do +30 damage. It might be a typo? I forget the real damage bonus, it was an odd value like +14 or something. Still thoroughly stupid though - I mean, if you want to add Strong Arm to BGEE then just add the regular BG2 Strong Arm item!) Quote Link to comment
jmerry Posted October 12, 2022 Share Posted October 12, 2022 On cures not showing up - there's some sort of system around not offering a spell if it isn't needed. In a fully vanilla BGEE/SOD install, I just took my fully healed party to the nearest temple. All cures greyed out. Shoot Imoen with a Chromatic Orb for 1 damage and no side effect - now Cure Light Wounds and Dispel Magic are available. Hit her with a mace for 17 damage, and now higher-tier cure spells show up. Or if I hit Minsc with Blindness and he fails the save, Dispel Magic is available but no others are. What actually determines this ... no idea, and it's not in the stores themselves. The actual element for a temple cure in a store file is tiny - 8 bytes for a resource reference, 4 bytes for a price, and that's it. Scroll prices ... the elemental protection scrolls have a base price of 750 in the standard game (both BG1 and BG2). If that's still in place, 4050 means an effective store markup of 540% of base price. Standard stores in the BG1 campaign have a sell markup of 150, which means that you'd need a charisma/reputation adjustment of +260%. You can get +100% prices at rep 3, or +900% at rep 2, and charisma is either no change or a small (0-25%) price reduction. So +260% is impossible. Looks like something in your mod stack either changed the prices of those scrolls or gave that particular merchant a different store markup. Quote Link to comment
Mordekaie Posted October 12, 2022 Share Posted October 12, 2022 On 9/20/2022 at 10:06 PM, subtledoctor said: If it is that one, I made a hotfix for it as Quester mentioned. You can install the hotfix at any time, including mid-way through your game, and temple cures will start working. (He said he applied the hotfix and still got the crash, so his issue may be different. The Hotfix is very much specific to the JMerry mod.) Just to be sure (as i am not playing yet) : - In the extracted mod list for PI, i open jtweaks/setup-jtweaks.tp2 - In line 1014 i replace the existing : COPY_EXISTING ~SPPR713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR match_opcode=93 END By (from fix_temple_restoration.tp2) : COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END IF_EXISTS Quote Link to comment
Mordekaie Posted October 12, 2022 Share Posted October 12, 2022 (edited) On 9/23/2022 at 5:04 PM, Quester said: Well silly me. I didn't even realize. I have now removed that component for my next installation. On the temple cures topic, interestingly it seems in my game it's not J8#GRNF.spl which is faulty (which is what your fix mod fixes), but J8#LRNF.spl. Looking in NI, it doesn't have a name. I'm guessing this is due to some interaction with another mod that changes temple cures. After looking through my weidu.log again, I realize I have two mods doing similar things to temples: ~MIH_SP\SETUP-MIH_SP.TP2~ #0 #15 // Expanded Temple Services: v5 ~ATWEAKS\SETUP-ATWEAKS.TP2~ #0 #510 // Expanded temple services: v4.53 I don't know which causes the issue with jtweaks, but maybe the atweaks one since that is installed after in my install? Edit: So I'm removing that line with the missing spell from the relevant store in NI, I click Save. Load the game up....and still, it crashes upon trying to open the Cures page at temples. What the heck. I thought that would do it. My EET install order at the moment (work in progress) has those 3 components : jmerry's Tweak Collection (jtweaks) : "150 - Temple cures work better" Atweaks : "510 - Expanded temple services" (It expands the selection of curative spells which can be cast by NPC priests in temples). MiH Spell Pack : 15 - Expanded Temple Services (it expands ... and restores things...). Should i just choose one and stick to it ? Or do i have other alternatives because they look quite complementary ? I am now thinking to just install jtweaks temple cures work better with either Atweaks or MiH Spell Pack Expanded Temple Services. Any recommandations or opinions ? Edited October 12, 2022 by Mordekaie Quote Link to comment
subtledoctor Posted October 12, 2022 Share Posted October 12, 2022 Three mods changing the same thing… without looking at the code or anything, and only considering these small facts: 1. aTweaks was made a looong time ago, before any other mods modified temple cures, snd had no reason to worry about compatibility; 2. the author of MiH has specifically warned the the mod is not coded with compatibility in mind (not in this specific context, but still it’s some insight into how the mod is designed)… and yeah I would not try mixing those three components. The real question is, what exactly do you hope temple service stores will look like? Can you articulate any specific benefit to installing multiple mods that cover that area? What is your goal here? Quote Link to comment
Mordekaie Posted October 12, 2022 Share Posted October 12, 2022 1 hour ago, subtledoctor said: Three mods changing the same thing… without looking at the code or anything, and only considering these small facts: 1. aTweaks was made a looong time ago, before any other mods modified temple cures, snd had no reason to worry about compatibility; 2. the author of MiH has specifically warned the the mod is not coded with compatibility in mind (not in this specific context, but still it’s some insight into how the mod is designed)… and yeah I would not try mixing those three components. The real question is, what exactly do you hope temple service stores will look like? Can you articulate any specific benefit to installing multiple mods that cover that area? What is your goal here? I was focused on other aspects of my install order. Basically i definitely need the "usual" Temple services working as intended; and i would also like more services or items/scrolls to purchases. It seems (from the readme) that jmerry's Tweak Collection (jtweaks) : "150 - Temple cures work better" component just "repairs" the "vanilla" Temple services. On the other hand, MiH Spell Pack : 15 - Expanded Temple Services component seems to expand/restore few things. Does this component also correct the vanilla "bugs" ? Quote Link to comment
jmerry Posted October 12, 2022 Share Posted October 12, 2022 2 hours ago, Mordekaie said: Just to be sure (as i am not playing yet) : - In the extracted mod list for PI, i open jtweaks/setup-jtweaks.tp2 - In line 1014 i replace the existing : COPY_EXISTING ~SPPR713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR match_opcode=93 END By (from fix_temple_restoration.tp2) : COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END IF_EXISTS Not exactly. You actually need to make the following replacement: COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END BUT_ONLY with COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END IF_EXISTS Or you could just delete code instead of adding anything, replacing COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END BUT_ONLY with COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END In any case, it's key that you remove the BUT_ONLY. Whether you add an IF_EXISTS check in its place is unimportant, as that's something that will always return true. The BUT_ONLY check, which I included as mindless boilerplate in the original, returns false and doesn't create the new spell if the DELETE_EFFECT function doesn't find anything to remove. Oh, and here's the intent of my mod component in regards to temple services: - Dispel Magic, when offered, becomes a single--target spell that always dispels with no level check. Instead of, as in vanilla, being a standard priest Dispel Magic cast at the recipient's divine caster level. - Lesser Restoration and Greater Restoration, when offered, don't fatigue the recipient. - No changes made to what spells (by name) are offered. Quote Link to comment
subtledoctor Posted October 12, 2022 Share Posted October 12, 2022 Having read that, I would install either aTweaks changes or MiH changes, and then install jmerry's afterward. Also be aware, Item Revisions "Store Revisions" component messes with temple cures. I'm not entirely sure what it does... but I'm pretty sure it also works fine with jmerry's mod. Quote Link to comment
Mordekaie Posted October 12, 2022 Share Posted October 12, 2022 2 hours ago, jmerry said: Not exactly. You actually need to make the following replacement: COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END BUT_ONLY with COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END IF_EXISTS Or you could just delete code instead of adding anything, replacing COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END BUT_ONLY with COPY_EXISTING ~sppr713.spl~ ~override/J8#GRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END In any case, it's key that you remove the BUT_ONLY. Whether you add an IF_EXISTS check in its place is unimportant, as that's something that will always return true. The BUT_ONLY check, which I included as mindless boilerplate in the original, returns false and doesn't create the new spell if the DELETE_EFFECT function doesn't find anything to remove. Should i also do the same manipulation with Lesser restoration ? Replace : COPY_EXISTING ~SPPR417.spl~ ~override/J8#LRNF.SPL~ LPF DELETE_EFFECT INT_VAR match_opcode=93 END BUT_ONLY // Lesser restoration without fatigue By : COPY_EXISTING ~SPPR417.spl~ ~override/J8#LRNF.SPL~ LPF DELETE_EFFECT INT_VAR check_globals = 0 match_opcode = 93 END IF_EXISTS // Lesser restoration without fatigue 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.