Board index FlightGear Development Add-ons

Announcing Mission Generator Addon

FlightGear has support for add-ons, to further extend the simulator's core functionality.

Re: Announcing Mission Generator Addon

Postby wlbragg » Mon Oct 04, 2021 11:02 am

I'm looking for MP (online players) not AI (traffic). I didn't notice MP aircraft in the AI property tree, but maybe I missed it?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby benih » Mon Oct 04, 2021 10:49 pm

It is there somewhere, and i think mp planes are modeled as ai models internally.
Have no means to check as I’m not home, but it is somewhere close there
User avatar
benih
 
Posts: 1689
Joined: Tue Aug 15, 2017 10:34 am
Callsign: D-EBHX
Version: next
OS: Debian Linux 64bit

Re: Announcing Mission Generator Addon

Postby wlbragg » Tue Oct 05, 2021 3:46 am

OK, thanks. They are there, I wasn't seeing them because they were not in range at my location.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby Hooray » Tue Oct 05, 2021 5:11 am

The background here being, for a very long time, Flightgear didn't have much of a MP system, so that the AI system is predating it by several years - which is why MP was finally implemented by piggybacking it onto the AI system to handle traffic creation/injection and updates
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Announcing Mission Generator Addon

Postby wkitty42 » Tue Oct 05, 2021 12:54 pm

wlbragg wrote in Mon Oct 04, 2021 11:02 am:I'm looking for MP (online players) not AI (traffic). I didn't notice MP aircraft in the AI property tree, but maybe I missed it?

MP craft are in AI property tree... i think only when they are in range and the MP server sends their data... if they are out of range, the server doesn't send anything and they disappear... i think that's right... it has been a long while since i dug around in that area...
"You get more air close to the ground," said Angalo. "I read that in a book. You get lots of air low down, and not much when you go up."
"Why not?" said Gurder.
"Dunno. It's frightened of heights, I guess."
User avatar
wkitty42
 
Posts: 9148
Joined: Fri Feb 20, 2015 4:46 pm
Location: central NC, USA
Callsign: wk42
Version: git next
OS: Kubuntu 20.04

Re: Announcing Mission Generator Addon

Postby Hooray » Tue Oct 05, 2021 5:17 pm

MP aircraft are by default in the AI sub-tree, however that's unrelated to any MP servers - it's just the way it's always worked, for the reasons mentioned previously.
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Announcing Mission Generator Addon

Postby wlbragg » Tue Oct 05, 2021 10:26 pm

It only took me about 3 years to finally figure out how to update a PUI list dynamically without repositioning the dialog. What an obscure way to accomplish something.
Anyway, now that I figured it out I can go back and fix the Cargo Towing PUI and also move forward with this addon, the target intercept mission.
I've got a dynamically updated list which is filled with gui selection controlled data such as AI, MP both, in-flight that can be used for a random selection or a physical selection to provide a target to go chase.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby Hooray » Wed Oct 06, 2021 12:40 pm

in PUI, you have the "dialog-apply" and "dialog-update" fgcommands, but such functionality is more easily implemented by using a corresponding Canvas Widget, for instance using a ScrollArea with buttons:

https://wiki.flightgear.org/Canvas_snip ... ScrollArea
Image
Please don't send support requests by PM, instead post your questions on the forum so that all users can contribute and benefit
Thanks & all the best,
Hooray
Help write next month's newsletter !
pui2canvas | MapStructure | Canvas Development | Programming resources
Hooray
 
Posts: 12707
Joined: Tue Mar 25, 2008 9:40 am
Pronouns: THOU

Re: Announcing Mission Generator Addon

Postby wlbragg » Wed Oct 06, 2021 6:39 pm

Thanks Hooray, you don't have to sell me on canvas. I recognize its advantage as a scripting language and its capabilities to use for this project. Unfortunately I am not in the position to take the extra time needed to learn the syntax and API. At least with PUI I have the experience behind me to be effective in a reasonable time. That might change though as there are a couple elements I am doing with canvas and if they prove to be reasonably easy for me to understand, I may slowly migrate to it. You know there is nothing stopping anyone from converting one or more of the PUI dialogs I create to its canvas cousins so I can get some good working examples of it.
I know there are many examples in the Shuttle and I have referred to them many times.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby wlbragg » Thu Oct 07, 2021 7:19 am

I haven't had much time to work on the Target Intercept mission generator but I finally made some time.

I just pushed the first round. I have plenty more to do, but I think I have a really good start. Enough to maybe get some critiques from those interested in using it.

There are areas I need to "idiot proof". There are bound to be some bugs in logic and flow. There is plenty of formatting and menu aesthetics to do. Just lots of small details to attend to. I want to add the "range" limiting slider to the logic, right now there is no range limiting other than AI and MP hard coded or LOD limits.

I think I may need to completely separate the different mission types into their own, more stand alone, dialogs? Except, there is a lot of common overlap.

So, the basics are there and you can generate either an instant Target Intercept mission or a time delayed random one. Using either AI or MP aircraft or both. You can limit the Intercept to a target in flight. You can either pick a target from the GUI list or at random and instantly start the mission or ask it to select a random target from the list and start it with the timer.

There are two ways to get to the Target intercept GUI helper. Either through the Mission Generator menu if you want to use the timer or through the main menu bar at the top of the sim through the addon menu if you just want to start a mission instantly, either a chosen target or at random.

