Jump to content

How can I use the Spawner to spawn Columns with a leader?


Recommended Posts

Posted

I want to be able to spawn full columns of vehicles or planes that follow their leader, no just indivdual vehicles or planes.

 

 

is this possible with the current mission editor?

 

Thanks!  :salute:

Posted

You can't using the spawn command.

 

Spawn = individual

Activate = group

 

You have to set each plane to simulate a flight group.

  • Upvote 2
Posted (edited)

You can't using the spawn command.

 

Spawn = individual

Activate = group

 

You have to set each plane to simulate a flight group.

 

 

 

Oh nice, but can i spawn several combat groups with the same activate command?

 

 

Basiccaly what i want to do is:

 

Every time a train arrives at a station, a convoy spawns and start going towards an airfiled to resupply it.

Edited by 19//SAG
Posted (edited)

As you want an infinite loop, the best way is to use the spawn trigger. But :

 

1- You can use only one Spawn trigger link to all your vehicle.

2- You have to set waypoint and formation for each vehicle. You can't link vehicle like you can do with an activate trigger.

3- You have to use some timer to activate the waypoint to avoid any vehicle crash.

 

For exemple.

 

Timer 01 set to 2 sec and link to the WP1 for the Vehicle 01

Timer 02 set to 4 sec and link to the WP1 for the vehicle 02

 

Be carefull, you cant use the same waypoint for all the vehicle. Each vehicle must have their own waypoint.

 

 

A group which is activate can be activated only once from it's departure.

Edited by Habu
  • Upvote 1
Posted

As you want an infinite loop, the best way is to use the spawn trigger. But :

 

1- You can use only one Spawn trigger link to all your vehicle.

2- You have to set waypoint and formation for each vehicle. You can't link vehicle like you can do with an activate trigger.

3- You have to use some timer to activate the waypoint to avoid any vehicle crash.

 

For exemple.

 

Timer 01 set to 2 sec and link to the WP1 for the Vehicle 01

Timer 02 set to 4 sec and link to the WP1 for the vehicle 02

 

Be carefull, you cant use the same waypoint for all the vehicle. Each vehicle must have their own waypoint.

 

 

A group which is activate can be activated only once from it's departure.

 

 

 

Oh well that seems like it would take a lot of processing power :(

 

Thansk for the tip though :)

Posted

Not so much if you use groups and duplicate it.

 

1- Do a group with 1 vehicles, its waypoint and the timer which is link to the first waypoint.

2- Duplicate the group you mad in 1, change the settings of the timer. Do that for the amount of vehicle you want.

3- Put a spawn trigger, then link it to all the vehicles.

4- Do a group with all the previous elements.

 

 

The point 1 is very important because you are going to duplicate it.

  • Upvote 1
Posted

Not so much if you use groups and duplicate it.

 

1- Do a group with 1 vehicles, its waypoint and the timer which is link to the first waypoint.

2- Duplicate the group you mad in 1, change the settings of the timer. Do that for the amount of vehicle you want.

3- Put a spawn trigger, then link it to all the vehicles.

4- Do a group with all the previous elements.

 

 

The point 1 is very important because you are going to duplicate it.

 

really? awesome ill try that! :D

 

I'm still waiting on my Dserver Key though so itll have to wait :/ untill i can test performance :)

Posted

If you don't understand, or can't build what i describe, i can provide you an exemple. ;)

  • 4 months later...
SAS_Storebror
Posted

Sorry for jumping this thread.

Is there any good reason why formations cannot be spawned?

This limitation is mildly annoying if you e.g. try to setup a training mission where a formation of objects which has been killed completely, should respawn after a certain time.

Furthermore, while the workaround might work to some extent for vehicles, it's completely useless for plane formations, e.g. "V" ones when you want the planes to turn at a certain point.

 

Cheers!

Mike

Posted
1 hour ago, SAS_Storebror said:

