Jump to content


Photo

Restcheck version 1.01 (code for mod rest scene compatibility with BG2


  • Please log in to reply
15 replies to this topic

#1 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 27 March 2017 - 03:00 AM

Now that I have it so it's working I moved it over to the tutorials forum here:

http://www.shsforums...nes-compatible/

 

I also started my RestCheckForModScenes tutorial here, where people can request that coding to use in their own mods if they want (I'm going to be making it anyways for my mod so I might as well use it.) It should work fine using the priority system I talked about below (so my mod's restcheck yields to everyone, the next restcheck will yield to everyone except mine, etc.):

http://www.shsforums...-compatibility/


Edited by BCaesar, 31 March 2017 - 08:08 PM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#2 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 27 March 2017 - 03:12 AM

Also, if you have a mod with a rest-scene I highly recommend you break up the scripting so it attempts to trigger until succeeding (rather than only attempting to trigger once). For example this is my coding in korgand.baf for the Korgan-Mazzy Inn scene in All Things Mazzy:

 

IF //Korgan and Mazzy Inn Scene Trigger	
	InParty("Korgan")
	InParty("Mazzy")
	!StateCheck("Mazzy",CD_STATE_NOTVALID)
	!StateCheck(Player1,CD_STATE_NOTVALID)
	!StateCheck("Korgan",CD_STATE_NOTVALID)
	OR(11)
		AreaCheck("AR0021")        // City Gates - Crooked Crane 1st floor
		AreaCheck("AR0313")        // Docks - Sea's Bounty 1st floor
		AreaCheck("AR0406")        // Slums - Copper Coronet
		AreaCheck("AR0509")        // Bridge - Five Flagons 1st floor
		AreaCheck("AR0513")        // Bridge - Calbor's Inn 1st floor
		AreaCheck("AR0522")        // Bridge - Five Flagons 1st floor (stronghold)
		AreaCheck("AR0704")        // Waukeen's Promenade - Mithrest Inn
		AreaCheck("AR0709")        // Waukeen's Promenade - Den of the Seven Vales
		AreaCheck("AR1105")        // Umar Hills - Imnesvale Inn
		AreaCheck("AR1602")        // Brynnlaw - Brynnlaw Inn
		AreaCheck("AR2010")        // Trademeet - Vytori's Pub
	Global("_BKTRM","GLOBAL",0)
	Global("_brestcheck","GLOBAL",0)
	Global("_bkoma","GLOBAL",6)
THEN
	RESPONSE #100
		SetGlobal("_BKTRM","GLOBAL",1)
END	

So the first script is the normal script which just sets a new trigger: Global("_BKTRM","GLOBAL",1)

 

Then I have the script triggering the dialogue in korgan.baf (the normal file for korgan). Remember the first one is in the dream file: korgand.

 

IF //Korgan and Mazzy Inn Scene Dialogue Trigger    
    Global("_BKTRM","GLOBAL",1)
THEN
    RESPONSE #100
        ActionOverride(Player1,SetDialog("Player1"))
        StartDialogNoSet(Player1)
END       


This way the dream file (korgand) only sets the trigger and then the normal file (korgan) keeps trying to start dialogue until it works (instead of trying only once). It seems to work much more reliably.


Edited by BCaesar, 28 March 2017 - 10:32 PM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#3 jastey

jastey
  • Administrator
  • 3219 posts

Posted 27 March 2017 - 05:19 AM

The back-up script is exactly the same, but it uses: Global("_BKTRM","GLOBAL",1) to trigger and doesn't set any new trigger. That way even if the scene doesn't trigger on one rest it will always trigger on the next rest (or if it fails there it will attempt it on the next rest, and the one after, and the one after until it finally works).

That sounds a bit dangerous considering the night talks are in the same dlg as the normal dialogues - it means you have an "open" dialogue sitting in your dlg that will play the next time, and not necessarily upon the next rest. It will also play if the script tries to trigger a completely different dialogue (if that one is below the night talk in your dlg), or the player initiates PID with the NPC. I wouldn't do that.



#4 jastey

jastey
  • Administrator
  • 3219 posts

Posted 27 March 2017 - 05:54 AM

One question: Why not make this one mod that adds the script blocks to the listed mods once in an install and give modders the possibility to just do this:
 

5) Add the following trigger to your mod's rest scenes:
Global("_rc_restcheck","GLOBAL",0)
Remember that you're replacing _rc_ with your own mod prefix.


