Jump to content

Photo

Resting of familiars? (or any other creature following in that status)


29 replies to this topic

#16 Avenger

Avenger
  • Modders
  • 3805 posts
  • Gender:Male
  • Location:Hungary

Posted 10 April 2018 - 07:34 AM

Well, maybe i was in haste, not sure if this would work, but if you are not EE only, this is moot anyway. 



#17 Roxanne

Roxanne

    Modder

  • Modders
  • 2041 posts
  • Gender:Female
  • Location:Auckland, NZ

Posted 10 April 2018 - 07:40 AM

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?


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#18 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6827 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 April 2018 - 07:59 AM

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 by Jarno Mikkola, 10 April 2018 - 08:08 AM.

Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#19 subtledoctor

subtledoctor
  • Modders
  • 2838 posts
  • Gender:Male

Posted 10 April 2018 - 08:32 AM

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 by subtledoctor, 10 April 2018 - 08:33 AM.

Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#20 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6827 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 April 2018 - 09:19 AM

... but that probably would not have any noticeable impact on performance.

yEAH, TELL THAT TO THE DUDE THAT WANT TO MOVE THEIR FAMILIAR ...


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#21 subtledoctor

subtledoctor
  • Modders
  • 2838 posts
  • Gender:Male

Posted 10 April 2018 - 10:19 AM

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...)


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#22 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6827 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 April 2018 - 10:29 AM

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 !!!!!½!!!!!!!!!!!!!!!!!!!!!!!!!!!!


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#23 subtledoctor

subtledoctor
  • Modders
  • 2838 posts
  • Gender:Male

Posted 10 April 2018 - 11:14 AM

Really?  That's silly.


Faiths & Powers: Spell spheres and kit pack for priests and paladins
Might & Guile: Tweaks and kits for warriors and rogues
Scales of Balance: Game tweaks and rule overhauls
NPC_EE: More options for NPCs in BGEE, SoD, & BG2EE


#24 Jarno Mikkola

Jarno Mikkola

    The Imp

  • Modders
  • 6827 posts
  • Gender:Male
  • Location:The town where the dead haven't keeled over, yet. In Finland.

Posted 10 April 2018 - 11:34 AM

Yeah, not.Fun.At.All. If you know any worse scripts people do... burn the heretic.


Welcome to the sanity, you are free to search for the limit, it's out there, we drew it in the sand.
Here's how to install all the ... mods you ever really could want to Infinity Engine games. I removed the stable word from there as Roxanne began to add BS mods that are likely to break compatibility from the BWS.

#25 Avenger

Avenger
  • Modders
  • 3805 posts
  • Gender:Male
  • Location:Hungary

Posted 10 April 2018 - 12:49 PM

Are you using some of the 'Spell*' actions or ApplySpell?

Using blocking actions can indeed cause stutter, but instant actions are fine.



#26 Endurium

Endurium
  • Members
  • 32 posts
  • Gender:Male

Posted 10 June 2018 - 08:13 AM

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 by Endurium, 11 June 2018 - 01:22 PM.


#27 CamDawg

CamDawg

    ALL GLORY TO THE HYPNOTOAD

  • Gibberling Poobah
  • 9750 posts
  • Gender:Not Telling

Posted 10 June 2018 - 04:00 PM

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 by CamDawg, 10 June 2018 - 04:43 PM.

Why is this Hypnotoad video so popu... ALL GLORY TO THE HYPNOTOAD.


#28 jastey

jastey
  • Gibberlings
  • 7525 posts
  • Gender:Female

Posted 10 June 2018 - 08:31 PM

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. :happy:

Thank you for the idea nontheless!



#29 Endurium

Endurium
  • Members
  • 32 posts
  • Gender:Male

Posted 11 June 2018 - 01:13 AM

 

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. :happy:

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.



#30 jastey

jastey
  • Gibberlings
  • 7525 posts
  • Gender:Female

Posted 11 June 2018 - 10:40 PM

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.)





Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users