Results 1 to 27 of 27

Thread: RAF Redux Campaign missing briefing

  1. #1
    Student Pilot
    Join Date
    Sep 2020
    Posts
    3
    Post Thanks / Like
    Total Downloaded
    1.13 GB

    RAF Redux Campaign missing briefing

    Hi everyone,

    I just installed the RAF REDUX Campaign from Heinkill.

    I unzipped it into ...bob/mission/campaign as outlined in the PDF. The missions are just running fine (great work), but I dont get the briefings for the mission. It is still the old text from the stock campaign. Also no debriefing screen and kill counts.
    I guess somehow the game is still linked to the old briefing files and loads the new missions. Does anybody experienced the same and has a workaround? Do I have to delete specific files in the campaign folder?

    Thanks for help!

  2. #2
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    Custom campaigns installation was changed for 5.0 (but not documented yet).

    Is no longer used the folder "Steam apps\common\il2...bob\parts\mission\campaign.."

    Now you should put the campaign files in

    ..\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom - Create a New Folder, rename with campaign name, e.g. Cliffs of Dover - REDUX (use this suffix for Heinkill for differentiate from default campaign).

    Place the Campaign.ini index in the root of the "custom" folder.

    Campaing-custom.jpg

    And if campaign use custom skins, place in

    ...\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\PaintSchemes\Skins"Plane name/Mk"
    Last edited by 1lokos; Sep-25-2020 at 19:13.

  3. #3
    Supporting Member
    Join Date
    Jan 2013
    Location
    Sparks, Nevada
    Posts
    110
    Post Thanks / Like
    Total Downloaded
    1.11 GB

    Re: RAF Redux Campaign missing briefing

    I've been trying for several days to get the game to recognize some downloaded campaigns. I'm confused. I've tried to understand and followed all the directions I've seen, above and elsewhere, with no luck. The following are the folders I'm concerned with.
    In my Documents folder/1CSoftClub, there are three sub-folders: 1)il-2 sturmovik cliffs of dover, 2)il-2 cliffs of dover-MOD, 3)il-2 cliffs of dover-MOD(Blitz). I've been busy trying to follow the directions I've been able to find.
    My COD is in Steam. I've two game folders there: 1)IL-2 Sturmovik Cliffs of Dover(which on longer opens), 2)IL-2 Cliffs of Dover Blitz.
    This is what I've done. In the 1CSoft Club I transferred the campaign folders to a "custom" folder-unable to find a "campaign.ini," (all the folders have a "stat.ini" file in them and nothing else). I copied and pasted a "campaign.ini" in the "custom" folder along with the campaign folders in all three of my 1CSoft Club folder.
    In Steam/common/...Blitz, I did the same.
    None of these attempts worked. The only campaigns in the game's "Campaign" window are the campaigns that came with the Tobruk addition.
    Below is what my 1CSoftClub "log.txt"reported.
    Any help appreciated.

    Sorry, because I don't know how to transfer a file from the game to here, I'm forced to give you the whole bit.
    ------------ BEGIN log session [2020-09-25 11:12:40] -------------
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign01_27', no such folder campaign01_27
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign01_40', no such folder campaign01_40
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign01_bf', no such folder campaign01_bf
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign01_fr', no such folder campaign01_fr
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign02_37RAF_3_july', no such folder campaign02_37RAF_3_july
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign02_3RAAF_25_june', no such folder campaign02_3RAAF_25_june
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign02_42Falco_2_18_July', no such folder campaign02_42Falco_2_18_July
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    [11:13:04] D:\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaigns.ini:
    [11:13:04] Campaign 'campaign02_Gravity_5_July', no such folder campaign02_Gravity_5_July
    [11:13:04] [0] ERROR [SYSTEM] Failure processing custom campaign
    System:
    EVGA P55 FTW SLI / Intel Core i7 875K 2.93GHz / nVidia GeForce GTX680 2GB / 16GB DDR3 1600MHz / Windows 7 64bit
    Flight gear:
    Logitech Extreme 3D Pro / TrackIR 5 / Saitek Pro Flight Throttle Quadrant / CH Flight SIM Yoke

  4. #4
    Student Pilot
    Join Date
    Sep 2020
    Posts
    3
    Post Thanks / Like
    Total Downloaded
    1.13 GB

    Re: RAF Redux Campaign missing briefing

    Hello again,

    thank you for the information. Copied all to the custom folder and simply added the campaign.init from bob folder. All works now. Additionally I changed language in Steam to English. Now the texts are what they are supposed to be.

    Thanks for help...

  5. Likes 1lokos liked this post
  6. #5
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by jlan5031 View Post
    In my Documents folder/1CSoftClub, there are three sub-folders: 1)il-2 sturmovik cliffs of dover, 2)il-2 cliffs of dover-MOD, 3)il-2 cliffs of dover-MOD(Blitz). I've been busy trying to follow the directions I've been able to find.
    Jlan,

    Unless you are expert in deal with game folders, keep all this versions 1, 2, 3 in Documents just increase the confusion.

    There's no campaign/mission that work only with specific CloD version, any work with al versions - minus, obviously, campaigns made for Tobuk, or using planes of Tobruk pack; so no reason for keep old versions.

    Follow my advise in the above post - like Regloh did, put all in "Custom" folder and all will work OK.

    Pay special attention when updating the file "Campaign.ini" - what is required do manually; any error there and campaign don't appear in menu.

  7. #6
    Supporting Member
    Join Date
    Jan 2013
    Location
    Sparks, Nevada
    Posts
    110
    Post Thanks / Like
    Total Downloaded
    1.11 GB

    Re: RAF Redux Campaign missing briefing

    Thanks for all your responses.
    The campaigns still don't show up. I'm missing something, but I can't figure out what. These are the paths I have used.

    1. 1SoftClib>il-2 sturmovik cliffs of dover>mission>campaign>custom>campaign_deREDUX>sta te.ini (plus 14 other campaigns and a campaign.ini).

    2. OSC>...>SteamApps>common>IL-2 Sturmovik Cliffs of Dover Blitz>campaign>custom>campaign_REDUX>state.ini (plus 14 other campaigns and a campaign.ini.

    Any ideas where I went wrong?
    System:
    EVGA P55 FTW SLI / Intel Core i7 875K 2.93GHz / nVidia GeForce GTX680 2GB / 16GB DDR3 1600MHz / Windows 7 64bit
    Flight gear:
    Logitech Extreme 3D Pro / TrackIR 5 / Saitek Pro Flight Throttle Quadrant / CH Flight SIM Yoke

  8. #7
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    1 - in Documents... \custom\ you should put the Campaign.ini and all mission files (.mis, .cs, .misroads, etc), those in an folder with respective campaign name.
    Don't bother with "state.ini" this is no longer used anymore with this name and game automatically create an appropriated.

    Example of "Campaign.ini" in custom folder, with 6 campaigns, notice that don't contain campaign_gb and campaign_de, why in 2.

    Code:
    [Main]
    campaign_18th_August_1940
    campaign_Battle_of_France
    campaign_Dunkirk
    campaign_Eagle_Day
    campaign_First_Combat_August_1940
    campaign_Spitfire_Dawn
    
    [campaign_18th_August_1940]
    folder campaign_18th_August_1940
    title August 18, 1940
    image Poster.bmp
    
    [campaign_Battle_of_France]
    folder campaign_Battle_of_France
    title Battle of France
    image Poster.bmp
    
    [campaign_Dunkirk] 
    folder campaign_Dunkirk
    title Dunkirk: Operation "Dynamo"
    image Poster.bmp
    
    [campaign_Eagle_Day]
    folder campaign_Eagle_Day
    title Eagle Day
    image Poster.bmp
    
    [campaign_First_Combat_August_1940]
    folder campaign_First_Combat_August_1940
    title First Combat, August 1940
    image Poster.bmp
    
    [campaign_Spitfire_Dawn]
    folder campaign_Spitfire_Dawn
    title campaign Spitfire Dawn
    image Poster.bmp

    2 - Don' keep any files of custom campaign there, just the default campaigns (campaign_gb and campaign_de) files, plus their Campaign.ini, that should contains only:

    Code:
    [Main]
    campaign_gb
    campaign_de
    
    [campaign_gb]
    folder campaign_gb
    title Cliffs Of Dover
    image Poster.bmp
    
    [campaign_de]
    folder campaign_de
    title Adler Angriff
    image Poster.bmp
    And Tobruk oficial campaign (made by TFS).

    Resume:
    Custom campaigns all in Documents...\custom

    Oficial campaigns in ... SteamApps\...

  9. #8
    Student Pilot
    Join Date
    Oct 2020
    Posts
    1
    Post Thanks / Like
    Total Downloaded
    0

    Re: RAF Redux Campaign missing briefing

    I'm struggling with this also.

    Is there something I need to do to make the game read the custom folder? To activate custom campaigns?

    I've dropped the files and .ini into the locations instructed in this thread but nothing shows up in the game when selecting Single Player>Campaign. All I am seeing are the 2 vanilla campaigns which come with the game.

  10. #9
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    No, nothing special is need.

    "Campaign_name" folder inside the folder:

    ..\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\

    Update the file "Campaing.ini" - in the Custom folder, or create one just for this campaign, and name with the same name of "campaign_name" folder.

    Probable the cause of campaign being MIA is:

    Old campaigns don't have the file "campaign.mis" file - that is just a map reference, so create one inside campaign folder whit this lines:

    Code:
    [PARTS]
      core.100
      bob.100
    [MAIN]
      MAP Land$English_Channel_1940
      BattleArea 150000 100000 100000 150000 1000
      TIME 12
      WeatherIndex 0
      CloudsHeight 0
      BreezeActivity 0
      ThermalActivity 0
    [splines]
    [CustomChiefs]
    [Stationary]
    [Buildings]
    [BuildingsLinks]
    Don't change folders, files names, if have _ (underline) keep.

  11. #10
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Question Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by 1lokos View Post
    ...
    Old campaigns don't have the file "campaign.mis" file ...
    This is actually the case.

    *******************
    Also.
    I am checking and learning the script of those missions, this campaign come across some issues (I don't know if it is a flaw or just because of the 'game version')

    1.You don't see this campaign in your 'list' until you make a campaign.mis file into this campaign folder.

    2.The mission success script not suits the .mis file as there is no front line in the mission. So you can NOT get a mission success(even you add front line via the FMB, though there is no scrpit for detecting pos of player in the .cs file. I believe it is because this script was cut out from other scripts.)
    Troubleshooting:
    Change this lines
    Code:
    ...
    public class Mission : maddox.game.campaign.Mission
    {
        
    	bool end = false; // mission objective
    	bool safe = true;  // in allied territory
        int totscore = 0; // total score
    	int prevscore = 0; // score read from file
    	int score = 0;
        bool flagCompletedAnnounced = false; 
    ...
    
    		if  ((end = true) && (safe = true))   // check  reached mission objective  
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + score); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(5.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD
    
      	    }
    to
    Code:
    ...
    public class Mission : maddox.game.campaign.Mission
    {
        
    	bool end = false; // mission objective
    //	bool safe = true;  // in allied territory
        int totscore = 0; // total score
    	int prevscore = 0; // score read from file
    	int score = 0;
        bool flagCompletedAnnounced = false; 
    ...
    
    		if (end == true)   // check  reached mission objective
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + score); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(5.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD
    
      	    }
    3.SCORE counting doesn't work. Also this is my question(SOLVED):
    Even I have correctly change the 'file directory' in the .cs file
    Code:
    	private static string mydocpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
            private static string FILE_NAME = mydocpath + @"\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaign_gb\Score.txt";
    I don't see the Score.txt file in the folder neither after install the campaign nor after finished first mission.(meaning it was not generated. Should it be?)
    AND even created a blank Score.txt by myself, the score system still not working.
    (after finished first mission with kills, the Score.txt remain blank)

    Anyone knows how to make the score system working?
    Sovled, after re-install and change the directory in .cs

    P.S. campaign was D\L from here

    P.P.S. Full version script shown in #12
    Last edited by fenbeiduo; Yesterday at 02:54.

  12. #11
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    (Geniok) script "score" used in this old campaign's should work if update the paths for actual 5.0xx folder placements. I have tested successfully.

    But this "score" has little value, just was added in end mission briefing "Your score: 100" and this is not added with the score of the next missions.

  13. #12
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    The script I was talking about is this:
    Code:
    //$reference Campaign.dll
    //-$debug
    
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    
    
    public class Mission : maddox.game.campaign.Mission
    {
        
    	bool end = false; // mission objective
    	bool safe = true;  // in allied territory
            int totscore = 0; // total score
    	int prevscore = 0; // score read from file
    	int score = 0;
        bool flagCompletedAnnounced = false; 
    
    	private static string mydocpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
        private static string FILE_NAME = mydocpath + @"\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaign_gb\Score.txt";
    	
         //Gabu
        int r = 0;
        bool cmpl = false;
        int cEnemy = 0; //killed enemies
        int cFriendly = 0; // killed friends
        int cPlayer = 0;//killed by player
        int MySquad = 0;//killed in player squadron
        int hunt = 0;
        int bomb = 0;
        string b, tx1;
        string[] br = new string[100];
        int cEnemyS, cFriendlyS, cPlayerS, MySquadS;
        //Gabu end
    
    	
    	public override void OnBattleStarted() 
        {
                   base.OnBattleStarted();
                   writeScore(0);
                   GamePlay.gpHUDLogCenter("Welcome to your new Squadron !"); //initialize score  reminder every time we start
        }
    	
        
    
    	private static void writeScore(int scr)
            {
            using (FileStream fs = new FileStream(FILE_NAME, FileMode.Create))
                {
                using (BinaryWriter w = new BinaryWriter(fs))
                    {
                    w.Write(scr);
                    }
                }
            }
    	
    	private static int readScore()
        {
            using (FileStream fs = new FileStream(FILE_NAME, FileMode.Open, FileAccess.Read))
            {
                using (BinaryReader r = new BinaryReader(fs))
                {
                    return (0);
                }
            }
        }
    	
        public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> initiatorList)
        {
            //Gabu 
    
            if (actor is AiAircraft)
            {
                if (shortName.IndexOf("607Sqn", 0) > 0) MySquad++;// indicate playerSqn loss
    
                if (actor.Army() == 2)
                {
                    cEnemy++;
                    //GamePlay.gpHUDLogCenter(shortName);
                    if (shortName.IndexOf("JG51", 0) > 0) hunt++;
                }
    
                else bomb++;
    
                if (actor.Army() == 1)
                {
                    cFriendly++;
                    GamePlay.gpHUDLogCenter("British down");
                }
    
                if (actor.Army() == 2)
                {
                    if (GamePlay.gpPlayer().Place() != null)
                    {
                        bool playerWin = false;
                        foreach (DamagerScore i in initiatorList)
                        {
                            if (i.initiator != null && i.initiator.Actor == GamePlay.gpPlayer().Place())
                            {
                                playerWin = true;
                            }
                        }
                        if (playerWin) cPlayer++;
                        if (cPlayer == 1) end = true;//win if one victory
    					if (end == true && flagCompletedAnnounced == false)
    					{
    						flagCompletedAnnounced = true;
    						GamePlay.gpHUDLogCenter("MISSION COMPLETE : YOU CAN RETURN TO BASE");
    					}//STD
                    }
                }
    			Timeout(5.0, () =>
                {
    			    
                    ShowResult(true);
                });
              
                //Gabu end
            }
        }
    	
    	//STD  display score of the mission
        private void ShowResult(bool CComplite)
        {
            GamePlay.gpHUDLogCenter(String.Format("Our losses  -  {0} ", cFriendly)+String.Format(" Our Squadron losses  -  {0} ", MySquad));
                  
            Timeout(5.0, () =>
            {
                GamePlay.gpHUDLogCenter(String.Format("Enemy killed  -  {0} ", cEnemy)+String.Format(" Your victories  -  {0} ", cPlayer));
            });
            
        }
        //STD end
    
        private void checkLanded(AiAircraft aircraft) 
    	{
        	if (GamePlay.gpPlayer().Place() != aircraft)
        	return;
    	
    		if (end != true)
    		{ 
    			Campaign.battleSuccess = false;
    			GamePlay.gpHUDLogCenter("MISSION FAILED."); //STD 
    	    	Timeout(5.0, () => { ShowResult(true); }); // STD
     	   	    return;
    		}
    		
    		if  ((end = true) && (safe = true))   // check  reached mission objective
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + score); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(5.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD
    
      	    }
        }
    
    	public override bool IsMissionListener(int missionNumber) 
    	{
                return true;
        }	
    	
    	public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
        {
            checkLanded(aircraft);
        }
    
        
        public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) 
        {
            checkLanded(aircraft);
        }
    }

  14. #13
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by 1lokos View Post
    script "score" used in this old campaign's should work if update the paths for actual 5.0xx folder placements. I have tested successfully.
    So... is it being generated? I mean the score.txt

    Quote Originally Posted by 1lokos View Post
    But this "score" has little value, just was added in end mission briefing "Your score: 100" and this is not added with the score of the next missions.
    This is wired. Because the PDF states this campaign has medal system which means it should count the score at least at ‘backstage’
    Last edited by fenbeiduo; Nov-24-2020 at 14:02.

  15. #14
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by fenbeiduo View Post
    So... is it being generated? I mean the score.txt
    Yes the "score.data" is updated at end of mission.


    This is wired. Because the PDF states this campaign has medal system which means it should count the score at least at ‘backstage’
    Ah, don't know this, make sense, could be that if "100 points" is keep for a number of missions you receive the medal.

    I've set a "Test" campaign with 3 missions- plane just take of and landing, conditions for mission success, and script work Ok, "score.data" is updated as well the end of mission briefing.



    Geniok script with path updated for 5.0xx. The file updated is "score.data" not "score.txt", in kind of code "dNULL".
    I have not tested REDUX, but seems based in this.

    Code:
    /*
    This file is part of the "Battle of France" campaign.
    Author: Vikharev Evgeniy aka Geniok.
    Date: 09.09.2011
    */
    
    
    //$reference Campaign.dll
    //-$debug
    
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    
    public class BriefingParser
    {
        private struct SectionPair
        {
            public String Section;
            public String Title;
            public String Key;
        }
    
        private Dictionary<SectionPair, string> keyPairs = new Dictionary<SectionPair, string>();
        private String briefingFilePath;
    
        public BriefingParser(String briefingPath)
        {
            TextReader briefingFile = null;
            String strLine = null;
            String currentRoot = null;
            String currentTitle = null;
            String[] keyPair = null;
    
            briefingFilePath = briefingPath;
    
            try
            {
                briefingFile = new StreamReader(briefingPath);
    
                strLine = briefingFile.ReadLine();
    
                while (strLine != null)
                {
                    if (strLine != "")
                    {
                        if (strLine.StartsWith("[") && strLine.EndsWith("]"))
                        {
                            currentRoot = strLine.Substring(1, strLine.Length - 2);
                        }
                        else if (strLine.StartsWith("<") && strLine.EndsWith(">"))
                        {
                            currentTitle = strLine.Substring(1, strLine.Length - 2);
                        }
                        else
                        {
                            keyPair = strLine.Split(new char[] { '=' }, 2);
    
                            SectionPair sectionPair;
                            String value = null;
    
                            if (currentRoot == null)
                            {
                                currentRoot = "[1]";
                            }
                            if (currentTitle == null)
                            {
                                currentTitle = "<Name>";
                            }
    
                            sectionPair.Section = currentRoot;
                            sectionPair.Title = currentTitle;
                            sectionPair.Key = keyPair[0];
    
                            if (keyPair.Length > 1)
                            {
                                value = keyPair[1];
                            }
    
                            keyPairs.Add(sectionPair, value);
                        }
                    }
                    strLine = briefingFile.ReadLine();
                }
            }
            catch (Exception ex)
            {
                throw ex;
            }
            finally
            {
                if (briefingFile != null)
                {
                    briefingFile.Close();
                }
            }
        }
    
        public void AddSetting(String sectionName, String titleName, String settingName, String settingValue)
        {
            SectionPair sectionPair;
            sectionPair.Section = sectionName;
            sectionPair.Title = titleName;
            sectionPair.Key = settingName;
    
            if (keyPairs.ContainsKey(sectionPair))
            {
                keyPairs.Remove(sectionPair);
            }
    
            keyPairs.Add(sectionPair, settingValue);
    
            SaveSettings();
        }
    
        public void AddSetting(String sectionName, String titleName, String settingName)
        {
            AddSetting(sectionName, titleName, settingName, null);
        }
    
        private void SaveSettings()
        {
            ArrayList sections = new ArrayList();
            ArrayList titles = new ArrayList();
            String tmpValue = "";
            String strToSave = "";
    
            foreach (SectionPair sectionPair in keyPairs.Keys)
            {
                if (!sections.Contains(sectionPair.Section))
                {
                    sections.Add(sectionPair.Section);
                }
                if (!titles.Contains(sectionPair.Title))
                {
                    titles.Add(sectionPair.Title);
                }
            }
    
            foreach (String section in sections)
            {
                strToSave += ("[" + section + "]\r\n");
    
                foreach (String title in titles)
                {
                    strToSave += ("<" + title + ">\r\n");
    
                    foreach (SectionPair sectionPair in keyPairs.Keys)
                    {
                        if (sectionPair.Section == section)
                        {
                            if (sectionPair.Title == title)
                            {
                                tmpValue = (String)keyPairs[sectionPair];
    
                                strToSave += (sectionPair.Key + tmpValue + "\r\n");
                            }
                        }
                    }
                }
                strToSave += "\r\n";
            }
    
            try
            {
                TextWriter tw = new StreamWriter(briefingFilePath);
                tw.Write(strToSave);
                tw.Close();
            }
            catch (Exception ex)
            {
                throw ex;
            }
        }
    }
    
    public class Mission : maddox.game.campaign.Mission
    {
        AiActor a1 = null;
        AiAircraft airc1 = null;
        int countPlayerWins = 0;
        int countDead = 0;
        bool isComplete = false;
        int score = 0;
    	
    	public static string USER_DOC_PATH = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);	
        public static string FILE_NAME = USER_DOC_PATH + "..\\1C SoftClub\\il-2 sturmovik cliffs of dover\\mission\\campaign\\custom\\campaign_test\\Score_data";
    
        private static void writeScore(int scr)
        {
            using (FileStream fs = new FileStream(FILE_NAME, FileMode.Create))
            {
                using (BinaryWriter w = new BinaryWriter(fs))
                {
                    w.Write(scr);
                }
            }
        }
    
        private static int readScore()
        {
            using (FileStream fs = new FileStream(FILE_NAME, FileMode.Open, FileAccess.Read))
            {
                using (BinaryReader r = new BinaryReader(fs))
                {
                    return (r.ReadInt32());
                }
            }
        }
    
        private void serverMessage(string msg)
        {
            Player pl = GamePlay.gpPlayer();
            Player[] players = { pl };
            object[] args = { msg };
            GamePlay.gpLogServer(players, msg, args);
        }
    
        private void HUDMessgeTo(string message)
        {
            Player pl = GamePlay.gpPlayer();
            String namePlayer = pl.Name();
    	    GamePlay.gpHUDLogCenter(namePlayer + ": " + message);
        }
    
        public override void OnBattleStarted()
        {
            base.OnBattleStarted();
        }
    
        private void checkLanded(AiAircraft aircraft)
        {
            if (GamePlay.gpPlayer().Place() == aircraft)
            {
                Campaign.battleSuccess = true;
    
                isComplete = true;
                score += 100;
    
                HUDMessgeTo("Mission accomplished!");
                Timeout(10.0, () =>
                {
                    GamePlay.gpHUDLogCenter("Press ESC to exit mission!");
                });
            }
        }
    
        public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
        {
            checkLanded(aircraft);
        }
    
        public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft)
        {
            checkLanded(aircraft);
        }
    
        public override void OnBattleStoped()
        {
            base.OnBattleStoped();
    
            if (isComplete)
            {
                writeScore(score);                
    			 
                BriefingParser parser = new BriefingParser(@USER_DOC_PATH + "..\\1C SoftClub\\il-2 sturmovik cliffs of dover\\mission\\campaign\\custom\\campaign_test\\Test_01.BRIEFING");
             	parser.AddSetting("2", "Description", "Score: ", readScore().ToString());
            }
        }
    }
    Last edited by 1lokos; Nov-24-2020 at 15:28.

  16. #15
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by fenbeiduo View Post
    The script I was talking about is this:

    Code:
    //$reference Campaign.dll
    //-$debug
    No, this script you post is not based in "Geniok" (the 100 points) script, but in "Vetochka" script, what count kills.

    For his script I've used this path:

    Code:
    public static string USER_DOC_PATH = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);	
    public static string FILE_NAME = USER_DOC_PATH + "../1C SoftClub/il-2 sturmovik cliffs of dover/mission/campaign/custom/campaign_Bristol_Beaufighter/";
    and

    Code:
    StreamReader f1 = new StreamReader(@USER_DOC_PATH + "../1C SoftClub/il-2 sturmovik cliffs of dover/mission/campaign/custom/campaign_Bristol_Beaufighter/Bristol_Beaufighter_01.briefing");
    The above are used four times, previous M#.txt, actual M#.txt and mission_#.briefing (two times).

    In original "Vetochka" script was used one file for each mission: M1, M2.txt... to be update and used for write kills in briefing.

    BTW - I don't like the "Football score board" part used in this script.

    Code:
     GamePlay.gpHUDLogCenter(String.Format("Our losses  -  {0} ", cFriendly)+String.Format(" Our Squadron losses  -  {0} ", MySquad));
       Timeout(5.0, () =>
            {
                GamePlay.gpHUDLogCenter(String.Format("Enemy killed  -  {0} ", cEnemy)+String.Format(" Your victories  -  {0} ", cPlayer));
            });
    Last edited by 1lokos; Nov-24-2020 at 15:58.

  17. #16
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    I put this script (path updated) in my Test mini-campaign and work... minus the score part, the file Score.txt is updated with a []
    but the result is not show in the "Football score board" for campaign progress, remains in 0. No errors in console.



    Play two missions - shoot a Tiger Moth over the airfield.

    Seems this script are lacking an part, can you post the script for other mission of this campaign?
    Last edited by 1lokos; Nov-24-2020 at 18:33.

  18. Likes fenbeiduo liked this post
  19. #17
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    Thanks for the reply

    Quote Originally Posted by 1lokos View Post
    ...
    this script you post is not based in "Geniok" (the 100 points) script, but in "Vetochka" script, what count kills.
    ...
    Yes, you are right. The name Score.txt in 'RAF Redux' fooled me, it actually counting the kills; not score.


    Quote Originally Posted by 1lokos View Post
    ...the file Score.txt is updated with a []
    ...
    Yes, I don't know why but the 'score' worked, after I re-installed 'RAF Redux' . (WTF? XD)
    (without Score.txt by default; After 1st mission was loaded, Score.txt was generated)
    In the Score.txt there is a ' □ ' once player got kills


    ****************************************
    Quote Originally Posted by 1lokos View Post
    I put this script (path updated) in my Test mini-campaign...for campaign progress, remains in 0. No errors in console.

    Play two missions - shoot a Tiger Moth over the airfield.

    Seems this script are lacking an part, can you post the script for other mission of this campaign?
    For the original version. 'campaign kills' is counting kills mission after mission, after the score.txt worked.

    And yes there are some differences between 1st script file and the others.

    1st script, it resets the score to '0' in case player start the campaign over again:
    Code:
    ...
    	int score = 0;
    ...
    And here(corrected)
    Code:
    ...
    	public override void OnBattleStarted() 
        {
                   base.OnBattleStarted();
                   writeScore(0);
                   GamePlay.gpHUDLogCenter("Welcome to your new Squadron !"); //should be:("Campaign kills : " + readScore().ToString())  in other mis
        }
    ...
    Therefore, if you use this line in every single script, it will set the 'campaign kills' to 0 every time. So delete it in the 2nd 3rd 4th...
    AND change the 'HUDlog' for showing the campaign kills at beginning of 2nd 3rd...

    And also an other difference:
    In the 1st:
    Code:
    ...
    		if  ((end = true) && (safe = true))   // check  reached mission objective 
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + score); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(15.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD  
    
      	    }
    ...
    In other missions, it looks like:
    Code:
    ...
    		if (end == true)   // check  reached mission objective  
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + readScore()); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      //Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(10.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD
    
      	    }
    ...

    If everything goes OK, you will get a campaign kills status at the beginning and end of each mission.
    Last edited by fenbeiduo; Today at 04:25.

  20. #18
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    You may notice, by default, at the end of 1st mission, you always get a 'Your campaign kills : 0'
    This can be solved by :
    change this:
    Code:
    ...
    		if  ((end = true) && (safe = true))   // check  reached mission objective 
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + score); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(15.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + readScore()); });//STD  
    
      	    }
    ...
    to
    Code:
    ...
    		if  ((end = true) && (safe = true))   // check  reached mission objective 
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(15.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + cPlayer); });//STD  
    
      	    }
    ...
    'cPlayer + score' is pointless in this case.
    'readScore()' does not work in 1st mission.
    Last edited by fenbeiduo; Yesterday at 12:24.

  21. Likes 1lokos liked this post
  22. #19
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    I did the changes in mission 1 script, and "campaign score" update.

    Remove 'int score =0;' for the next mission scrips, but after mission 2 score revert to 0.

  23. Likes fenbeiduo liked this post
  24. #20
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by 1lokos View Post
    ...

    Remove 'int score =0;' for the next mission scrips, but after mission 2 score revert to 0.
    Here is one more difference (I've mentioned in#17)
    Only the 1st cs has this line, so it has to be deleted:
    Code:
    ...
    	public override void OnBattleStarted() 
        {
                   base.OnBattleStarted();
                   writeScore(0);   //for 1st mis.
                   GamePlay.gpHUDLogCenter("Welcome to your new Squadron !"); //for 1st mis.
                   GamePlay.gpHUDLogCenter("Campaign kills : " + readScore().ToString()); //for other mis.   STD  reminder every time we start
        }
    ...
    P.S. I've changed many places of this script without a backup, for testing. That's why I didnt paste the full original 2nd cs to here.
    Last edited by fenbeiduo; Today at 04:18.

  25. #21
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    I've comment (//) this line ' writeScore(0);' (and 'int score =0) in next mission.cs, but score after second mission is always 0.

    What don't make sense is, after the second mission Score.txt is updated with the same [] of the first, I keep the file open in Notepadd++ and the change is detected.

    In "Vetochka" scrip the mission #.txt is updated with numbers (1, 2...)
    In "Geniok" script the score.data receive a code 'dNULL' for the 100 points.
    Last edited by 1lokos; Yesterday at 13:46.

  26. Likes fenbeiduo liked this post
  27. #22
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by 1lokos View Post
    I've comment (//) this line ' writeScore(0);' (and 'int score =0) in next mission.cs, but score after second mission is always 0.
    Do you mean it shows 0 at the end of 2nd mission? That's wired, cause I can see a text of kill number, both at the end of 2nd and the beginning of the 3rd mission
    (I think it doesn't matter : what those 3 missions are - could be yours, could be his)


    Quote Originally Posted by 1lokos View Post
    ...
    What don't make sense is, after the second mission Score.txt is updated with the same [] of the first, I keep the file open in Notepadd++ and the change is detected.

    In "Vetochka" scrip the mission #.txt is updated with numbers (1, 2...)
    ...
    Yeah, the Score.txt always shows a ' □ ' after you have a kill (no matter how many the kill(s) - as in my test, probably it is not a number or letter ,yet a character or Unicode for the system)

    And I do not have the "Vetochka" script. Maybe the 'read-write' part of the script is different from the REDUX one?
    Last edited by fenbeiduo; Yesterday at 23:56.

  28. #23
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    Yes, at end of first mission is OK now, "Your campaign kills: 1".


    Then I run the second mission -with the above changes in script; shot down the Tiger Moth, landing and after the messages saying that I have at least 1 kill in the mission, the "Your campaign kills: 0".

    Script for mission 2 and 3.

    Spoiler: 

    Code:
    //$reference Campaign.dll
    //-$debug
    
    using System;
    using System.IO;
    using System.Collections;
    using System.Collections.Generic;
    using maddox.game;
    using maddox.game.world;
    using maddox.GP;
    
    
    public class Mission : maddox.game.campaign.Mission
    {
        
    	bool end = false; // mission objective
    	bool safe = true;  // in allied territory
        int totscore = 0; // total score
        int prevscore = 0; // score read from file
    //  int score = 0;
        bool flagCompletedAnnounced = false;
    
        private static string USER_DOC_PATH = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);	
    //  private static string mydocpath = Environment.GetFolderPath(Environment.SpecialFolder.MyDocuments);
    //  private static string FILE_NAME = mydocpath + @"\1C SoftClub\il-2 sturmovik cliffs of dover\mission\campaign\custom\campaign_gb\Score.txt";
    	private static string FILE_NAME = USER_DOC_PATH + "..\\1C SoftClub\\il-2 sturmovik cliffs of dover\\mission\\campaign\\custom\\campaign_test2\\Score.txt";
    	
    
         //Gabu
        int r = 0;
        bool cmpl = false;
        int cEnemy = 0; //killed enemies
        int cFriendly = 0; // killed friends
        int cPlayer = 0;//killed by player
        int MySquad = 0;//killed in player squadron
        int hunt = 0;
        int bomb = 0;
        string b, tx1;
        string[] br = new string[100];
        int cEnemyS, cFriendlyS, cPlayerS, MySquadS;
        //Gabu end
    
    	
    	public override void OnBattleStarted() 
        {
                   base.OnBattleStarted();
    			   
                   GamePlay.gpHUDLogCenter("Welcome to your new Squadron !"); //initialize score reminder every time we start
        }    
    
    	private static void writeScore(int scr)
            {
            using (FileStream fs = new FileStream(FILE_NAME, FileMode.Create))
                {
                using (BinaryWriter w = new BinaryWriter(fs))
                    {
                    w.Write(scr);
                    }
                }
            }
    	
    	private static int readScore()
        {
            using (FileStream fs = new FileStream(FILE_NAME, FileMode.Open, FileAccess.Read))
            {
                using (BinaryReader r = new BinaryReader(fs))
                {
                    return (0);
                }
            }
        }
    	
        public override void OnActorDead(int missionNumber, string shortName, AiActor actor, List<DamagerScore> initiatorList)
        {
            //Gabu 
    
            if (actor is AiAircraft)
            {
                if (shortName.IndexOf("FatCat", 0) > 0) MySquad++;// indicate playerSqn loss
    
                if (actor.Army() == 2)
                {
                    cEnemy++;
                    //GamePlay.gpHUDLogCenter(shortName);
                    if (shortName.IndexOf("JG51", 0) > 0) hunt++;
                }
    
                else bomb++;
    
                if (actor.Army() == 1)
                {
                    cFriendly++;
                    GamePlay.gpHUDLogCenter("");
                }
    
                if (actor.Army() == 2)
                {
                    if (GamePlay.gpPlayer().Place() != null)
                    {
                        bool playerWin = false;
                        foreach (DamagerScore i in initiatorList)
                        {
                            if (i.initiator != null && i.initiator.Actor == GamePlay.gpPlayer().Place())
                            {
                                playerWin = true;
                            }
                        }
                        if (playerWin) cPlayer++;
                        if (cPlayer == 1) end = true;//win if one victory
    					if (end == true && flagCompletedAnnounced == false)
    					{
    						flagCompletedAnnounced = true;
    						GamePlay.gpHUDLogCenter("MISSION COMPLETE : YOU CAN RETURN TO BASE");
    					}//STD
                    }
                }
    			Timeout(5.0, () =>
                {
    			    
                    ShowResult(true);
                });
              
                //Gabu end
            }
        }
    	
    	//---------
    
        private void checkLanded(AiAircraft aircraft) 
    	{
        	if (GamePlay.gpPlayer().Place() != aircraft)
        	return;
    	
    		if (end != true)
    		{ 
    			Campaign.battleSuccess = false;
    			GamePlay.gpHUDLogCenter("MISSION FAILED."); //STD 
    	    	Timeout(5.0, () => { ShowResult(true); }); // STD
     	   	    return;
    		}
    		
    		if  ((end = true) && (safe = true))   // check  reached mission objective
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer + readScore()); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      //Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(10.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + cPlayer + readScore()); });//STD
    
      	    }
        }
    	//STD  display score of the mission
        private void ShowResult(bool CComplite)
        {
           GamePlay.gpHUDLogCenter(String.Format("RAF losses  -  {0} ", cFriendly)+String.Format(" Squadron losses  -  {0} ", MySquad));
           Timeout(5.0, () =>
           {
            GamePlay.gpHUDLogCenter(String.Format("Enemy killed  -  {0} ", cEnemy)+String.Format(" Your victories  -  {0} ", cPlayer));
           });
    	}
       //STD end
    
    	public override bool IsMissionListener(int missionNumber) 
    	{
                return true;
        }	
    	
    	public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
        {
            checkLanded(aircraft);
        }
    
        
        public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) 
        {
            checkLanded(aircraft);
        }
    }

  29. Likes fenbeiduo liked this post
  30. #24
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by 1lokos View Post
    ...
    Script for mission 2 and 3.
    Delete this: (maybe?)
    Code:
    ...
      	      writeScore(cPlayer + readScore()); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      //Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(10.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + cPlayer + readScore()); });//STD
    ...

  31. #25
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    I give up of this script adaptation and use "force brute".

    Download the REDUX campaign and use their scripts (have to put true in 'bool end" because if you don't scored a goal... oops, shot down a 109, the mission fail).

    At end of first mission is show only player/squadron/side kills, in the script the "Your campaigns kills: " is disabled.

    At start of second mission is show "Campaign kills: 1" (of previous mission) using this:

    Code:
         public override void OnBattleStarted()
                 {
                   base.OnBattleStarted();
                   GamePlay.gpHUDLogCenter("Campaign kills : " + readScore().ToString()); //STD  reminder every time we start
                  }
    And at end of the second mission the "Your campaign kills: 2". Finally.
    And after mission 3, 3 kills.

    Curious is that "Score.txt" or have nothing or the same [].

    Anyway "Vetochka" script with score in briefing is more "elegant".

    Need a simplification in condition for mission sucess.
    Last edited by 1lokos; Today at 01:17.

  32. #26
    Manual Creation Group fenbeiduo's Avatar
    Join Date
    May 2013
    Posts
    53
    Post Thanks / Like
    Total Downloaded
    279.36 MB

    Re: RAF Redux Campaign missing briefing

    Yes, my bad on this code of 'campaign kills at the beginning':
    'GamePlay.gpHUDLogCenter("Welcome to your new Squadron !");' in post#17, it maybe confused you @Sokol

    To show the campaign kills at the beginning of 2nd mis or so, it should be:
    Spoiler: 

    Code:
    ...
    public override void OnBattleStarted()
                 {
                   base.OnBattleStarted();
                   GamePlay.gpHUDLogCenter("Campaign kills : " + readScore().ToString()); //STD  reminder every time we start
                  }
    ...
    Like Sokol's post in #25
    But I believe it has nothing to do with the 'ending text of Campaign kills' (2nd & 3rd mis)

    Quote Originally Posted by 1lokos View Post
    I give up of this script adaptation and use "force brute".
    ...
    Don't know why the 'ending text of Campaign kills' for 2nd & 3rd mis does not work in your test campaign.



    Quote Originally Posted by 1lokos View Post
    ...
    At end of first mission is show only player/squadron/side kills, in the script the "Your campaigns kills: " is disabled.
    ...
    Yeah, it is a 'flaw', refers to post #18 for the solution.
    Last edited by fenbeiduo; Today at 13:43.

  33. #27
    Ace 1lokos's Avatar
    Join Date
    Jan 2012
    Posts
    5,147
    Post Thanks / Like
    Total Downloaded
    985.12 MB

    Re: RAF Redux Campaign missing briefing

    Quote Originally Posted by fenbeiduo View Post
    ...
    At end of first mission is show only player/squadron/side kills, in the script the "Your campaigns kills: " is disabled.
    Yeah, it is a 'flaw', refers to post #18 for the solution.
    #18 change
    Code:
    ...
    		if  ((end = true) && (safe = true))   // check  reached mission objective 
        
    		{    
      	      Campaign.battleSuccess = true;
    
      	      writeScore(cPlayer); // STD : increase campaign kills       
      	      GamePlay.gpHUDLogCenter("GOOD SHOW! You shot down at least 1 enemy." ); // STD : every time we explain why the success
      	      Timeout(5.0, () => { ShowResult(true); });//STD 
      	      Timeout(15.0, () => { GamePlay.gpHUDLogCenter("Your campaign kills : " + cPlayer); });//STD  
    
      	    }
    ...
    Copy this part for the original REDUX script (plus remove 'int score = 0') result in this error, in the last line.

    System.Exception: ...\ Test_01.cs (160.83): error CS0118: 'Mission.cPlayer' is a 'field' , but is used as a 'method'

    Anyway "Your mission score:" at end of mission #1 is redundant, previous on screen message show the number of player kills in the mission.

    BTW - Shooting repeatedly the Tiger Moth I notice:

    Most time the Tiger Moth just keep circling (has only 1 Normal Fly waypoint) like a "target drone", but sometimes (rare) he maneuver trying avoid to be shoot, what indicates that something in AI game code most time don't "trigger", but eventually "trigger" and AI work as expected.

    I try shoot down Tiger Moth in head pass, just after wheels up, but most time miss, one time I hit some bullets, and Tiger Moth continues normally in their turn, when I was finishing my turn to get their six, I see their right wings broken off, several seconds - 30 or more after being hit.
    Last edited by 1lokos; Today at 14:46.

Bookmarks

Posting Permissions

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