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, 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
  #2  
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
  #3  
Old 04-08-2012, 06:40 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

i gave it a go : this is my script

PHP Code:
//$reference IL2ClodCommanderStats.dll
// v.1_0. script by FG28_Kodiak, ZaltysZ, Oreva, Small_Bee, RAF238thWildWillie
using System;
using System.Diagnostics;
using System.Collections;
using maddox.GP;
using maddox.game;
using maddox.game.world;
using part;
using System.Collections.Generic;
using IL2ClodCommanderStats;


public class 
Mission AMission
{
    
#region Stats Initialization
    // For Connection to the IL2 Clod Commander Application
    // This allows you to store stats on players within Cliffs of Dover
    //  Change the following to meet your needs
    //
    
private static string serverName "5./JG27 SERVER";
    private static 
string serverIP "127.0.0.1";
    
    
// Password is not used currently
    
private static string serverPassword "password";
    private static 
Int32  serverPort 27015;
    private 
StatsRecording stats = new StatsRecording(serverNameserverIPserverPasswordserverPort);
    private 
Dictionary<StringAiActorallActors = new Dictionary<StringAiActor>();
    private List<
ServerCommandnewCmds = new List<ServerCommand>();
    private 
Stopwatch MissionTimer = new Stopwatch();
    
#endregion

    
int LastMissionLoaded 0;

    
double initTime;
    
    
    
////////////////setting chat messages
    
private void sendChatMessage(string msgparams object[] args)
    {
        
GamePlay.gpLogServer(nullmsgargs);
    }


    private 
void sendChatMessage(Player playerstring msgparams object[] args)
    {
        if (
player != null)
            
GamePlay.gpLogServer(new Player[] { player }, msgargs);
    }


    private 
void sendChatMessage(int armystring msgparams object[] args)
    {
        List<
PlayerConsignees = new List<Player>();

        if (
GamePlay.gpPlayer() != null)
            
Consignees.Add(GamePlay.gpPlayer());
        if (
GamePlay.gpRemotePlayers() != null)
            
Consignees.AddRange(GamePlay.gpRemotePlayers());

        if (
army == -1)
            
GamePlay.gpLogServer(nullmsgargs);
        else if (
Consignees.Exists(item => item.Army() == army))
            
GamePlay.gpLogServer(Consignees.FindAll(item => item.Army() == army).ToArray(), msgargs);
    }
    
////////////////testing voice messages
    
     
public void sendMessagesToAirgroup(AiAirGroup fromdouble maxDistance)
    {

        
AiAirGroup[] EnemyAirgroups;
        
Point3d StartPos = new Point3d(from.Pos().xfrom.Pos().y1.0);

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

        
int i 0;

        foreach (
AiAirGroup aag in EnemyAirgroups)
        {
            
Point3d enemyPosition = new Point3d(aag.Pos().xaag.Pos().y1.0);

            if (
from.Pos().distance(ref enemyPosition) < maxDistance)
            {
                
                
string sectorName GamePlay.gpSectorName(aag.Pos().xaag.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(+= 2, () =>
                {
                    
LeaderPlane.SayToGroup(from"In_square");
                });

                
Timeout(+= 2, () =>
                {
                    
LeaderPlane.SayToGroup(fromalpha);
                });
                
Timeout(+= 2, () =>
                {
                    
LeaderPlane.SayToGroup(fromnumber);
                });

                
+= 2;
            }
        }
    }


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

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


    
// loading sub-missions
    
    
          #region Stats Timer
          
if (MissionTimer.Elapsed.TotalSeconds >= 5// 5 seconds
        
{
            
MissionTimer.Restart(); // stopwatch reset to 0 and restart
            
if (stats != null )
            {
               
newCmds stats.getCommands();
               if (
newCmds != null && newCmds.Count 0)
                   
ProcessCommands(newCmds);
            }
        }
        
#endregion
    ///////////////////////
    // server info every 5 min
    
     
if (Time.tickCounter() % 9000 == 1800)  
       
       {

       
sendChatMessage((-1), "PLEAS VISIT www.5jg27.net TO CHECK STATS");

        }
    
    
    
// load ground objects
       
if (Time.tickCounter() % 2592000 == 300)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_ground.mis");
    
       }

// loads Mission1
       
if (Time.tickCounter() % 2592000 == 12600)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Air1Red1Blue1.mis");
                      
       }

// loads Rescue
       
if (Time.tickCounter() % 2592000 == 95000)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Airsearescue.mis");
                      
       }
    

