Avenger Posted April 10, 2018 Share Posted April 10, 2018 Well, maybe i was in haste, not sure if this would work, but if you are not EE only, this is moot anyway. Quote Link to comment
Roxanne Posted April 10, 2018 Share Posted April 10, 2018 Do you happen to know the progression of the FATIGUE stat in the game? After how many seconds does it get increased by 1? If I could spare the fatigue spell and use the stat directly it would be cool. But I guess it's more complicated than that or maybe related to gametime timer and /or dependent in the char's CON or something. The impact of CON on the fatigue and regeneration is found in hpconbon.2da. If I interpret it right, fighters get some advantage but only at higher levels. A question on the side PartyRested() only gives true after RestParty() How would that impact all the roundabout 500 cases (in modded EET) that look for PartyRested(). Or is that just an occasional rest event that differs from the normal ones and thus may just delay some other event by one rest? Quote Link to comment
Jarno Mikkola Posted April 10, 2018 Share Posted April 10, 2018 (edited) Avenger: what does seven eyes mean? It's originally the one IWD spell that's impossible to make in the old BG2 engine... that required the opcode #335 in EE engine. Edited April 10, 2018 by Jarno Mikkola Quote Link to comment
subtledoctor Posted April 10, 2018 Share Posted April 10, 2018 (edited) The 7eyes thing is a very interesting idea. I'm using the 7eyes effect in one mod, but I feel like there is a lot of unused (EE-only) potential there. What about using the method outlined in the first post, but instead of scripting the familiar to be rested, apply a spell that uses the "Wish rest" opcode. And give the spell 7 hours of 206 protection against itself? Then you don't need to advance Player1's fatigue. Sure, it will waste some procesdor cycles as the conditions return true and it tries to fire the spell every six second for an (in-game) hour... but that probably would not have any noticeable impact on performance. Edited April 10, 2018 by subtledoctor Quote Link to comment
Jarno Mikkola Posted April 10, 2018 Share Posted April 10, 2018 ... but that probably would not have any noticeable impact on performance. yEAH, TELL THAT TO THE DUDE THAT WANT TO MOVE THEIR FAMILIAR ... Quote Link to comment
subtledoctor Posted April 10, 2018 Share Posted April 10, 2018 Are you kidding? People do WAY worse things to the game scripts than that. Most lag and stutter comes from complex and bloated scripts, and this only adds a single ~6-line conditional check. Firing a spell with no animation and no sound and no effect should add almost no hit to performance. I have literally dozens of this sort of thing going on every second in my game, and I'm playing it on the 2nd-slowest iPad model. (But admittedly, at this point I'm used to the EE engine, I don't remember how unoptimized the old engine is...) Quote Link to comment
Jarno Mikkola Posted April 10, 2018 Share Posted April 10, 2018 Are you kidding? People do WAY worse things to the game scripts than that. No, definitely not kidding. And I said MOVE the familiar, not have the game lag. Check if you can move a character that fire a script at every 6 seconds with an action. It stops at every 6 second and doesn't go on anymore !!!!!½!!!!!!!!!!!!!!!!!!!!!!!!!!!! Quote Link to comment
subtledoctor Posted April 10, 2018 Share Posted April 10, 2018 Really? That's silly. Quote Link to comment
Jarno Mikkola Posted April 10, 2018 Share Posted April 10, 2018 Yeah, not.Fun.At.All. If you know any worse scripts people do... burn the heretic. Quote Link to comment
Avenger Posted April 10, 2018 Share Posted April 10, 2018 Are you using some of the 'Spell*' actions or ApplySpell? Using blocking actions can indeed cause stutter, but instant actions are fine. Quote Link to comment
Endurium Posted June 10, 2018 Share Posted June 10, 2018 (edited) Hmm, I use a local timer variable in a script attached to creatures such as familiars to control resting/refreshing spells/abilities outside of a player-initiated party rest. IF ActionListEmpty() GlobalTimerExpired("REST","LOCALS") THEN RESPONSE #100 Rest() SetGlobalTimer("REST","LOCALS",2400) Continue() END IF !GlobalTimerNotExpired("REST","LOCALS") THEN RESPONSE #100 SetGlobalTimer("REST","LOCALS",2400) Continue() END The ActionListEmpty() trigger prevents the animation sequence triggered by resting from interrupting the character's current action, if any. You can set the timer limit to any value desired, of course; I used 8 game hours as an example. Second block starts the timer, first block maintains it. Sorry if this isn't what you're looking for. Edit: Sadly, in IWDEE at least, when the character is merely walking from one place to another this isn't considered as an action by ActionListEmpty() so Rest() will take place anyway and halt the character in their tracks, throwing away the destination marker. Edited June 11, 2018 by Endurium Quote Link to comment
CamDawg Posted June 11, 2018 Share Posted June 11, 2018 (edited) A question on the side PartyRested() only gives true after RestParty()How would that impact all the roundabout 500 cases (in modded EET) that look for PartyRested(). Or is that just an occasional rest event that differs from the normal ones and thus may just delay some other event by one rest? This got lost in the shuffle--better late than never. This really only becomes a problem when you rely on it through multiple script cycles, primarily via using it to fire a banter. Anomen has a good example of this from the Fixpack; he had a morning banter that never fired because of this issue. His script prompts it with: IF InParty(Myself) PartyRested() AreaType(0) !AreaType(CITY) See(Player1) !StateCheck(Player1,STATE_SLEEPING) CombatCounter(0) Global("BAnomen4","LOCALS",0) THEN RESPONSE #100 Interact(Player1) END The script fires correctly once the broken AreaType trigger is fixed. The corresponding dialogue trigger was: PartyRested() AreaType(OUTSIDE) See(Player1) !StateCheck(Player1,STATE_SLEEPING) Global("BAnomen4","LOCALS",0) Even after fixing the broken AreaType to OUTDOOR and adding the missing !City check, this banter never fired. Anomen's script block was the initial script cycle so by the time the engine is parsing the banters looking for true states, PartyRested() was already returning false. We end up removing the PartyRested() check from the dialogue to get it working. Since it's now a very loose dialogue trigger, the script now bumps the variable 0>1 and the dialogue 1>2 so that it doesn't get prompted by another Interact() call. IF InParty(Myself) PartyRested() AreaType(OUTDOOR) !AreaType(CITY) See(Player1) !StateCheck(Player1,STATE_SLEEPING) CombatCounter(0) Global("BAnomen4","LOCALS",0) THEN RESPONSE #100 SetGlobal("BAnomen4","LOCALS",1) Interact(Player1) END AreaType(OUTDOOR) !AreaType(CITY) See(Player1) !StateCheck(Player1,STATE_SLEEPING) CombatCounter(0) Global("BAnomen4","LOCALS",1) Edited June 11, 2018 by CamDawg Quote Link to comment
jastey Posted June 11, 2018 Author Share Posted June 11, 2018 Hmm, I use a local timer variable in a script attached to creatures such as familiars to control resting/refreshing spells/abilities outside of a player-initiated party rest. IF ActionListEmpty() GlobalTimerExpired("REST","LOCALS") THEN RESPONSE #100 Rest() SetGlobalTimer("REST","LOCALS",2400) Continue() END IF !GlobalTimerNotExpired("REST","LOCALS") THEN RESPONSE #100 SetGlobalTimer("REST","LOCALS",2400) Continue() END The ActionListEmpty() trigger prevents the animation sequence triggered by resting from interrupting the character's current action, if any. You can set the timer limit to any value desired, of course; I used 8 game hours as an example. Second block starts the timer, first block maintains it. Sorry if this isn't what you're looking for. It definitely is one way to make sure the creature is rested in appropriate amounts of time. It doesn't satisfy my sense of perfection, though, where I expect the following NPC to have his spells refreshed after the party rested. Thank you for the idea nontheless! Quote Link to comment
Endurium Posted June 11, 2018 Share Posted June 11, 2018 Hmm, I use a local timer variable in a script attached to creatures such as familiars to control resting/refreshing spells/abilities outside of a player-initiated party rest. IF ActionListEmpty() GlobalTimerExpired("REST","LOCALS") THEN RESPONSE #100 Rest() SetGlobalTimer("REST","LOCALS",2400) Continue() END IF !GlobalTimerNotExpired("REST","LOCALS") THEN RESPONSE #100 SetGlobalTimer("REST","LOCALS",2400) Continue() END The ActionListEmpty() trigger prevents the animation sequence triggered by resting from interrupting the character's current action, if any. You can set the timer limit to any value desired, of course; I used 8 game hours as an example. Second block starts the timer, first block maintains it. Sorry if this isn't what you're looking for. It definitely is one way to make sure the creature is rested in appropriate amounts of time. It doesn't satisfy my sense of perfection, though, where I expect the following NPC to have his spells refreshed after the party rested. Thank you for the idea nontheless! I see. Perhaps have a block on the party member's script do something like this: IF PartyRested() Global("PARTYRESTED","GLOBAL",0) THEN RESPONSE #100 SetGlobal("PARTYRESTED","GLOBAL",1) END Then have a block on the Familiar's script monitoring the variable, something like this: IF Global("PARTYRESTED","GLOBAL",1) THEN RESPONSE #100 Rest() SetGlobal("PARTYRESTED","GLOBAL",0) END This assumes PartyRested() resets to false after a script cycle, if I understood Cam's earlier post on the subject. Quote Link to comment
jastey Posted June 12, 2018 Author Share Posted June 12, 2018 Endurium: The main problem was that I wanted to cover the rests that are triggered by scripts using "Rest()" for the party members individually (used by some mods to make sure the romantic love-night with wake-up talk isn't turned into a threesome by another resttalk or the like). For these kind of "rests" the PartyRested() trigger doesn't trigger, unfortunately. (Plus, after a real rest via "RestParty()", the familiar is refreshed anyway, so it's really only those scripted rests I am trying to detect.) 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.