Part of why I said I may need to separate the different mission types more clearly with their own GUI's is because some of the options in the Mission Generator "configuration" dialog are not relevant to the Target intercept mission. Really only the timer is relevant to the target Intercept mission. Even the Incident report dialog is not used with the Target Intercept. It has its own canvas popup that appears once the mission is started.

Right now the only way you can close that popup is if you close to within 500 meters of the target or uncheck the "Enable" checkbox in the main Mission Generator config dialog.

I have some work to do yet on the original Incident Report popup. It needs to have a custom control loop to control the data that passes through it. Right now it has the ugly duplicating bug if you try to close it and open it a second or successive times. I know what it takes to fix it but still have to take the time to do it.

I think that is about it. There is quite a lot this little package can do already an it is only going to grow. But I need to get it better organized so it is more intuitive and easily comprehensible.

Anyway, comments, suggestions and critiques welcome. I promise I wont take any offence to any comments if you all understand I do have a vision for this and I am not planning on straying too far from my vision. It is going to be slow going at first, with lots of evolution in style, until the final aesthetics and functionality are adopted.

Let me know what changes in the Intercept reporting might be needed, if any. One thing for sure I plan to do in the Intercept target GUI is add checkboxes for all the reporting parameters so you can limit it to only the parameters you want. The popup would then be limited to what ever was checked. That would be something like a difficulty factor, same as what I did for the S&R and Wildfire portions.

I tested a random AI target in the AirCrane, ha, not a chance of catching the AI. It was at 30000+ feet traveling at some crazy speed. I cheated and used a combination of ctrl+u and the browser app to try to get close. I was able to see it but never did get close enough to end the mission (so that part hasn't actually been tested). One other thing to note, the reported position parameters of the target change color the closer you get to the target.
< 5000 = red, <10000 = yellow, else green. Let me know if a different distance for the changes are better. If there is a flashing switch for the canvas text, maybe I will do that for a few cycles as a notice of identification before ending the mission. I am planning on possibly doing something like that and then updating the canvas parameters to show the aircrafts callsign and a popup asking if you want to close the report popup.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby wlbragg » Thu Oct 07, 2021 9:17 am

I added the Target Intercept report parameter options. Also the originating position of the target intercept is now reported to the incident report. All that is left is to add the range limiting to it.

What kind of range should I be looking at? This is a max AI range that the Target Intercept will use. It will be adjustable using the slider in the Mission Configuration GUI.

The Configuration Dialog is now mostly functional with the intercept mission as in you can limit the reporting options and use the timer.

I verified the distance of < 500 to the target completes the mission. I may lower it to 300-400 meters?
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby wlbragg » Thu Oct 07, 2021 9:57 pm

Oops, I broke something with my last push. Won't be able to fix it until later tonight.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby wlbragg » Fri Oct 08, 2021 6:37 am

I fixed it. Dumb mistake in the core logic.
Now to do some cleanup. There are some actions that you can take that will surely break things. I need to do some type checking for those things.
Stuff like clicking on execute buttons when no data is available or selected. Or possibly trying to run more than one type of mission at the same time. There is limited checks for some of that, but not everything yet. I haven't tested or debugged all the different areas you can get into trouble with. So beware, if you try to go outside what you consider valid actions, you will most like break something. I don't know what will happen with something like selecting an AI and before you hit the timer button that AI disappears from the property tree. That will undoubtedly pose a problem. I need to put some time into checking for those types of bugs and making the code robust enough to catch those of chances. Likely an MP player you have selected and they log out somewhere during the process. Merely the manner in the way the timer works, I think I allow you to set the timer and also select a specific target. Not a good idea because you could potentially set the timer for an hour and the target might not even be there in an hour. Those type if scenarios still need to be addressed in the code. I'm aware of most of the potential issues and need to spend some time fool proofing them. But I wanted to get this out there so you all can mess around with it.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

Re: Announcing Mission Generator Addon

Postby erik » Fri Oct 08, 2021 8:53 am

wlbragg wrote in Thu Oct 07, 2021 9:17 am:I verified the distance of < 500 to the target completes the mission. I may lower it to 300-400 meters?

For a first start that would be good enough. It's always possible to refine the details later on.

Erik
Current: Parachutist, Paraglider, Pterosaur, Pilatus PC-9M and variants, ERCO Ercoupe, Fokker Dr.1, Fokker 50, Fokker 100
Less active: Cessna T-37, T-38, Santa Claus. Previous: General Dynamics F-16. Worked on: Wright Flyer
erik
 
Posts: 2245
Joined: Thu Nov 01, 2007 2:41 pm

Re: Announcing Mission Generator Addon

Postby wlbragg » Fri Oct 08, 2021 3:54 pm

Demonstrating menu use and new type checking help. Nice short mission with really nice clouds.

Last edited by wlbragg on Sun Oct 10, 2021 7:10 pm, edited 1 time in total.
Kansas and Ohio/Midwest scenery development.
KEQA, 3AU, KRCP Airport Layout
Intel i7/GeForce RTX 2070/Max-Q
User avatar
wlbragg
 
Posts: 7588
Joined: Sun Aug 26, 2012 12:31 am
Location: Kansas (Tornado Alley), USA
Callsign: WC2020
Version: next
OS: Win10/Linux/RTX 2070

PreviousNext

Return to Add-ons

Who is online

Users browsing this forum: No registered users and 1 guest