Board index FlightGear Development Tutorials and missions

Tutorials/Missions/Adventures: requests for features

Interactive in-sim tutorials and missions

Re: Tutorials/Missions/Adventures: requests for features

Postby DFaber » Sun Apr 27, 2014 10:57 am

Marius_A wrote in Wed Apr 23, 2014 5:43 pm:P.S. I have made minor modification to walk.nas to make it compatible with tutorial system:


Thanks for the fix Marius, it's committed to Git together with Walker M4 and the NPC Models.

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

German FlightGear Forum
http://forum.flightgear-de.net
DFaber
 
Posts: 687
Joined: Fri Dec 01, 2006 7:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby DFaber » Sat May 10, 2014 2:41 pm

Marius_A wrote in Fri Apr 25, 2014 2:18 pm:
3d models can be loaded in each step.
Changed model placement procedure. Use this:
Code: Select all
         <model>
            <path>Tutorials/Generic/Models/marker-d20.xml</path>
            <latitude-deg>37.50087011</latitude-deg>
            <longitude-deg>-122.5125049</longitude-deg>
            <altitude-ft>1.0</altitude-ft> <!--NEW-->
            <heading-deg>120.0</heading-deg>
         </model>


I found a problem while trying to make the Models movable. It is in the set_models function at line 368:
Code: Select all
      setprop(path ~ "/elevation-ft", geo.elevation(lat, lon) * M2FT + alt_agl);


It expects a number value for lat- and longitude. To move a Model I need to specify a property (latitude-deg-prop) for the position, so the function doesn't get a number. Hence it throws a NAN Error. I don't have an Idea how to deal with that. Any suggestions?