in their mods? I have full understanding if you don't want to distribute a mod with a variable that contains your prefix and open that variable to general use*, but if your code gets used a lot, it will add several script blocks that basically do the same.

 

*Someone spread his prefix a while ago in an NPC creation guide, and it turned out to be a bad idea.

There's been thoughts about unifying the dream timers across mods a while ago, but it never came to reality. I'm not sure yet whether your solution makes more sense than just patching a unisono dream timer to all dream script blocks in question, but cudos for attempting to prevent CHARNAME from having unplanned threesomes!


Edited by jastey, 27 March 2017 - 05:55 AM.


#5 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 27 March 2017 - 06:19 PM

The back-up script is exactly the same, but it uses: Global("_BKTRM","GLOBAL",1) to trigger and doesn't set any new trigger. That way even if the scene doesn't trigger on one rest it will always trigger on the next rest (or if it fails there it will attempt it on the next rest, and the one after, and the one after until it finally works).

That sounds a bit dangerous considering the night talks are in the same dlg as the normal dialogues - it means you have an "open" dialogue sitting in your dlg that will play the next time, and not necessarily upon the next rest. It will also play if the script tries to trigger a completely different dialogue (if that one is below the night talk in your dlg), or the player initiates PID with the NPC. I wouldn't do that.

 

I hadn't thought of that, but the other option is it doesn't trigger at all (unless it works fine and then it's not an issue either way).

 

I got it! You break it up just like any normal script, put the conditions in one script (in korgand) and have that set a trigger which then triggers a script in the normal NPC script (korgan) which starts dialogue. That's just like the normal reliable way to trigger a conversation (except that the frist script is in the dream file).


Edited by BCaesar, 27 March 2017 - 10:34 PM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#6 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 27 March 2017 - 06:31 PM

One question: Why not make this one mod that adds the script blocks to the listed mods once in an install and give modders the possibility to just do this:
 
5) Add the following trigger to your mod's rest scenes:
Global("_rc_restcheck","GLOBAL",0)
Remember that you're replacing _rc_ with your own mod prefix.


in their mods? I have full understanding if you don't want to distribute a mod with a variable that contains your prefix and open that variable to general use*, but if your code gets used a lot, it will add several script blocks that basically do the same.

 

*Someone spread his prefix a while ago in an NPC creation guide, and it turned out to be a bad idea.

There's been thoughts about unifying the dream timers across mods a while ago, but it never came to reality. I'm not sure yet whether your solution makes more sense than just patching a unisono dream timer to all dream script blocks in question, but cudos for attempting to prevent CHARNAME from having unplanned threesomes!

 

If it only did it for in-game rest scenes I could do that, but once I start adding rest scenes from mods as well there's a problem. As it's currently written the scripting is code that is added to your mod to prevent your rest scenes from triggering with the in-game scenes and those in the listed mods. The issue is that if your mod is one of the ones listed (and I plan to expand restcheck to include the rest scenes from as many mods as I can) then you have to delete the coding that affects your mod from your restcheck or otherwise your own rest scenes won't trigger at all.

 

So if I am the writer of the Mazzy Friendship mod and want to add this to the Mazzy Friendship I will use my prefix and delete the coding for the Mazzy Friendship rest. And Restcheck prevents the Mazzy Friendship rest from triggering the same rest as any other rest scene.

 

And then if I'm the writer of the Imoen Romance Mod and want to add this to the Imoen Romance then I will use my prefix and delete the coding for the Imoen Romance rests. And Restcheck will prevent my Imoen romance rests from triggering the same rest as any other rest scene.

 

But if both mods are using the same prefix in the coding then the Restcheck in the Mazzy Friendship Mod will prevent the Imoen Romance rest scenes from triggering and vice versa. Plus the prefix on the trigger Global("_rc_restcheck","GLOBAL",0) has to be the same as the prefix for SetGlobal("_rc_restcheck","GLOBAL",0) (and 1, 2) in the restcheck coding.

 

