Page 1 of 4 123 ... LastLast
Results 1 to 10 of 34

Thread: Campaign Building Tutorial... Enclosed | Forums

  1. #1
    Senior Member bird_brain's Avatar
    Join Date
    Feb 2004
    Posts
    2,413
    I saw a need for this, so here it is. I will make a PDF version for DL when I get a chance. Maybe some kind Mod can make it a sticky for easy reference.

    Combining User Made Missions into an Offline Campaign

    We all know that user made missions can be combined into an offline campaign, yet the same questions continually come up in the IL2 Forgotten Battles / Pacific Fighters forums. If you read the information contained in this file, your questions should all be answered. Some of the information covered here will duplicate that which is covered in the manual; however, some of the information in the manual is actually wrong. This tutorial is not designed to cover basic interaction with the Full Mission Builder, so if you are not already familiar with it, you should read one of the excellent guides available from other sources before attempting to follow along with this one.

    File structure;

    The best place to start a campaign is by making a folder to keep it in. This will have the additional benefit of helping you to understand the file structure you will be working with throughout the project. To create a folder for your campaign, you must browse to your IL-2 Sturmovik Forgotten Battles folder through €œMy Computer€ or €œWindows Explorer€ and go to the country that your virtual pilot will be flying for. We will use as an example here €œNN€ which will be selected as €œNone€ under the country list when starting your new career. If you have a default installation of the game, this should be located under:
    C:\Program Files\Ubi Soft\IL-2 Sturmovik Forgotten Battles\Missions\Campaign\NN
    If the folder does not exist (which it most likely does not) right click with your mouse on the screen & create a new folder and name it €œNN€. Now open this folder and create another new folder. Name this one My_Campaign. Be aware that this folder cannot have spaces or symbols in the name. You can use an underscore if you want more than one word in the folder name. This is a common error which will prevent your campaign from showing up in the €œCareer€ list when you try to start it. You can of course rename this folder whatever you like later, just make sure you follow the rule of no symbols or spaces.



    You now have a home for your mission files to be created in that will be used throughout the project. You may also place this folder under any country that you wish to fly for. Using the €œNone€ folder simply allows me to illustrate some additional points later. You should know whether your pilot will be €œRed€ for the Allied side, or €œBlue€ for the Axis side. This will be important when you create your campaign.ini file.


    ** The Missions **

    The next step (and the longest by far) in your campaign is making your missions. Many mission builders make what they refer to as a €œtemplate€. In the FMB, a map is selected for the campaign, and all objects that will be consistent throughout the campaign are added. Buildings, installations, populated airstrips & targets are created to your liking before you start placing vehicles and aircraft which will vary with each mission. You then save this as your €œCampaign Template€. From the €œFile€ menu at the top, select €œsave as€ and browse down to Campaign\NN\My_Campaign and save the file there. I am going to name it €œMC_Template€ for this example.At this point, I have started abbreviating my mission names with €œMC€ for My Campaign. I will continue to do this throughout the process to eliminate confusion, prevent typographical errors, and to save time typing out numerous characters.



    You will now make your missions on this template, and save them into the same €œMy_Campaign€ file. I highly recommend using a simple and consistent numbering system. I always number my missions with the campaign abbreviation and then 01,02,03, etc. It looks like this when complete;



    A few words are in order about mission names at this point. Just like the campaign folder, your mission names cannot contain spaces or symbols with the exceptions of €œ_€ and €œ-€ which have proven to work just fine. If you number your missions _01, _02, etc., the zeros before the single digits will allow the missions to show up in order in the FMB €œLoading Mission€ window as well as the single missions selection screen if you want to test fly them as single missions.

    Now that your missions are complete and all together in the correct format, we are ready to combine them into a complete campaign. We will need to create a few more files that go into the same €œMy_Campaign€ folder to make them run in sequence as a campaign. The first of these is the campaign.ini file referred to earlier.


    ** The campaign.ini file **

    There are 2 types of offline campaigns in FB/PF; You can fly for €œRed€ for Allied, or €œBlue€ for the Axis. It is possible to fly for a neutral country, but that is a subject for a different discussion. Refer to the Mission Builders€ Forum @ http://www.Pacific-Fighters.com if you need more information on that subject.

    You should now create a file within your €œMy_Campaign€ folder named campaign.ini. To edit this folder, you may need to go to Control Panel \Folder Options and look under €œFile Types€. There you can change the options for €œopens with€ to notepad or wordpad which will allow you to edit this file in the default word editors included with MS Windows xx.

    You should then copy and paste into your campaign.ini file the following text lines.

    For an Allied Campaign;

    [Main]
    Class il2.game.campaign.CampaignRed
    awardsClass il2.game.campaign.AwardsRUfighter

    [list]
    xx_01.mis

    For an Axis Campaign;

    [Main]
    Class il2.game.campaign.CampaignBlue
    awardsClass il2.game.campaign.AwardsDEfighter

    [list]
    xx_01.mis

    Then to finish your campaign.ini file structure, you will add the names of your missions, making sure to
    duplicate their names exactly . For an Allied campaign, we will therefore need it to look like this;

    [Main]
    Class il2.game.campaign.CampaignRed
    awardsClass il2.game.campaign.AwardsRUfighter

    [list]
    MC_01.mis
    MC_02.mis
    MC_03.mis
    MC_04.mis
    MC_05.mis
    MC_06.mis
    MC_07.mis
    MC_08.mis
    MC_09.mis
    MC_10.mis
    MC_11.mis
    MC_12.mis
    MC_13.mis

    Now close the file and save it. We will need to come back to it later to add references to our track files.


    ** The info.properties file **

    This is a text file that will also added to your €œMy_Campaign€ folder. Make a new file with wordpad, and name it info.properties. After you finish it and save it, you will need to delete the .txt extension from the file to make it work properly. Once again, forgetting to delete the .txt extension will prevent your campaign from showing up in the Career selection window when you try to start it.
    Your info.properties file is formatted almost exactly like a mission brief file and you can even copy one of the .properties files and rename it if you like. It has a specific syntax that must be followed or it will not show up in the campaign briefing window. Here is an example of how the text must be entered in the file using €œMy Campaign€ as the name that will show up in the €œCareer€ selection screen. Please compare the text to the image to understand how the file shows up on screen.


    Name My Campaign
    Description You can place an introduction to your campaign here.\n\nI like to establish the mood of the campaign here, but others like to make an overview or explain the history of the missions.\n\nIf you have done everything correctly so far, you will now know it.



    Note that you must have the €œName€ & €œDescription€ headers before your text, and that you use €œ\n€ to indicate an [enter] command. You cannot have hard return commands in your info.properties file or it will prevent the campaign from showing up or running.

    This is starting to sound repetitive, which is why so many people ask these questions. Any error in formatting, spelling or syntax in any of these steps so far will make the campaign non-functional and fail to load. Save the completed info.properties file in the €œMy_Campaign€ folder, and let€s proceed to the next issue.


    ** Background screens, medals & awards **

    Since we created the €œNone€ Country by adding the €œNN€ folder we need to address the issue of background files, awards, ranks & medals. These are the files that will allow the virtual pilot to advance and receive recognition for all the hard work you have put into making this campaign. Your new country folder has none of these files, so the easiest thing to do is copy them from another country. In the example above, I copied the files from the €œUN€ or US Navy folder which gave me a Star & Bar icon, ranks & awards, and a background file. My campaign will now run.

    But what if I want to create my own custom icon, background splash screen & medals? It can be done with image editing software and a little creativity. To make a new background file, you would start with a screenshot taken from the game or even a montage of images combined with your image editing software such as Photoshop or Paint Shop Pro. You would need a full screen size image sized to 1024 x 768 pixels. You then combine this image into a single layer, 32 bit targa image file and name it €œbackground.tga€ ;



    From this image, you will resize it to 1024 x 1024 pixels and save it into your €œNN€ folder. It looks €œstretched€ But the program will sort that out when it loads.



    You would then need another file to make it show up. It is called €œbackground.mat€ and can be copied from another country folder and placed into €œNN€ with your new custom screen. The .mat files are a small text file that tells the program where to look for the background.tga file, and if you edit the .mat file, you can make it look for the splash screen by a different name. I frequently change the name of the background file so that it does not overwrite and erase the stock splash screen when my €œcustomers€ install the campaign. All they have to do to restore the original splash screen is copy the background.mat file over from another country and viola!, it disappears. Be aware that if you have Microsoft Access installed on your computer, the .mat file will show up as an Access Table and you will be unable to open it. I edit the files on my kids€ computer that does not have Access on it.

    A couple of idiosyncrasies I have noticed about background screens is that in my experience, they do not show up correctly when created and resized in PSP7 and when you are starting a new single player campaign, they will only show up once until you exit the campaign and then re-open it. It€s no big deal, but don€t let it make you think you have messed it up.

    An icon for the Career selection screen can by made by the same process with the only difference being that we save it as a 64 x 64 pixel targa file named €œicon.tga€. This should have a file named €œicon.mat€ to go along with it. Now that we have our background & icon files taken care of, we have to make sure the correct ranks & awards files are in the country folder. The folder should contain €œrank.properties€, €œaward.properties€, and 7 each €œawardx.tga€ and €œawardx.mat€ files. The quickest way is to copy them from another country folder, but some folks out there have created all new medal packs that can be downloaded to go along with your custom campaign. The more detail you can throw in with these little visuals, the more immersive the whole package will be.


    ** Inserting track files **

    I will only cover this subject briefly since there are tutorials specifically directed at creating tracks for campaigns as well, and I find them to be quite difficult to pull off nicely. You can record a mission track in the .ntrk format and add it to your campaign to play as an intro track, an intermission track, or an epilogue track. For our example here, we will add one of each into the campaign.ini file to illustrate their syntax.You will start by recording your .ntrk file with the mission recorder feature within the game. You must create a mission that has all of the action you want to capture, and then play it while recording from different camera perspectives.

    Once you have this .ntrk file complete to your satisfaction, you will add a new folder within your €œMy_Campaign€ folder and name it €œVideo€. We will start with our 1st one and save it as €œintro€. Note that I have deleted the .ntrk extension from the file and this must be done in order for it to play as an interlude track.



    You will then need to create another text file in wordpad or notepad and name it €œintro.msg€. This file will contain the text that appears on screen with the video while your track is playing. It is formatted with the following syntax;

    [all]
    0:0
    0:02 Your 1st line of text goes here
    0:10
    0:12 Your 2nd line of text goes here
    0:20
    0:22 It continues like this throughout the video
    0:30

    The blank lines indicate a break between text lines and if you put text in them, it will snap from one line to the next with no pause. The numbers on the left margin are minutes and seconds and once you get past 0:59, you would skip to 1:00 or 1 minute and 0 seconds.

    Now you will need to make arrangements to view your intro track to adjust the timing of the text. To do that, we will place a reference to it in the campaign.ini file and start the campaign to watch it. You will now need to open your campaign.ini file and add the following line;

    [Main]
    Class il2.game.campaign.CampaignRed
    awardsClass il2.game.campaign.AwardsRUfighter

    [list]
    * Missions/Campaign/NN/My_Campaign/video/intro
    MC_01.mis
    MC_02.mis
    MC_03.mis
    Etc€¦...

    What you have just added is the file path to your video file. If you move the campaign to a different country folder, or create it in a different one, the text line will need to match the location of the €œVideo€ folder exactly.

    Now we can go to €œPilot Career€ within the game, start our new campaign under the country €œNone€ and the intro video should play (if you have done everything correctly so far). You can watch it as it will be on screen and make notes regarding timing, and go back into the intro.msg file to make the necessary adjustments. Once you get the text coordinated with the video, pat yourself on the back because you have truly made a great accomplishment!

    Now you will repeat the video making process and make 2 more .ntrk files. Name them €œCut1€ and €œEpilogue€
    These will be placed in the €œVideo€ folder as well.



    You will now add 2 more reference lines for your cut scene and your epilogue in the campaign.ini file;

    [Main]
    Class il2.game.campaign.CampaignRed
    awardsClass il2.game.campaign.AwardsRUfighter
    EpilogueTrack Missions/Campaign/NN/My_Campaign/video/Epilogue
    [list]
    * Missions/Campaign/NN/My_Campaign/video/intro
    MC_01.mis
    MC_02.mis
    * Missions/Campaign/NN/My_Campaign/video/Cut1
    MC_03.mis
    MC_04.mis
    Etc€¦...


    To view these tracks for editing purposes, simply replace the reference in your campaign.ini file for €œintro€ with €œCut1€ or €œEpilogue€ and you can view it when you fire up your new campaign. The 1st video will always play until you €œApply€ the 1st mission upon completion.


    ** Packing your files using Winzip **

    The most common and easiest way to pack up your campaign for distribution is by using €œWinzip€ It has all the necessary features and it€s free! Some people, myself included, use a self-executing .exe file to install the campaigns. The main reason you might want to do this is to avoid confusion for people who do not know much about computers, but like to play the game. They sometimes have a hard time extracting the files to the correct location and a self executing file will solve that issue for them.

    The 1st step to packing up your file is a little odd, but it works for me. I duplicate the file structure to my campaign under the C:\ directory and save it from there instead of from within the game folder. If you look closely at the image here, you will see that I have copied and saved all my missions under

    C:\Missions\Campaign\NN\My_Campaign.



    The next step is to open winzip and create a new .zip file. Name it €œMy_Campaign€ and check the box for €œsave full path info€ and browse to the location noted above. Add all your files, and double check to be sure you have not forgotten any. You will need to add the video sub-folders separately. By using this system, you can direct the people who download your campaign to simply select all files in winzip and extract them to the Forgotten Battles root folder with €œuse file names€ checked. This will solve many future inquiries about how to install the files.

    Once you have your .zip file completed, delete all traces of the campaign from the game folders & install the .zip file. Fire up your new campaign, watch the videos and play it through yourself for the fun of it. You deserve it!
    If it does not show up in the campaign selection screen and run correctly, go through this list;

    ** Common errors that will prevent your campaign from loading **

    A typographical error in the campaign.ini file.
    Spaces and/or symbols in the campaign folder name.
    Spaces or symbols in the mission names.
    Mission names do not exactly match the campaign.ini file.
    Formatting errors in the info.properties file such as hard returns or heading spacing.
    Leaving the .txt extension on one or more of your .ini or .properties files.
    Not having the correct ranks & awards files in the country folder.

    Now you are ready to distribute your new campaign to some friends for playtesting. I highly recommend that you don€t get anxious and upload it for hosting just yet, because I assure you that your peers will find some things you have missed and it will make in that much better in the end.

    Good Luck making campaigns and I hope this has been a help€¦.. b_b.
    Reply With Quote Reply With Quote

  2. #2
    Awesome info BB, I found the instructions regarding background images and trackfiles especially useful as previously I had no idea how to go about inserting them.
    Cheers mate!

    [url=http://forums.ubi.com/groupee/forums/a/tpc/f/23110283/m/4541063514][b]Preview Screens
    Reply With Quote Reply With Quote

  3. #3
    Great Job bb!!! Looks like you covered all the important stuff for sure. Thanks much
    Salute,

    DHumphrey

    Reply With Quote Reply With Quote

  4. #4
    Senior Member
    Join Date
    Nov 2002
    Posts
    1,499
    Good stuff BB. There was some info about the background.tga that I needed and didn't know.

    Cheers!
    'Will there be any bartenders up there in Heaven?
    Will the pubs never close, will the glass never drain?'
    Reply With Quote Reply With Quote

  5. #5
    Senior Member bird_brain's Avatar
    Join Date
    Feb 2004
    Posts
    2,413
    I'm glad ya'll like it, but just so you know, I wasn't trying to teach you past masters new tricks.

    I figured if we have a thread with the whole thing in one place, we can refer the guys that ask basic questions here for the main info to get them pointed in the right direction. They can cut & paste campaign.ini files, see what is wrong in the manual & so forth. We won't have to keep answering the same questions and everyone can make more campaigns for us to fly.

    Maybe then I can retire from mission building and fly all the great stuff the rest of you guys are turning out.
    Reply With Quote Reply With Quote

  6. #6
    Senior Member
    Join Date
    Nov 2004
    Posts
    1,221
    Let me be the first, BB...MODS, Please STICKY this.

    Reply With Quote Reply With Quote

  7. #7
    Senior Member hotspace's Avatar
    Join Date
    Dec 2001
    Location
    Bournemouth, UK
    Posts
    3,567
    Very niceeeeee work m8

    Hot Space
    Reply With Quote Reply With Quote

  8. #8
    ditto what Achilles NZ said, and yeah, mods need to make this a sticky. Man, i was just wondering about some of this stuff.......

    but no way you can retire from msn blding.....you got us hooked with the first one (it was free), so now youre one of our supplyers, whether you like it or not. heh heh..

    neat backgrounds from the gladiator thingy youre doing.....

    ------------------------------

    Sleep tight tonight, your Air
    Force is......awake!
    Reply With Quote Reply With Quote

  9. #9
    Senior Member bird_brain's Avatar
    Join Date
    Feb 2004
    Posts
    2,413
    Originally posted by Enforcer572005:
    ...you got us hooked with the first one (it was free)
    I'm not sure that anyone but me actually flew the 1st one.
    Reply With Quote Reply With Quote

  10. #10
    Ok I've stickied this thread.

    You wanna wiki this? Then the community can expand it further.


    M4T Forums - M4T - [URL=http://www.mis
    Reply With Quote Reply With Quote

Page 1 of 4 123 ... LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •