Jump to content

Mission generator


m0jo

Recommended Posts

I created a mission generator for DCS:BS and FC2. At the moment, the missions are composed of a few random targets areas for grounds pounder and a common waypoint for fighter between blue and red airbases. This script is available at: (Still a WIP)

 

Todo

 

  • Triggers to hide target area until the precedent one is clean
    • Right now all TA spawn at the beginning and the mission don't change when the objective is reach.

     

    [*]Briefing text

    [*]Briefing map with the generated TA displayed

    • Can also be created with PHP on the fly
    • I need a good map (picture) where airports are visible

     

    [*]Tanker, AWACS and transport

    [*]A better selection of unit in the targets area and at the airport defense

    • Somebody could create a list of units

     

    [*]FARP support

    [*]Conversion of cartesian coordinates to spherical coordinates for the mission editor

    • I need the mathematical formulas to convert the coordinates

     

    [*]Cleanup the slot selection screen (done)

     

    [*]Find a way to remove trees or move the TA away from forests

    [*]Season and weather random (already have random wind)

    • 1 season a week ?

     

    [*]Dynamic campaign :pilotfly:

    • I'm going to analyses the debrief.log and calculate a general score with how many units are dead
    • Somebody could make a list of stages(where the planes are spawning depending of the score)

     

Contact me if you need help setting this on a server.


Edited by m0jo
  • Like 1
Link to comment
Share on other sites

Great! seems very interesting!

 

