dcs-liberation / dcs_liberation

DCS World dynamic campaign.
GNU Lesser General Public License v3.0
712 stars 185 forks source link

Convoy should start on road #2192

Open zelosos opened 2 years ago

zelosos commented 2 years ago

Affected versions

5.2.0

Development build

No response

Description

The generated convoy starts near the base and drives one by one to the street. This takes ages. Only after all units are on the street the convoy starts moving to the next base. To actually take place in the Mission the convoy should start at the next street, to start moving as soon, as the mission starts.

There exist a feature in DCS to place units on the street at mission start.

The example campaign here is Tibilisi Gap, but other campaignes should be checked as well.

Save game and other files

Compaign File TibilisiGabHeli2.zip

Raffson commented 2 years ago

There exist a feature in DCS to place units on the street at mission start.

This option is actually active, you can verify this when you open a mission generated by liberation but you'll see the convoy laid out horizontally instead of on actual road. The problem is the following:

When you're in the ME and you select "On Road" for a certain ground unit, DCS automatically updates the positions of those units and puts them on the road. We don't have that capability, i.e. we can't determine what's road and what isn't in order to generate the units with the exact coordinates needed to put them on the road.

So I'm thinking... If we can't determine coordinates to put vehicles on the road through pydcs, we should try forcing an update of their positions on mission start with lua. I know mist has a function to teleport/respawn a group, which might be interesting in this case.

Raffson commented 2 years ago

So I've tried "teleporting" the convoy onto the road, but no dice. So that made me think in some different directions.

It would be possible to define the convoy positions in the campaign's mission file, though it has a certain limitation. Specifically we depend on the number of positions defined in the mission file, or in other words, the amount of units in the convoy group. If the actual convoy in-game turns out to be larger, we'll have to try and offset those positions for the excess units.

Another possible solution, though I prefer the one above, would be to simply generate the entire convoy "inside itself", so basically use the same coordinates for each unit. The drawback, aside from being completely unrealistic, is that the AI has a quirky way of driving out of that "stack" of vehicles.

@DanAlbert wdyt?