Jump to content

Modders' use of limited resources


Recommended Posts

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.

Link to comment
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.

Link to comment

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.

Link to comment
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.

Link to comment
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.

Link to comment
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 by subtledoctor
Link to comment
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 ?

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...