This is the tutorial I used:
Code: Select all
<PropertyList>
   <name>Place an NPC</name>
   <description>Places an NPC Character</description>

   <init>
      <!--NPC0 -->
      <set>
         <property>/sim/model/npc/character</property>
         <value>2</value>
      </set>
      <set>
         <property>/sim/model/npc/gender</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/npc/outfit</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc/hair</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc/headgear</property>
         <value>3</value>
      </set>
      <set>
         <property>/sim/model/npc/mask</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc/toolr</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/npc[0]/tooll</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/npc/longitude-deg</property>
         <value>-0.5419</value>
      </set>
      <set>
         <property>/sim/model/npc/latitude-deg</property>
         <value>38.28027048</value>
      </set>
      <set>
         <property>/sim/model/npc/altitude-ft</property>
         <value>35</value>
      </set>

      <!--NPC1 -->
      <set>
         <property>/sim/model/npc[1]/character</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/gender</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/outfit</property>
         <value>3</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/hair</property>
         <value>2</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/headgear</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/toolr</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/tooll</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/longitude-deg</property>
         <value>-0.54187</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/latitude-deg</property>
         <value>38.28027048</value>
      </set>
      <set>
         <property>/sim/model/npc[1]/altitude-ft</property>
         <value>35</value>
      </set>

      <!--NPC2 -->
      <set>
         <property>/sim/model/npc[2]/character</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[2]/gender</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[2]/outfit</property>
         <value>3</value>
      </set>
      <set>
         <property>/sim/model/npc[2]/hair</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[2]/eyewear</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[2]/toolr</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/npc[2]/tooll</property>
         <value>0</value>
      </set>

      <!-- Vehicle0 -->
      <set>
         <property>/sim/model/vehicle[0]/variant</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/vehicle[0]/position/longitude-deg</property>
         <value>-0.54177</value>
      </set>
      <set>
         <property>/sim/model/vehicle[0]/position/latitude-deg</property>
         <value>38.28027048</value>
      </set>
      <set>
         <property>/sim/model/vehicle[0]/position/altitude-ft</property>
         <value>35</value>
      </set>
      <set>
         <property>/sim/model/vehicle[0]/controls/heading</property>
         <value>0</value>
      </set>
      <set>
         <property>/sim/model/vehicle[0]/controls/roam-radius</property>
         <value>1</value>
      </set>
      <set>
         <property>/sim/model/vehicle[0]/controls/speed</property>
         <value>10</value>
      </set>


      <nasal>
            <script>
         io.read_properties("Aircraft/Generic/Human/Models/Poses/help.xml", "sim/model/npc[0]/pose");
         io.read_properties("Aircraft/Generic/Human/Models/Poses/bored.xml", "sim/model/npc[1]/pose");
         io.read_properties("Aircraft/Generic/Human/Models/Poses/threat_gun.xml", "sim/model/npc[2]/pose");



      print ("Hi");
      var self = props.globals.getNode("sim/model/vehicle[0]");

      var movement = func() {
            print ("Moving ...");
            var lat = self.getNode("position/latitude-deg",1).getValue();
            var lon = self.getNode("position/longitude-deg",1).getValue();   
            var speed = self.getNode("controls/speed",1).getValue();
            var heading = self.getNode("position/longitude-deg",1).getValue();

            
            interpolate ("sim/model/vehicle[0]/position/latitude-deg", la+0.0001, 1.5 );

         settimer(func { movement() }, 1.5);
      }
      movement();
         

            </script>


      </nasal>
   </init>

  <models>
      <model>
          <path>Aircraft/Generic/Human/Models/npc0.xml</path> 
          <longitude-deg-prop>/sim/model/npc/longitude-deg</longitude-deg-prop> 
          <latitude-deg-prop>/sim/model/npc/latitude-deg</latitude-deg-prop>     
          <elevation-ft-prop>/sim/model/npc/altitude-ft</elevation-ft-prop>   
         </model>
      <model>
          <path>Aircraft/Generic/Human/Models/npc1.xml</path> 
          <longitude-deg-prop>/sim/model/npc[1]/longitude-deg</longitude-deg-prop> 
          <latitude-deg-prop>/sim/model/npc[1]/latitude-deg</latitude-deg-prop>     
          <elevation-ft-prop>/sim/model/npc[1]/altitude-ft</elevation-ft-prop>   
         </model>
      <model>
          <path>Aircraft/Generic/Human/Models/npc2.xml</path> 
          <longitude-deg>-0.541885</longitude-deg> 
          <latitude-deg>38.2802703</latitude-deg>     
          <elevation-ft>35.0</elevation-ft>   
         </model>
      <model>
          <path>AI/Aircraft/l3000/l3000-tut.xml</path> 
          <longitude-deg-prop>/sim/model/vehicle[0]/position/longitude-deg</longitude-deg-prop> 
          <latitude-deg-prop>/sim/model/vehicle[0]/position/latitude-deg</latitude-deg-prop>     
          <elevation-ft-prop>/sim/model/vehicle[0]/position/altitude-ft</elevation-ft-prop>   
         </model>

   </models>             

</PropertyList>

It works with the current GIT Walker. The Airport is LEAL

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

German FlightGear Forum
http://forum.flightgear-de.net
DFaber
 
Posts: 687
Joined: Fri Dec 01, 2006 7:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby Hooray » Sat May 10, 2014 2:48 pm

I can help and fix that within a few minutes, but I need to know what files you are working with, i.e. if everybody here is familiar with git/gitorious, it would be great if we could actually use that to collaborate. I am currently involved in MapStructure, but fixing such things is pretty straightforward and should only take a couple of minutes (if not seconds). But if there's code & files floating around that I am not aware of, it's obviously more difficult than it needs to be :D
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Tutorials/Missions/Adventures: requests for features

Postby ludomotico » Sat May 10, 2014 3:43 pm

DFaber wrote in Sat May 10, 2014 2:41 pm:It works with the current GIT Walker. The Airport is LEAL


