Jump to content


Photo

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


29 replies to this topic

#1 jastey

jastey
  • Gibberlings
  • 7330 posts
  • Gender:Female

Posted 09 April 2018 - 11:34 PM

For RestParty(), familiars or all creatures following in that status will be rested just as well.

 

But there are some mods that use the scripted rest to prevent stacking of rest banters as described here.

 

Problem: After such a rest, Players 1-6 will be rested, but familiars won't. Since I am using the familiar status to let some of my NPCs follow as a 7th party member, this is not good.

 

I have a solution that is taken from rest detection of Zed Nocear's BG1 trigger simluations (i.e. apply a spell that increases FATIGUE by 1 to Player1 and do so every time FATIGUE is at 0 -> rest can be detected).

 

This is a bit tedious, though (ahaha, what a game of words!) since it decreases Player1's time until fatigued, adds a scriptblock to Baldur.bcs, and would have to be compatible for all mods that want to make use of this approach as it can only be done once (duh).

 

Is there a more elegant way to achieve this?

 

Unfortunately, the best solution would not be to change the used rest cutscenes, as they are already used by mods as they are now. Still, if there is a way to rest all "creatures that follow as familiars" by scripting, it would interest me to know, too.



#2 Roxanne

Roxanne

    Modder

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

Posted 10 April 2018 - 01:27 AM

I have worked with those two alternatives in my mods:

 

1) I have given those 7th member-like creature a minimum  regeneration effect, so an 8 hours rest heals them as well. Of course the same happens during a worldmap travel of some length.

Use of this idea of course depends on how late and at which level your *NPC* appears. It is not for low level creatures early in the game but if we talk of somewhere in SoA or ToB it works.

Anyway, I admit that it is a matter of taste and a workaround.

 

2) Use the PartyRested() trigger in the creature's script to apply the same spell used by the rest function on your creature.


Edited by Roxanne, 10 April 2018 - 01:28 AM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#3 Roxanne

Roxanne

    Modder

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

Posted 10 April 2018 - 01:36 AM

Sorry, the *same spell used by the rest function* actually is not correct, that was what I tried but not got adequate results.

I use a custom spell now for it, you can find it in my Corwin mod - there is also a slightly similar spell in Argent77's Djinni mod,(when the guy rests in his bottle) and some other mods I cannot remember off-hand.


The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#4 jastey

jastey
  • Gibberlings
  • 7330 posts
  • Gender:Female

Posted 10 April 2018 - 03:30 AM

My main problem is that the NPC has e.g. special abilities or even spells that need to be refreshed after such a scripted rest, as well.

#5 Jarno Mikkola

Jarno Mikkola

    The Imp

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

Posted 10 April 2018 - 03:35 AM

My main problem is that the NPC has e.g. special abilities or even spells that need to be refreshed after such a scripted rest, as well.

Those should be refreshed via Rest script action triggered by the PartyRested() trigger.


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.

#6 Roxanne

Roxanne

    Modder

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

Posted 10 April 2018 - 03:42 AM

My main problem is that the NPC has e.g. special abilities or even spells that need to be refreshed after such a scripted rest, as well.

Ah...

add

ActionOverride("yourCre",Rest())

to the script?

It is different from RestParty() as you do not see movie or effect and you can apply it to a single creature.


Edited by Roxanne, 10 April 2018 - 03:43 AM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#7 Jarno Mikkola

Jarno Mikkola

    The Imp

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

Posted 10 April 2018 - 04:18 AM

Pretty sure one just needs to have this in an override script of the creature:

IF
	PartyRested()
THEN
	RESPONSE #100
		Rest()
END

No action override shenanigans.


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.

#8 jastey

jastey
  • Gibberlings
  • 7330 posts
  • Gender:Female

Posted 10 April 2018 - 05:03 AM

PartyRested() only gives true after RestParty(), at least in my tests.

I am talking about party rest that is simulated via cutscene and scripted Rest() actions for Players 1-6.

Patching these cutscenes would only be possible as crossmod content late in an install. It is possible, of course, but I am interested whether there is a general approach.

#9 Roxanne

Roxanne

    Modder

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

Posted 10 April 2018 - 05:36 AM

PartyRested() only gives true after RestParty(), at least in my tests.

I am talking about party rest that is simulated via cutscene and scripted Rest() actions for Players 1-6.

Patching these cutscenes would only be possible as crossmod content late in an install. It is possible, of course, but I am interested whether there is a general approach.

Are you talking about that special rest script that was published by someone to prevent multiple rests triggered by mods interacting?

I cannot find it anymore to see how exactly it worked, just - does that always trigger and substitute RestParty()? Or is the triggering of that script rather the exception?

 

Is there anything in this script that you could evaluate, some global set or so?


Edited by Roxanne, 10 April 2018 - 05:40 AM.

The Sandrah Saga!

another piece of *buggy, cheesy, unbalanced junk*

 

 

 


#10 Jarno Mikkola

Jarno Mikkola

    The Imp

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

Posted 10 April 2018 - 06:11 AM

Are you talking about that special rest script that was published by someone to prevent multiple rests triggered by mods interacting?
I cannot find it anymore ...

That's cause you have never played the game with SCS then, cause it has been there for YEARS.
But the whole jig of that mods is that you literally can't rest but once.

Edited by Jarno Mikkola, 10 April 2018 - 07:11 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.

#11 jastey

jastey
  • Gibberlings
  • 7330 posts
  • Gender:Female

Posted 10 April 2018 - 06:43 AM

There is a link in my first post to berelinde's tutorial.
There is no variable etc I could use.
I am searching for a general solution on my mod's side because I don't have power over the rest cutscenes already in other mods.

#12 subtledoctor

subtledoctor
  • Modders
  • 2472 posts
  • Gender:Male

Posted 10 April 2018 - 07:02 AM

Was going to say, have the creature's script check Player1's FATIGUE stat, and rest the creature whenever it is zero.  And prevent it from happening every 6 seconds... maybe by setting Player1's FATIGUE stat to 1.  It would minimal effect on normal gameplay.

 

And then I re-read the first post.  :blush:


Edited by subtledoctor, 10 April 2018 - 07:02 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


#13 Avenger

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

Posted 10 April 2018 - 07:30 AM

Here is a weird idea: if you are programming only for the EE, you can detect the fatigue opcode with param2 =  0 by seven eyes (335/336).

In the triggered spell, you can target familiars globally by anything (using 177 or 318 or 324).

 

You can add the seven eyes opcode by the familiar on creation.

 

This way, you can refresh your familiar the moment its owner has rested.

 

Note: i didn't test this, but feels like doable.


Edited by Avenger, 10 April 2018 - 07:31 AM.


#14 jastey

jastey
  • Gibberlings
  • 7330 posts
  • Gender:Female

Posted 10 April 2018 - 07:30 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.

#15 jastey

jastey
  • Gibberlings
  • 7330 posts
  • Gender:Female

Posted 10 April 2018 - 07:32 AM

Avenger: what does seven eyes mean?

Unfortunately, I am coding for vanilla BGII, as well.



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users