But if there's any way I could make it simpler than it is for use by other mods I'm open to suggestions.


Edited by BCaesar, 27 March 2017 - 07:05 PM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#7 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 27 March 2017 - 06:54 PM

The back-up script is exactly the same, but it uses: Global("_BKTRM","GLOBAL",1) to trigger and doesn't set any new trigger. That way even if the scene doesn't trigger on one rest it will always trigger on the next rest (or if it fails there it will attempt it on the next rest, and the one after, and the one after until it finally works).

That sounds a bit dangerous considering the night talks are in the same dlg as the normal dialogues - it means you have an "open" dialogue sitting in your dlg that will play the next time, and not necessarily upon the next rest. It will also play if the script tries to trigger a completely different dialogue (if that one is below the night talk in your dlg), or the player initiates PID with the NPC. I wouldn't do that.

 

Thanks for that. I changed and tested it and I think I fixed it by just breaking the script into two parts like I do for normal conversations like I talked about in the post above (well, two posts above actually). Because something triggered in the dream file no rest happens. And then immediately the rest scene starts. It runs almost exactly like trying to trigger everything in the dream file, but more reliably.

 

Thoughts?


Edited by BCaesar, 27 March 2017 - 10:35 PM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#8 jastey

jastey
  • Administrator
  • 3219 posts

Posted 27 March 2017 - 10:37 PM

For the night talks re-trigger: yes, that would fix the problem you described.


As for the RestCheck: I apologize for being daft, but I don't get the explanations of your above post. Why do the restscenes get prevented if two mods introduce the RestCheck script blocks with the same prefix? The way I see it, all that happens is that script blocks get doubled. So, the first script block introduced by mod 1 will run, the second doing the exact same thing introdued by mod 2 will never, because the trigger variable is already changed. How is that more dangerous than adding several script blocks that all use the same trigger variable (of some night talk) but all need to reset the RestCheck variables with different prefixes?

Further:

The issue is that if your mod is one of the ones listed (and I plan to expand restcheck to include the rest scenes from as many mods as I can) then you have to delete the coding that affects your mod from your restcheck or otherwise your own rest scenes won't trigger at all.

That means, if I would include RestCheck into my mod (with my prefix) now, and you decide to include it into the general RestCheck code you provide with the RestCheck tool, then as soon as other modders include this script block into their mod, my mod won't trigger any rest scenes any more - until I update my mod, too? That's something I don't like (I don't like anything that sounds as if it introduces incompatibility or buggy behavior into my mod :-) ) I never know when I'll update my mods, to assume I can do it right away would mean ignoring reality of the last years. I am happy if I manage to keep my mods updated and mostly bugfree in a decent amount of time as it is.

 

Also, if you plan on increasing the number of mods included into RestCheck, i.e. the script blocks your readme tells me to include into my own mod (with my prefix), do you expect modders to always update their mods with the newly in RestCheck included mods? Look through the current RestCheck code, identify the new script blocks, give them my prefix, and add them to my mod? That sounds like much work, and a bit messy, tbh.

 

My suggestion would be, to make RestCheck not a set of script blocks the modder has to include with own prefix by hand with all dangers that can happen if you have to do / update things by hand that will change with updates. But to make RestCheck a mod that can be installed, and only considers mods that are included. This probably also means to open the RestCheck variable (with your prefix) to all modders to include in their rest scenes to make it compatible.

 

Currently, I have a bad feeling concerning this having to copy and change by hand, as I pointed out. Especially with the warning that night talks could be prevented completely, if someone doesn't work carefully enough.

 

One possibility to prevent other restscenes from happening after one in your mod is to use Rest(Player1)-Rest(Player6) (and, if you want to make it perfect, trigger the correct resting movie). Dream scripts only fire if rest is triggered by RestParty().

 