Please, do not use LEAL for tutorials. Runways, taxiways and aprons were heavily updated and the layout was submitted to Robin. In addition, all buildings are modeled but not yet in terrasync because current scenery does not match their sizes. You can find our current version of LEAL in the IBE scenery, but is it still a work in process. I believe LEAL is not the best airport to write tutorials in this moment since it is going to change for sure in the near future.

If you are looking for an airport in the area, check LEMU (small airport for general aviation) or LELC (if we consider the military area, it is bigger than LEAL). Both are fully modeled in terrasync and under 100km from LEAL.

Hooray, I have some changes in the mission-related files in your git, but I'm not sure how to proceed. Do I need to create a clone in github and issue a "merge request"? Do I ask for "push permissions"?
User avatar
ludomotico
 
Posts: 1018
Joined: Tue Apr 24, 2012 1:01 pm
Version: git
OS: Debian GNU/Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby Hooray » Sat May 10, 2014 3:54 pm

ludomotico wrote in Sat May 10, 2014 3:43 pm:Hooray, I have some changes in the mission-related files in your git, but I'm not sure how to proceed. Do I need to create a clone in github and issue a "merge request"? Do I ask for "push permissions"?


Just post your gitorious handle here so that we can add you to the repo, you'll then have push permissions automatically.
Instructions for cloning/tracking are to be found in the wiki article, see: http://wiki.flightgear.org/FlightGear_M ... ntributing
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Tutorials/Missions/Adventures: requests for features

Postby Michat » Thu May 22, 2014 6:55 pm

Good evening fellow FG'ers and dear "Free as in Intellectual Freedom!" code poets.

I wish to share with you some info, ideas and opinions.

1. Info: Lake of Constance Hangar have an aircraft with animated banner, perhaps you could adapt it for this project. Direct link to the CS-1 here: http://marc-kraus.de/fg/aircrafts/CS1-0.6.5.zip

2. Ideas:
2.1 Wondering if anyone can create a communication back pack ( Walkie Talkie) for one of the featured walkers like a mobile radio beacon operator.

2.2 It seems the walker can get in and out of the aircrafts. :arrow: having that into account: what about if we replace the walker model for a ground vehicle........ It is feasible nowadays to get a ground vehicle into and aircraft? ... At that point I consider that V22 Osprey can carry some units like the Walker Talkie or maybe some vespas, because wheelie doesn't fit on it .... :mrgreen:

3. Opinion: From my now 10 years old niece I wish to translate our gratitude to you "hackers of honor" by doing dreams come true. Resuming some words from my niece. She thinks that the simulator we are using is really a great value, no extreme violence like in other games. Initially she criticized the lack of wardrobe variety in our walkers but watching by herself the advance of the development state, she declares that those gentlemen (you) are doing a great and awesome work. 8)

I'm on the duty to translate to you our gratitude.
User avatar
Michat
 
Posts: 958
Joined: Mon Jan 25, 2010 6:24 pm
Location: Spain
Version: 191b
OS: GNewSense

Re: Tutorials/Missions/Adventures: requests for features

Postby Hooray » Thu May 22, 2014 7:16 pm

Michat wrote in Thu May 22, 2014 6:55 pm:From my now 10 years old niece I wish to translate our gratitude to you "hackers of honor" by doing dreams come true. Resuming some words from my niece. She thinks that the simulator we are using is really a great value, no extreme violence like in other games. Initially she criticized the lack of wardrobe variety in our walkers but watching by herself the advance of the development state, she declares that those gentlemen (you) are doing a great and awesome work. 8)


I guess, that if DFaber could provide a texture map, it could be customized and treated like a conventional "livery", so that GIMP artists could modify it to suit different needs :D
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Tutorials/Missions/Adventures: requests for features

Postby DFaber » Sat May 24, 2014 11:05 am

Hooray wrote in Thu May 22, 2014 7:16 pm:I guess, that if DFaber could provide a texture map, it could be customized and treated like a conventional "livery", so that GIMP artists could modify it to suit different needs :D


