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 > FMB, Mission & Campaign builder Discussions

Reply
 
Thread Tools Display Modes
  #51  
Old 09-27-2011, 07:48 PM
Ataros Ataros is offline
Approved Member
 
Join Date: Jun 2010
Location: USSR
Posts: 2,439
Default

Quote:
Originally Posted by Mington View Post
many thanks for the piece on Visual Studio

Yes thanks Ataros, that's very useful
We should thank TheEnlightenedFlorist actually http://forum.1cpublishing.eu/showpos...&postcount=164

ps. Updated my collection. Hope it is more readable now. http://forum.1cpublishing.eu/showthread.php?t=26523
Reply With Quote
  #52  
Old 09-27-2011, 09:59 PM
klem's Avatar
klem klem is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,653
Default

Quote:
Originally Posted by Mington View Post
....................

I have succeeded in one test module to determine the sector I am in and report it to myself

Nice one, and any code you're working on would be valuable for inspection klem, this ..................

Ming
ok at the risk of being the blind leading the blind (I'm sure Ataros/Kodiak will shout if I am)....

I wanted to find out what sector a Tanker group is in (when I say 'group' I can't find a way to identify a few tankers as a Group, they are just a group to me because thay travel together waiting to be sunk or arrive at their destination). Now, bear in mind I'm new to all this and I'm feeling my way forward with my fingers so there may be better ways of doing it but if any of my Tanker group arrives in a certain "destination" sector it has "arived safely". I want to announce that but I also wanted to call up the grid it is in and Remove all objects in that sector as they are no longer relevant. Of course I know what that sector is but coding actual data like sector numbers into a module is anathema to me so I want the code to find out so that I can re-use the module whenever I like. I haven't got this far yet, I have only just worked out how to use GamePlay.gpSectorName(actor.Pos().x, actor.Pos().y).ToString() :surprise:
For testing I set it in the context of the player entering the cockpit and being told where he is:

public override void OnPlaceEnter(Player player, AiActor actor, int placeIndex)
{
base.OnPlaceEnter(player, actor, placeIndex);
AiAircraft aircraft = actor as AiAircraft;
string sectors = "";
sectors += ' ' + GamePlay.gpSectorName(actor.Pos().x, actor.Pos().y).ToString() + ";";
GamePlay.gpHUDLogCenter(new Player[] { player }, "You are in Sector " + sectors);
}

So now I have to find out how to 'group' the Tankers or maybe work through all Tankers for those in the sector and then how to remove them.

The big plan is to create a mission that runs for a long time, measuring objectives (Tankers home safe or not etc) then start a new phase of the battle without loading a sub-mission (sub-missions cause the phantom dots problem), just send the pilots to rtb within a certain timeframe (or be destroyed), clear all old objects, create new ones and carry on from there.

Its a big project and probably causing the mission experts to wince but its all good learning stuff and if it nevers comes to fruition at least I'll have had an interesting time.
__________________
klem
56 Squadron RAF "Firebirds"
http://firebirds.2ndtaf.org.uk/



ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU
Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders
Reply With Quote
  #53  
Old 09-28-2011, 12:09 PM
Mington Mington is offline
Approved Member
 
Join Date: Apr 2008
Posts: 29
Default

For testing I set it in the context of the player entering the cockpit and being told where he is

Good work klem that works first time

It's amazing that one can simply add your routine to my original lake-trigger and both my trigger and your location-indicator work without problems. I'd have bet that something would go wrong

You've got 'sectors' so I imagine that you can create a 1940 War Room map table one day, with the Toblerone bars and the pretty WAAFs

A group of oilers, are you thinking of Malta <dreaming, more 'one day, one day' stuff> - I'm not sure that they'd figured out efficient convoys in 1940. Oh U-Boats yes and rendezvous for re-fuelling. We're sending in the Sunderlands (just chatting, not entirely serious)

Ming
Reply With Quote
  #54  
Old 09-28-2011, 12:55 PM
SNAFU SNAFU is offline
Approved Member
 
Join Date: Feb 2011
Posts: 324
Default

Nice script lines, Klem. Very usefull, while mission testing. Could also be used for OnPilotBailedOut to direct SAR operations to the pilot.

Quote:
Originally Posted by klem View Post
(sub-missions cause the phantom dots problem),
How do you know that? I also have experienced phatoms, while simply testing missions. In observation, this is a lag problem, because only objects are rendered in your viewing distance (you can see this while switching through external view, that only the objects are rendered, which are somewhat close to you). At some point the game stopped rendering an object, because a player left or got out of sight. Another player gets in range of the drawing distance of the object and the game starts calculating the new position of the object, but lost it somewhere, because of high work load in the net transmission. I think that is hard to explain for me, but easily observed with AI travelling tankers. Put enough of them in a group and start out of sight, get close to them and they will appear as ghostships, fist the dot, then grwoing but then suddenly gone and only the smoke of the funnel is still there.

PS: I think Blis removed all submissions from ATAG Server and only loads AI via CMD - and he still has the Ghost-Syndrom on the server.
__________________
http://cornedebrouwer.nl/cf48e

Last edited by SNAFU; 09-28-2011 at 01:20 PM.
Reply With Quote
  #55  
Old 09-28-2011, 07:36 PM
klem's Avatar
klem klem is offline
Approved Member
 
Join Date: Nov 2007
Posts: 1,653
Default

Quote:
Originally Posted by SNAFU View Post
Nice script lines, Klem. Very usefull, while mission testing. Could also be used for OnPilotBailedOut to direct SAR operations to the pilot.



How do you know that? I also have experienced phatoms, while simply testing missions. In observation, this is a lag problem, because only objects are rendered in your viewing distance (you can see this while switching through external view, that only the objects are rendered, which are somewhat close to you). At some point the game stopped rendering an object, because a player left or got out of sight. Another player gets in range of the drawing distance of the object and the game starts calculating the new position of the object, but lost it somewhere, because of high work load in the net transmission. I think that is hard to explain for me, but easily observed with AI travelling tankers. Put enough of them in a group and start out of sight, get close to them and they will appear as ghostships, fist the dot, then grwoing but then suddenly gone and only the smoke of the funnel is still there.

PS: I think Blis removed all submissions from ATAG Server and only loads AI via CMD - and he still has the Ghost-Syndrom on the server.
Fair comment SNAFU. I was told that by someone several weeks ago (was it one of the ATAG guys? Can't remember). It could be wrong. Anyway they are still around

We seem to be short of objective-based missions and my main idea was to have a rolling battle without stopping/loading missions but 'clean out' and 'create new' objectives. I know its a tall order especially for someone who doesn't know how to do all that yet. Lets just call it 'optimistic vision' The general idea is a 'phase' of say 3 hours during which perhaps convoys try to reach objectives (sector x,y). The phase ends when either all/75%(?) convoys have been sunk or have reached their destination sector = win/lose for one side or other or a stalemate at mission timeout. Includes say a 10 minute end period for all players to rtb or be destroyed, followed by a period of cleanout/rebuild while they wait in the briefing room and then a call to re-enter the mission. A 'new day' if you like. Could be a couple of phases of convoys then a couple on coastal airfields/radar then on inland airfields then London all with 'countable' objectives. Victory would go to the LW if they achieved enough objectives or to the RAF if during the whole Battle they prevented the LW from achiewvinbg their goals. Of course if the LW succeed/fail at a phase it calls for different next-phase objectives. I am assuming different .cs scripts can be 'called' depending on results or just a massive multi-branch script.

OK so I am still at the bottom of the ladder, perhaps dreaming and it would need a lot of help but... just maybe....

...and of course, if it can't work, I know ATAG have found a way to automate mission changeovers by loading new missions. I think they could add the 10 minute rtb period though
__________________
klem
56 Squadron RAF "Firebirds"
http://firebirds.2ndtaf.org.uk/



ASUS Sabertooth X58 /i7 950 @ 4GHz / 6Gb DDR3 1600 CAS8 / EVGA GTX570 GPU 1.28Gb superclocked / Crucial 128Gb SSD SATA III 6Gb/s, 355Mb-215Mb Read-Write / 850W PSU
Windows 7 64 bit Home Premium / Samsung 22" 226BW @ 1680 x 1050 / TrackIR4 with TrackIR5 software / Saitek X52 Pro & Rudders
Reply With Quote
  #56  
Old 09-28-2011, 08:22 PM
SNAFU SNAFU is offline
Approved Member
 
Join Date: Feb 2011
Posts: 324
Default

I hear you klem. I started with the same idea more or less. But I also wanted to rebuild history as far as possible.

But then I hit the reality and the limitation of performance. If you want to have it all on one map at the same time, the loading time raises immense. I for example put on every historically used airfield of a single given day of July AA emplacements, AA and tents and added a tower. Loading time was ok, as long as there is no plane on the map. But as soon as you have objects and planes, it took 20 minutes to connect to the server. I started with 16.000 objects I ended up with 1.200 objcts and now I have connecting times below 20 sec if there are less than 16 planes in the air, and 4 minutes as soon as I have 36 planes in the air, which is ridicoulus for rebuilding something which should simulate the battles of August, well, for July it is somewhat ok.

We now have 11 objective orientated missions (rebuild from the daily reports of the days around the mid of July) in the loop and the player has the option to start a mission via the menu, when ever he likes, with the restriction of 1 mission per hour. The instrucitons are quite clear and simple and there is only one objective per mission, so all players focus on that one, if the want . The teams get points for success and points for air kills and ground kills, these points can trigger other events or can be used as win conditions (thats what we are working on at the moment). I found that is the best compromise, between rebuilding history and playability. The main restriction we have is the performance and the connecting time, that`s a pitty, because the scripting opens so many options and ideas.
__________________
http://cornedebrouwer.nl/cf48e
Reply With Quote
  #57  
Old 09-28-2011, 09:07 PM
SNAFU SNAFU is offline
Approved Member
 
Join Date: Feb 2011
Posts: 324
Default

I found this somewhere a while ago and just changed the timer for the AIAircraft:

Code:
public override void OnTickGame()
	{
   double initTime;    
		
    if (MissionTimer1M1.Elapsed.Minutes >= 59) 
		{
		MissionTimer1M1.Restart();
		foreach (int army in GamePlay.gpArmies())
            {
                foreach (AiAirGroup group in GamePlay.gpAirGroups(army))
                {
                    if (ActorName.MissionNumber(group.Name()).Equals(MissionNumber)) // Zeile L schen wenn auch AAA entfernt werden soll
                    {
                        AiActor[] members = group.GetItems();
                        for (int i = members.Length - 1; i > -1; i--)
                        {
                            (members[i] as AiAircraft).Destroy();
                        }
                    }
                }
               
    
			}
		}
	}
			
			//////////////////////////////////////////////////////////////////////////////////////////////////

    //Ground objects (except AA Guns) will die after 55 min when counted from their birth
public override void OnActorCreated(int missionNumber, string shortName, AiActor actor)
    {
        base.OnActorCreated(missionNumber, shortName, actor);
        if (actor is AiGroundActor)
            if ((actor as AiGroundActor).Type() != maddox.game.world.AiGroundActorType.AAGun)
                Timeout(3599, () =>
                {
                    if (actor != null)
                    { (actor as AiGroundActor).Destroy(); }
                }
                        );
    }
Note that you need to set the MissionTimer1M1 Stopwatch accordingly, f.e. in the OnBattleStarted-Section of you script:

using System;
using maddox.game;
using maddox.game.world;
using System.Collections.Generic;
using System.Diagnostics;

public class Mission : AMission
{
Stopwatch MissionTimer1M1 = new Stopwatch();

public override void OnBattleStarted()
{
base.OnBattleStarted();

MissionNumberListener = -1;
}
...
..
.


I found some issues with removing of the AI Airplanes, but these will be removed after landing by the standard remove-Ai-after-player-leaving script, so I left it that way. For ground units it works well.
__________________
http://cornedebrouwer.nl/cf48e
Reply With Quote
  #58  
Old 09-28-2011, 11:47 PM
_79_dev _79_dev is offline
Approved Member
 
Join Date: Sep 2010
Location: Dublin
Posts: 242
Default

~S~

As far as I know all missions are looped even though if I want load that mission once and throw into it all the static objects and etc. just to avoid ghosts... so what will You have to do at the very end is...restart the server...and don't allow it to loop mission. This seems to be very complicated. Klem if You want to create very long scenario we gonna have to first find out what are this "ghosts"... at least few months (hope I'am wrong)...

How about to use Klems script to indicate sector, then check if there is any action or plane or whatever in that given sector and after all use trigger to spawn artillery for example or remove objects to minimise amount of statics on the server?
__________________

Asus P6T V2 Deluxe, I7 930, 3x2 GB RAM XMS3 Corsair1333 Mhz, Nvidia Leadtek GTX 470, Acer 1260p screen projector, Track IR 4 OS ver5, Saitek Pro Flight Rudder, Saitek X52, Win 7 x64 ultimate
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 09:13 PM.


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