![]() |
|
CoD Multiplayer Everything about multiplayer in IL-2 CoD |
![]() |
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
![]()
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! |
#2
|
|||
|
|||
![]() 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); } } |
#3
|
|||
|
|||
![]()
Just wondering if this is a typo?
base.OnBattleStoped(); |
#4
|
|||
|
|||
![]()
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.
![]() |
#5
|
|||
|
|||
![]()
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! |
#6
|
|||
|
|||
![]() 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 |
#7
|
|||
|
|||
![]() Quote:
![]() |
#8
|
|||
|
|||
![]() Quote:
I will check my timing. This is the only thing in my mission which uses tick counts so perhaps ive missed something... wouldn't be the first time. But yeah there where plenty of AI when it should have run the first time. Will see what I can see. |
#9
|
|||
|
|||
![]() 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] ================================================= |
#10
|
|||
|
|||
![]()
Try this:
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); if(GamePlay.gpRemotePlayers() != null) { GamePlay.gpLogServer(GamePlay.gpRemotePlayers(), totalAircraft.ToString(), null); } } } |
![]() |
|
|