That is the plan, however the organisation and mesh of the Walker outfits is not final yet. There are a bunch of bugs to iron out. The UV Layout is self-explanatory and will not change much (only additions planned). So if GIMP Artists like to create their custom Flightsuit, go ahead :-)

Greetings
Detlef Faber
FlightGear Development:
http://flightgear-de.net

German FlightGear Forum
http://forum.flightgear-de.net
DFaber
 
Posts: 687
Joined: Fri Dec 01, 2006 7:51 pm
Location: Aachen, Germany
Version: GIT
OS: Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby Talkless » Wed Jul 02, 2014 2:25 pm

Marius_A wrote in Mon Apr 14, 2014 6:47 pm:Here is the place to share ideas and feature requests related to tutorial/mission system.

Current wish/to do list (will be periodically updated according to your feedback):
  1. Navaids support,
  2. Power line maintenance missions (helicopters),
  3. Equipment transportation missions (helicopters),
  4. Banner pickup and towing missions,
  5. Precision landing challenges,
  6. ...


Wow.. I am really happy to see this happening. Been dreaming about it forever. Good luck implementing!
Talkless
 
Posts: 80
Joined: Thu Mar 10, 2011 12:05 pm
Callsign: TLS
Version: git master
OS: Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby Talkless » Sat Aug 16, 2014 8:44 am

I have one question, will this system goal is to allow define missions in XML/Nasal, or will it have actual UI for generating them within game during gameplay? Like, random mission generator with some parameters to choose (mission starting FROM/RANDOM, destination TO/RANDOM_WITHIN_RADIUS, difficulty, etc).
Talkless
 
Posts: 80
Joined: Thu Mar 10, 2011 12:05 pm
Callsign: TLS
Version: git master
OS: Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby Hooray » Sat Aug 16, 2014 9:33 am

I am not sure if this is currently being worked on by anybody - but a simple GUI would definitely be possible using Canvas, I once prototyped a simple dialog that would allow MapStructure layer elements/symbols to be freely moved around on a map, e.g. for visually placing missions elements (other aircraft, crash/accident sites, objectives, wild fires etc):
http://wiki.flightgear.org/FlightGear_M ... es#Gallery
Image

Likewise, a slider could be used for timeline-based editing, and a treeview control could be used for event/branching-based editing - which I understand, is the way the FSX missions creator works:

Image

Regarding your question on XML: The answer is that the back-end format could very well be XML, i.e. PropertyList XML - even the FSX mission editor uses XML for storing missions.
A mission generator could still be built on top of such a format, simply by making certain fields variable within a certain range of valid values (such as different locations, daytime/weather settings, aircraft configurations, altitudes etc).

Back when I looked at Marius_A's code, I was hoping to generalize those ideas and provide some kind of XML-based extension frameworks, such that new "primitives" could be added just by editing a few XML files, i.e. to support timers, listeners, events or hoops and randomization by adding the required primitives and allowing missions creators to simply chain those together to create new missions: http://wiki.flightgear.org/FlightGear_M ... _Framework

Since then, I haven't worked on anything related, but I still believe this to be the "correct" method, even though there are probably better/less-verbose formats to express the whole idea.
But I still believe that we shouldn't introduce too much custom Nasal (as is currentlly done), but instead identify misssing building blocks and extend tutorial.nas acccordingly - I simply skipped that step to directly make tutorial.nas extensible from XML space, so that building blocks could be specified, reused and parameterized easily.

However, I do understand that people may find it more straightforward to proceed step by step here - but all the use-cases you mentioned would definitely be possible, even though it would make sense to tackle those ideas one after another, i.e. either extend the system via Nasal, or make it extensible via XML, and then come up with a basic XML-based format - a GUI to build missions could be created using Canvas widgets - and likewise, a mission generator/randomization scheme could be built on top of that eventually.

