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 > CoD Multiplayer

CoD Multiplayer Everything about multiplayer in IL-2 CoD

Reply
 
Thread Tools Display Modes
  #1  
Old 11-26-2011, 12:20 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default Rotating server missions

I'm trying to script the rotation (restarting same mission) of server missions every 2 hrs. The mission restarts OK, but it appears that existing planes are not destroyed before launching the mssion again. This leads to an excess of planes sitting around the airfields radius. Can anyone suggest how to correct this. Here's the comand scripts I'm using, I start the server with using
f start1.cmd.

START1.CMD
Code:
battles stop

difficulty AntropomorphicControl 0
difficulty ComplexEManagement 1
difficulty TorqueGyroEffects 1
difficulty EngineTemperatureEffects 1
difficulty FlutterEffects 1
difficulty WindTurbulence 1
difficulty StallSpins 1
difficulty Vulnerabilty 1
difficulty BlackoutsRedouts 1
difficulty Realisticgunnery 1
difficulty RealisticBombing 1
difficulty LimitedAmmo 1
difficulty LimitedFuel 1
difficulty CockpitAlwaysOn 0
difficulty NoOutsideViews 0
difficulty HeadShake 1
difficulty NoIcons 1
difficulty NoPadlock 1
difficulty Clouds 1
difficulty TakeoffLanding 1
difficulty RealisticLandings 1
difficulty NoMapIcons 1
difficulty NoMinimapPath 1
difficulty NoAutopilot 1
difficulty NoReplacementPlace 0
difficulty NoReplacement 0
difficulty NoSelect 0
difficulty NoReplacementArmy 0
difficulty NoSelectArmy 0
difficulty NoCreate 0

missLoad "missions\Multi\Dogfight\aus1\main.mis"

REM === 5 min message ===============
timeout 180.00 chat Welcome to AUS_Nations@War server ALL
timeout 200.00 chat please report problems to salmo@netspace.net.au ALL
timeout 340.00 chat Map restarts every 2 hours ALL

REM === 1/2 hr message ===============
timeout 1800.00 chat Welcome to AUS_Nations@War server ALL
timeout 1920.00 chat please report problems to salmo@netspace.net.au ALL
timeout 1860.00 chat Map restarts every 2 hours ALL


REM === 1 hr message ===============
timeout 3600.00 chat Welcome to AUS_Nations@War server ALL
timeout 3620.00 chat please report problems to salmo@netspace.net.au ALL
timeout 3660.00 chat Map restarts every 2 hours ALL


REM === 1 & 1/2 hr message ===============
timeout 5400.00 chat Welcome to AUS_Nations@War server ALL
timeout 5420.00 chat please report problems to salmo@netspace.net.au ALL
timeout 5460.00 chat Map restarts every 2 hours ALL

REM === 2 hr message ===============
timeout 6960.000 chat Map will change in 5 minutes ALL
timeout 7140.000 chat Map will change in 2 minutes ALL
timeout 7200.000 chat Map will change in 1 minutes ALL
timeout 7255.000 chat Map will change in 5 seconds ALL

battle start
timeout 7260.000 f stop.cmd
STOP.CMD
Code:
battle stop
file start1.cmd
__________________
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
Reply With Quote
  #2  
Old 11-26-2011, 06:57 AM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

If you do not change map you do not have to use battle stop command. Just destroy all unnecessary actors of the previous mission with a script and load new mission.
Reply With Quote
  #3  
Old 11-26-2011, 10:23 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Thanks for advice, changed some of the cmd file text. I'm now using these cmd files. RotateMap.mis contains just the volcano map. Seems to work, but load times between missions can be 1-2 minutes & I'm not sure if this is the most efficient method. I start the server with using f start1.cmd.

Start1.cmd
Code:
difficulty AntropomorphicControl 0
difficulty ComplexEManagement 1
difficulty TorqueGyroEffects 1
difficulty EngineTemperatureEffects 1
difficulty FlutterEffects 1
difficulty WindTurbulence 1
difficulty StallSpins 1
difficulty Vulnerabilty 1
difficulty BlackoutsRedouts 1
difficulty Realisticgunnery 1
difficulty RealisticBombing 1
difficulty LimitedAmmo 1
difficulty LimitedFuel 1
difficulty CockpitAlwaysOn 0
difficulty NoOutsideViews 0
difficulty HeadShake 1
difficulty NoIcons 1
difficulty NoPadlock 1
difficulty Clouds 1
difficulty TakeoffLanding 1
difficulty RealisticLandings 1
difficulty NoMapIcons 1
difficulty NoMinimapPath 1
difficulty NoAutopilot 1
difficulty NoReplacementPlace 0
difficulty NoReplacement 0
difficulty NoSelect 0
difficulty NoReplacementArmy 0
difficulty NoSelectArmy 0
difficulty NoCreate 0

