subtledoctor Posted February 11, 2022 Author Share Posted February 11, 2022 That's fine. I think it can work more or less seamlessly with this approach. When it detects Fatigue = 0 and variable = 0, then 1) refresh the NPC's spells by whatever method; 2) set the variable to 1; and 3) set Fatigue to 1 BUT set this on a 15-second delay. Then when it detects Fatigue >= 1 and variable = 1, set the variable to 0. This should catch every instance but maintain a ~2-round cushion during which other mods can detect resting. This should allow all such mods to work together with no problems. Quote Link to comment
jastey Posted March 3, 2022 Share Posted March 3, 2022 On 2/11/2022 at 9:30 PM, subtledoctor said: BUT set this on a 15-second delay That's what I will do in my mods, too. FATIGUE increases rather slowly so there would be a chance some scripted spell refreshing wouldn't work (like transition into hell in BGII) if it's solely done by checking for the FATIGUE value. My mods all use the same variable so script blocks are only added once to baldur.bcs, plus FATIGUE value is only increased after the timer run out if it's still at 0 so it's not increased more than necessary. Quote Link to comment
subtledoctor Posted March 3, 2022 Author Share Posted March 3, 2022 Nice. By the way, 41 minutes ago, jastey said: there would be a chance some scripted spell refreshing wouldn't work (like transition into hell in BGII) I had completely failed to take this into account when I designed my mods. But you'll be happy to know that, now that I have actually played BG2 to the end for the first time in a decade, this transition worked perfectly, without a hitch and without any special handling on my part. The hell transition seems to set fatigue to 0 as one would hope. Quote Link to comment
jastey Posted March 3, 2022 Share Posted March 3, 2022 13 minutes ago, subtledoctor said: The hell transition seems to set fatigue to 0 as one would hope. I didn't doubt it; but if I do refreshing of spells by checking fatigue value only it might be it was not increased by normal progression when the group descends, meaning the scripted resting wouldn't be detected by a "rest detection" by script only if the fatigue value is not increased after doing so. That's why I left the increased via spell in in the end but after the timer run as you suggested. Quote Link to comment
CamDawg Posted March 3, 2022 Share Posted March 3, 2022 Is now a good time to mention that IWD(EE) druids are immune to fatigue starting at level 15? This is also available to the BG games via IWDification. Quote Link to comment
Jarno Mikkola Posted March 3, 2022 Share Posted March 3, 2022 2 minutes ago, CamDawg said: Is now a good time to mention that IWD(EE) druids are immune to fatigue starting at level 15? This is also available to the BG games via IWDification. Is this the fatigue effect, or ? Aka, which opcode do you use, so the others can have the infered code checked out. Quote Link to comment
subtledoctor Posted March 3, 2022 Author Share Posted March 3, 2022 (edited) 44 minutes ago, CamDawg said: Is now a good time to mention that IWD(EE) druids are immune to fatigue starting at level 15? This is also available to the BG games via IWDification. Do you know how it is applied? 1) Do they have immunity to opcode 93? 2) How does it prevent the natural hard-coded fatigue advancement as the game clock runs? Presumably we can work around this in some way. If they are immune to #2 but not #1, then the mods should already work just fine, as they use opcode 93 to set fatigue to 1. A druid with fatigue = 1 and never getting higher is just as good as a druid with fatigue = 0 and never getting higher. If they get immunity to opcode 93, then we would have to code around it - probably remove that and reimplement "immunity to fatigue" in a different way. Edited March 3, 2022 by subtledoctor Quote Link to comment
CamDawg Posted March 3, 2022 Share Posted March 3, 2022 Op 93 to set fatigue to 0 permanently followed by immunity to op 93 via spcl939. Quote Link to comment
Jarno Mikkola Posted March 3, 2022 Share Posted March 3, 2022 36 minutes ago, CamDawg said: Op 93 to set fatigue to 0 permanently, followed by immunity to op 93 via spcl939. I placed the comma there for a reason. The first part doesn't need to be there, as the second part takes care of the whole thing. Unless we are talking about very unlikely things like the character being very tired when they gain level 15, and even then it shouldn't have an effect as the tired thing only checks the fatigue level only so often. But any ways, the other modders need to find their way around this... is there a spot in DS or similar system that could be used ? Quote Link to comment
subtledoctor Posted March 3, 2022 Author Share Posted March 3, 2022 Will have to work around that, then. Can just edit SPCL939. In the EEs could just have a repeating effect that checks for fatigue>1 and conditionally sets fatigue to 1, or something. Pre-EE it would be a bit tougher. Quote Link to comment
CamDawg Posted March 3, 2022 Share Posted March 3, 2022 It's cdidrif.spl for IWDification and hardcoded for oIWD. There are also spells (Ilmater's Endurance) that set fatigue to zero. Quote Link to comment
Awachi Posted March 4, 2022 Share Posted March 4, 2022 Can increment -x take fatigue below 0? Quote Link to comment
subtledoctor Posted March 4, 2022 Author Share Posted March 4, 2022 I imagine it would wrap around to 127 or 255. But, I never actually tried. 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.