![]() |
IL-2 Server Master v1.0
1 Attachment(s)
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! :-P
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; 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. :) My code returns commands in an array of strings. The string at position zero is the command, the rest are the arguments. It returns null if there are no commands to be executed. There is an example of how to get a command in the above code. 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 |
well done:) this looks very promising
|
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! |
Quote:
Quote:
Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) |
Just wondering if this is a typo?
base.OnBattleStoped(); |
Quote:
|
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! |
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 |
Quote:
|
Quote:
Code:
public override void OnTickGame() Code:
[13:05:14] Battle starting...[13:05:14] Server: Battle begins! |
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. |
Try this:
Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) |
Code:
[13:45:21] ================================================= |
Wait, are you running it on a dedicated server? If so, try this. Otherwise, I'm out of ideas. :(
Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) |
Sorry, same
Code:
[14:02:10] System.IndexOutOfRangeException: Индекс находился вне границ массива. |
Alright, one more try.
Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) |
For testing i am running a dedi server and joining it with a client from the same PC. I got error messages before joining the server.
It would be nice to have it working on a dedi server. Will try the latest version later. Thank you for your input. |
Quote:
|
Your efforts are appreciated...as for me, I haven't a bloody clue! Im just muddling along trying to get a mission to work!
Thanks |
Now it is better.
It says "maddox.game.Player" does not contain definition for "Length" Code:
[20:55:59] ================================================= |
Alright, I finally have a solution. This won't send a message to the server, but it will appear in the server logs as something like "server to [username]: ". It will appear every five minutes for everybody connected to the server. You can decrease the time interval by changing 9000 to a lower number.
As a reminder, this code goes in the OnTickGame() method and both sides have to have at least one aircraft. I hope this helps. :grin: Code:
if (GamePlay.gpAirGroups(1) != null && GamePlay.gpAirGroups(2) != null) |
Quote:
This error occurs when you try to call a method or access a class member that does not exist. |
Quote:
My latest snippet of code should work though. ;) |
Thanks a lot again! I'll install it tomorrow when I am at my gaming PC.
|
Mate, you're using the log to read the commands, or you've found a beter way?
|
This is an awesome project; please make it open source so others can contribute.
|
Quote:
|
2 Attachment(s)
Quote:
Also, it turns out there's a much easier way to reference the dll than using reflection. Code:
//$reference IL2ServerMasterLibrary.dll Code:
ServerMaster master = new ServerMaster("pass", 27340); |
Quote:
|
Quote:
You might also use kegetys' way to have a dll loaded at the start of the game. |
It works. It looks in the root directory of IL-2. Maybe it would make more sense if it were:
//$reference parts/ServerMaster/IL2ServerMasterLibrary.dll |
but isn't that line actually a comment? or you just meant it as a comment to show the path were it will look for the dll..
|
Technically, yes. IL-2 is obviously using it to reference the external dll before compiling the script. How that is done is beyond me.
|
Some parsers will read the first line, even if it's commented. Example: unix shell scripts.
|
obviously they must have a parser which seems to look even after // chars for special words (as $reference).
|
There is another keyword that can be placed within the mission script:
Code:
//$debug |
Tried this yesterday and it worked when I used my client to run as a server. Was able to send the "Test" command and got Received back.
When I tested this on our Dedicated server it did not work. (Dedicated server uses Win 2008 Server OS (64bit) The 1st problem I found and modified to work for me was in the code where you create the socket. New code I had to change the ipAddress.AddressFamily piece. Code:
// Create a TCP/IP socket. Any Ideas ? WildWillie |
Quote:
I would think no by your example, but I get the following error in my server log when the above code is used instead of the "Reflections" stuff. Code:
================================================= Here is the 1st part of my mission script: Code:
using System; WildWillie |
All times are GMT. The time now is 12:50 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.