Fulqrum Publishing Home   |   Register   |   Today Posts   |   Members   |   UserCP   |   Calendar   |   Search   |   FAQ

Go Back   Official Fulqrum Publishing forum > Fulqrum Publishing > IL-2 Sturmovik: Cliffs of Dover > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #1  
Old 04-07-2012, 10:51 PM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default Organising flights in a multisquad campaign.

Well our campaign is nearly ready and everyday the "grail patch" draws closer. The big question still remains. How to coordinate (especially red players) into action realistically during our missions. We could simply direct the squadrons in the air and then use one of the following:


Obviously the most realistic method would be have a fighter command to plot and direct red squadrons where they are needed. However I dont see anyone comming forward to do this. This thread wexplains how it might happen: http://forum.1cpublishing.eu/showthread.php?t=30918

Triggers are the next obvious solution. However Triggers are a dead cert! There is no room for error which is unrealistic. Also the Orange writing is a massive immertion killer.

The third option is a brief. This is ok for blue on the attack. However red may feel cheated by a brief if they dont get into action and or lose out in the mission.

The forth option is let radar and the game call out the action and squadrons conduct themselves.



What do you (especially those willing to take pat) think. We are open to all ideas however keep them short and simple - no essays please. I look forward to reading your responses.

Last edited by 5./JG27.Farber; 04-08-2012 at 01:53 AM.
Reply With Quote
  #2  
Old 04-08-2012, 09:06 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by 5./JG27.Farber View Post
Triggers are the next obvious solution. However Triggers are a dead cert! There is no room for error which is unrealistic. Also the Orange writing is a massive immertion killer.
In my Coops i use triggers, but without Orange writing, i simulate a radio message.
Code:
if ("EnterAreaM8".Equals(shortName))
        {
            int i = 0;

            AiActor actor = GamePlay.gpActorByName("0:BoB_LW_JG51_III.000");
           

            (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "Enemy_planes");

            Timeout(i += 2, () =>
            {
                (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "In_square");
            });

            Timeout(i += 2, () =>
            {
                (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "M");
            });
            Timeout(i += 2, () =>
            {
                (actor as AiAircraft).SayToGroup(actor.Group() as AiAirGroup, "n8");
            });

            GamePlay.gpGetTrigger(shortName).Enable = false;
        }
Reply With Quote
  #3  
Old 04-08-2012, 11:10 AM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default

Could a trigger have a chance of success? Or is it like a switch - on/off. Can a message in chat be sent to a specific Squadron or just one team?
Reply With Quote
  #4  
Old 04-08-2012, 11:31 AM
bolox bolox is offline
Approved Member
 
Join Date: May 2008
Posts: 351
Default

triggers can be made to do 'random' things
Code:
// Script that triggered an accidental damage to the player plane
// Autor: FG28_Kodiak

