Page 1 of 1
Preview movie (like in Campaign) [SOLVED]
Posted: Tue Jan 05, 2010 1:11 pm
by Darth_Spiderpig
Hello, I wanted to put in a movie instead of the loadscreen, but all the different tut's conusing me.
I want to take a few moments out os the TCW episode (landing at point rain) and add them.
So, it would help if you can tell me which tut to follow. (yeah, today's one of my stupid days)
thanks in advance
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 1:23 pm
by [RDH]Zerted
The v1.3 patch defines a preview movie in terms as SWBF1. That means a preview movie is a short clip that is displayed in the lower right side of the screen when you click on that map in the map selection screen.
If you want a SWBF2 style preview movie, there are no complete tutorials on how to do it. You need to override the map selection screen's 'play map' function in-order to load and play the movie before the shell exits to load the first selected map. The move should only play if your map is the first map to be played, if it is not first in the list, the movie shouldn't be played.
To date, no one has actually done this, but it should work fine.
If you are making a custom inshell Campaign or custom Galactic Conquest, then loading a custom movie is very simple.
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 3:21 pm
by Darth_Spiderpig
Ok, thanks Zerted
[RDH]Zerted wrote:If you are making a custom inshell Campaign or custom Galactic Conquest, then loading a custom movie is very simple.
I am making Geonosis: Landing at Point Rain (non campaign/galactic conquest), so it will be difficult?
Okay, so all I know is, I need a video first, so I will make one.
okay, done. I folloewd Redline's tut, but the movie doesn't show up.
I am sure i named everything correctly...
Could it be because of the vids dimensions (it is a pretty small window)?
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 5:17 pm
by [RDH]Zerted
I don't know what you're talking about. Where are you expecting a movie to show up?
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 6:04 pm
by Darth_Spiderpig
What I am talking about is that my video is not getting played.
It should play after the map is loaded.
But instead, the window goes all black short and the the match starts normal.
I added this line in my lua:
Code: Select all
ScriptCB_PlayInGameMovie("ingamegr.mvs","preview")
it is right after the beginning of the scriptpostload section
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 6:52 pm
by Teancum
That's because:
[RDH]Zerted wrote:To date, no one has actually done this
Nobody has successfully built an intro movie to play after the map loads, but before you spawn.
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 6:55 pm
by Darth_Spiderpig
Oh, okay. I just wanted to have one.
Oh btw, anyone know what these errors mean?
Code: Select all
Message Severity: 3
C:\Battlefront2\main\RedEngineFL\Memory\RedMemory.cpp(561)
attempted to allocate from invalid heap -1
Message Severity: 3
C:\Battlefront2\main\RedEngineFL\Memory\RedMemory.cpp(538)
Allocating 34 bytes failed - no free blocks left in Heap -1 ()
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 7:10 pm
by Ping
Teancum wrote:That's because:
[RDH]Zerted wrote:To date, no one has actually done this
Nobody has successfully built an intro movie to play after the map loads, but before you spawn.
I think the map Taris: Into the Sea was able to achieve something similar, except the preview movie appeared in that box that's added with the 1.3 patch on the Instant Action menu.
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 7:19 pm
by Teancum
Two different things.
A "menu" preview
[RDH]Zerted wrote:The v1.3 patch defines a preview movie in terms as SWBF1. That means a preview movie is a short clip that is displayed in the lower right side of the screen when you click on that map in the map selection screen.
A "post-load" preview
[RDH]Zerted wrote:If you want a SWBF2 style preview movie, there are no complete tutorials on how to do it. You need to override the map selection screen's 'play map' function in-order to load and play the movie before the shell exits to load the first selected map. The move should only play if your map is the first map to be played, if it is not first in the list, the movie shouldn't be played.
To date, no one has actually done this, but it should work fine.
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 9:34 pm
by [RDH]Zerted
Darth_Spiderpig wrote:...it is right after the beginning of the scriptpostload section
Yeah, thats after the shell has exited. The movie needs to be loaded and
played while the user is still in the shell. To do this, you could add another tag in the map's addme table, similar to how the v1.3 preview movies do it. Next, you would have to
inject code into the shell so that when one clicks the play maps button, it checks to see if the first map has the tag in its table. If it does, then play that movie. When its finished, resume the normal flow of switching out of the shell and into loading the map. This all happens before the map's mission script is even loaded.
You can inject code into the shell through an addme.lua (doesn't require v1.3 patch) or through a blank cGC script (requires the v1.3 patch).
Re: Preview movie (like in Campaign) please help
Posted: Tue Jan 05, 2010 9:37 pm
by Darth_Spiderpig
okay, is that right (addme):
Code: Select all
--Search through the missionlist to find a map that matches mapName,
--then insert the new flags into said entry.
--Use this when you know the map already exists, but this content patch is just
--adding new gamemodes (otherwise you should just add whole new entries to the missionlist)
function AddNewGameModes(missionList, mapName, newFlags)
for i, mission in missionList do
if mission.mapluafile == mapName then
for flag, value in pairs(newFlags) do
mission[flag] = value
end
end
end
end
--insert totally new maps here:
local sp_n = 0
local mp_n = 0
sp_n = table.getn(sp_missionselect_listbox_contents)
sp_missionselect_listbox_contents[sp_n+1] = { movieFile = "..\\..\\addon\\LPR\\data\\_LVL_PC\\movies\\pre-movie", movieName = "preview", dnldable = 1, isModLevel = 1, mapluafile = "LPR%s_%s", era_g = 1, era_c = 1, mode_con_g = 1, mode_con_c = 1, mode_1flag_g = 1, mode_1flag_c = 1, mode_eli_g = 1,}
mp_n = table.getn(mp_missionselect_listbox_contents)
mp_missionselect_listbox_contents[mp_n+1] = sp_missionselect_listbox_contents[sp_n+1]
-- associate this mission name with the current downloadable content directory
-- (this tells the engine which maps are downloaded, so you need to include all new mission lua's here)
-- first arg: mapluafile from above
-- second arg: mission script name
-- third arg: level memory modifier. the arg to LuaScript.cpp: DEFAULT_MODEL_MEMORY_PLUS(x)
AddDownloadableContent("LPR","LPRg_con",4)
AddDownloadableContent("LPR","LPRc_con",4)
AddDownloadableContent("LPR","LPRg_1flag",4)
AddDownloadableContent("LPR","LPRc_1flag",4)
AddDownloadableContent("LPR","LPRg_eli",4)
-- all done
newEntry = nil
n = nil
-- Now load our core.lvl into the shell to add our localize keys
ReadDataFile("..\\..\\addon\\LPR\\data\\_LVL_PC\\core.lvl")
EDIT: Nvere mind, I did it

Re: Preview movie (like in Campaign) please help
Posted: Wed Jan 06, 2010 9:59 am
by DarthD.U.C.K.
Teancum wrote:That's because:
[RDH]Zerted wrote:To date, no one has actually done this
Nobody has successfully built an intro movie to play after the map loads, but before you spawn.
redline did:
http://de.xfire.com/video/bf463/
(no, its no fake)
Re: Preview movie (like in Campaign) please help [SOLVED]
Posted: Wed Jan 06, 2010 10:07 am
by Darth_Spiderpig
DarthD.U.C.K. wrote:Teancum wrote:That's because:
[RDH]Zerted wrote:To date, no one has actually done this
Nobody has successfully built an intro movie to play after the map loads, but before you spawn.
redline did:
http://de.xfire.com/video/bf463/
(no, its no fake)
I did it too.

Re: Preview movie (like in Campaign) please help [SOLVED]
Posted: Wed Jan 06, 2010 5:41 pm
by [RDH]Zerted
Can you download those maps and it works without replacing any of the game's movies?
Re: Preview movie (like in Campaign) please help [SOLVED]
Posted: Thu Jan 07, 2010 8:50 am
by Darth_Spiderpig
[RDH]Zerted wrote:Can you download those maps and it works without replacing any of the game's movies?
Sadly no.
DEVISS-REX was so kind and tested it for me...
I tried to change the lua to load the custom movies, but it seems not to work properly...I will have for the full release of Geonosis to make an extra download for the movie...

Re: Preview movie (like in Campaign) please help [SOLVED]
Posted: Fri May 07, 2010 10:01 pm
by stardestroyer001
Does it matter which file format the movie is in?
If so, what's the format?
Re: Preview movie (like in Campaign) please help [SOLVED]
Posted: Fri May 07, 2010 10:03 pm
by 501st_commander
.bik
One thing (not moderating) watich the last post date.
Re: Preview movie (like in Campaign) please help [SOLVED]
Posted: Fri May 07, 2010 10:11 pm
by stardestroyer001
A "bik" file? How do you make that?
And about post dates, thanks. I'll be sure to look for it.
EDIT: Never mind, this seems to have answered all of my questions.
http://www.gametoast.com/forums/viewtop ... &hilit=mvs