![]() |
Tasks & Stats in continuous online campaign
5 Attachment(s)
Here is an online mission which records and/or uploads 768 different events in game. I hope this helps making our online play more fun.
About Mission: There are 4 ai controlled frontlines in which ships and armors try to reach the enemy's base in the same path, base defenses and 2 bomber missions in which Wellingtons and He111s bomb an area between enemy airfields. These continuous missions are inside script and loaded into ram at battle start to reduce loading times. About Gameplay
Everything is written from ground up according to the examples from devs. I have included a balance system based on red75prime from sukhoi.ru's balance code which is modified not to use dictionary for performance and to be compatible with stat collection. For max performance stats processing is done asynchronously in a seperate single thread which sleeps automatically when there's nothing to be done.If you experience lags try lowering stbSr_Worker thread priority in line 140 and/or increasing queue length in line 99. Files must be in the "missions/multi/dogfight/StbVolcanicIslands2/" folder to work. Stats are read back by default (optional) every time server/battle is restarted so collecting dta for a week or month is possible. Different stats like "tasks completed per place enters" or "ace of the week/month" can be variated. More details about campaign can be found in attachment pics and readme.txt, i have also included the visual studio solution in zip so you can benefit from its syntax correction, dont forget to update reference paths of core.dll, gameworld.dll and part.dll in solution explorer's reference folder if you plan to use visual studio solution. All my methods and variables have stb prefix so you can integrate your own code without any worries. You can even integrate the script to another map directly by just setting "all the boolean variables except the ones related to stat collection&balance" to false at the "customizable variables region". Latest version (1.1) is here |
thank you, mate, I'll have a look.
|
Alter Schwede, :-o:-P
I hear what you say, but I don´t understand a word. I wish I could follow your script, above the 5th line... :grin: Anyhow, looks great! :cool: |
Your mission is now running on our test server (III./JG27TestServer) for a try, will report back tomorrow evening (UTZ+2).
|
Quote:
please report any mission related errors you experience from the StbVolcanicIslands2_errorlog.txt |
Here the stats:
http://www.india499.server4you.de/JG...rstats_low.htm Seem to work! :cool: But I have no "StbVolcanicIslands2_errorlog.txt" on the disk, sorry. Do I have to create that file, so it can write into? |
Hi, stillborn!
Thanks a lot for your mission again! Just had a quick look at it. Looks fantastic! I did not see any frontline on the map. I assume it should move depending on tanks progress? Moving frontline gives players incentive to fight harder. Could you please write a very short briefing for the mission explaining what sides can achieve, e.g. moving frontline, capturing some objectives, etc. I think it is important for players to know what they should concentrate on, e.g. if shooting down bombers or destroying ships helps to move frontline. How AI bombers select targets? I would like to have a short description to post on the forums to attract more players to the servers running this mission. BTW. On Repka #3 we added Spit2 to the captured blue airfield. It is a good incentive for everyone to fight for it now. Also I have a small request especially important for this new mission as it has only 4 airfields. Vulching is a big problem for small maps with few airfields. Could you please include a script damaging attacker's plane if someone damages enemy within 1200m diameter and 1000m altitude from an airfield? Maybe you have better idea how to prevent vulching on small maps. What are the balancing rules? Is it progressive like 15 seconds if there are 10% more fighters, 30 seconds if 20% more fighters, 1 minute if 30%, 3 minuted if 40%, etc. or something like this? Could you please include air kill per death, air kill per sortie, current streak, max streak into statistics and same for ground and ship kills? Do I understand you correctly that statistics will be continuous for months and years of the server life? I.e. each pilot's record can be viewed from the very beginning? I did not get what you mean by "Different stats like "tasks completed per place enters" or "ace of the week/month" can be variated." Can not see anything like this in stat sample. Thank you for great code again! PS. What do you think of writing a mission like this one? http://www.adw.alkar.net/en/static/rules/index.html |
Need urgent help, please!
When trying to run the mission on Repka #2 server we get a pop-up window "Can`t open / create file". This prevents server from automatically restarting the mission twice a day as we do with other missions. What could be causing it and can it be fixed? btw. Server has a Russian version of the game and OS (Win Server 2003 x32). Thus system uses comma as decimal separator, not a decimal point. This caused some issues in other missions. BigRepa changed paths in your mission to match x32 version. StbVolcanicIslands2_errorlog.txt is not created either. Edit. Attached is the mission with paths edited for x32 version. Please have a look if it does not miss anything. |
Quote:
the path creation method i used has some hardcoded dumb approach, like this: 1. get the application path => (which is "C:\Users\user01\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\cache" in my computer) 2. crop last 5 chars => ("C:\Users\user01\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\") 3. append "missions\Multi\Dogfight\StbVolcanicIslands2\" to it => ("C:\Users\user01\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\StbVolcanicIslands2\ ") 4. create all the absolute full file names from this => ("C:\Users\user01\Documents\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\StbVolcanicIslands2\ StbVolcanicIslands2_playerstats_low.htm" etc etc) maybe cache folder is named something else in russian version or you have uploaded it to "C:\Program Files (x86)\Steam\steamapps\common\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\StbVolcanicIslands2" instead, sorry i forgot to mention this, but you have a user stat in the file with name "satar" which means all this progress completed correctly and it wrote to the file successfully and you dont have to care about the explanation in the upper paragraph.:grin: Currently my system has a different default CultureInfo too (uses comma as decimal separator). I've created an invariant culture info(en-US) variable and used it in all required string conversions in all threads. So you dont have to worry about different system settings, this is very very low probability but there may be an extra change required because of the Russian game version, cant tell it without testing. just make sure you use ToString(stb_nf) or "ToString(stbSr_nf) in stat recorder class" instead of ToString() if you want to add anything in the future. Quote:
|
The problem is we have to close the pop-up window "Can not read/write file" manually when restarting the mission. Then it works fine.
BigRepa told he had to change paths from "Program Files (x86)" to "Program Files" because server runs x32 version. Could this be a reason? Can it be avoided (no mention of (x86) in path names? |
1 Attachment(s)
Quote:
Quote:
Quote:
Quote:
About different/variated stats: if you stop the battle, move the "StbVolcanicIslands2_playerstats_full.txt" and "StbVolcanicIslands2_playerstats_low.htm" files to another folder manually and restart the battle, it will create the stats from scratch. This way you can archive them daily/weekly or however you like and can give the player with most air kills a nick or award. etc. i'll write an example about the things like "tasks per placeEnters" shortly. |
Thanks a lot for all the answers.
This is how a path to cache looks C:\Documents and Settings\Администратор\Мои документы\1C SoftClub\il-2 sturmovik cliffs of dover\cache This is Russian WinServer 2003 x32, contains Cyrillic letters. Can this cause the problem? |
2 Attachment(s)
Quote:
i dont think its caused by Cyrillic letters, the cs files containing nonstandart chars are saved as utf8 by default unless you force them to save as ascii, i think its the Path.GetDirectoryName(System.Reflection.Assembly.G etExecutingAssembly().Location) command that returns something different in win server 2003. make sure you extracted the modified archive to "C:\Documents and Settings\Администратор\Мои документы\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\StbVolcanicIslands2\ " , not the one inside program files so "StbVolcanicIslands2.cs" file location should be like this: "C:\Documents and Settings\Администратор\Мои документы\1C SoftClub\il-2 sturmovik cliffs of dover\missions\Multi\Dogfight\StbVolcanicIslands2\ StbVolcanicIslands2.cs" |
1 Attachment(s)
here's a file explaining which types of damages goes where in stats htm
|
2 Attachment(s)
Here is version 1.1
Changes:
StbViMission.dll must be in the folder where Launcher.exe is. You can put the "StbVi.cs" and "StbVi.mis" files anywhere you like and run the mission from there. If you want to edit the mission further, visual studio solution for the dll is in the second zip. Please turn on "Cannot Swith Planes" difficulty option when running this mission because Blues can get into He111s by pressing AltF1 but reds cant use Wellingtons. Btw it seems like game only lets me to load dlls from the folder where Launcher.exe is. I used "//$reference StbViMission.dll" for import at the top of the script. "Assembly.LoadFrom" and similar methods work fine but they are useless because i use this dll to define the class type of mission at the top. If you find a way to include folders with "//$reference" or another way to reference a dll from another folder (without editing an xml or ini, just from inside the mission script) please suggest. |
You can give the path the the dll relative to the path with the launcher.exe, for example:
Code:
//$reference parts/il2dce/IL2DCE.Mission.dll |
Quote:
Your example naming seems to be identical to the namespaces you use, maybe i should wrap my custom class in a namespace according to the dlls folder (yes i havent used a namespace). or some kind of default compiler option for my net4.0 runtime is different and messing things up. |
This is really strange.
http://code.google.com/p/il2dce/sour....GameServer.cs I can load assemblies with the following script. However I get a exception because Core is not marked as serializable. Do you have a similar problem and have to mark classes you use within a mission as serializable? |
I guess its good to access "imported objects with //$reference" after everything is loaded and initialized. From what i see things differ a bit before and after the initialization of a mission. For example one strange thing i noticed is: The first version of this mission had "Assembly.GetExecutingAssembly().Location" command inside OnBattleStarted Method, which returned a path with "1cSoftClub" in it but the same command returns the launcher.exe path when used as a variable's default value at the top.
I never had an issue with serializability when both deriving the Mission class from a custom class and when using/accessing another class. if you are not saving your class or another object inside with its current state intentionally, probably something in the process of packing your dll and/or loading it requires serialization, to save or to send it somewhere in memory as a stream, etc. try using alternative approaches when importing/accessing your classes. Hope this helps. Btw i'm just curious, is there a specific purpose of importing gamePlay.dll via //$reference, which is as far as i know, identical to this Code:
using maddox.game; |
I had to import gamePlay.dll because I cast a IGamePlay object to GameDef. GameDef is defined within this assembly and is otherwhise not know. In fact this gives a lot of new possibilities because GameDef has some useful methods (like the Chat event).
With "using" you only don't need to write always the namespace before you access something of it but it doesn't load the assembly. |
wow this is great, will give it a try, thanks a lot!:grin:
|
Code:
|
no matter what i tried i couldnt manage to create a reference to gamedev object, all castings i tried returned null in Init method, probably would get serialization error instead in OnBattleStarted method, since GameDev is abstract and its constructor which the game uses needs an IGameInterface, there must be a way to keep it as a reference with the right type. i guess "as" operator tries to serialize gameplay for conversion. idk if gameplay can be casted like this directly or indirectly. which makes me think devs may have done this to restrict these parts from users. it would be better to ask for a proper way for this, maybe they can include new methods/properties for us in the future to interact more extensively.
|
Did you check if GamePlay is null before the cast?
Basicly you can do the cast using Code:
maddox.game.GameDef game = (maddox.game.GameDef)GamePlay; or Code:
maddox.game.GameDef game = GamePlay as maddox.game.GameDef; I tried both and both did work. Of course I still get the serialization exception. |
Hi, Stillborn!
Is it possible to reduce number of destroyer ships by about 30-50%? We have complains that it is not possible to have dogfights above them due to their uber AAA. BTW some stats from Repka 2 http://r2.repka.su/ Thanks for the mission again! |
Quote:
|
Quote:
|
Thanks Ataros :) overlooked it after searching various forums half the day to my eyes bleeds ;-)
Must get me some stronger glases :cool: |
All times are GMT. The time now is 11:02 PM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright © 2007 Fulqrum Publishing. All rights reserved.