![]() |
|
CoD Multiplayer Everything about multiplayer in IL-2 CoD |
![]() |
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
![]()
IL-2 Server Master is software that allows you to interact with a mission script while it is running. With this software, you can run portions of your script on demand. Possibilities are many. Let your imagination run wild!
![]() Here is an abridged version of the manual included with the software. Install 1. Extract IL2ServerMasterLibrary.dll to "Steam\steamapps\common\il-2 sturmovik cliffs of dover\". 2. Put the following code in you mission's script. Code:
using System; using System.Collections; using maddox.game; using maddox.game.world; using System.Reflection; using System.IO; public class Mission : AMission { MethodInfo mi; Type classType; object obj; public override void OnBattleStarted() { base.OnBattleStarted(); try { //Load the new DLL from the specified path and set the current method to popCommand(). Assembly a = null; a = Assembly.LoadFrom(Directory.GetCurrentDirectory() + @"\IL2ServerMasterLibrary.dll"); classType = a.GetType("IL2ServerMasterLibrary.ServerMaster"); obj = Activator.CreateInstance(classType, new object[] { "password", 11000 }); //First argument is the password, second is port number. mi = classType.GetMethod("popCommand"); } catch (Exception e) { GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, "Could not load Server Master. :(", null); } } public override void OnBattleStoped() { base.OnBattleStoped(); //Set method to Stop(). Stop the DLL. mi = classType.GetMethod("Stop"); mi.Invoke(obj, null); } public override void OnTickGame() { base.OnTickGame(); //get the command from Server Master string[] command = (string[])mi.Invoke(obj, null); //if command is not null, there is a command to be executed if (command != null) { // Do the command. } } } 4. Start your server with the new script and fire up the included executable. 5. Send a command to your server. If the server receives the command you will get a message next to the "Send Command" button. 6. Write code to actually do something with the commands. ![]() As this is the first release, there may be bugs in it. If you need any help using it or getting it installed, I'd be happy to help. Feature requests are welcome also. ![]() Airwarfare.com Download Last edited by TheEnlightenedFlorist; 05-26-2011 at 04:23 AM. |
#2
|
|||
|
|||
![]()
well done
![]()
__________________
Gigabyte Z68 Intel 2500K (@4.3 ghz)212 CM Cooler 8GB Ram EVGA 660SC (super clocked) 2GB Vram CORSAIR CMPSU-750TX 750W 64 GB SSD SATA II HD WIN7 UL 64BIT |
#3
|
|||
|
|||
![]()
Sorry this hasn't had more attention. We at Syn will be having a look at this and no doubt be back with many questions!
I have one for you now: Will this allow us to rotate to a new mission after a set time without disconnecting all the players? (you know, like we used to do in IL2) One issue we at Syndicate is finding is that whilst having all sorts of scripts is great, every time an AI mission spawns the pings creep up (though we might be doing something wrong). If we can start a new mission every 4 hours or so we could eliminate quite a few of the AI. At the moment we are trying to run a mission that can be left to its own devices for many hours as we have no way of rotating the (whole) missions as we used to do in IL2 unless we restart the server. As such we cram our mission with repeating AI via submissions but we think this essentailly clogs it up. The pings get higher and the loading time gets longer as time goes on. If Server Commander works and allows us to rotate the maps then this should help solve that problem. It would allow us to create a morning, afternoon and evening mission to recreate the daylight hours and have those rotate. The beauty of the scripts of course is we can make endless variations of the same base map. Also, as you say intefeing with the script whilst the mission is in progress opens up all sorts of possibilities I haven't even looked at yet! |
#4
|
|||
|
|||
![]() Quote:
Quote:
Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) { if (Time.tickCounter() % 9000 == 0) { int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length; GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, totalAircraft.ToString(), null); GamePlay.gpLogServer(GamePlay.gpRemotePlayers(), totalAircraft.ToString(), null); } } |
#5
|
|||
|
|||
![]()
Just wondering if this is a typo?
base.OnBattleStoped(); |
#6
|
|||
|
|||
![]()
No, it's misspelled in the code. Most of the devs don't speak English so it's understandable. It's also far too late to change it now.
![]() |
#7
|
|||
|
|||
![]()
Thanks EF,
Its a shame this battle stop business doesn't work. I tried simply typing it into the server DOS box yesterday and the thing just froze! I will try your AI airgroups count code and see if that can shed any light. We did have an improvement yeserday, the pings crept up but then stabilised (I used a different scripting method which I won't go into here). Cheers! |
#8
|
|||
|
|||
![]() Quote:
Just spent about an hour working out how many AI groups should be in the air at a given moment on the mission, so this would be great to compare. Thx |
#9
|
|||
|
|||
![]() Quote:
![]() |
#10
|
|||
|
|||
![]() Quote:
Code:
public override void OnTickGame() { if (Time.tickCounter() % 45000 == 9000) // 45000=25 min repeat. 9000=5 min delay. { // randomly selects 1 of several submissions excluding the recent one Random RandomIncident = new Random(); int CurrentMissionSelected; do { CurrentMissionSelected = RandomIncident.Next(1, 4); } while (LastMissionLoaded == CurrentMissionSelected); LastMissionLoaded = CurrentMissionSelected; switch (CurrentMissionSelected) { case 1: GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_air01.mis"); //GamePlay.gpHUDLogCenter("Intel: Enemy activity is expected at E3!"); //600 initTime = 0.0; Timeout(initTime += 600, () => { GamePlay.gpHUDLogCenter("Attention! Enemy activity is expected at E3!"); }); //600+600 Timeout(initTime += 600, () => { GamePlay.gpHUDLogCenter("Attention! Help is needed at E3/D4!"); }); break; case 2: GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_sea01.mis"); //GamePlay.gpHUDLogCenter("Intel: Cover your shipping at C4!"); //500 initTime = 0.0; Timeout(initTime += 450, () => { GamePlay.gpHUDLogCenter("Attention! Cover your shipping at C4!"); }); //500+300 Timeout(initTime += 300, () => { GamePlay.gpHUDLogCenter("Attention! Ships are under attack at C4!"); }); break; case 3: GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_air02.mis"); //GamePlay.gpHUDLogCenter("Intel: Enemy activity is expected at E2!"); //600 initTime = 0.0; Timeout(initTime += 600, () => { GamePlay.gpHUDLogCenter("Attention! Enemy activity is expected at E2!"); }); //600+300 Timeout(initTime += 300, () => { GamePlay.gpHUDLogCenter("Attention! All fighters please proceed to E2/D3!"); }); break; } } /////////////////////// //loads small submissions w/o messages if (Time.tickCounter() % 216000 == 108000) // 216000=120 min repeat. 108000=60 min delay. { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_small01.mis"); } if (Time.tickCounter() % 216000 == 215999) // 216000=120 min repeat. 215999=120 min delay. { GamePlay.gpPostMissionLoad("missions/Multi/Dogfight/BoF1/BoF1_small02.mis"); } /////////// Counts AI groups on the server. if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) { if (Time.tickCounter() % 9000 == 0) { int totalAircraft = GamePlay.gpAirGroups(1).Length + GamePlay.gpAirGroups(2).Length; GamePlay.gpLogServer(new Player[] { GamePlay.gpPlayer() }, totalAircraft.ToString(), null); GamePlay.gpLogServer(GamePlay.gpRemotePlayers(), totalAircraft.ToString(), null); } } } Code:
[13:05:14] Battle starting...[13:05:14] Server: Battle begins! [13:05:14] ok [13:05:14] Server to [Server]: 4 [13:05:14] [13:05:14] ================================================= [13:05:14] System.IndexOutOfRangeException: Индекс находился вне границ массива. [13:05:14] [13:05:14] Server stack trace: [13:05:14] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.wXZFyNGvcs2(Player[] , Boolean , String , Object[] ) [13:05:14] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.ppDoUYCpY9HF87vxRBGe(Object , Boolean , Object , Object ) [13:05:14] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.0AAFyzF3TVd(Player[] , String , Object[] ) [13:05:14] в UXx9sZjCf3yc9i99GpR.69j9o82zIn0dDNk0dpm.LogServer(Player[] , String , Object[] ) [13:05:14] в maddox.game.GameDef.gpLogServer(Player[] to, String format, Object[] args) [13:05:14] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:05:14] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:05:14] [13:05:14] Exception rethrown at [0]: [13:05:14] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:05:14] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:05:14] в maddox.game.IGamePlay.gpLogServer(Player[] to, String format, Object[] args) [13:05:14] в Mission.OnTickGame() [13:05:14] в maddox.game.ABattle.OnTickGame() [13:05:14] в maddox.game.world.Strategy.OnTickGame() [13:05:14] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:05:14] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:05:14] [13:05:14] Exception rethrown at [1]: [13:05:14] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:05:14] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:05:14] в maddox.game.IBattle.OnTickGame() [13:05:14] в maddox.game.GameDef.tickGame() [13:05:14] в 13yXBRPwF6JbN5OXHZ6.NTKTOgPPsXwbvypIj6k.Z37cRDxFulC() [13:05:14] в RKuLtykUFmi8DgWf36W.9FOhqSkweWrYgooHcsk.neSF4RIW4t3(Boolean , Boolean ) [13:05:14] ================================================= [13:09:43] Server to [Server]: 4 [13:09:43] [13:09:43] ================================================= [13:09:43] System.IndexOutOfRangeException: Индекс находился вне границ массива. [13:09:43] [13:09:43] Server stack trace: [13:09:43] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.wXZFyNGvcs2(Player[] , Boolean , String , Object[] ) [13:09:43] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.ppDoUYCpY9HF87vxRBGe(Object , Boolean , Object , Object ) [13:09:43] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.0AAFyzF3TVd(Player[] , String , Object[] ) [13:09:43] в UXx9sZjCf3yc9i99GpR.69j9o82zIn0dDNk0dpm.LogServer(Player[] , String , Object[] ) [13:09:43] в maddox.game.GameDef.gpLogServer(Player[] to, String format, Object[] args) [13:09:43] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:09:43] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:09:43] [13:09:43] Exception rethrown at [0]: [13:09:43] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:09:43] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:09:43] в maddox.game.IGamePlay.gpLogServer(Player[] to, String format, Object[] args) [13:09:43] в Mission.OnTickGame() [13:09:43] в maddox.game.ABattle.OnTickGame() [13:09:43] в maddox.game.world.Strategy.OnTickGame() [13:09:43] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:09:43] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:09:43] [13:09:43] Exception rethrown at [1]: [13:09:43] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:09:43] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:09:43] в maddox.game.IBattle.OnTickGame() [13:09:43] в maddox.game.GameDef.tickGame() [13:09:43] в 13yXBRPwF6JbN5OXHZ6.NTKTOgPPsXwbvypIj6k.Z37cRDxFulC() [13:09:43] в RKuLtykUFmi8DgWf36W.9FOhqSkweWrYgooHcsk.neSF4RIW4t3(Boolean , Boolean ) [13:09:43] ================================================= [13:09:44] Loading mission ... [13:09:44] Server: A new group of 4 Blue aircraft identified as Ju 87 B-2 was reported in sector >,<. [13:09:44] Server: A new group of 2 Red aircraft identified as Walrus was reported in sector C,<. [13:09:44] Server: A new group of 4 Red aircraft identified as Blenheim I was reported in sector D,<. [13:09:44] Server: A group of Blue 3xDo 215 B-1 just appeared in sector E,4. [13:09:44] Mission loaded. time = 0.180 [13:14:18] Server to [Server]: 8 [13:14:18] [13:14:18] ================================================= [13:14:18] System.IndexOutOfRangeException: Индекс находился вне границ массива. [13:14:18] [13:14:18] Server stack trace: [13:14:18] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.wXZFyNGvcs2(Player[] , Boolean , String , Object[] ) [13:14:18] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.ppDoUYCpY9HF87vxRBGe(Object , Boolean , Object , Object ) [13:14:18] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.0AAFyzF3TVd(Player[] , String , Object[] ) [13:14:18] в UXx9sZjCf3yc9i99GpR.69j9o82zIn0dDNk0dpm.LogServer(Player[] , String , Object[] ) [13:14:18] в maddox.game.GameDef.gpLogServer(Player[] to, String format, Object[] args) [13:14:18] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:14:18] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:14:18] [13:14:18] Exception rethrown at [0]: [13:14:18] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:14:18] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:14:18] в maddox.game.IGamePlay.gpLogServer(Player[] to, String format, Object[] args) [13:14:18] в Mission.OnTickGame() [13:14:18] в maddox.game.ABattle.OnTickGame() [13:14:18] в maddox.game.world.Strategy.OnTickGame() [13:14:18] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:14:18] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:14:18] [13:14:18] Exception rethrown at [1]: [13:14:18] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:14:18] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:14:18] в maddox.game.IBattle.OnTickGame() [13:14:18] в maddox.game.GameDef.tickGame() [13:14:18] в 13yXBRPwF6JbN5OXHZ6.NTKTOgPPsXwbvypIj6k.Z37cRDxFulC() [13:14:18] в RKuLtykUFmi8DgWf36W.9FOhqSkweWrYgooHcsk.neSF4RIW4t3(Boolean , Boolean ) [13:14:18] ================================================= [13:16:54] Server: Bofors murdered the Gunner of a Ju 87 B-2 () (AI). [13:18:48] Server to [Server]: 9 [13:18:48] [13:18:48] ================================================= [13:18:48] System.IndexOutOfRangeException: Индекс находился вне границ массива. [13:18:48] [13:18:48] Server stack trace: [13:18:48] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.wXZFyNGvcs2(Player[] , Boolean , String , Object[] ) [13:18:48] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.ppDoUYCpY9HF87vxRBGe(Object , Boolean , Object , Object ) [13:18:48] в WLxT1kvtHRQOtMZZl62.DRdThMvpbN33CGywFW7.0AAFyzF3TVd(Player[] , String , Object[] ) [13:18:48] в UXx9sZjCf3yc9i99GpR.69j9o82zIn0dDNk0dpm.LogServer(Player[] , String , Object[] ) [13:18:48] в maddox.game.GameDef.gpLogServer(Player[] to, String format, Object[] args) [13:18:48] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:18:48] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:18:48] [13:18:48] Exception rethrown at [0]: [13:18:48] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:18:48] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:18:48] в maddox.game.IGamePlay.gpLogServer(Player[] to, String format, Object[] args) [13:18:48] в Mission.OnTickGame() [13:18:48] в maddox.game.ABattle.OnTickGame() [13:18:48] в maddox.game.world.Strategy.OnTickGame() [13:18:48] в System.Runtime.Remoting.Messaging.StackBuilderSink._PrivateProcessMessage(IntPtr md, Object[] args, Object server, Int32 methodPtr, Boolean fExecuteInContext, Object[]& outArgs) [13:18:48] в System.Runtime.Remoting.Messaging.StackBuilderSink.SyncProcessMessage(IMessage msg, Int32 methodPtr, Boolean fExecuteInContext) [13:18:48] [13:18:48] Exception rethrown at [1]: [13:18:48] в System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg) [13:18:48] в System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type) [13:18:48] в maddox.game.IBattle.OnTickGame() [13:18:48] в maddox.game.GameDef.tickGame() [13:18:48] в 13yXBRPwF6JbN5OXHZ6.NTKTOgPPsXwbvypIj6k.Z37cRDxFulC() [13:18:48] в RKuLtykUFmi8DgWf36W.9FOhqSkweWrYgooHcsk.neSF4RIW4t3(Boolean , Boolean ) [13:18:48] ================================================= |
![]() |
|
|