The features to make all this happen without having to touch any C++ are all in place meanwhile, so it's mainly a matter of teaming up with others interested in similar ideas and implement those step by step.
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Tutorials/Missions/Adventures: requests for features

Postby Marius_A » Sat Aug 16, 2014 12:35 pm

I have plans to make custom view (similar to fgcamera's world view). The user would be able to create simple missions by switching to this view ("mission editing mode") and placing mission objects (hoops, markers ...) on scenery using mouse (similarly to "ufo").
The goal is to have functionality similar to this:

Mission editor would export "mission" as *.xml file which could be edited/extended manually.
Marius_A
 
Posts: 89
Joined: Wed Dec 04, 2013 2:20 pm

Re: Tutorials/Missions/Adventures: requests for features

Postby Hooray » Sat Aug 16, 2014 6:41 pm

looks like a cool idea, and a logical extension of your own work :D
If possible, please try to use some wrapper class for encapsulating the position lat/lon and objective placement, so that we can ideally reuse the same interface for the map-based GUI editor mentioned above.
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

Re: Tutorials/Missions/Adventures: requests for features

Postby Talkless » Thu Sep 11, 2014 10:56 am

UI for editing is very nice, but I am personally dreaming about "generating" (NOT editing, manually creating) missions.

For example,

  • Load FGFS with EC-130.
  • Somewhere in menu, select "Generate Mission".
  • Select mission (sub)category, for example, "Medical transport".
  • Enter mission properties: From: [exact OR random airport/helipad/other("hospital"?) within some distance], To: [ exact OR random airport/helipad/other("hostpital"?) within some distance].
  • Select "Challenges": Flight at night, Disabeld Map ("manual navigation challange"!) / GPS / Autopilot / other, enabled time limit, etc, etc...
And then system will place you at (possibly randomly selected) start position, possibly create flight plan, and start to check your mission profile (arrived at destination? took too long? experienced too much G? ... ).

I personally really miss some really simple tasks/missions as these, because currently, when I start Flightgear, I often quit it pretty soon as I am indulged in dilemmas as "what should I do ow?", "where should I fly today?". We have such big world to fly to, so many aircrafts, but for me, it's also too much of freedom of choice and requirement for imagination... </semi rant>
Last edited by Talkless on Thu Oct 02, 2014 8:56 am, edited 1 time in total.
Talkless
 
Posts: 80
Joined: Thu Mar 10, 2011 12:05 pm
Callsign: TLS
Version: git master
OS: Linux

Re: Tutorials/Missions/Adventures: requests for features

Postby Hooray » Thu Sep 11, 2014 3:29 pm

A mission generator should be fairly straightforward to write - after all, it's just a number of variables that are populated in a few nested loops - the main challenge is coming up either with a subset of valid values, or a randomization scheme that can do sanity checking for certain values - or your mission may be flying a MED EVAC mission at night time in an ASK13 :D

Stuart also once explored writing a mission generator using the tutorial system - so it's definitely possible, there isn't anything missing at all - it's mainly a matter of finding people interested in this, and willing to acquire the skills to make this happen - even though the latter should be fairly straightforward - we can probably post the main building blocks for something like this within a few weeks, including code snippets for randomizing aircraft, mission, airports etc

Like I said, it's not exactly difficult, but a matter of finding people willing to pursue this - which kinda applies to the whole missions system.
While we do have a number of folks very familiar with Nasal, most of us are busy with other things - that we often consider "more important" (or at least "more interesting") - but the fact that I am posting here demonstrates that I am interested in seeing this materialize eventually - so, if you are sufficiently motivated, we can post a few snippets of code and teach you enough about Nasal to prototype a simple system and grow it over time.
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: 11326
Joined: Tue Mar 25, 2008 8:40 am

PreviousNext

Return to Tutorials and missions

Who is online

Users browsing this forum: BLEXBot [Bot] and 1 guest