Sorry for jumping this thread.

Is there any good reason why formations cannot be spawned?

This limitation is mildly annoying if you e.g. try to setup a training mission where a formation of objects which has been killed completely, should respawn after a certain time.

Furthermore, while the workaround might work to some extent for vehicles, it's completely useless for plane formations, e.g. "V" ones when you want the planes to turn at a certain point.

 

Cheers!

Mike

 

If you spawn a formation, wingmen do not follow commands given to the leader.

SAS_Storebror
Posted

Which essentially means: You cannot spawn formations.

That's a bummer.

The one thing I could see so far is that the "target" link of formation members cannot be set to the leader at runtime.

Should be an easy thing to fix in the game's code, because the way it is right now, it doesn't seem to be quite intuitive.

 

Cheers!

Mike

FS_Fenice_1965
Posted

I agree Mike. That is one of the things I would like to see implemented in future versions.

  • 8 months later...
Posted

Going back to this, is there a way to reset a formation after death of all members? I'm just wondering if any of this behavior has changed since this was last discussed?

SAS_Storebror
Posted

I'm afraid the answer is still the same: You can't.

Formations are a one-time thing, you cannot spawn/reset/re-create them at runtime.

 

:drinks:

Mike

Posted
6 hours ago, Stix_09 said:

Going back to this, is there a way to reset a formation after death of all members? I'm just wondering if any of this behavior has changed since this was last discussed?

 

Within update 3.006.

34. While driving, AI now takes into consideration all nearby vehicles instead of the vehicles of its group only;

 

Using the above you may now be able to fashion a formation of individuals travelling together without having them run into each other if one is incapacitated and blocking a road per se.

Before this update several commands would be needed to stop each individual, delete the stricken vehicle, and restart the column should one of them get damaged or destroyed and are blocking the others. This often would result in unafflicted vehicles ramming their comrade.

 

If it works as advertised this is a good thing and opens up many possibilities for vehicle maneuvering and composition within the ME.

Tip 

  • Thanks 1
Posted
14 hours ago, Stix_09 said:

Going back to this, is there a way to reset a formation after death of all members? I'm just wondering if any of this behavior has changed since this was last discussed?

 

It’s not a matter of behavior, but editor logic. You can’t spawn formations, the end.

 

However you can place a second (or third etc) inactive formation to be activated upon whatever conditions you choose.

Posted
Just now, Gambit21 said:

 

It’s not a matter of behavior, but editor logic. You can’t spawn formations, the end.

 

However you can place a second (or third etc) inactive formation to be activated upon whatever conditions you choose.

 

Ya ok , that's what I thought...just checking to be sure.
thx

I was hoping the game logic would get more work in these updates... currently there is a lot of extra logic having to be applied to work around game logic limits (and bugs) to get it to do what u want it to.

 

I do X game does X+Y or sometimes Z (and I'm having to fix the unwanted y with extra logic) or scratching my head in confusion ?

Posted

Welcome to mission building! ;)

SAS_Storebror
Posted
10 hours ago, Gambit21 said:

you can place a second (or third etc) inactive formation to be activated upon whatever conditions you choose.

 

I've tried that in the past with AI bomber formations, but effectively it would kill the DServer performance when I did so.

Actually the performance impact of the inactive AI bomber formations was almost the same as if they were active all the time.

 

:drinks:

Mike

Posted
58 minutes ago, SAS_Storebror said:

 

I've tried that in the past with AI bomber formations, but effectively it would kill the DServer performance when I did so.

Actually the performance impact of the inactive AI bomber formations was almost the same as if they were active all the time.

 

:drinks:

Mike

I can confirm this.

  • Thanks 1
Posted

Yeah - mp is a different ball game.

  • 4 years later...
ThunderBat
Posted
On 11/20/2018 at 8:09 AM, Gambit21 said:

Yeah - mp is a different ball game.

