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-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
  #2  
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
  #3  
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
  #4  
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
  #5  
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
  #6  
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
  #7  
Old 04-08-2012, 03:19 PM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

Now this stuff looks very promising.

I'm going to crack open VS express and have a bigger look. I can't write the stuff but adapting it may be easier.
Reply With Quote
  #8  
Old 04-08-2012, 04:36 PM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default

Kodiak thats great. Were gonna give it a whirl on our server today. I have some ideas for expansion. Could there be some kind of delay between requesting the information and recieving it, say 4 mins? This would simulate the request going to and from the lines of communication. Also. What if some radars are knocked out or damaged? Can this be simulated also?

P.S. I know how you feel with the renovation, Ive been doing it for 4 months now. It will be finished this week. What a grind.
Reply With Quote
  #9  
Old 04-08-2012, 06:00 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

you wanna ask the operators with the mission menu? and than after 4min you will get the response? This is possible without problem.
Okay for clearance, when we use "radars" will you give the messages to the Airgroups in range of a spezific radarstation or to all. So if you hit the 'radarbutton' then you get Information of all Enemies Airgoups in range of any available radarstation or only from this you are in Range?
Reply With Quote
  #10  
Old 04-09-2012, 08:22 AM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

Kodiak, Your script for generating voice messages due to distance from blue Airgroup seems to be working fine on server console, however I can't test it physically my self cause I am on holidays and using IPod at the moment (can't run Cliffs of Dover on iPod...yet). If someone can give us a hand pleas go to 5jg27.net there is direct connect button to server.

Just one more question, by the look at the script It supose to give radio messages every x amount of seconds or do I have to go to TAB menu to ask for message? (just getting confused here)
__________________

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
Reply

Thread Tools
Display Modes

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 09:35 AM.


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