Hope my objections makes sense. (I have the strong feeling I missed something. I'll be happy if you point me in the right direction.)


Edited by jastey, 27 March 2017 - 10:39 PM.


#9 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 28 March 2017 - 12:28 AM

Although generally a tool to prevent a series of dreamtalks to trigger all on one RestParty() sounds like a good idea,

a) I share jastey's doubts above

b) I think it may misfire a large number of those talks - in those cases (and there are a lot) - when there are extra conditions, e.g. rest at an inn - rest in a forest - rest during day/night time - or that have checks for some other conditions (someone hurt, someone in party). - Such a talk can be triggered as number 2 and put on hold. It triggers at the next rest, which may be completely out of context.

c) at this moment I am using in my mod already checks for some known dreamfiles to avoid double triggers with vanilla or commonly used mods (like the BG1 chapter dreams, Irenicus dreams, BG1NPC dreams, Imoen's romance dreams and some others). This eliminates much but not all, doing more might lead to my talks never getting a chance at the right time (e.g. how many times do you rest in chapter 5? - if I have a talk that makes no more sense afterwards but it gets delayed several times?).

 

In a way it may be considered unavoidable - just like the backlog of banters that triggers in a long row when you come outside after a very long time in a dungeon (most banters use !AreaType(DUNGEON), so they queue up during that time.)


Edited by Roxanne, 28 March 2017 - 12:43 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#10 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 28 March 2017 - 09:00 PM

Hope my objections makes sense. (I have the strong feeling I missed something. I'll be happy if you point me in the right direction.)

 

I think I was explaining it poorly, but it also turned out that I missed something too and it doesn't work if you and I both have it for our mods and there's a scene from each mod waiting to trigger (even if we both have our own prefixes it still doesn't work).

 

So I changed it and in its new form it is now it's one batch of coding that anyone can use in their mod without changing the prefix (I just went and got another prefix specifically for restcheck) and it only applies to all the dreams and rest scenes in BG2:EE.

 

It's not actually a mod to install (though you can to help test it) rather it's just coding to add to your mod if you want a quick and easy way to make your mod's rest scenes compatible with all those in BG2:EE.

 

So I'm just going to delete my longer explanation in this post since it turned out to be moot and thus would be a waste of your time.


Edited by BCaesar, 29 March 2017 - 04:48 AM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#11 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 28 March 2017 - 11:21 PM

But here's the example of the code in my mod's restcheck for the very first dream in Baldur's Gate SoA (the coding is the same as that in the restcheck I included except that it uses my prefix. However, now no one needs to change the prefixes since restcheck just has its own prefix and only applies to those scenes included in the normal BG2:EE game). What this does is when all the conditions for this dream are met it sets Global("_brestcheck","GLOBAL",1)

 

Since my rest scenes all have Global("_brestcheck","GLOBAL",0) as one of their requirements that means they won't trigger on the same rest before this scene.

 

IF //First Imoen Dream
	GlobalTimerExpired("ImoenDream1","GLOBAL")
	Global("HadImoenDream1","GLOBAL",0)
	GlobalLT("Chapter","GLOBAL",4)
	Global("_brestcheck","GLOBAL",0)
THEN
	RESPONSE #100
	SetGlobal("_brestcheck","GLOBAL",1)
END

IF
	Global("HadImoenDream1","GLOBAL",1)
	Global("_bHadImoenDream1","GLOBAL",0)
THEN
	RESPONSE #100
	SetGlobal("_bHadImoenDream1","GLOBAL",1)	
	SetGlobal("_brestcheck","GLOBAL",2)
END

Once the dream happens it sets Global("_brestcheck","GLOBAL",2).

 

Then there's a timer in baldur.bcs and baldur25.bcs which looks like this:

 

//Rest check timer.
IF
	Global("_brestcheck","GLOBAL",2)
THEN
	RESPONSE #100
	SetGlobal("_brestcheck","GLOBAL",3)
	RealSetGlobalTimer("_brestchecktimer1","GLOBAL",TWO_TURNS)
END

IF
	RealGlobalTimerExpired("_brestchecktimer1","GLOBAL")
		Global("_brestcheck","GLOBAL",3)
THEN
	RESPONSE #100
	SetGlobal("_brestcheck","GLOBAL",0)
END

Which keeps my rest scenes from triggering for 2 minutes after so they don't trigger right after an in-game dream.


Edited by BCaesar, 29 March 2017 - 04:46 AM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#12 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 28 March 2017 - 11:41 PM

For another example the code in my mod's restcheck for the very first dream in Baldur's Gate SoA looks like this:

 

IF //First Imoen Dream
	GlobalTimerExpired("ImoenDream1","GLOBAL")
	Global("HadImoenDream1","GLOBAL",0)
	GlobalLT("Chapter","GLOBAL",4)
	Global("_brestcheck","GLOBAL",0)
THEN
	RESPONSE #100
	SetGlobal("_brestcheck","GLOBAL",1)
END

IF
	Global("HadImoenDream1","GLOBAL",1)
	Global("_bHadImoenDream1","GLOBAL",0)
THEN
	RESPONSE #100
	SetGlobal("_bHadImoenDream1","GLOBAL",1)	
	SetGlobal("_brestcheck","GLOBAL",2)
END

Understood.

I do pretty similar things in my mod to avoid overlap with certain dreams and dreamtalk.

 

As such, I understand your contribution rather as a "convenience blueprint" one can adopt for the own mod instead of re-inventing the wheel, not really as a *mod*. (Copy and paste the code and adjust to your triggers.)


Edited by Roxanne, 28 March 2017 - 11:42 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#13 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 29 March 2017 - 12:06 AM

Understood.

I do pretty similar things in my mod to avoid overlap with certain dreams and dreamtalk.

 

As such, I understand your contribution rather as a "convenience blueprint" one can adopt for the own mod instead of re-inventing the wheel, not really as a *mod*. (Copy and paste the code and adjust to your triggers.)

 

Yes, but I just realized the whole thing doesn't work.

 

I mean it works great for my mod, but lets say I use it for my mod and you use it for your mod and both are installed. Well I'm playing along and the game hits a point where both of us have rest scenes waiting to trigger. The coding in my mod will tell my rest scenes to wait for your mod's scene to trigger first. The coding in your mod will tell your rest scene to wait for my mod's scene to trigger first.

 

But because neither scene has priority that means both will wait indefinitely. Both rest scenes will be sitting there saying "after you" forever.

 

Which means the whole thing doesn't work as coding for other people to use (though it still works great in my mod).

 

Bah! Now I need to think. Any ideas?

 

At the moment my plan is to wait and hope for an epiphany. As they say, "The morning is wiser than the evening." I'm in Vietnam so it's currently afternoon, but the saying still applies.

 

I mean I could still introduce rest-check as a quick code-drop for modders to prevent their mod's rest scenes from triggering the same rest as all the in-game scenes for BG2:EE (dreams and romance). That would be a helpful contribution. But I was hoping to go far beyond that.

 

But I'll start with that tomorrow while we figure out the rest. I'll get Restcheck a prefix over at Blackwyrmlair, reduce it down to just having code for the non-modded scenes (the dreams, and the existing non-modded romances for BG2:EE), and post it for everyone to use. That way they don't even have to change the prefix to their own or mess with code. It will essentially just be an updated version of this tutorial that also includes all the romance rest scenes.


Edited by BCaesar, 29 March 2017 - 12:19 AM.

Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#14 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 29 March 2017 - 04:26 AM

There's been thoughts about unifying the dream timers across mods a while ago, but it never came to reality. I'm not sure yet whether your solution makes more sense than just patching a unisono dream timer to all dream script blocks in question, but cudos for attempting to prevent CHARNAME from having unplanned threesomes!

 

 

Understood.

I do pretty similar things in my mod to avoid overlap with certain dreams and dreamtalk.

 

As such, I understand your contribution rather as a "convenience blueprint" one can adopt for the own mod instead of re-inventing the wheel, not really as a *mod*. (Copy and paste the code and adjust to your triggers.)

 

Ok let's start over. Right now, restcheck is just coding to add to your mod that allows you to easily make your mod's rest scenes not trigger at the same time as all the in-game rest scenes from BG2:EE. I eliminated all the ones for the mods as I couldn't figure out how to make it work. But this makes it easy. Just copy the code for your tp2 file and paste it in (and change "ModFolderName" to your actual mod folder name so that paths are correct). Then copy the folder and paste it in.

 

So it's still useful as it's essentially an updated form of this tutorial: http://www.shsforums...or-game-dreams/

 

But it's not quite what I was hoping for. If I (or one of you) can think of a way to include mod rest scenes in it and have it work.


Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#15 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 29 March 2017 - 08:05 PM

Understood.

I do pretty similar things in my mod to avoid overlap with certain dreams and dreamtalk.

 

As such, I understand your contribution rather as a "convenience blueprint" one can adopt for the own mod instead of re-inventing the wheel, not really as a *mod*. (Copy and paste the code and adjust to your triggers.)

 

I got it! Came to me in the morning of course. The problem is priority. Every mod can't wait for every other mod's rest scenes to happen or two scenes will both wait for the other and never happen. One mod has to have priority.

 

 

One question: Why not make this one mod that adds the script blocks to the listed mods once in an install and give modders the possibility to just...

 

I'm trying to avoid doing anything that involves me making a mod that patches existing mods. Both because I'm generally against messing with other people's mods, and because that would require this to be a mod to be installed last (which then has to be reinstalled if you install another mod). I don't want this to be a mod that people have to install. I'd rather just give code that people can put inside their own mods if they wish and modify as they see fit (much like a modding tutorial, except I already wrote it all for them). It's a voluntary action by modders rather than me going in and messing. So instead of everyone who plays your mod having to install this other mod to make your rest scenes yield, you would just have the coding inside your mod and it would function as an entirely self-contained system that wouldn't require anything from anyone else.

 

Anyway, back to my solution for the RestCheckForModScenes coding.

 

As it is now restcheck is code that anyone can pop into their mod to prevent their rest scenes (that they include the trigger in) from triggering with any of the normal BG2:EE dreams or rest scenes. That's a good start.

 

However this can be added to provided you don't have two mods yielding to each other. The coding and idea I had before works, but it can't be free to download by anyone and use or you'll have that issue. What we'd need is a priority list (or really a reverse priority list). Here's how it would work.

 

My mods have the full restcheckformodscenes coding, yielding to every other mod (I have a lot of rest scenes but no hurry in them triggering so I'm happy to yield). That coding (unlike the ingame scenes) has to have my prefix.

 

The next mod that wants restcheck coding can ask and I'll give them a folder of files and coding for their tp2 files (with their prefix) that they can use to have their rest scenes yield to the rest scenes of every other mod except my mods.

 

The 3rd mod that wants the coding can ask and I'll give them the same thing but for every other mod except those of the first two.

 

So as each modder adds themselves to the list I will send them the coding they need with their prefix already attached, but I don't include coding for yielding to the mods on the list above theirs. So the farther down the list you go the fewer mods you yield to. The highest modder on the list (me) yields to everything. That way there's an order and you never have two mods trying to yield to each other forever.

 

Of course if I have a particular scene which I don't want to yield that's easy too, I just don't add the restcheckformodscenes trigger as a requirement for that rest.

 

And that way no one's coding will interfere with anyone else's mod. My coding is a self-contained system which makes my scenes yield. Your coding is self-contained system which makes your scenes yield, and nothing you do will affect me and vice-versa (since we all have different prefixes).

 

I think that fixes everything. As I add more mods to restcheck I can just pm each modder with their updated version of restcheckformodscenes, but even if they don't update their mod it won't break anything. Everything would still function just the same (they just wouldn't yield to the new mods I added to restcheckformodscenes).

 

Thoughts?


Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.


#16 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 31 March 2017 - 08:07 PM

Thanks for your help. Now that I got  it working the way I wanted I moved this over to the tutorials forum so other people can find it and use it. I'll be continuing to add to the coding for Rest Check For Mods coding as I go since I'm trying to make my mods' rest scenes yield to everyone else's.


Mod: All Things Mazzy (banters, romance, expanded friendship and more)
Tutorial/Coding: Rest Check (coding for anyone to make their Mod's rest scenes yield to those from BG2:EE and additional coding to make them yield to those from a list of other mods as well.