Preview movie (like in Campaign) [SOLVED]

In this forum you will find and post information regarding the modding of Star Wars Battlefront 2. DO NOT POST MOD IDEAS/REQUESTS.

Moderator: Moderators

Post Reply
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Preview movie (like in Campaign) [SOLVED]

Post 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
Last edited by Darth_Spiderpig on Tue Jan 05, 2010 10:00 pm, edited 1 time in total.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Preview movie (like in Campaign) please help

Post 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.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Preview movie (like in Campaign) please help

Post 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? :? :lol:

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)?
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Preview movie (like in Campaign) please help

Post by [RDH]Zerted »

I don't know what you're talking about. Where are you expecting a movie to show up?
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Preview movie (like in Campaign) please help

Post by Darth_Spiderpig »

What I am talking about is that my video is not getting played. :wink:

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
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Preview movie (like in Campaign) please help

Post 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.
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Preview movie (like in Campaign) please help

Post 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 ()
User avatar
Ping
Sith
Sith
Posts: 1398
Joined: Thu Sep 18, 2008 4:19 pm
Location: College

Re: Preview movie (like in Campaign) please help

Post 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.
User avatar
Teancum
Jedi Admin
Jedi Admin
Posts: 11080
Joined: Wed Sep 07, 2005 11:42 pm
Projects :: No Mod project currently.
Games I'm Playing :: Destiny
xbox live or psn: No gamertag set
Location: Indiana

Re: Preview movie (like in Campaign) please help

Post 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.
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Preview movie (like in Campaign) please help

Post 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).
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Preview movie (like in Campaign) please help

Post 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 :runaway: :faint: :thumbs:
User avatar
DarthD.U.C.K.
Master of the Force
Master of the Force
Posts: 6027
Joined: Wed Sep 27, 2006 11:05 am
Location: Duckburg, Germany

Re: Preview movie (like in Campaign) please help

Post 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)
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Preview movie (like in Campaign) please help [SOLVED]

Post 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. :thumbs:
User avatar
[RDH]Zerted
Gametoast Staff
Gametoast Staff
Posts: 2982
Joined: Sun Feb 26, 2006 7:36 am
Projects :: Bos Wars AI - a RTS game
Games I'm Playing :: SWBF2 and Bos Wars
xbox live or psn: No gamertag set
Location: USA
Contact:

Re: Preview movie (like in Campaign) please help [SOLVED]

Post by [RDH]Zerted »

Can you download those maps and it works without replacing any of the game's movies?
Darth_Spiderpig
Sith Master
Sith Master
Posts: 2631
Joined: Fri Mar 27, 2009 10:23 am
Projects :: Something cool...
Games I'm Playing :: BF2 CoDBO BFBC2
xbox live or psn: Has no xbox....Yup
Location: Does whatever a Spiderpig does
Contact:

Re: Preview movie (like in Campaign) please help [SOLVED]

Post 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... :(
stardestroyer001
Sergeant Major
Sergeant Major
Posts: 239
Joined: Fri Apr 16, 2010 7:02 pm
Projects :: Space Coruscant [before it corrupted]
Games I'm Playing :: World of Warships
xbox live or psn: StarDestroyer75
Location: Canada
Contact:

Re: Preview movie (like in Campaign) please help [SOLVED]

Post by stardestroyer001 »

Does it matter which file format the movie is in?
If so, what's the format?
501st_commander
Master Bounty Hunter
Master Bounty Hunter
Posts: 1570
Joined: Wed Dec 10, 2008 7:48 pm

Re: Preview movie (like in Campaign) please help [SOLVED]

Post by 501st_commander »

.bik

One thing (not moderating) watich the last post date.
stardestroyer001
Sergeant Major
Sergeant Major
Posts: 239
Joined: Fri Apr 16, 2010 7:02 pm
Projects :: Space Coruscant [before it corrupted]
Games I'm Playing :: World of Warships
xbox live or psn: StarDestroyer75
Location: Canada
Contact:

Re: Preview movie (like in Campaign) please help [SOLVED]

Post 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
Post Reply