Jump to content


Photo

Solved! How do I make screen fade to black (and stay black) while


  • Please log in to reply
7 replies to this topic

#1 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 05 February 2017 - 12:05 AM

Hello everyone,

         I'm coding a dialogue that takes place on rest. The dialogue works just fine, but being able to see all the characters standing there in the inn is distracting, especially since the text is describing things happening that are clearly not happening on screen. So what I want to do is have the screen fade to black either at the beginning or partly through the dialogue, stay black for the whole dialogue, and then go to rest directly from there.

 

I can make the screen fade to black, but I can't keep it like that. It unfades as soon as the first dialogue happens. Any ideas on how to keep the screen black until I want it to unfade?

 

I tried making it FadeToColor([30.0],0) at the beginning of the dialogue in the .d file and then unfading at the end, but that didn't work. It just faded to black and then turned normal again at the first talk, and went black and then un-faded at the last talk. It wouldn't stay black in-between.

 

I also tried making it fade in the .baf file but that didn't work either. It looks like it will stay black if I can make it fadetocolor and fadefromcolor in the same trigger with actions in-between (like during the dream sequences in game), but that doesn't really help me since I want the dialogue to happen in-between the two fades and it to stay black while that dialogue is happening.

 

Thanks


Edited by BCaesar, 08 May 2017 - 11:25 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 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 05 February 2017 - 12:42 AM

Hello everyone,

         I'm coding a dialogue that takes place on rest. The dialogue works just fine, but being able to see all the characters standing there in the inn is distracting, especially since the text is describing things happening that are clearly not happening on screen. So what I want to do is have the screen fade to black either at the beginning or partly through the dialogue, stay black for the whole dialogue, and then go to rest directly from there.

 

I can make the screen fade to black, but I can't keep it like that. It unfades as soon as the first dialogue happens. Any ideas on how to keep the screen black until I want it to unfade?

 

I tried making it FadeToColor([30.0],0) at the beginning of the dialogue in the .d file and then unfading at the end, but that didn't work. It just faded to black and then turned normal again at the first talk, and went black and then un-faded at the last talk. It wouldn't stay black in-between.

 

I also tried making it fade in the .baf file but that didn't work either. It looks like it will stay black if I can make it fadetocolor and fadefromcolor in the same trigger with actions in-between (like during the dream sequences in game), but that doesn't really help me since I want the dialogue to happen in-between the two fades and it to stay black while that dialogue is happening.

 

Thanks

To do that you may want to display your text in a textscreen, just like those chapter texts or bhaal dreams during BG1. For that purpose you need to create a 2da file and a MOS file (may be a picture or just black) and display text there. Another possibility would be to use a screen like in the ToB end bios screen.

You can look into those dream scripts or end bios to see how such a thing is done.

 

Generally you would fade to black (like you did), then display the text screen with

SmallWait(2)
SetInterrupt(FALSE)
TextScreen("BCaDre")

and then fade out again - Wait(2) - RestParty(). //

"BCaDre" would be the name of the 2da file which contains the references to the MOS file used as background and the text to be displayed on it.

 

Probably the way the BG1 dreams are done would suit your idea the best?

 

Requires a bit of extra work though...

 

PS

I also coded a scene for my mod where something happens in the dark night ( a nightly ambush) and the screen fades black, you see some overhead dialogue text from the actors involved but not the scene itself and then it gets light again - another possibility but maybe not exactly what you are looking for.

And another possibility would be a dream cutscene where the actor (Protagonist or NPC) is taken from the actual scenery to another place and back again (like in the Irenicus dreams in BG2) = more work than all of the other possibilities.


Edited by Roxanne, 05 February 2017 - 12:59 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#3 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 05 February 2017 - 08:54 PM

Thanks. There's some back and forth conversation, with the CharName responding as well, and I like having the pictures of the different characters show up next to their dialogue (since at least for me it makes their voice show up in my head when I see their picture). If I do a cutscene can CN respond? I can't remember (It could easily be rewritten without the character responding. CN's responses were mainly just in the dialogue so there's more interaction rather than just reading a banter).

 