using System;
using maddox.game;
using maddox.game.world;

    public class Mission : maddox.game.AMission
    {
		 
		    AiAircraft PlayerPlane;

    
    
        public override void OnTrigger(int missionNumber, string shortName, bool active) 
        {
            if (("trigger01".Equals(shortName) || "trigger02".Equals(shortName))  && active) 
            { 
                DoDamage();
            }
            GamePlay.gpGetTrigger(shortName).Enable = false;
        }
    
    
        private void DoDamage()
        {
                PlayerPlane = (AiAircraft)GamePlay.gpPlayer().Place();              
                    
                Random RandomIncident = new Random();
            
        		    switch (RandomIncident.Next(1,9))
						    {
						        case 1:
								        PlayerPlane.hitNamed(part.NamedDamageTypes.ControlsElevatorDisabled);
								        GamePlay.gpHUDLogCenter("Elevator Disabled");
								    break;
								    case 2:
								        PlayerPlane.hitNamed(part.NamedDamageTypes.ControlsAileronsDisabled);
								        GamePlay.gpHUDLogCenter("Ailerons Disabled");
								    break;
								    case 3:
								        PlayerPlane.hitNamed(part.NamedDamageTypes.ControlsRudderDisabled);
								        GamePlay.gpHUDLogCenter("Rudder Disabled");
								    break;
								    case 4:
								        PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0PropBlade0Broken);
								        GamePlay.gpHUDLogCenter("PropBlade Broken");
								    break;
								    case 5:
								        PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0TotalFailure);
								        GamePlay.gpHUDLogCenter("Engine Failure");
								    break;
								    case 6:
								        PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0OilSecondariesFire);
										    GamePlay.gpHUDLogCenter("Oil is on fire");
								    break;
								    case 7:
								 		    PlayerPlane.hitNamed(part.NamedDamageTypes.HydraulicsPumpFailure);
								        GamePlay.gpHUDLogCenter("Hydraulics Pump failure");
								    break;
								    case 8:
								 		    PlayerPlane.hitNamed(part.NamedDamageTypes.UndercarriageDownLockFailureL);
								        GamePlay.gpHUDLogCenter("UndercarriageDownLock Left failure");
								    break;
								    case 9:
								 		    PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0Plug00Failure);
								 		    PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0Plug01Failure);
								 		    PlayerPlane.hitNamed(part.NamedDamageTypes.Eng0Plug05Failure);
								        GamePlay.gpHUDLogCenter("Engine Plug 0,1,5 failure");
								    break;
						    }        	
        	
        }
 
        public override void OnAircraftLanded(int missionNumber, string shortName, AiAircraft aircraft)
        {
            GamePlay.gpHUDLogCenter("Excellent!");
        }
    
        public override void OnAircraftCrashLanded(int missionNumber, string shortName, AiAircraft aircraft) 
        {
            GamePlay.gpHUDLogCenter("Congratulation You are alive ;-)");
        }

    
    }
message can be sent to pretty much anyone you like as i understand it- but Kodiak will be able to answer that much better than me (and probably a better way of doing the random )
Reply With Quote
  #5  
Old 04-08-2012, 11:33 AM
41Sqn_Banks 41Sqn_Banks is offline
Approved Member
 
Join Date: Oct 2007
Posts: 644
Default

The best would be IMHO to react on Radar messages. However I didn't find a way so far to react on them in the script.
Reply With Quote
  #6  
Old 04-08-2012, 12:02 PM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

I think the main problem with radar is that it tells the RAF the type. In reality FC RDF plotters would only be able to give location, height, heading and approximate numbers eg.

"30 plus, 10 miles North of Calais at Angels 12, Heading 300"

Ground control (who the flight lead was in contact with) would give a vector and height for interception. This often took the form of a normal conversation when single pilots were sent to intercept single enemies. eg. "climb to 10,000ft, heading south-south west, you should see him on your 2 o'clock by now"

So what would be immense is to have the script loop the list to find all RAF flight leads (which have at least a single wingman) and then load a custom menu for that pilot. The custom menu would have a ground control option to locate the enemy and firing it would give him a height, position, heading and number in the chat, vocally or on the orange HUD. Since this would be by request to that flight leader only then I don't see a problem with that. It is then up to him to direct his squadron to the enemy.

It is possible to create a menu, to get the enemy, to get the flight position of the pilot.
I would code this but I'm shite at it, I have the idea but not the technical ability

I'm not a fan of randomness, RDF was excellent and pretty much directed the RAF into position - there are hundreds of accounts from both sides about this. I only just read about how Brian Kingcombe would scramble away inland from the enemy who were 15kft, he'd climb to 20kft, turn around and shallow dive south to meet them at speed. Anyway, replication would be ace.
Reply With Quote
  #7  
Old 04-08-2012, 02:07 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

An other way to get the Enemy location via script.
In this script i check the distance between red Airgroups and blue Airgroups. And if it lower as a given value, there will a Voice Message being generated to the ally Airgroups which are in range to the enemy. The script is not fully tested yet, i am to busy at the moment (home renovation ). Feel free to expand it, the voice files (use the filename without .ogg) are located in ..\Steam\SteamApps\common\il-2 sturmovik cliffs of dover\parts\bob\speech, you can add for example the type of the Enemy Aircrafts, their Numbers etc. The timedelay between the checks should be larger as in my example to avoid overlaping of the messages.