Does the performance impact of inactive aircraft only apply to Multiplayer servers, or will I be killing my single player performance by having 100 bombers in formations on standby for an infinite takeoff loop. I only plan to activate 5 at once, before the airborne ones are out of sight, deactivated,  and the new group is activated for taxi to the runway

IckyATLAS
Posted (edited)

Deactivating does indeed reduce resources and Cpu/Gpu load but not as deleting. What is deactivated has still to be there to be reactivated at another moment and so you may not see it graphically but it is still in the memory and has to be handled during the code run.

 

Check the test below

Edited by IckyATLAS
Posted

I think Icky gave a good answer. How much it impacts is a bit ambiguous IMO. I haven’t run a test after pasting a huge number of inactive B-25’s or something in a while now. 
 

Maybe Icky has time - I’m up to my eyeballs in DCS builds etc.

 

 

Posted

@Jaegermeister might have run a similar test more recently.

 

 

 

IckyATLAS
Posted (edited)

I run a quick test with 105 HE111-H16 bombers (and also tested with B25) with max bombload (1x SC1000 + 1x SC2500 bombs) all flying the same direction and at 500 mt altitude.

The test is on a sunny cloudless day on the completely empty Velikie winter map . The test is made at full 4K resolution.

The PC  is an Intel 11900K CPU with an Asus Strix OC RTX3090 (non Ti) GPU. Very fast RAM 128 GB.

This test has been run with a 1 minute timer comparison between stopwatch and internal in game timer.

Here are the results :

 

1) Normal situation that is all 105 Bombers flying.

In game Trigger Timer set at 60 sec ----> Stopwatch time 133 sec. That is a time dilation effect by a factor of 220%, a disaster but we knew that already.

The FPS is around 120 stable. This is normal as the bombers are spread over a very large area and so only a few are visible at the same time. It would have been different if you had the 100 of them crammed and visible in the same frame. So here it is only a CPU limitation that has also an effect on display. FPS is 120 but stuttering is terrible. We see here that stuttering and FPS are not related. The CPU cannot deliver enough refreshed data to the GPU. Stuttering here is due to absence of data for a different frame. So the FPS is 120 but the rate at which the GPU receives new different frames (which then translate into visible motion) is probably around 15. In these situation the frame interpolation technologies based on deep learning may improve things and reduce stuttering.

 

2) All the 105 Bombers fly as per 1) but then they get all deactivated after about 15 seconds of flight. The timer is then activated.

In game Trigger Timer set at 60 sec -----> Stopwatch time 60 sec. Time dilation is 0%. Amazing as this completely counter-intuitive and completely contradicts my post above. To be sure I ran a second test this time over 180 seconds to see maybe some difference and the verdict is exactly the same 0% time dilation.

One could add more bombers but this does not make sense here it will not bring more info. The moment the bombers are deactivated then the stuttering disappears completely.

Let's look more into it what happens when you deactivate: the deactivated objects are frozen in space where they have been deactivated. They have no more motion. If yo reactivate them they will be activated exactly where they have been frozen. They retain their links and their description, but after all even for 105 bombers the amount of information kept is very small a few kilobytes at most. Besides refreshing some links a few hundred bytes that may disappear during the running of the mission the rest of the stored data has no change and there is no more a graphical objects generated. We see that this is a rounding error for the 11900K.

 

3) All the 105 Bombers fly as per 2) but then they get all deleted after about 15 seconds of flight. The timer is then activated.

Ingame Trigger Timer set at 60 sec -----> Stopwatch time 60 sec. Time dilation is 0%. This was expected so it is not really a surprise. 

 

I also made a test where I deactivated and then after running the 3 minutes time test I reactivated all the bombers and we went back to the initial situation with stuttering and so on.

 

Finally it is up to you to decide if use deactivation or deletion and spawning. If you activate you can use flights with leader and wingman, you cannot do this with spawning. 

I would say it is good programming to delete whatever will be not used in the mission again. Leaner code is always better.

 

