Official Fulqrum Publishing forum

Official Fulqrum Publishing forum (http://forum.fulqrumpublishing.com/index.php)
-   FMB, Mission & Campaign builder Discussions (http://forum.fulqrumpublishing.com/forumdisplay.php?f=203)
-   -   Online Dynamic Campaign with Script (http://forum.fulqrumpublishing.com/showthread.php?t=23129)

steam 06-30-2011 11:36 AM

add some flaks
 
Hi.
I ask you to put a lot of anti-aircraft guns at airports so that they can be used for cover from enemy attacks on its territory and prevent voulching.

Skoshi Tiger 07-03-2011 03:16 AM

Quote:

Originally Posted by Ataros (Post 287594)
btw. There is a Break command there. What does it break?

The break statement terminates the closest enclosing loop or switch statement in which it appears. Control is passed to the statement that follows the terminated statement, if any.

Is this the break you are talking about?

Quote:

//check if there is any player inside
foreach (Player p in ps)
{
if (p != null)
{
if (p.Place() != null)
{
AiAircraft playerAircraft = (p.Place() as AiAircraft);
if (playerAircraft != null)
{
if (playerAircraft == aircraft)
{
aircraftWillBeDestroyed = false;
break;
}
}
}
}
}
I think the break statement will drop out of the foreach loop. As far as I can see the purpose of the code is to see if any of the planes contained in array ps have a player inside. If any of the array locations contains a player then the loop does not have to continue.

The next section of code checks 'aircraftWillBeDestroyed' if player is present then this is set to false and the section that destroys the aircraft will be skipped.


Cheers!

stillborn 07-07-2011 04:24 PM

Quote:

Originally Posted by Skoshi Tiger (Post 305087)
The break statement terminates the closest enclosing loop or switch statement in which it appears. Control is passed to the statement that follows the terminated statement, if any.

Is this the break you are talking about?



I think the break statement will drop out of the foreach loop. As far as I can see the purpose of the code is to see if any of the planes contained in array ps have a player inside. If any of the array locations contains a player then the loop does not have to continue.

The next section of code checks 'aircraftWillBeDestroyed' if player is present then this is set to false and the section that destroys the aircraft will be skipped.


Cheers!

yes the break u mention here interrupts the foreach loop because we found a player inside the plane queued for destroy and there is no need to check other players,this will be a waste of time, there is possibly someone else entered this plane in the meantime and the plane must not be destroyed, i set a boolean value (aircraftWillBeDestroyed) to hold the result because the code continues to execute after foreach loop according to this result.

lol no, sorry i misunderstood, its the "break command" (key command) set in options-controls-builder, exits free view mode in fmb and deselects current object, could be handy if you fine tune the positions of objects in free view mode a lot, by the way this is what i use it for, may be intended for something else.

stillborn 07-07-2011 10:41 PM

5 Attachment(s)
here is version 1.1

changes:
  • fixed script errors at onactorcreated methods preventing removal of destroyed ship hulls and campaign progress

  • added aa guns to prevent voulching(optional, respawns each 5mins by default)
    *not available at capturable airfields because it will prevent mission progress
    if you find aa guns insufficient please suggest a good combination, i didnt put 2cm guns because their combined explosion effects causes shutters and slowdowns

  • added radius_hide value to all aa guns to prevent ships and base defenses fire on taking off enemy aircrafts, yes unfortunately map is too small, sticked with tanker+aa for the same reason, ships dont have a radius_hide option

  • raised onboard guns of ships by 2m to prevent collision

  • changed available aircrafts

    Reds:
    Aircraft.HurricaneMkI_dH5-20
    Aircraft.HurricaneMkI
    Aircraft.SpitfireMkI_Heartbreaker
    Aircraft.SpitfireMkI
    Aircraft.SpitfireMkIa
    Aircraft.BlenheimMkIV

    Blues:
    Aircraft.G50
    Aircraft.Bf-109E-1
    Aircraft.Bf-109E-3
    Aircraft.Bf-110C-4
    Aircraft.Ju-87B-2
    Aircraft.Ju-88A-1

    Both on captured airfields

  • added error logging (optional) to desktop (works on a seperate lower priority thread)

  • added campaign status saving (optional) to desktop (works on a seperate lower priority thread), main mission will resume from where it's left on server restart.

  • added new airfield points and changed airfield radius to make use of game's own cleanup system

  • campaign now reverts back by 1 mission when invading ground forces are destroyed

dgw_iod_v1_1(3aa_on_ships).zip has two extra guns to protect ships on the move, one Zwillingssockel, one Bofors, these are short range and does not engage ships

Extract the archive to "missions/Multi/Dogfight/" and launch main mission from dgw_iod_v1_1 folder.

Skoshi Tiger 07-08-2011 02:46 AM

Quote:

Originally Posted by stillborn (Post 306514)
lol no, sorry i misunderstood, its the "break command" (key command) set in options-controls-builder, exits free view mode in fmb and deselects current object, could be handy if you fine tune the positions of objects in free view mode a lot, by the way this is what i use it for, may be intended for something else.

Which just goes to show that great minds can think in completely different ways and go off on completely different tangents! ;)

Thanks for the clarification!

Cheers!

Ataros 07-08-2011 10:25 AM

1 Attachment(s)
Quote:

Originally Posted by stillborn (Post 306589)
here is version 1.1

Thanks a lot, stillborn! Your mission is the most popular in the CloD world right now I think.

Quote:

added campaign status saving (optional) to desktop (works on a seperate lower priority thread), main mission will resume from where it's left on server restart.
How can we activate this option?

As we experienced issues with team balance red75prime from sukhoi.ru forums added a balancing script to the previous version of your mission. Please find it attached. I hope he will include it in the recent version as well.

Edit
Quote:

yes unfortunately map is too small, sticked with tanker+aa for the same reason, ships dont have a radius_hide option
It may be interesting to have the warships placed at the outside of islands as targets for bombers only if it is possible. This way they hopefully won't reach airfields with gun fire.

From my experience 2-3 20mm per airfield is fine. Also there is a German recon car #202 IIRC (the only one which can fire upwards) and it is the most efficient AA weapon used on Repka#1 atm.

stillborn 07-08-2011 06:13 PM

1 Attachment(s)
thanks for the tip, i'll look into the code you sent and see if there's anything i can do, the loops i use for player checks may be a bit slow if there are too many players in the server but they are designed to work with all available options, for a fixed server settings, the same things can be done much more efficiently, for example if the server is set not to show aircrafts in the map and set not to allow players to enter currently flying aircrafts than an "onplaceleave event" can be directly connected to a "destroy attempt" after a simple check for other seats(places) in this aircraft, which will be more robust compared to checking all players.

Quote:

Originally Posted by Ataros (Post 306669)
How can we activate this option?

all optional features are on by default, to disable you need to set the "isLogCampaignStatus" boolean values at the beginning of the script(in all files)

Quote:

Originally Posted by Ataros (Post 306669)
It may be interesting to have the warships placed at the outside of islands as targets for bombers only if it is possible. This way they hopefully won't reach airfields with gun fire.

i had prepared a new mission in a bigger map (volcanic islands), i think it will be more suitable for 40+ players, does not have anything dynamic yet, juts refreshes aa guns and ships periodically, has the same code layout with dgw. the thing i like about this map is the bases are behind hills so preventing voulching is easier and does not interfere with mission related objects thus any kind of mission will suit better, also has plenty of neutral space for dogfight. i'll try to prepare a dynamic bomber mission series for this one.

Ataros 07-08-2011 07:58 PM

Speaking of bomber missions I remember naryv (one of the dev team) included very interesting code in this script http://forum.1cpublishing.eu/showpos...&postcount=133 The code dynamically assigns the most close ground target as a waypoint for bombers to attack.

Also I had an idea for airfields capture mission where objectives are
1) clear all AAA at an airfield - several bombing runs
2) drop paratroopers over the field - different bomber flight with paratroopers dropped over field (if possible)
3) then another 2-3 aircraft has to land on the airfield to deliver supplies and finally capture it.