missLoad "missions\Multi\Dogfight\aus1\main.mis"

REM === 5 min message ===============
timeout 180.00 chat Welcome to AUS_Nations@War server ALL
timeout 200.00 chat please report problems to salmo@netspace.net.au ALL
timeout 340.00 chat Map restarts every 2 hours ALL

REM === 1/2 hr message ===============
timeout 1800.00 chat Welcome to AUS_Nations@War server ALL
timeout 1920.00 chat please report problems to salmo@netspace.net.au ALL
timeout 1860.00 chat Map restarts every 2 hours ALL


REM === 1 hr message ===============
timeout 3600.00 chat Welcome to AUS_Nations@War server ALL
timeout 3620.00 chat please report problems to salmo@netspace.net.au ALL
timeout 3660.00 chat Map restarts every 2 hours ALL


REM === 1 & 1/2 hr message ===============
timeout 5400.00 chat Welcome to AUS_Nations@War server ALL
timeout 5420.00 chat please report problems to salmo@netspace.net.au ALL
timeout 5460.00 chat Map restarts every 2 hours ALL

REM === 2 hr message ===============
timeout 6960.000 chat Map will change in 5 minutes ALL
timeout 7140.000 chat Map will change in 2 minutes ALL
timeout 7200.000 chat Map will change in 1 minutes ALL
timeout 7255.000 chat Map will change in 5 seconds ALL
timeout 7260.000 f stop.cmd

battle start
Stop.cmd
Code:
battle stop
missLoad "missions\Multi\Dogfight\aus1\misc\RotateMap.mis"
battle stop
file start1.cmd
__________________
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
Reply With Quote
  #4  
Old 11-27-2011, 12:15 AM
salmo salmo is offline
Approved Member
 
Join Date: Mar 2011
Posts: 632
Default

Quote:
Originally Posted by Ataros View Post
If you do not change map you do not have to use battle stop command. Just destroy all unnecessary actors of the previous mission with a script and load new mission.
Are you able to supply a script to destroy all actors please. I'm guessing it will be something like...

using maddox.game.world;

public void DestroyAllActors()
{
for each AiActor a in maddox.game.world
{
a.destroy();
}
}
__________________
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
Reply With Quote
  #5  
Old 11-27-2011, 04:14 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by salmo View Post
Are you able to supply a script to destroy all actors please.
Sorry, I do not have a script which destroys all actors (never used it) but there are some examples in a sticky thread in the FMB section. E.g. I did a timeout OnActorCreated to destroy ground actors in some time.

Last edited by Ataros; 11-27-2011 at 04:16 PM.
Reply With Quote
  #6  
Old 12-09-2011, 10:59 AM
wildwillie wildwillie is offline
Approved Member
 
Join Date: Aug 2010
Posts: 111
Default

Salmo -

This is what I use to destroy actors between missions:

1st create a list to store all the objects at the top of the mission script:
Code:
    private Dictionary<String, AiActor> allActors = new Dictionary<String, AiActor>();
Then I modify the OnActorCreated Script:
Code:
 public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
    {
        #region stats
        base.OnActorCreated(missionNumber, shortName, actor);
        // Add actor to list of all Actors
        if (!allActors.ContainsKey(shortName))
           allActors.Add(shortName, actor);
        try
        {
            stats.newActor(shortName, actor);
        }
        catch (Exception ex)
        {
            System.Console.WriteLine("Stats.OnActorCreated - Exception: " + ex);
        }
        #endregion
    }
Just use the IF statement part. The rest is for my ClodCommander program.

Finally I use the OnBattleStopped trigger to destroy any Actors which have not already been destroyed.

Code:
public override void OnBattleStoped()
    {
        #region stats
        base.OnBattleStoped();
        try
        {
            stats.battleStopped();
            // Loop through list of AiActors and destroy them all
            List<string> keys = new List<string>(allActors.Keys);
            for (int i = 0; i < keys.Count; i++)
            {
                AiActor a = allActors[keys[i]];
                AiAircraft aircraft = a as AiAircraft;
                if (aircraft != null)
                {
                    aircraft.Destroy();
                }
                else
                {
                    AiGroundActor aiGroundActor = a as AiGroundActor;
                    if (aiGroundActor != null)
                    {
                        aiGroundActor.Destroy();
                    }
                    else
                    {
                        System.Console.WriteLine("Stats.OnBattleStoped - Unknown Actor (" + a.Name()+") ShortName ("+keys[i]+")");
                    }
                }
            }
        }
        catch (Exception ex)
        {
            System.Console.WriteLine("Stats.OnBattleStoped - Exception: " + ex);
        }
        #endregion
        //add your code here
    }
Again any code starting with "stats." links to the ClodCommander program.
WildWillie
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 11:26 PM.


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