Edited by IckyATLAS
  • Like 1
  • Upvote 2
JG4_Deciman
Posted

So that really confirms the troubles I had in the past, when I used 'spawn/despawn'

for objects connected to any kind of mission logic.

 

Since my latest tries I enable all objects by default,

disable all at mission start (with a short delay)

and only enable what is needed by some logic

 

Player spawnpoints are enabled after all objects were disabled

so the players will enable objects in visible range

and these will check for players in visible range and disable again if no player detected

 

Deci

Jaegermeister
Posted
16 hours ago, Gambit21 said:

@Jaegermeister might have run a similar test more recently.

 

 

 

 

I am not surprised by Icky's findings. It corresponds with what I see in game, but I have not run any technical tests.

 

In scripted missions I follow a few guidelines for reducing time dilation now;

Spawn and delete single AI guns, vehicles and linked objects as much as possible, and as close to the player as possible to minimize the number of active entities.

Only activate and deactivate groups of vehicles like truck or tank columns and trains if they may be reactivated in the mission. Otherwise delete them at the end of their run

Activate and then delete AI formations. If I need them again, I will activate a new duplicate formation.

You have to delete all of them individually, not just the leader.

 

I have discovered (as we all know now) that all deactivated formations remain in memory. If a formation is deactivated within a checkzone for faction, it prevents that checkzone from registering it as out of the zone, rendering it useless unless you delete the formation instead of deactivating it. I believe that is why the mission templates link all the checkzones to specific planes or vehicles instead of factions.

 

Obviously keeping track of the location of lots of deactivated entities will progressively slow down the mission as it continues. 

The key point is to delete when possible instead of deactivating, even with formations.

 

Posted

Yeah I went to mostly deleting things (with some exceptions) before building Havoc.

 

 

  • 4 weeks later...
Posted (edited)
On 5/4/2023 at 3:04 AM, IckyATLAS said:

I run a quick test with 105 HE111-H16 bombers (and also tested with B25) with max bombload (1x SC1000 + 1x SC2500 bombs) all flying the same direction and at 500 mt altitude.

 

..snip...

 

It would be interesting the know the what the threads running in BoX are and what they do.  It's somewhat certain there is a "mission thread" that drives the mission's logic events as defined by the .msnbin file, and that this thread run every 20 usec and must complete all its work in that time period to prevent time dilation (which I'm assuming).  What your test shows is that this thread's execution time is effected by the number of active missions objects, and in this case the average execution time was lengthened to (or possible suspended up to?) 44.33 msec.   I surmise that there is also at least one thread that updates the state data of all the objects in motion, and ideally this thread should be able to run at the FPS of the display so stuttering isn't apparent.  I surmise also there is a rendering thread that uses the current state data for the objects it needs to render to construct/render the entirety of the current video frame.  Lacing these threads together explains the runtime behavior you experienced.  Though solutions to the time dilation problem can be implemented, it'd be helpful if the max limit on the number of active objects before time dilation occurs is known.  Such values would be rough estimates at best, since they'd also be effected by mission's active MCUs and the CPU's compute power.   Perhaps someday I'll mod your test and ramp down the bomber count to find such a max limit for it.  BTW, I've yet to experience time dilation in any of my missions.   They are all small scaled and written to take about 15-30 minutes to complete by me and 2-4 other squad members.

Edited by AcidBath
Posted
On 5/28/2023 at 8:10 PM, AcidBath said:

Perhaps someday I'll mod your test and ramp down the bomber count to find such a max limit for it.

You're welcome to try. The test is yours ? 

The name of the Mission is Test Waypoint but do not bother.

You have two periods. A first period of one minute timer with No bombers to have a reference time with zero time dilation, and then a second one minute timer with the 110 bombers activated. You fly a C47 and the bombers are B25.

 

Test Time Dilation.zip

  • Like 1

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...