MPEG's for campaign opening

_486_Col_Wolf

Charter Member
Has anyone had success inserting thier own MPEG (movie clip) into the beginning of campaigns? I created a short video for the beginning of my Luftwaffe campaign, added it to videos/transit in the main CFS2 folder, added the line:

[failure]
moviefile=
soundfile=

[success]
soundfile=
moviefile=BoBLMovie

above node 0 but the clip will not play when you start the campaign. Anyone know how to make this work?
 
I think you need to use the whole file name including the extension. You added the text in the cmg file at the right place.

[failure]
moviefile=
soundfile=

[success]
soundfile=
moviefile=BoBLMovie.mpg
 
Capt Kurt is correct, you need the full file name including the extension. I cover that in my Mission Building Handbook. Here's the section:

Movies and Sounds
Go to your CAMPAIGNS folder in your main CFS2 directory and find the campaign file war in the pacific – usn.cmg. Open it using Notepad. This is the stock U.S. Navy campaign that comes with the game. It is a dynamic campaign using many branching nodes. Take a few moments to look at the campaign structure but DON’T CHANGE ANYTHING!

The first thing that you’ll notice is that there is some extra information between the allegiance data and the first node that we didn’t include in our campaign. Ignore this data for now. Notice that [node.0] is a Splitter Node. As soon as you start the game you have an equal chance of going to either [Node 1] or [Node 4]. If you’ll look at those nodes you’ll see that they are Splitter Nodes as well. Microsoft has done what we did above and created a balanced four-way split right at the start of the campaign. This gives the player four different starting points into the campaign.

This campaign is fairly large, 154 nodes. As you scroll through, notice that they use a combination of static and branching nodes, random chance and goals. You’ll also notice that a number of nodes have sound and movie files associated with them. These files are referenced by the lines soundfile= and moviefile=. You see and hear these sound and movie clips at the start of the campaign, at certain missions along the way, and at the end if you successfully complete the campaign. Scroll back to the beginning of the campaign file and focus in on [node.2].

[node.2]
mission_name=hn1a_usn
true_branch=7
percent_true=100
soundfile=pt001.wav
moviefile=ptadgj.mpg
filler=1

Node 2 is one of the starting points for the campaign and has both a sound and movie file associated with it. When you first begin the campaign the game will play a movie and you’ll hear a voice-over explaining the war in the Pacific. The command lines soundfile= and moviefile= tell the game which movies and sound files to play. All movie files used by the game are in mpg format and are stored in the folder CFS2\videos\transit. The sound clips associated with these movies are wav files and are stored in the folder CFS2\SOUND\VO. The sound files also have a text file associated with them that scrolls the voice-over text below the movie so that you can read along during the narration.

Sound and movie files can be added, modified, or deleted from your campaign. You don’t need either to write an exciting and workable campaign. However, if you decide to use sound and movie files in your campaign there are a couple of things to know. You must have a movie file if you want to have a sound file. You can have a movie file without a sound file and the movie will play just fine, but you cannot have a sound file without a movie file. The game will just skip the sound file entirely and move on as though it wasn’t there.

You can use your own sound and movie files as long as they are created in the mpg and wav formats and they are stored in the proper directories. You can also mix the stock movies with your own sounds or your own movies with the stock voice-overs. The stock movies have background music associated with them that plays as a part of the movie. You can achieve some interesting effects by showing the stock movie with your own sound effects (air raid sirens, bomb blasts, even some of the stock radio transmissions) as the voice-over instead of using the stock sound files. Those of you that are especially talented could create you own mpg movies or record your own voice-overs to add into your campaign.

Looking again at the stock campaign, note the two sections directly above [node.0].

[failure]
moviefile=
soundfile=

[success]
soundfile=pt011.wav
moviefile=ptk.mpg

These two sections are used to call up movies and sounds when you either successfully complete or fail the campaign. The two are self-explanatory. Notice that the game shows you a movie when you succeed but not when you fail, although you could add one to the stock campaign or use this format in your own campaigns.
 
OK, this is what I have but still no joy.

[Campaign Global Info]
version=2.0
campaign_name=%campaign_name_string%
overview=%campaign_overview%
allegiance=2

[failure]
moviefile=
soundfile=

[success]
soundfile=
moviefile=BoBLMovie.mpg

[node.0]
true_branch=1
percent_true=100
filler=0

[node.1]
mission_name=BoBluft1
true_branch=2
percent_true=100
filler=0

[node.2]
mission_name=BoBluft2
true_branch=3
percent_true=100
filler=1

What am I missing?
 
OK disregard the last post I made. This is what I have

[Campaign Global Info]
version=2.0
campaign_name=%campaign_name_string%
overview=%campaign_overview%
allegiance=2

[failure]
moviefile=
soundfile=

[success]
soundfile=
moviefile=

[node.0]
true_branch=1
percent_true=100
filler=1

[node.1]
mission_name=BoBluft1
true_branch=2
percent_true=100
soundfile=
moviefile=luftbob.mpg
filler=1

Clicking "next" at squadron page after the pilot is added brings up the next mission and it tries to play the movie just before the mission page appears. When I say tries to I mean the screen goes black for a second as if the clip is starting but then goes to the mission page 1-2 seconds after.
 
Well, I tested it using your campaign info shown here. That is, I copied your post to Notepad and changed the mission names to my own and the movie name to one of my own. I also added a third, ending node, to the campaign so that it would run and it tested fine.

I even swapped in a large movie file (17MB) and it still worked fine.
  • Make sure your movie is in the proper location as I described above.
  • Make sure the movie file name matches the campaign info. Type the file name into the campaign file itself, don't copy the name from somewhere else and paste it in. I've seen that cause hidden characters which don't show, but cause the campaign file not to run properly.
  • Check the file size of your movie, I don't know that there is a size limit, but it is possible that if your movie is too large it won't play.
  • Convert your movie to MPEG-I format. I haven't experimented with MPEG-II, PAL or NTSC, all of which are .mpg files I believe, but MPEG-I works for sure.
 
Problem was I was using MPEG II and didnt realize it. I tried it with WMV as it comes directly from Windows Movie Maker and it works great! Thanks to everyone for your help!!!
 
Back
Top