Jump to content

Recommended Posts

Posted

I couldn't really find much help for scripting spawning aircraft into parking spaces hot. So I decided to document what I have found for others. I have only tested this on the Nevada Map. For other maps your results may vary.

 

First take note of an airbase in mission editor. When you zoom in you will see the particular parking spaces listed for each airfield on the map.

 

Of these parking spaces not every aircraft type can park in every space. This is true in mission editor and also true via scripting. You can use the mission editor to find available spaces for a particular aircraft type by creating an aircraft type take of from parking hot. There is a drop down of available spaces.

 

There are two parking variables available for the groupData ["units"]. These are ["parking"] and ["parking_id"] both can be used for parking in a desired space. The friendlier one is ["parking_id"]. Use it like this:

 

["parking_id"] = "G20"

 

The value for ["parking_id"] uses the same value that is printed on the map in the Mission Editor. If the aircraft can be park in the space in Mission Editor, you can park in that space via scripting when you assign ["parking_id"] the same value.

 

The other variable ["parking"] is numeric and matches a ["parking_id"] as printed on the map in mission editor. For instance the variable ["parking_id"] = "G20" , might be the same parking space as ["parking"] = 185 . Use either one of these variables or both. The variable ["parking"] seems to take precedence if you include both. You can find these ["parking"] numbers by parking an aircraft in the mission editor in the desired space, saving, and then opening the mission script file inside the .miz file to find the value.

 

A couple of things that tripped me up which might help you.

 

Spawing Incrementally.

 

Don't even bother trying to spawn a group of similar aircraft by incrementing the variable ["parking"] + 1. This fails because the ["parking"] spaces on a given airbase probably are not sequential for a given type of aircraft. If you do this, unexpected behavior will result. The way I solved spawning a group of same type aircraft is to create a table of known available parking spaces and increment over it to spawn the aircraft:

 

parkingMap = { "E13" , "03" , "02" , "01" , "06" , "F163" }

 

["parking_id"] = parkingMap[1] , etc

 

Only One Time

 

I have found you can only spawn aircraft into a given parking space one time. For instance if you created the above table parkingMap, then you decided to iterate over that table multiple times to repeatedly spawn aircraft. This will fail because you cannot keep spawning into ["parking_id"] = parkingMap[1] multiple times. If you do this, you will experience the next concept.

 

The Main Ramp

 

If you spawn an aircraft into the same space twice or use a ["parking_id"] or ["parking"] value that does not exist, the aircraft will spawn into the parking space which I am calling the "Main Ramp". Every airbase has a Main Ramp and its location is different on each airbase. Every aircraft "seems" to be able to spawn to the Main Ramp on every airbase regardless of the length of the runway. I found some airbases with Main Ramps that are actual ["parking_id"] spaces which you can also spawn repeatedly into. Other Main Ramps might just be the approach end of the runway or a taxiway.

 

You can use the Main Ramp to spawn aircraft repeatedly into the same spot. For example if you were to iterate over the above table parkingMap a second time, every subsequent spawn will be to the Main Ramp. This behavior happens regardless of what value you assign to ["parking_id"] when you attempt to spawn a second time in the same space.

 

Stacking Aircraft.

If nothing is blocking their way aircraft will start to move 20 second after spawning. If you stack aircraft on the Main Ramp or something is blocking their way as they spawn, aircraft won't queue up and pull out one by one. If you stack multiple spawns on the Main Ramp, as soon as an aircraft moves there will be a crash. Remaining spawns will just stack up and nobody moves, just like ORD.

 

Only So Many

Some aircraft types have a lot of available parking spaces, others not so many. Too many waiting or taxing aircraft will just gum up the works. Eventually nobody will move, just like ORD.

 

Hope that helps!

Posted (edited)

It would really help if we could get a function for that, especially now that 2.5 Caucasus uses the same parking ID method. The ME knows so i bet there's a function for that already under the hood. Could be as simple as:

 

parking=getParking(AirfieldID, AircraftType)

 

AI spawning was already causing issues on NTTR and now it's available on Caucasus as well. Hope some function can be added, or documented if it exists already, ASAP.

Edited by Coug4r

-

If man were meant to fly he'd be filled with helium.

Posted

I need to spend some time testing this out thoroughly. At least on previous builds of the game you could spawn aircraft without specifying a ramp position and it'd mostly give each a unique spot. Mostly being the operative word as a few spots resulted were more prone to allowing multiple aircraft to spawn there.

 

After a quick test on NTTR I noticed multiple flights spawned on top of each other and they spawned in completely different locations than expected. Previously it'd spawn at spots with the shortest taxi distance to the active runway. The recent test had all the spawns near the aircraft I was copying. But it was copying parking info so maybe that broke it. Or maybe its actually taking the parking Id into effect now.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