I could do the textscreens with a picture of the character talking, changing the picture a few times as different people talk. If I could draw I'd love to have drawings of each part of the scene, but that's beyond me (unless I spend some months binging on learning how to draw the same way I've been binging on learning how to mod or any other thing I learn).

 

The easiest thing would be to do would be a cutscene where the entire party was transported to a screen that was covered in fog-of-war or black in some way if that were possible.

 

Also my prefix is _B. I wanted BC but unfortunately for me Grey Acumen took it back in 2006.


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.


#4 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 05 February 2017 - 09:51 PM

Thanks. There's some back and forth conversation, with the CharName responding as well, and I like having the pictures of the different characters show up next to their dialogue (since at least for me it makes their voice show up in my head when I see their picture). If I do a cutscene can CN respond? I can't remember (It could easily be rewritten without the character responding. CN's responses were mainly just in the dialogue so there's more interaction rather than just reading a banter).

 

I could do the textscreens with a picture of the character talking, changing the picture a few times as different people talk. If I could draw I'd love to have drawings of each part of the scene, but that's beyond me (unless I spend some months binging on learning how to draw the same way I've been binging on learning how to mod or any other thing I learn).

 

The easiest thing would be to do would be a cutscene where the entire party was transported to a screen that was covered in fog-of-war or black in some way if that were possible.

 

Also my prefix is _B. I wanted BC but unfortunately for me Grey Acumen took it back in 2006.

In this case the way to do is with actually 2 cutscene that later appear as one:

fade to black, - store party locations - move party to other area - unfade - trigger dialogue (can contain anything any other dialogue can do - even include additional creatures you put at new location) - at end of dialogue trigger cutscene2 which returns the party to the stored location - restparty.

You will find examples for this all over the game.

 

PS Instead of moving whole party, you can just move the ones involved to the new location with that same pattern, might suit your case even better.


Edited by Roxanne, 05 February 2017 - 10:01 PM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#5 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 05 February 2017 - 10:52 PM

 

In this case the way to do is with actually 2 cutscene that later appear as one:

fade to black, - store party locations - move party to other area - unfade - trigger dialogue (can contain anything any other dialogue can do - even include additional creatures you put at new location) - at end of dialogue trigger cutscene2 which returns the party to the stored location - restparty.

You will find examples for this all over the game.

 

PS Instead of moving whole party, you can just move the ones involved to the new location with that same pattern, might suit your case even better.

Yeah I've seen examples of it and could borrow the code, though I was hoping to avoid learning how to do the cutscene thing at the moment. I've spent the last couple of months binge-learning modding and I can now do pretty much any dialogue and install it all and make it work, but I was hoping for a period of relaxation before I revisited the world of error messages. A black screen with a dialogue taking place would be one thing, but making an actual cutscene with movement and areas and such would be a lot more work in terms of learning how to do it.

 

I suppose I could just leave this as a normal dialogue for the moment, finish coding the rest of the dialogues (not to mention continuing the writing process with Ratatoskr), and then once I don't have anything else to do I can start thinking about cutscenes. I would want to move everyone since there's possible comments by every character.

 

Of course I was hoping to get this scene all nice and polished though...

 

I don't suppose there's a way to start a cut scene, center the camera off-screen in the black area, trigger the dialogue, and then go to rest from there? That would be a little work, and give me something better than I have now, but not so much work as to put a wrench in the whole process. I know that when the dialogue happens the camera always centers on the person talking, but is there a way to turn that off?


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 Roxanne

Roxanne

    Modder

  • Member
  • 3564 posts

Posted 06 February 2017 - 01:13 AM

I have no "easy" solution at hand if you are set on the idea of a black screen, but here is another possibility I use somewhere in my mod (if I do not use moving the party to some *dream area*).

You do that fade out - while the screen is black your script casts some effects (e.g. blur) on your party members (I also used to equip them with a ring to make them look ghostly like Ulcaster ghost) maybe even some fog effect or whatever - then start the conversation, make the first line maybe some narrative like

~*While you slowly drift into sleep, you encounter a strange conversation and you are later not sure if it was real or a dream...*~

Then you have the talk and the party members you see still have that *unreal* look - again you fade at the end of the talk (maybe remove items or effects you used) then restparty.

 

There are endless possibilities, they just require a bit of experimentation and then a choice of what you prefer to have to set the right atmosphere/environment for your scene.


Edited by Roxanne, 06 February 2017 - 01:13 AM.

The Sandrah Saga

another piece of *buggy, cheesy, unbalanced junk*

 


#7 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 06 February 2017 - 10:13 PM

I have no "easy" solution at hand if you are set on the idea of a black screen, but here is another possibility I use somewhere in my mod (if I do not use moving the party to some *dream area*).

You do that fade out - while the screen is black your script casts some effects (e.g. blur) on your party members (I also used to equip them with a ring to make them look ghostly like Ulcaster ghost) maybe even some fog effect or whatever - then start the conversation, make the first line maybe some narrative like

~*While you slowly drift into sleep, you encounter a strange conversation and you are later not sure if it was real or a dream...*~

Then you have the talk and the party members you see still have that *unreal* look - again you fade at the end of the talk (maybe remove items or effects you used) then restparty.

 

There are endless possibilities, they just require a bit of experimentation and then a choice of what you prefer to have to set the right atmosphere/environment for your scene.

 

Heh, this started because I was hoping the black screen was the easy solution. But without that then what I think I'll do is just have it run as a normal dialogue on rest, and then once everything else is done and there's a complete, functioning, written mod then I'll worry about improving it with cutscenes or having something run in the end-game epilogue style or something like that.

 

Thanks for your help!


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 BCaesar

BCaesar
  • Modder
  • 62 posts

Posted 15 February 2017 - 12:06 AM

I have no "easy" solution at hand if you are set on the idea of a black screen,

 

I found it! My answer was in the IESDP: http://gemrb.org/ies...bgeeactions.htm

 

The action I want is: 

UndoExplore()

  but then the problem is that the entire screen stays black and the game is unplayable until I do the opposite action:

Explore()

 

Or oddly enough if I have a dead character and raise him or her that will explore the area around my party as well. So it works more or less the way I want it to, the only issue is that when it's finished the entire inn is explored.

 

There might be a way to put something inside the parenthesis in order to only blacken or explore a specific part of the map, but I couldn't find any examples of that in game (all I could find was it used generally).

 

But that works the way I want and it's beautiful. I'll need to figure out if there's a way to modify the Explore though, since if I have some scenes outside and do that it'll end up exploring the whole map when I'm done.


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.