This scenario can be interesting because stopping bombers has some practical meaning for players in it. Islands map ideally fits this type of scenario I think.

Feel free to use the idea if you like it.

Ralith 07-27-2011 11:41 PM

Nice job on this mission! It's a lot of fun to play (I spend almost all my MP time on Repka 3 thanks to it), and a great improvement on the bland objectiveless dogfights that used to characterize IL-2. I look forward to further developments! Much respect for wading through the APIs and producing something of quality despite the utter lack of documentation and rarity of reference material.

One comment: If you down your plane on top of an enemy airfield, but don't crash so badly that you're completely destroyed, the AA will fire at your mangled plane for some time, even after your crew is long dead and you've respawned into another aircraft. Not only does this lessen the firepower available to engage actual threats to the airfield, it presents a massive friendly fire hazard to planes taking off or landing there. Would there be some way to get the AA to disregard the target once the crew is dead?

stillborn 07-28-2011 05:27 PM

Quote:

Originally Posted by Ataros (Post 306669)
As we experienced issues with team balance red75prime from sukhoi.ru forums added a balancing script to the previous version of your mission. Please find it attached. I hope he will include it in the recent version as well.

Quote:

Originally Posted by Ataros (Post 306914)
Speaking of bomber missions I remember naryv (one of the dev team) included very interesting code in this script http://forum.1cpublishing.eu/showpos...&postcount=133

Thank you so much Ataros for the samples and links, they were very useful, i have created a new mission as a successor to DGW which is written from ground up. (link:http://forum.1cpublishing.eu/showthread.php?t=24954)
It does not have af capture ability yet but can be added after the fix for refreshing online briefing page is released.

Quote:

Originally Posted by Ralith (Post 315936)
One comment: If you down your plane on top of an enemy airfield, but don't crash so badly that you're completely destroyed, the AA will fire at your mangled plane for some time, even after your crew is long dead and you've respawned into another aircraft. Not only does this lessen the firepower available to engage actual threats to the airfield, it presents a massive friendly fire hazard to planes taking off or landing there.

Thanks Ralith, the new mission linked above addresses this issue by removing place leaved planes instantly in a 1000m diameter, 10m height cylinder at the center of airfields.


All times are GMT. The time now is 09:28 PM.

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