jastey Posted April 10, 2018 Posted April 10, 2018 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. Quote
Roxanne Posted April 10, 2018 Posted April 10, 2018 (edited) 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 April 10, 2018 by Roxanne Quote
Roxanne Posted April 10, 2018 Posted April 10, 2018 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. Quote
jastey Posted April 10, 2018 Author Posted April 10, 2018 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. Quote
Jarno Mikkola Posted April 10, 2018 Posted April 10, 2018 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. Quote
Roxanne Posted April 10, 2018 Posted April 10, 2018 (edited) 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 April 10, 2018 by Roxanne Quote
Jarno Mikkola Posted April 10, 2018 Posted April 10, 2018 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. Quote
jastey Posted April 10, 2018 Author Posted April 10, 2018 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. Quote
Roxanne Posted April 10, 2018 Posted April 10, 2018 (edited) 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 April 10, 2018 by Roxanne Quote
Jarno Mikkola Posted April 10, 2018 Posted April 10, 2018 (edited) 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 April 10, 2018 by Jarno Mikkola Quote
jastey Posted April 10, 2018 Author Posted April 10, 2018 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. Quote
subtledoctor Posted April 10, 2018 Posted April 10, 2018 (edited) 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. Edited April 10, 2018 by subtledoctor Quote
Avenger Posted April 10, 2018 Posted April 10, 2018 (edited) 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 April 10, 2018 by Avenger Quote
jastey Posted April 10, 2018 Author 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. Quote
jastey Posted April 10, 2018 Author Posted April 10, 2018 Avenger: what does seven eyes mean? Unfortunately, I am coding for vanilla BGII, as well. Quote
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.