Code:
using System;
using System.Collections;
using System.Collections.Generic;
using maddox.game;
using maddox.game.world;
using maddox.GP;


public class Mission : AMission
{

    public void sendMessagesToAirgroup(AiAirGroup from, double maxDistance)
    {

        AiAirGroup[] EnemyAirgroups;
        Point3d StartPos = new Point3d(from.Pos().x, from.Pos().y, 1.0);

        EnemyAirgroups = GamePlay.gpAirGroups((from.Army() == 1) ? 2 : 1);

        int i = 0;

        foreach (AiAirGroup aag in EnemyAirgroups)
        {
            Point3d enemyPosition = new Point3d(aag.Pos().x, aag.Pos().y, 1.0);

            if (from.Pos().distance(ref enemyPosition) < maxDistance)
            {
                
                string sectorName = GamePlay.gpSectorName(aag.Pos().x, aag.Pos().y);

                string[] splittet = sectorName.Split(',');
                string alpha = splittet[0];
                string number = "n" + splittet[1];

                AiAircraft LeaderPlane = (from.GetItems()[0] as AiAircraft);

                Timeout(i, () =>
                {
                    (LeaderPlane as AiAircraft).SayToGroup(from as AiAirGroup, "Enemy_planes");
                });


                Timeout(i += 2, () =>
                {
                    LeaderPlane.SayToGroup(from, "In_square");
                });

                Timeout(i += 2, () =>
                {
                    LeaderPlane.SayToGroup(from, alpha);
                });
                Timeout(i += 2, () =>
                {
                    LeaderPlane.SayToGroup(from, number);
                });

                i += 2;
            }
        }
    }


    public override void OnTickGame()
    {
        base.OnTickGame();

        if (Time.tickCounter() % 600 == 299)
        {
            foreach(AiAirGroup aag in GamePlay.gpAirGroups(1))
                sendMessagesToAirgroup(aag, 100000.0);
        
        }
    }
}

Last edited by FG28_Kodiak; 04-08-2012 at 02:15 PM.
Reply With Quote
  #8  
Old 04-08-2012, 02:53 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

That looks interesting, Kodiak. Do I just copy that script over existing one? Do I need any extra functions to invoke messages? Where do I edit distaff value between Airgroups? .... If You answer I will test it as soon as possible...
__________________

Asus P6T V2 Deluxe, I7 930, 3x2 GB RAM XMS3 Corsair1333 Mhz, Nvidia Leadtek GTX 470, Acer 1260p screen projector, Track IR 4 OS ver5, Saitek Pro Flight Rudder, Saitek X52, Win 7 x64 ultimate
Reply With Quote
  #9  
Old 04-08-2012, 02:56 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Only copy the sendMessagesToAirgroup to your code, in OnTickGame you will see the example how to use it
sendMessagesToAirgroup(aag, 100000.0);
bold is the distance.
Reply With Quote
  #10  
Old 04-08-2012, 02:59 PM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Some more radar speech code that might be useful. I use sayMessageTo to voice to everyone in the army, not just the airgroup, and have converted altitude to use 'angels' & 'metres' (depending on the army) with custom functions.

Interestingly, both (actor as AiAircraft).getParameter(part.ParameterTypes.Z_Alt itudeMSL, -1); and (actor as AiAircraft).getParameter(part.ParameterTypes.Z_Alt itudeAGL, -1); both fail to get the airgroup altitude in a multi-player server environment, so you need to use the Pos().z & convert the z offset to metres.

Code removed by author
__________________
When one engine fails on a two engine bomber, you will always have enough power left to get to the scene of the crash.

Get the latest COD Team Fusion patch info HERE

Last edited by salmo; 01-12-2013 at 01:07 PM.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 07:02 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.