Note: LucasForums Archive Project
The content here was reconstructed by scraping the Wayback Machine in an effort to restore some of what was lost when LF went down. The LucasForums Archive Project claims no ownership over the content or assets that were archived on archive.org.

This project is meant for research purposes only.

Scripts calling Bink movies

Page: 1 of 1
 DarthParametric
10-02-2008, 4:03 PM
#1
Some of you may have seen the mod (http://www.lucasforums.com/showthread.php?t=192625) zybl2 and I released to stop the screen resizing that happens for some people between the 4 Bink movies played back-to-back in TSL when you leave Telos for the first time in a shuttle and crash.

I've noticed a few other instances in TSL where this resizing between movies occurs, and was thinking of releasing fixes for them as well. Rather than do it via re-encoded Bink movies like the first mod however, stoffe enlightened me as to the proper way to do it via scripting with QueueMovie and PlayMovieQueue. However, I have found a script that may need a bit more complex editing. I know nothing whatsoever about scripting, but I've taken a stab at what seems (to me at any rate) to be a logical modification. Just wondering if some more knowledgeable folks can take a look at it for me. The script in question is a_escape_851.ncs - the one that triggers when you exit the Ravager after killing Nihlus and placing all the charges.

The original is:
void main() {
SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0);
SetSoloMode(0);
SetPartyLeader(0xFFFFFFFF);
PlayMovie("MalMov05", 0);
if ((GetGlobalNumber("101PER_Revan_End") == 1)) {
QueueMovie("TelMov02", 1);
QueueMovie("HypMov01", 1);
QueueMovie("MalMov07", 1);
QueueMovie("MalMov08", 1);
PlayMovieQueue(1);
SetGlobalNumber("907MAL_CUTSCENE", 2);
StartNewModule("907MAL", "", "", "", "", "", "", "");
}
else {
StartNewModule("205TEL", "", "", "", "", "", "", "");
}
}
Because MalMov05 is separate from the queue, a resize occurs between it and the other four movies (if you said Revan was Dark Side). My extremely long-winded question is, can you change it to this:
void main() {
SetGlobalFadeOut(0.0, 0.0, 0.0, 0.0, 0.0);
SetSoloMode(0);
SetPartyLeader(0xFFFFFFFF);
if ((GetGlobalNumber("101PER_Revan_End") == 1)) {
QueueMovie("MalMov05", 1);
QueueMovie("TelMov02", 1);
QueueMovie("HypMov01", 1);
QueueMovie("MalMov07", 1);
QueueMovie("MalMov08", 1);
PlayMovieQueue(1);
SetGlobalNumber("907MAL_CUTSCENE", 2);
StartNewModule("907MAL", "", "", "", "", "", "", "");
}
else {
PlayMovie("MalMov05", 0);
StartNewModule("205TEL", "", "", "", "", "", "", "");
}
}
 stoffe
10-02-2008, 5:27 PM
#2
However, I have found a script that may need a bit more complex editing. I know nothing whatsoever about scripting, but I've taken a stab at what seems (to me at any rate) to be a logical modification. Just wondering if some more knowledgeable folks can take a look at it for me. The script in question is a_escape_851.ncs - the one that triggers when you exit the Ravager after killing Nihlus and placing all the charges.

Here's a variant of that script that should hopefully do what you are after. The MalMov05.bik movie should be played regardless of Revan's selected fate, so it needs to stay outside the if-statement. And in order to play it when going directly to Malachor (rather than the meeting with Carth) you need to play the movie queue in the else case as well by adding another PlayMovieQueue() call.


void main() {
SetGlobalFadeOut();
SetSoloMode(FALSE);
SetPartyLeader(NPC_PLAYER);

QueueMovie("MalMov05", FALSE);

if ((GetGlobalNumber("101PER_Revan_End") == 1)) {
QueueMovie("TelMov02");
QueueMovie("HypMov01");
QueueMovie("MalMov07");
QueueMovie("MalMov08");
PlayMovieQueue();
SetGlobalNumber("907MAL_CUTSCENE", 2);
StartNewModule("907MAL");
}
else {
PlayMovieQueue();
StartNewModule("205TEL");
}
}
 DarthParametric
10-03-2008, 1:22 AM
#3
Cheers, I'll try it out.

Would I be right in guessing that PlayMovieQueue(FALSE) only plays those queued movies that have the FALSE tag, but PlayMovieQueue() will play all queued movies regardless?

EDIT: Oh and I assume the 0xFFFFFFFF that you changed to NPC_PLAYER was an error on the part of the decompiler? I was using a copy of DeNCS from the front page which looks to be Beta 2 from 2006.
 stoffe
10-03-2008, 8:02 AM
#4
Would I be right in guessing that PlayMovieQueue(FALSE) only plays those queued movies that have the FALSE tag, but PlayMovieQueue() will play all queued movies regardless?

The second parameter in QueueMovie() flag that determines if the player can click to skip past watching that particular movie in the queue. I don't know what the parameter to PlayMovieQueue() is supposed to do since it doesn't have any effect on whether any movies can be skipped or not, from what I can tell. If the whole queue is supposed to be unskippable the second parameter will have to be set to FALSE/0 for all the QueueMovie() function calls. Likewise if the whole queue is supposed to be skippable you just leave out that parameter on all the QueueMovie() function calls.


EDIT: Oh and I assume the 0xFFFFFFFF that you changed to NPC_PLAYER was an error on the part of the decompiler?

DeNCS doesn't really create an exact clone of the original NSS file; it generates code that, while it (usually) works is fairly "dirty" from a human viewer's perspective. It often gives variables fairly nondescript names, does not backwards-resolve constant values to any global constants that presumable were used in he original script, and it lists out all optional function parameters with their default value in the code. It works to recompile, but it's a bit harder for a human viewer of the source code to follow. Thus I cleaned it up a bit by trimming out parameter default values and sticking in constants where applicable.

NPC_PLAYER is a global integer constant (declared in the nwscript.nss file) that represents the value -1, which in hexadecimal notation is written as 0xFFFFFFFF.
 DarthParametric
10-03-2008, 8:50 AM
#5
Thanks for the clarification.

Finished my Dark Side run through checking for movie sequences that need the fix. Need to do a Light Side run through now to make sure there aren't any others I missed (although I suspect not, since the major alignment difference aside from the transition to Malachor is the end of the game, and it already uses QueueMovie in its scripts).
Page: 1 of 1