-
Notifications
You must be signed in to change notification settings - Fork 0
In game videos
To make in-game videos you'll need to start by recording a video (OBS Studio is a good choice for this task).
The different game versions (PC, XBOX, PS2) require videos to be in a certain format for the 'MovieMunge.exe' program (located in 'BF2_ModTools/ToolsFL/bin/').
Platform | Video Format | Conversion Tool |
---|---|---|
PC | .bik | Rad Tools |
XBOX | .xmv | XBOX Video Converter |
PS2 | .pss | Pss Plex |
The MovieMunge program can be used as follows:
:: Make sure that you have the 'BF2_ModTools\ToolsFL\bin' in your path
MovieMunge.exe -input movie_list.mlst -output MovieName
The content of movie_list.mlst would look like the following:
movies\movie_1.bik
movies\movie_2.bik
When playing a movie it's important to know the path to the movie and the internal movie name.
The internal movie name is the same as the input file name (so the above munged movie file would contain movies named 'movie_1' and 'movie_2').
If you are making a preview movie for the 1.3 UOP you'll want to ensure that in your addme.lua file your map list entry has a pattern like:
sp_missionselect_listbox_contents[sp_n+1] = {
movieFile = "..\\..\\addon\\PVE\\data\\_LVL_PC\\PVE\\movies\\pre-movie",
movieName = "preview",
dnldable = 1,
isModLevel = 1,
mapluafile = "PVE%s_%s",
era_c = 1,
mode_con_g = 1,
}
It is important to have read in a .mcfg file that has the properties of the movie defined. If you are making a preview movie targeting the UOP1.3+ you would need to use a name that was located inside 'shell_movies.mcfg', usually 'preview' or 'preview-loop').
Note: find 'Name("preview");' in the file above. You'll see that the 'Name' 'preview' is defined and it refers to a 'movie_segment' 'preview'. This is the convention that should be followed. For a Preview Movie targeting the 1.3 UOP you do not need to create a new .mcfg file since the 'preview' movie properties already defined in 'shell_movies.mcfg'.
If you find yourself wanting to play a movie outside the established patterns (1.3 uop preview, ingame movies like in the campaign) the following may be of use to you.
-- Should be able to use this function to play a movie
-- movieFile - Path to the movie (ie - "..\..\addon\ABC\data\_data_pc\movies\preview.mvs")
-- movieName - the name of the movie (ie - "preview")
function PlayMovie(movieFile, movieName)
print("PlayMovie: " .. tostring(movieName) .. " " .. tostring(movieFile))
if (movieFile == nil and movieName == nil ) then
return
end
local fullpath = movieFile
if( not endsWith(fullpath, ".mvs") ) then
fullpath = fullpath .. ".mvs"
end
if( string.lower( fullpath) == string.lower(gMovieStream)
and string.lower( movieName) == string.lower(gMovieName) ) then
return
end
if( gMovieStream ~= fullpath) then
print("CHANGING MOVIE FILE: " .. fullpath )
ScriptCB_CloseMovie()
gMovieStream = fullpath
ScriptCB_OpenMovie(gMovieStream, "")
gMovieName = movieName
print("change movieName: " .. movieName )
ScriptCB_StopMovie()
ifelem_shellscreen_fnStartMovie(movieName,1, nil, true)
elseif( gMovieName ~= movieName) then
gMovieName = movieName
print("change movieName: " .. movieName )
ScriptCB_StopMovie()
ifelem_shellscreen_fnStartMovie(movieName,1, nil, true)
end
end