Thanks for testing this, it's been an issue since open alpha. Pretty much the main reason why i hardly ever hosted on OA, you don't want AI aircraft spawning on top of eachother or on players or in the middle of the runway when players take off and land.

-

If man were meant to fly he'd be filled with helium.

  • 2 weeks later...
Posted

I hope we're gonna see some solution/fix for this. Spawning AI from a ramp start from script may now result in:

 

iHhXh7KiHhXh7KiHhXh7K.jpg

t366Sf1.jpg

C9AQj5n.jpg

GKfKPdt

-

If man were meant to fly he'd be filled with helium.

Posted

I saw the spawning in reverse on runway due to this bug: https://forums.eagle.ru/showthread.php?t=202136

 

Specifically a static object was placed on the nearest spawn point. Removing the static object or changing it to an uncontrolled AI fixed the issue. Best guess is it tries to find the nearest parking and it couldn't account for static objects or anything other than uncontrolled AI starting at a given spot.

 

The E-3 at Batumi is probably happening because there is no valid parking for an aircraft of that size to begin with at that base. Donno whats going on at Gudata and Kras-P (guessing) with those spawns.

 

Gonna spend some time this week on this.

The right man in the wrong place makes all the difference in the world.

Current Projects:  Grayflag ServerScripting Wiki

Useful Links: Mission Scripting Tools MIST-(GitHub) MIST-(Thread)

 SLMOD, Wiki wishlist, Mission Editing Wiki!, Mission Building Forum

Posted

E-3 is valid at Batumi, there's even 2 parking spots for it. Apart from Soganlug you can spawn big aircraft anywhere from script without a problem on 1.5, hope we can get the same on 2.5. Thanks for checking it out!

  • Like 1

-

If man were meant to fly he'd be filled with helium.

Posted
E-3 is valid at Batumi, there's even 2 parking spots for it. Apart from Soganlug you can spawn big aircraft anywhere from script without a problem on 1.5, hope we can get the same on 2.5. Thanks for checking it out!

+1

 

 

https://forums.eagle.ru/showthread.php?p=3408453

A warrior's mission is to foster the success of others.

i9-12900K | RTX 4090 | 128 GB Ram 3200 MHz DDR-4 | Quest 3

RAT - On the Range - Rescue Helo - Recovery Tanker - Warehouse - Airboss

Posted

Sorry to interject, but is this "parking hot" an actual word or is it a typo of "parking lot" I think i've reported it a long time ago.

 

Are you sure it's not a typo?

 

The first hit in search engine is an xxx rated adult website ... and then half of all the results are like that.

Modules: A-10C I/II, F/A-18C, Mig-21Bis, M-2000C, AJS-37, Spitfire LF Mk. IX, P-47, FC3, SC, CA, WW2AP, CE2. Terrains: NTTR, Normandy, Persian Gulf, Syria

 

Posted

"parking hot site:eagle.ru" is what you want to type into Google, don't risk anything else.

Parking hot, not sure where the term came from, since I don't know why this is different from spawning them into parking cold either, as in "hot/cold start"?

Sorry to interject, but is this "parking hot" an actual word or is it a typo of "parking lot" I think i've reported it a long time ago.

 

Are you sure it's not a typo?

 

The first hit in search engine is an xxx rated adult website ... and then half of all the results are like that.

___________________________________________________________________________

SIMPLE SCENERY SAVING * SIMPLE GROUP SAVING * SIMPLE STATIC SAVING *

Posted

Hot vs lot is not a typo. The term "parking hot" comes from both the mission builder and scripting. It means engines running.

 

In the mission builder if you spawn an aircraft "Take off from parking hot". The aircraft spawns with engines running from the parking space you specify and will taxi to takeoff. If you spawn "Takeoff From Ramp" the aircraft spawns from the main ramp, starts it engines and then will taxi. You can't spawn aircraft with engines not running from parking in mission editor. You also cannot spawn engines running from the ramp in the mission editor.

 

Via scripting you specify engines running or not and parked or on runway in the first waypoint.

 

To spawn with engines running at parking:

 

["route"] = {["points"] = {[1] = {

["action"] = "From Parking Area Hot",

 

To spawn with engines not running at parking:

 

["route"] = {["points"] = {[1] = {

["action"] = "From Parking Area",

 

To spawn from the runway with engines running:

 

["route"] = {["points"] = {[1] = {

["action"] = "From Runway",

 

When you spawn as hot the aircraft will taxi after 20 seconds, if taxiway is clear. Missing hot and the aircraft has to start its engines before it will taxi. If another AI aircraft is on final approach or the runway is occupied. The "From Runway" spawn will wait to render AI until the runway is clear.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...