// loads Mission2
       
if (Time.tickCounter() % 2592000 == 66600)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Air2Red2.mis");
           
           
       }

// loads Mission3
       
if (Time.tickCounter() % 2592000 == 144000)  
       {
           
GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/kanalkampf/kanalkampf_Air3Blue2.mis");
          
           
       }
       


    }
 
////////////////////////////////////////////////////////////////////////////////////////////////////

//

// Base Scripts for Missions
  
private bool isAiControlledPlane (AiAircraft aircraft
  {
        if (
aircraft == null
        { 
            return 
false;
        }

        
Player [] players GamePlay.gpRemotePlayers ();
        foreach (
Player p in players
        {    
            if (
!= null && (p.Place () is AiAircraft) && (p.Place () as AiAircraft) == aircraft)
            { 
                return 
false;
            }
        }

        return 
true;
    }

    private 
void destroyPlane (AiAircraft aircraft) {
        if (
aircraft != null) { 
            
aircraft.Destroy ();
        }
    }

    private 
void explodeFuelTank (AiAircraft aircraft
  {
        if (
aircraft != null
        { 
            
aircraft.hitNamed (part.NamedDamageTypes.FuelTank0Exploded);
        }
    }

    private 
void destroyAiControlledPlane (AiAircraft aircraft) {
        if (
isAiControlledPlane (aircraft)) {
            
destroyPlane (aircraft);
        }
    }

    private 
void damageAiControlledPlane (AiActor actor) {
        if (
actor == null || !(actor is AiAircraft)) { 
            return;
        }

        
AiAircraft aircraft = (actor as AiAircraft);

        if (!
isAiControlledPlane (aircraft)) {
            return;
        }

        if (
aircraft == null) { 
            return;
        }

        
aircraft.hitNamed (part.NamedDamageTypes.ControlsElevatorDisabled);
        
aircraft.hitNamed (part.NamedDamageTypes.ControlsAileronsDisabled);
        
aircraft.hitNamed (part.NamedDamageTypes.ControlsRudderDisabled);
        
aircraft.hitNamed (part.NamedDamageTypes.FuelPumpFailure);

        
int iNumOfEngines = (aircraft.Group() as AiAirGroup).aircraftEnginesNum();
        for (
int i 0iNumOfEnginesi++)
        {
            
aircraft.hitNamed((part.NamedDamageTypes)Enum.Parse(typeof(part.NamedDamageTypes), "Eng" i.ToString() + "TotalFailure"));
        }

        
/***Timeout (240, () =>
                {explodeFuelTank (aircraft);}
            );
         * ***/

        
Timeout (300, () =>
                {
destroyPlane (aircraft);}
            );
    }

  public 
override void Init(maddox.game.ABattle battleint missionNumber)
  {
        
base.Init(battlemissionNumber);
        
MissionNumberListener = -1//Listen to events of every mission
  
}

//////////////////////////////////////////
// Methods for Stats (You can add any code you may need after the Stats Region
//////////////////////////////////////////

    
public override void OnBattleStarted()
    {
        
base.OnBattleStarted();
        
#region Stats
           
MissionTimer.Start(); // start the stopwatch
        #endregion
    
}

    private 
void sendScreenMessageTo(int armystring msgobject[] parms)
    {
        List<
PlayerPlayers = new List<Player>();

        
// on Dedi the server or for singleplayertesting
        
if (GamePlay.gpPlayer() != null)
        {
            if (
GamePlay.gpPlayer().Army() == army || army == -1)
                
Players.Add(GamePlay.gpPlayer());
        }
        if (
GamePlay.gpRemotePlayers() != null || GamePlay.gpRemotePlayers().Length 0)
        {
            foreach (
Player p in GamePlay.gpRemotePlayers())
            {
                if (
p.Army() == army || army == -1)
                    
Players.Add(p);
            }
        }
        if (
Players != null && Players.Count 0)
            
GamePlay.gpHUDLogCenter(Players.ToArray(), msgparms);
    }

    private 
void ProcessCommands(List<ServerCommandnewCmds)
    {
        try
        {
            foreach (
ServerCommand sc in newCmds)
            {
                if (
sc.CommandType.Equals("HUDmsg"))
                {
                    if (
sc.ToWho.Equals("All"))
                        
GamePlay.gpHUDLogCenter(sc.Command);
                  else if (
sc.ToWho.Equals("Red"))
                    {
                        
sendScreenMessageTo(1sc.Commandnull);
                    }
                    else if (
sc.ToWho.Equals("Blue"))
                    {
                        
sendScreenMessageTo(2sc.Commandnull);
                    }
                    else
                    {
                        if (
GamePlay.gpRemotePlayers() != null || GamePlay.gpRemotePlayers().Length 0)
                        {

                            foreach (
Player p in GamePlay.gpRemotePlayers())
                            {
                                if (
p.Name() == sc.ToWho)
                                    
GamePlay.gpLogServer(new Player[] { }, sc.Commandnull);
                            }
                        }
                        
// Message is for a specific player based on player name in string sc.ToWho
                    
}
                }
            }
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.ProcessCommands - Exception: " ex);
        }
    }
 
    public 
override void OnActorCreated(int missionNumberstring shortNameAiActor actor)
    {
        
#region stats
        
base.OnActorCreated(missionNumbershortNameactor);
        
// Add actor to list of all Actors
        
if (!allActors.ContainsKey(shortName))
           
allActors.Add(shortNameactor);
        try
        {
            
stats.newActor(shortNameactor);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorCreated - Exception: " ex);
        }
        
#endregion
    
}


    public 
override void OnPersonHealth(maddox.game.world.AiPerson personmaddox.game.world.AiDamageInitiator initiatorfloat deltaHealth)
    {
        
#region stats
        
base.OnPersonHealth(personinitiatordeltaHealth);
        try
        {
            
stats.playerHealth(personinitiatordeltaHealth);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPersonHealth - Exception: " ex);
        }
        
#endregion

    
}

    public 
override void OnPersonParachuteFailed(maddox.game.world.AiPerson person)
    {
        
#region stats
        
base.OnPersonParachuteFailed(person);
        try
        {
            
stats.personParachute("Failed"person);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPersonParachuteFailed - Exception: " ex);
        }
        
#endregion
    
}

    public 
override void OnPersonParachuteLanded(maddox.game.world.AiPerson person)
    {
        
#region stats
        
base.OnPersonParachuteLanded(person);
        try
        {
            
stats.personParachute("Landed"person);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPersonParachuteLanded - Exception: " ex);
        }
        
#endregion
    
}

    public 
override void OnPlayerArmy(maddox.game.Player playerint army)
    {
        
#region stats
        
base.OnPlayerArmy(playerarmy);
        try
        {
            
stats.playerArmy(playerarmy);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlayerArmy - Exception: " ex);
        }
        
#endregion

    
}

    public 
override void OnPlayerConnected(maddox.game.Player player)
    {
        
#region stats
        
base.OnPlayerConnected(player);
        try
        {
            
stats.pilotInfo(player);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlayerConnected - Exception: " ex);
        }

        
#endregion
        // Your code here
    
}
    public 
override void OnPlayerDisconnected(maddox.game.Player playerstring diagnostic)
    {
        
#region stats
        
base.OnPlayerDisconnected(playerdiagnostic);
        try
        {
            
stats.playerDisconnect(playerdiagnostic);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlayerDisconnected - Exception: " ex);
        }

        
#endregion
        // Your code here
    
}
    
    public 
override void OnPlaceEnter(Player playerAiActor actorint placeIndex)
    {
        
#region stats
        
base.OnPlaceEnter(playeractorplaceIndex);
        try
        {
            
Point2d actorPos = new Point2d(actor.Pos().xactor.Pos().y);
            
String startingGrid GamePlay.gpSectorName(actorPos.xactorPos.y).ToString();
            
stats.sortieBegin(playeractorplaceIndexactorPosstartingGrid);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlaceEnter - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}


    public 
override void OnPlaceLeave(Player playerAiActor actorint placeIndex)
    {
        
#region stats
        
base.OnPlaceLeave(playeractorplaceIndex);
        try
        {
            
stats.sortieEnd(playeractorplaceIndex);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnPlaceLeave - Exception: " ex);
        }

        
#endregion
        //add your code here
        
Timeout(1, () =>
                { 
damageAiControlledPlane(actor); }
            );
    }

    public 
override void OnAircraftCrashLanded (int missionNumberstring shortNameAiAircraft aircraft)
    {
        
#region stats
        
base.OnAircraftCrashLanded (missionNumbershortNameaircraft);
        try
        {
            
Point2d actorPos = new Point2d(aircraft.Pos().xaircraft.Pos().y);
            
String gridRef GamePlay.gpSectorName(actorPos.xactorPos.y).ToString();
            
stats.aircraftLanded("CrashLanded"shortNameaircraftactorPosgridRef);
            
System.Console.WriteLine("Stats.OnAircraftCrashLanded - ("+shortName+")");
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftCrashLanded - Exception: " ex);
        }
        
#endregion
        //add your code here
        
Timeout (300, () =>
            { 
destroyPlane(aircraft); }
            );
      }

    public 
override void OnAircraftTookOff(int missionNumberstring shortNameAiAircraft aircraft)
    {
        
#region stats
        
base.OnAircraftTookOff(missionNumbershortNameaircraft);
        try
        {
            
stats.aircraftTakeoff(shortNameaircraft);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftTookOff - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}
          
    public 
override void OnAircraftLanded (int missionNumberstring shortNameAiAircraft aircraft)
    {
          
#region stats
          
base.OnAircraftLanded(missionNumbershortNameaircraft);
            try
            {
              
Point2d actorPos = new Point2d(aircraft.Pos().xaircraft.Pos().y);
             
String gridRef GamePlay.gpSectorName(actorPos.xactorPos.y).ToString();
             
stats.aircraftLanded("Landed"shortNameaircraftactorPosgridRef);
            }
            catch (
Exception ex)
            {
            
System.Console.WriteLine("Stats.OnAircraftTookOff - Exception: " ex);
            }
          
#endregion
          //add your code here

          
Timeout(300, () =>
            { 
destroyPlane(aircraft); }
            );
    }

    public 
override void OnActorDamaged(int missionNumberstring shortNameAiActor actorAiDamageInitiator initiatorNamedDamageTypes damageType)
    {
        
#region stats
        
base.OnActorDamaged(missionNumbershortNameactorinitiatordamageType);
        try
        {
            
stats.missionActorDamaged(shortNameactorinitiatordamageType);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorDamaged - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}

    public 
override void OnAircraftDamaged(int missionNumberstring shortNameAiAircraft aircraftAiDamageInitiator initiatorNamedDamageTypes damageType)
    {
        
#region stats
        
base.OnAircraftDamaged(missionNumbershortNameaircraftinitiatordamageType);
        try
        {
            
stats.missionAircraftDamaged(shortNameaircraftinitiatordamageType);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftDamaged - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}
    public 
override void OnAircraftLimbDamaged(int missionNumberstring shortNameAiAircraft aircraftAiLimbDamage limbDamage)
    {
        
#region stats
        
base.OnAircraftLimbDamaged(missionNumbershortNameaircraftlimbDamage);
        try
        {
            
stats.aircraftLimbDamaged(shortNameaircraftlimbDamage);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftLimbDamaged - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}
    public 
override void OnAircraftCutLimb(int missionNumberstring shortNameAiAircraft aircraftAiDamageInitiator initiatorLimbNames limbName)
    {
        
#region stats
        
base.OnAircraftCutLimb(missionNumbershortNameaircraftinitiatorlimbName);
        try
        {
            
stats.missionAircraftCutLimb(shortNameaircraftinitiatorlimbName);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftCutLimb - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}

    public 
override void OnActorDead(int missionNumberstring shortNameAiActor actor, List<DamagerScoredamages)
    {
        
#region stats
        
base.OnActorDead(missionNumbershortNameactordamages);
        try
        {
             
stats.missionActorDead(shortNameactordamages); 
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorDead - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}

    public 
override void OnActorDestroyed(int missionNumberstring shortNameAiActor actor)
    {
        
#region stats
        
base.OnActorDestroyed(missionNumbershortNameactor);
        try
        {
            
stats.actorDestroyed(shortNameactor);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnActorDestroyed - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}
    public 
override void OnAircraftKilled(int missionNumberstring shortNameAiAircraft aircraft)
    {
        
#region stats
        
base.OnAircraftKilled(missionNumbershortNameaircraft);
        try
        {
            
stats.aircraftKilled(shortNameaircraft);
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnAircraftKilled - Exception: " ex);
        }
        
#endregion
        //add your code here

    
}

    public 
override void OnBattleStoped()
    {
        
#region stats
        
base.OnBattleStoped();
        try
        {
            
stats.battleStopped();
            
// Loop through list of AiActors and destroy them all
            
List<stringkeys = new List<string>(allActors.Keys);
            for (
int i 0keys.Counti++)
            {
                
AiActor a allActors[keys[i]];
                
AiAircraft aircraft as AiAircraft;
                if (
aircraft != null)
                {
                    
aircraft.Destroy();
                }
                else
                {
                    
AiGroundActor aiGroundActor as AiGroundActor;
                    if (
aiGroundActor != null)
                    {
                        
aiGroundActor.Destroy();
                    }
                    else
                    {
                        
System.Console.WriteLine("Stats.OnBattleStoped - Unknown Actor (" a.Name()+") ShortName ("+keys[i]+")");
                    }
                }
            }
            
stats.disconnectStats();
        }
        catch (
Exception ex)
        {
            
System.Console.WriteLine("Stats.OnBattleStoped - Exception: " ex);
        }
        
#endregion
        //add your code here
    
}
//////////////////////////////////////////////////////////////////////////////////////////////////


 

console gives that every 20-30sec

PHP Code:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsgIMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageDatamsgDataInt32 type)
at maddox.game.IBattle.OnTickGame()
at maddox.game.GameDef.tickGame()
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.Hwe9ADXhn0AxpFMw7lv0(Object )
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.8An9qLaqwNd()
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.Af3oASrUh27g1Z9hCmya(Object )
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.9B8JM8x755B(Boolean Boolean )
=================================================
=================================================
System.NullReferenceExceptionObject reference not set to an instance of an object.
Server stack trace:
at Mission.sendMessagesToAirgroup(AiAirGroup fromDouble maxDistance)
at Mission.OnTickGame()
at maddox.game.ABattle.OnTickGame()
at maddox.game.world.Strategy.OnTickGame()
at System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr mdObject[] argsObject serverInt32 methodPtrBoolean fExecuteInContextObject[]& outArgs)
at System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msgInt32 methodPtrBoolean fExecuteInContext)
Exception rethrown at [0]:
at System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsgIMessage retMsg)
at System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageDatamsgDataInt32 type)
at maddox.game.IBattle.OnTickGame()
at maddox.game.GameDef.tickGame()
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.Hwe9ADXhn0AxpFMw7lv0(Object )
at uRQMLX6vlhrpBgfbWjC.eBu9gE6TS67VJSjj97t.8An9qLaqwNd()
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.Af3oASrUh27g1Z9hCmya(Object )
at 93bAC3gAbOoH4F4mw53.Pljjc2gU48bdLjaViwW.9B8JM8x755B(Boolean Boolean )
================================================= 
is that because there is no airgroups loaded yet?
__________________

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
  #4  
Old 04-08-2012, 07:26 PM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

Quote:
Originally Posted by _79_dev View Post
is that because there is no airgroups loaded yet?
Yepp:
Added
if (EnemyAirgroups == null) return;
to method sendMessagesToAirgroup
and
if (GamePlay.gpAirGroups(1) != null)
in OnTickGame
to avoid exception

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);
        if (EnemyAirgroups == null) return;

        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)
        {
            if (GamePlay.gpAirGroups(1) != null)
                foreach(AiAirGroup aag in GamePlay.gpAirGroups(1))
                    sendMessagesToAirgroup(aag, 100000.0);
        
        }
    }
}

Last edited by FG28_Kodiak; 04-08-2012 at 07:28 PM.
Reply With Quote
  #5  
Old 04-08-2012, 11:26 PM
5./JG27.Farber 5./JG27.Farber is offline
Approved Member
 
Join Date: Aug 2011
Posts: 1,958
Default

Quote:
Originally Posted by FG28_Kodiak View Post
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?
Hmm if the radar closest gave the information that would be good otherwise it is as if the aircraft has the radar, or maybe not?

How would you ask the radar?
Reply With Quote
  #6  
Old 04-09-2012, 03:54 AM
FG28_Kodiak FG28_Kodiak is offline
Approved Member
 
Join Date: Dec 2009
Location: Swabia->Bavaria->Germany
Posts: 884
Default

via MissionMenu.
Reply With Quote
  #7  
Old 04-09-2012, 07:55 AM
csThor csThor is offline
Approved Member
 
Join Date: Oct 2007
Location: somewhere in Germany
Posts: 1,213
Default

If my input is allowed. I agree with Kodiak about the menu thing. Think of it as a Squadron Leader "registering" with a certain Sector Station Ops Room to receive RADAR information. That could be easily done either by making this selection available in the menu (i.e. Select Sector -> Biggin Hill, Kenley, Tangmere etc - if you want more structure and accept a slightly higher workload for the squadron leader) or simply via a distance check for the airgroup (if it's supposed to be easier).

I do, however, suggest to take a look at how the Squad Select Series at Warbirds and the Friday Squad Ops at Aces High II operate. They appoint a CO prior to a run and he has to devise a general plan. Since we lack the numbers they can (theoretically) operate with there would, of course, be some adaptations necessary. My suggestion would be:

1.) Select one squad for CO duty prior to the run. Rotate this position within the squad pool after each run.
2.) Give the CO a number of targets he can choose from. For example a mission set in August 1940 would give the Luftwaffe CO a list of primary airfields of which he has to hit a certain number (depending on number of players, I guess no more than two for CloD) plus a list of secondary targets which may give the LW additional points. This way you create a more realistic Fog of War situation in which the RAF doesn't know which targets will be hit by the LW in advance.

For the RAF this CO duty is, of course, not that important. Later it will certainly become more important once we move to theaters which include offensive ops by both sides.
Reply With Quote
  #8  
Old 04-09-2012, 09:43 AM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

Hi Kodiak, whilst Farber has done the vast majority of the work and it is a JG27 campaign, I am providing a large number of his enemy fighters for it (looking forward to that ) and I have been working with him on how this runs (though the buck stops with him).

Quote:
Originally Posted by FG28_Kodiak View Post
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?
Quote:
Originally Posted by 5./JG27.Farber View Post
Hmm if the radar closest gave the information that would be good otherwise it is as if the aircraft has the radar, or maybe not?

How would you ask the radar?
Yes, mission menu! This is what I suggested in the first place. The flight leaders select #1



Everyone else selects something else, therefore this means not everyone gets the menu option and have to be organised by the squadron leader. Only 3 or 4 people on RAF would even have this ability so their workload goes up and the pressure for their team to stay together in flight becomes very important.

The information provided should be:
1. Location
2. Approximate numbers (30+??)
3. Height
4. Heading

The flight lead has to then direct his crew to intercept. If this can be provided vocally then that is even better.

Fighter Command had a WHOLE picture of the area via the plotting room bunker. This would receive all radar information from the RDF stations and observer corps, then scramble accordingly. @FARBER I imagine that for the purposes of campaign, that this event, ie "501 squadron scramble" could be handle by trigger. That way we start at the right time from the right place. I wouldn't want to be on some random patrol for ages because I don't know what's going on and then find ourselves 180 miles away with 1/2 tank of fuel left. Sorry to talk mission but I would suggest participating RAF squadrons being "At Readiness" with kites ready to scramble waiting for the off would be most realistic.

4 minutes delay
This 4 minutes delay for response is interesting since information cannot be absolutely up to date. I'm trying to find out the delay between RDF station and reporting to the squadrons. 4 mins seems a long time, you could cross the Channel in that time. An alternative suggestion is that the flight leaders have a time delay between plot requests of a few minutes, so once they request and get feedback they cannot select again until that time has expired - this would add in the random factor for LW course changes and human error until visual confirmation, it would stop a flight leader from just hammering the button!


This is why I love this stuff, because you learn so much about it all as you go I read that Ground Controlled Interception didn't occur until later because the RDF stations needed to scan the whole sky, therefore a squadron was scrambled and vectored to an interception position and that was it, though it was accurate. There was no 'within range of a station' since the entire coast was covered as one. It's really this we need to replicate. The difficulty would be that since we don't have the whole of 11 group in the mission then the Luftwaffe could 'slip the net' so we probably could do with a bit more reliability.
Here's a nice overview
http://www.radarpages.co.uk/mob/gci/gci.htm


Quote:
Originally Posted by csThor View Post
If my input is allowed. I agree with Kodiak about the menu thing. Think of it as a Squadron Leader "registering" with a certain Sector Station Ops Room to receive RADAR information. That could be easily done either by making this selection available in the menu (i.e. Select Sector -> Biggin Hill, Kenley, Tangmere etc - if you want more structure and accept a slightly higher workload for the squadron leader) or simply via a distance check for the airgroup (if it's supposed to be easier).

I do, however, suggest to take a look at how the Squad Select Series at Warbirds and the Friday Squad Ops at Aces High II operate. They appoint a CO prior to a run and he has to devise a general plan. Since we lack the numbers they can (theoretically) operate with there would, of course, be some adaptations necessary. My suggestion would be:

1.) Select one squad for CO duty prior to the run. Rotate this position within the squad pool after each run.
2.) Give the CO a number of targets he can choose from. For example a mission set in August 1940 would give the Luftwaffe CO a list of primary airfields of which he has to hit a certain number (depending on number of players, I guess no more than two for CloD) plus a list of secondary targets which may give the LW additional points. This way you create a more realistic Fog of War situation in which the RAF doesn't know which targets will be hit by the LW in advance.

For the RAF this CO duty is, of course, not that important. Later it will certainly become more important once we move to theaters which include offensive ops by both sides.
I see where you are coming from but I wouldn't want to sit out and direct anyone, and if you have a list of targets which the LW can hit then chances of even meeting in the sky are slim - which is the whole point. I don't care for tactics, winning or losing, I'm interested in experiencing the same as squadrons did in the BoB (minus the death).

Last edited by Osprey; 04-09-2012 at 09:51 AM.
Reply With Quote
  #9  
Old 04-09-2012, 10:07 AM
csThor csThor is offline
Approved Member
 
Join Date: Oct 2007
Location: somewhere in Germany
Posts: 1,213
Default

Quote:
Originally Posted by Osprey View Post
I see where you are coming from but I wouldn't want to sit out and direct anyone, and if you have a list of targets which the LW can hit then chances of even meeting in the sky are slim - which is the whole point.
Err ... no. The CO position is essentially a pre-flight position and is not meant to be RAF Fighter Command CO or commanding General of a german Fliegerkorps during the game. Once the planning is done the CO reverts to flying as usual. I don't know what number of players and squads you're planning with but given the obvious limitations on player numbers and ability to display a lot of aircraft I guess we're talking about maybe forty to fifty people at best so the target area and the target selection will always be within the confines of this limit. Going back to my example of an August 1940 mission I'd envision the german task to hit at least one of the primary targets (i.e. Biggin Hill, Kenley, Croydon) and also offers secondary targets such as radar stations, harbors and secondary airfields.

And just to make that absolutely clear I am not talking about using the whole width of the map if it doesn't reflect the number of players engaged. Right now that is simply not possible from the technical side as we don't see 128 player servers working and being filled to that point (plus a load of AI for the bombers which few people fly, anyway). The target zone would be limited to one of the areas assigned to the german Luftflotten (Luftflotte 3 = west of Seine, Luftflotte 2 = east of Seine). This way both RAF and LW would meet in one area and not play chicken with each other.

Quote:
Originally Posted by Osprey View Post
I don't care for tactics, winning or losing, I'm interested in experiencing the same as squadrons did in the BoB (minus the death).
The problem is you can't exclude tactics if you want that immersion. The Luftwaffe's bombers would be jubilant if they could fly unmolested.
Reply With Quote
  #10  
Old 04-09-2012, 10:13 AM
Osprey's Avatar
Osprey Osprey is offline
Approved Member
 
Join Date: Jan 2010
Location: Gloucestershire, England
Posts: 1,264
Default

Sort of reminds me of the USL in that there was a known mission and both sides planned for it plus if someone knew what was going to happen though then it sort of spoils it for them.

Although it would be nice, I wouldn't expect Farber to have to tail a bomber with flaps down lol I can live without that total repetition!
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 01:19 PM.


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