PD: I've downloaded a random mission but when opened in the editor, I couldn't show the units in the map (weren't hidden) but seem were placed outside map coordinates. Haven't tried to flight it yet. Can't explain it better sorry.


Edited by Distiler

AMD Ryzen 1400 // 16 GB DDR4 2933Mhz // Nvidia 1060 6GB // W10 64bit // Microsoft Sidewinder Precision 2

Link to comment
Share on other sites

Great! seems very interesting!

 

PD: I've downloaded a random mission but when opened in the editor, I couldn't show the units in the map (weren't hidden) but seem were placed outside map coordinates.

 

 

That's normal at the moment; I don't have the mathematical formulas to convert cartesian coordinates to spherical coordinate and the mission editor is using spherical coordinate unlike the game

Link to comment
Share on other sites

  • 3 weeks later...

Hey,

Good going I started a little project along simular lines (MP only). I never go to a point I was happy to release though.

Like allot of other people I would love a fully dynamic campaign within lockon/DCS. Basicly this isn't possible currently with DCS as

is. I started an attempt to create a snapshot campaign. I did too a degree but far far from finished though, its using a mysql database

backend and vb.net for the coding. It creates the mission and once complete it reads the logs after the mission and updates the mysql

database and generates the next mission. Units ocupping Town/airport genereate CP (Contruction points) which are used to reinforce units.

Destroyed units stay in for the next mission as destroyed static objects but are wiped then on the next mission. The reinforments are

supplied via ships or air which can be taken out before they reach there destination to weaken enemy forces, they have escorts which work

defending most of the time, AI in game can be a little funny at times.

Needed more work on the tasking as I haven't implemented the river system and not all of the road spans, so ground units just stop when

they encounter rivers if not assigned to a road span :(.. (Easy pickings though lol)

I stopped due to problems I ran into below and yet to think of a workaround for and a lack of time due to real life, kids etc..

* Fully Dynamic not possible unless I can inject units real-time into the server as its running. :(..

* No dedicated server would be nice as hosting on servers is hard most dont have 3d cards

* Snapshot sorta possible with limitations. ie. can read logs and update destroyed unit etc.

* Cannot Set unit Damage, i.e. damaged Ships.

* Limits on how many units available at one time in game, ran into the issues when over 2000+ objects (Stopped working!). Put limits so

it will only generate 200-2000 objects via slider in a mission at a time. (Still had to put smarts into this)

* Logs not detailed enough i.e. Do not know if pilot ejects as not available in MP Export only death. So pilot management limited.

* Destroyed units can be placed via static Objects for a set time, for next mission then removed. <- Does seem to have an affect on speed

may need to remove. More testing

* Respawning/Rejoining while in MP cannot limit aircraft! no easy way to limit respawns in multiplayer. have attempted via triggers in

missions generated however triggers are not reliable enough.

* Player can keep respawning and wipe the enemy out in 1 mission :( Thought about only having the units in the mission however not really

what I wanted.

* No way to limit resources i.e. Lack of a type of Ammo or fuel supplies running low!, Cannot stop in MP as you can land and then choice

to rearm/refuel. (Yes you can modify the LUA but then it must be done on all client systems too not really workable, and removing

ammo/fuel vehicles doesn't stop respawn and I would like it to be able to rearm/refuel if needed)

* Fuel, Ammo, squad pilot, management in database but of no use.

* Triggers to make units appear or to scramble from airports are troublesome as trigger sometimes don't trigger :(.

* Static objects aren't recorded via exporting from lua but are in debrief with only time reference have as close as possible cross

reference location details to link buildings placed and then recoreded as destroyed.

* Static objects cannot be targeted via AI, has to be human :(..

* “Default” map static objects like bridges/airports/runways are not available in export.

* Any map objects cannot be set to destroyed / Damaged :(..

 

PM me and I'll see if i can help with the maths as I already

Link to comment
Share on other sites

That's normal at the moment; I don't have the mathematical formulas to convert cartesian coordinates to spherical coordinate and the mission editor is using spherical coordinate unlike the game

 

A Gnomonic projection is used (not spherical). There is example code in Scripts\Export\Export.lua or search the ED forums for the word "gnomonic". I've implemented the transform and inverse transform in Java in those threads.

 

nb. watch the debrief log to see pilot ejections etc.

Link to comment
Share on other sites

  • 1 month later...
  • 5 months later...
Does this no longer work with latest FC2? I download the mission but it appears to be blank when I open the mission planner.

 

The units does not appear in the mission editor because I did put both coordinates inside the mission file. The game is using X/Y coordinate while the editor is using lat/long and those are set at 0-0 in the generator.

 

I will probably recreate a new generator from scratch for DCS:WH this summer so I will not update this script.

Link to comment
Share on other sites

Ah. Reason I asked is I started a mission and it didnt appear there was any flyable aircraft as the mission started up with an external view of a E3 Sentry AWACs. Nor did I see any briefing. Just random.miz in the transition briefing screen (Just before you select 'Fly').

 

The mission file seems to be only 37kb.


Edited by kraszus
Link to comment
Share on other sites

Ah. Reason I asked is I started a mission and it didnt appear there was any flyable aircraft as the mission started up with an external view of a E3 Sentry AWACs.

 

The mission file seems to be only 37kb.

Start the mission as a MP server instead of the normal SP game, when doing this, every planes are avalaible. This should not have any impact on performance.

 

Random AI flight will take off and either just change airdrome, attack ground target or attack air target. Awacs will also respawn when they are shot down or landing at a airport.

 

Also, sometime the generator can produce a invalid .miz, just re-download a mission and this will solve the problem.

Link to comment
Share on other sites

Start the mission as a MP server instead of the normal SP game, when doing this, every planes are avalaible. This should not have any impact on performance.

 

Random AI flight will take off and either just change airdrome, attack ground target or attack air target. Awacs will also respawn when they are shot down or landing at a airport.

 

Also, sometime the generator can produce a invalid .miz, just re-download a mission and this will solve the problem.

 

Thanks for the clarification Mojo - will try it out tomorrow.

Link to comment
Share on other sites

Hi Mojo. I've tried as you have suggested and although i can now get ingame in the aircraft I select there seems to be a problem. There is no mission briefing. I can get in the aircraft but have no idea what the mission is hehe. When i select the aircraft I wish to fly, then select briefing, I get this...

 

[EDIT] Just saw on 1st page that 'Mission Briefing' is on the ToDo list. That being the case, is there any way of discerning what your mission is?

 

clipboard01q.jpg


Edited by kraszus
Link to comment
Share on other sites

The mission is quite simple, F-15, Su-27 and MiG-29 have a common waypoint 2 between their respective airbase. Some AI flight will take off and have a fighter sweep mission set at waypoint 2.

 

For the A-10, Su-25 and Ka-50, each of their waypoint is a group of ~20 ennemy ground unit randomly placed on the ground. All these group spawn at the start of the mission so you can choose which group you will attack first.

 

There are also some AI flight in ferry mode between friendly airport to fill the sky a bit.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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