Sign in to follow this  
basys

Mission - Job - Inhibiting generation at a small airport

Recommended Posts

Hi Folks

 

I'm working on a mission/job for the airport's Job Boards.

 

I need to inhibit my job

from being generated at small airports with short runways

 

 

 

I've populated GeneratedAirport - GeneratedAirport_Current

with an appropriate MinRunwayLength value.

 

Unfortunately that's not inhibiting my job's generation at small airports.

 

Guessing that only the SimMissionUI.ScenarioMetadata and Career.CareerMissionMetadata

are evaluated by the Job Board's script.

 

 

 

I also had a brief play with / guess at a LUA script,

in Career.CareerMissionMetadata - DisplayRequirements

<CareerRequirements>return ( get_runway_length('{8D625BDF-2FF3-4583-9CC7-B70707AE5816}')  >= 2743 ) </CareerRequirements>
 

 

For test purposes -

I've forced an increased frequency of generation.

by temporarily raising the Career.CareerMissionMetadata - TemplateWeight to 5000.

 

 

 

I also noticed a couple of unexpected aspects -

- Very small airports consistently generate my jobs as a high proportion of total, whilst larger airports, (blue), only generate one or two.

- Some specific airports consistently generate an unusually high number of these jobs. (e.g. Hoonah 7 or 8)

 

 

 

Any pointers/tips would be much appreciated.

 

Either by reply, or if required, PM me.

 

 

 

ATB

Paul

Share this post


Link to post
Share on other sites
Help AVSIM continue to serve you!
Please donate today!

Hi Folks

Forgot to say -

If anyone has left-over mission code,     :wink:
or already has any works in progress,

then please let me know, soonest.

 

I'd hate to discover I'd been reinventing the wheel.

Which I am in a way.       :lol:

 

ATB
Paul

Share this post


Link to post
Share on other sites

Hey Paul, 
 
     Looks like you are up to an ambitious workload. Creating Missions through XML Schema is very difficult.
 
     I also attempted to create some missions by adjusting some of the current missions but I could only create Landing Challenges because they were easier to adjust than the other missions and challenges!
 
     I'm intrigued as to what missions you are going to attempt...I couldn't think of any missions to add to the job board!
 
     On the technical note, the airports which you depart from and arrive at are generated randomly, so I don't there is a way of adjusting that.
 
However, I have found the code snippet which may be of some use:

<MissionTemplate.GeneratedAirport InstanceId="{A917CDC9-5DDB-47F7-B8D4-BCD571FD386D}">
      <Descr>GeneratedAirport_Destination</Descr>
      <MinRunways>1</MinRunways>
      <MinRunwayLength>600</MinRunwayLength>   #you have already changed this
      <MinParking>1</MinParking>
      <AllowedParkingTypes>
        <ParkingType>Ramp_GA</ParkingType>
        <ParkingType>Ramp_GA_Small</ParkingType>
        <ParkingType>Ramp_GA_Medium</ParkingType>
        <ParkingType>Ramp_GA_Large</ParkingType>
        <ParkingType>Ramp_Cargo</ParkingType>
      </AllowedParkingTypes>
      <DistanceFrom>
        <MinDistance>50</MinDistance>
        <MaxDistance>500</MaxDistance>
        <AttachedWorldObject>
          <ObjectReference InstanceId="{221CBB7C-EBF3-46CD-B6CD-A31C774342C1}" />
        </AttachedWorldObject>
      </DistanceFrom>
      <AllowedRunwayTypes> --!---#Alter the allowed runway types, preferably Tarmac for large airports--
        <RunwayType>Concrete</RunwayType>
        <RunwayType>Grass</RunwayType>
        <RunwayType>Grass_Bumpy</RunwayType>
        <RunwayType>Asphalt</RunwayType>
        <RunwayType>Short_Grass</RunwayType>
        <RunwayType>Long_Grass</RunwayType>
        <RunwayType>Hard_Turf</RunwayType>
        <RunwayType>Snow</RunwayType>
        <RunwayType>Ice</RunwayType>
        <RunwayType>Urban</RunwayType>
        <RunwayType>Forest</RunwayType>
        <RunwayType>Dirt</RunwayType>
        <RunwayType>Coral</RunwayType>
        <RunwayType>Gravel</RunwayType>
        <RunwayType>Oil_Treated</RunwayType>
        <RunwayType>Steel_Mats</RunwayType>
        <RunwayType>Bituminus</RunwayType>
        <RunwayType>Brick</RunwayType>
        <RunwayType>Macadam</RunwayType>
        <RunwayType>Planks</RunwayType>
        <RunwayType>Sand</RunwayType>
        <RunwayType>Shale</RunwayType>
        <RunwayType>Tarmac</RunwayType>
      </AllowedRunwayTypes>
    </MissionTemplate.GeneratedAirport>

On the above code snippet, try changing the <AllowedRunwayTypes> so that only Tarmac or Concrete Airports will be generated as a destination.This is what I believe could reduce the pool of generated airports to ensure that an airport with a specific runway will be chosen.

 

 

Good Luck!

P.S. I have not tried this out myself... so this is a shot in the dark! Code snippet taken from GenMission_LightCargo-Animals

Share this post


Link to post
Share on other sites

Hi Folks

 

Cheers Kavinda for your suggestions.

 

 

 

I'm looking primarily to control Departure airports.

 

 

 

In this case -

Use of RunwayType and/or ParkingType is/are not appropriate parameters to filter on.

(Using ParkingType has returned some surprising omissions).

 

Controlling this Job's generation by filtering on runway length

is the essential Go / No Go, for implementing this mission type.

 

 

 

For Jobs -

 

Destination airports are randomly generated,

and subject to certain parameters, (related to those you'd listed).

 

Departure airports are not randomly generated.

Its the parameter passed, when you click that specific airport's Jobs Board.

 

MinRunwayLength doesn't appear to be honoured for departure.

 

 

 

Thanks again.

 

 

 

HTH

ATB
Paul

Share this post


Link to post
Share on other sites

Ahhh.. right! So, you want to change the Departure airport and not the Destination Airport!

Sorry, I misunderstood what was being asked! :o
 
     Just to be clear, you are aiming to set the departure airports which you would like your job to be shown on? If that is the case, I have searched for jobs which appear at specific airports and found the Biplane Tour Mission as an example:
 

    <Career.CareerMissionMetadata>
      <Title _id="{BECA0285-199E-4856-A729-0D0EBCD3A347}">Hawaii Biplane Tour</Title>
      <OrderingSequence>2</OrderingSequence>
      <MissionType>Job</MissionType>
      <DepartureAirport>DepartureAirport</DepartureAirport>
      <DestinationAirport>DepartureAirport</DestinationAirport>
      <BaseXPScript>return 100</BaseXPScript>
      <ThumbnailAssetID>{0BB06AEE-806C-43B6-9F18-FC7E5C8192CD}</ThumbnailAssetID>
      <ImageAssetID>{872DA6DE-F1C2-406F-9356-8C95651D3A98}</ImageAssetID>
      <TemplateWeight>500</TemplateWeight>
      <ContainerAssetID>{6160B426-C1B7-41F5-8145-5CD5C92AF45C}</ContainerAssetID>
      <SimObjectFlagName>Biplane, Tour</SimObjectFlagName>
      <DisplayRequirements>
        <CareerRequirements>                      --!--  --!--  --!--  --!--  --!-  --!-- --!-- --!-- --!-- --!--
                local ident = (varget('C:CAREER:AirportIdent'))
                 return (ident == 'PHLI' or
                 ident == 'HI01' or
                 ident == 'PHPA' or
                 ident == 'PHDH' or
                 ident == 'PHJR' or
                 ident == 'PHMK' or
                 ident == 'PHNY' or
                 ident == 'PHJH' or
                 ident == 'PHLU' or
                 ident == 'PHOG' or
                 ident == 'PHHN' or
                 ident == 'PHUP' or
                 ident == 'PHMU' or
                 ident == 'PHKO' or
                 ident == 'PHTO' or
                 ident == 'HI23')
                </CareerRequirements>                  --!-- --!-- --!-- --!-- --!- --!-- --!-- --!-- --!-- --!--
        <DataPointsPresent>
          <MissionDataPointType>Landmark</MissionDataPointType>
          <Count>3</Count>
          <MaxDistance>70</MaxDistance>
        </DataPointsPresent>
      </DisplayRequirements>

The above code snippet (from the tag <CareerRequirements>) allows you to set the airport(s) where you would like to see your job. The job will only appear on the airports which have been set by you.

 

 

I hope that helps,

Share this post


Link to post
Share on other sites

Try something like this in the CareerRequirements script:

 

return (varget('C:CAREER:LongestRunway')) > 2000

 

Other possible variables you could use besides LongestRunway and AirportIdent:

NumParking
NumRunways
Towered

Share this post


Link to post
Share on other sites

Do you mean "MinParking" and "MinRunwayLength"?  NumParking doesn't exist in the Propdef!  :blink:
 
Also, I'm not sure about the "LongestRunway" variable:

<PropertyDef
            name        = "GeneratedRunwayType"
            id          = "{7A6BA8FC-D533-4343-8685-DA0DB4E75A10}"
            type        = "ENUM"
            default     = "Longest"
            descr       = "Indicates how to interpret other properties of generated runway object.">
          <EnumDef symbolprefix="GENRUNWAY_TYPE">
            <EnumVal name="LONGEST" xml_name="Longest"/> <!-- Longest runway that matches criteria, heading upwind -->
            <!--<EnumVal name="CLEARED" xml_name="ClearedTo"/>   Runway user is currently cleared to land on or taxi to (if any) -->
          </EnumDef>
        </PropertyDef>

Share this post


Link to post
Share on other sites

KavindaJD: You're looking at propdefs. Stonelance is referring to simulation variables.

Share this post


Link to post
Share on other sites

What's the exact difference? Could you explain what the propdefs are used for?

 

 

Many Thanks,

Share this post


Link to post
Share on other sites

PropDefs describe Sim-Prop Binary files. Simulation variables are variables used by the simulator. The former are found in Microsoft Flight Simulator X\propdefs. The latter are accessible in FSX through the Panel and Gauges SDK or SimConnect API.

Share this post


Link to post
Share on other sites

Hi Folks

 

Steve -

Thankyou for that code sample.

 

It worked 'out of the box'

inhibiting job generation at airports with runways shorter than XXXX.

 

 

 

Unfortunately

it applies to both Departure and Destination runways.    

 

 

 

What I'm attempting to do is -

 

Permit - Loaded takeoff from long runway to short runway.

 

Inhibit - Loaded takeoff from short runway.

 

 

 

Pseudocode equivalent -

 

IF Departure.LongestRunway > 2000

OR

IF Destination.LongestRunway > 1000

 

Is there a way of achieving that ?

 

 

 

Many thanks

ATB
Paul

 

 

EDIT - Removed extraneous distracting info.

Share this post


Link to post
Share on other sites

Hi Gents

 

My apologies for asking so many questions.

 

Rather than me asking for issue by issue assistance,

do any of you perchance have lists of -

- Simvars available in Flight.

- Any known LUA script functions/parameters, e.g. generated_string('GeneratedAirport_Current')

- \Core\SceneryObjects\ and their related .spb.meta GUIDs.

 

If so, copies would be very much appreciated.    :smile:

 

No urgency,

please just let me know if its possible by PM or email.

 

Many thanks

ATB
Paul

Share this post


Link to post
Share on other sites

I don't know why that setting would control both.  Make sure your DestinationAirport in the CareerMissionMetadata is not set to the same airport as the departure.  Also make sure the settings for the destination airport make sense.

 

I can try to get a list of VARs and functions when I get home, but there is a very large number and they are spread out in different places.

 

I think Orion has a tool that makes it easy to get a list of assets of different types.  I think he may have already formatted it into a easy to read list too.

Share this post


Link to post
Share on other sites

Hi Paul,

 

I was given that list of default objects as extracted with the said tool. Here are the lists formatted for use in SBuilderX:

 

http://1drv.ms/1vRjLMw

 

Place them in the LibObjects directory in SBuilderX. Be sure to add the following to your objects.txt:

 

include=Flight_Landmarks_Hawaii.txt
include=Flight_Landmarks_Alaska.txt
include=Flight_Vehicles_Air.txt
include=Flight_Vehicles_Airport.txt
include=Flight_Vehicles_Autogen.txt
include=Flight_Vehicles_Land.txt
include=Flight_Vehicles_Water.txt
include=Flight_Buildings_Autogen.txt
include=Flight_Buildings_Generic.txt
include=Flight_Autogen.txt
include=Flight_airport_objects.txt
include=Flight_NaturalObjects.txt
include=Flight_Generic.txt
include=Flight_Hazards.txt
include=Flight_MissionObjects.txt
include=Flight_Procedural.txt
include=Flight_TempContent.txt

 

 

Here is the list as given to me:

 

http://1drv.ms/1vRjBF7

 

 

There are about 900 default objects in this list, but alas! no floatplanes. I haven't seen Steve's irrigator in the lists either, yet, so I am not certain that they are complete.

 

Best regards.

Luis

Share this post


Link to post
Share on other sites

Here's the list as plain text, as OneDrive's viewer doesn't seem to format the spacing properly: https://dl.dropboxusercontent.com/u/19121193/MicrosoftFlight/placeable.txt

 

It should contain every Flight asset (that is, a file that has an associated meta file) with the type GUID of b083a657-c6e4-4ad4-93f3-8bcf61ae3629 and with the @Placeable tag.

 

I'm not sure if the aforementioned GUID is specific to scenery objects, but it seemed that a large amount were tagged with @Placeable. Perhaps Steve can provide some clarification.

Share this post


Link to post
Share on other sites

Hi Gents

 

My apologies,

I should have replied earlier.

 

I became distracted, testing version 76.       :blink:

 

 


Orion -

Many thanks for your SceneryObjects asset list.

That GUID data will make cargo-item testing so much quicker.

 

 


Louis -

Many thanks for your SBuilder equivalent version

of Orion's SceneryObjects asset list.

 

Nearby Canadian tundra

might be a perfect place to lay out a grid of all those objects.

 

Have you already created such a placement ?

Or, at any location whatsoever ?

 

 

 

Steve's irrigator might be one of these -

Flight_Autogen

{3511ff46-a0c6-4a62-bc2e-6c5ebdaa074b} 2 6 10 1 Rural_Crop_Sprinklers_01

{75a4df84-ce8b-46bf-903f-bee1456f29bd} 2 6 10 1 Rural_Lateral_Irrigator_01

 

 

 

Just took a look at your files, and noticed something -

 

Your MissionObjects list

is substantially both, different from, and shorter than, those I'd found.

 

 

 

When initially creating my potential cargoes listings -

 

For reasons of mission compatibility for any potential users,

I'd only utilised -

- MissionObjects - Sourced from the Core package.

- Plus some extra - Obtained from elsewhere, (intended as a future addon package).

 

Your current MissionObjects listing,

appears to only incorporate Alaska pack's MissionObjects.

 

 

 

For reasons above, I hadn't investigated Alaska's MissionObjects.

 

In retrospect,

that was a somewhat stupid decision.

 

Flight appears to fail gracefully,

with any mission's call to a non-existent//missing MissionObject,

having zero impact, other than not displaying.

 

 


Steve -

Cheers for your comments on GeneratedAirports.

 

I've a long-standing, job-related, suspicion,

which I need to investigate further.

 

Please bear with me, back to you shortly.

 

 

 

re: VARS and functions -

If you'd need to find/extract those VARS and functions,

(rather than already having pre-existing documentation),

then please hold off from performing any search.

 

There's an alternative avenue

which I'd intended pursuing previously.

 

 


Much appreciate all of your assistance gents.

 

Whilst I've made substantial progress with your assistance,

there's still a number of specific issues

I need to either, correct in, or add to, my version of the mission's code,

before it'd be suitable for beta-testing.

 

 

 

ATB

Paul

Share this post


Link to post
Share on other sites

Hi Paul,

 

As you found, this is not a complete list of all default objects. I still must compare to a previous, partially-compiled list, but it appears that it must all be done again. Caveats to any user, but on the other hand, it is a very good start and probably contains most of the useful objects.

 

 

Yes, I had started placing some of the objects in order to get screenshots, but even limiting that project to generic and autogen objects would take too much time. Oh! if only one of Arno's tools could load each object, display it, and take a picture.

 

Best regards.

Luis

Share this post


Link to post
Share on other sites

The tool should be able to locate any file in Flight that has an associated meta file (unless Steve's libraries have a bug). My lists are constrained as described (by GUID (b083a657-c6e4-4ad4-93f3-8bcf61ae3629) and tag (@Placeable), or by virtual path (as sent to Paul)). Is there a particular file that's missing? If so, can you provide the GUID from its meta file (and/or its virtual path and type GUID)?

 

Also, is there a text based format (e.g. INI or CSV) that would be more convenient as output?

Share this post


Link to post
Share on other sites

I imagine that your list is complete, but I probably messed something up and "accidentally" deleted some objects when creating the SBuilder lists. As I said, users should watch for that and I shall try to make a corrected version available as soon as I can. But, in the meantime, most of the useful objects should be in the lists. Sorry!

 

Best regards.

Luis

Share this post


Link to post
Share on other sites

Hi Folks

My apologies for any confusion I'd caused.    :blush:

I'd missed Orion's 09:07 PM post, immediately prior to my last, 09:33 PM.

I was thanking Orion for a different list, (CoreSceneryObjectsAssets.txt),
which he'd supplied the previous evening.

I hadn't realised the list Louis was working from, (placeable.txt),
was a different list, restricted exclusively to @placeable tagged items.




Orion -
Within those parameters,
I don't think your list is missing items,
nor that Steve's libraries might have a bug.     :smile:



re: List formats -
I'll have a think.

Personally, from a mission perspective,
tabbed CSV would likely be most useful.

Something like -
GUID    Object_Name    Group_Folder    Source

e.g.

{BEE1AD24-5D18-437C-85AC-D07A59724839}    Cardboard_Boxes_01    MissionObjects    Core





Louis -
Within the above parameters, you hadn't messed up,
it was my fault, not being aware of the different list types.    :smile:

 

Those missing mission objects I was referring to were -
 

{BEE1AD24-5D18-437C-85AC-D07A59724839}    Cardboard_Boxes_01
{86D67B19-6118-468E-ACC0-6B09F13ED4D6}    Cardboard_Boxes_02
{E5F3D3F8-0793-4CF6-B1FF-C5E97E302515}    Case_ATA_02
{D7921826-58F1-44A9-9D6A-79F50D9F4F80}    Case_ATA_03
{3D4B4041-62D4-4A65-85DB-A70BB57E85EC}    Case_Pelican_01
{533AA4F9-76EB-4E90-856F-4A1AD95821E6}    Case_Pelican_02
{33F34E92-861B-48E6-B147-A7FEFE1F0733}    Case_Pelican_03
{BBE4650B-E29A-45FB-A48E-4404FF246881}    DuffleBag_01
{1220B30E-5C7E-45BC-8D49-7E728B11558F}    DuffleBag_02
{47A05624-AC85-4859-AAAF-5E3651CD2D62}    Money_Bag_01
{8B12C3C7-F975-4CFF-A662-7F114F1D4113}    Money_Bag_02
{C7E28540-7FFA-4DB6-A39A-9DC002EC00F0}    Suitcase_01
{C93688D5-1796-48F0-8436-8BEAA984D903}    Suitcase_02
{4D887436-A31C-45D5-A41A-482AB747A425}    Suitcase_03
{9DF3E294-4EAB-48E8-AA9C-CEF99EF0F274}    Travel_Trunk_01
{7B3DE2EC-741F-44F7-BD18-FFF3ED3859CB}    Wood_Box_Large_01
{ECEDE690-9183-4CC1-868C-0CFB5717E9C9}    Wood_Box_Large_02
{EBD23EF8-91E8-4ADE-8AFE-C36B29AE63C4}    Wood_Box_Med_01
{D86F3DD6-E298-470F-BB29-65439A9D2A51}    Wood_Box_Med_02

N.B. I've only listed objects suitable for use as CARGO.




Anyone -
The questions would be -

Why did MS tag certain objects, as placeable, yet not others ?

Does placeable mean -
- Compileable in a scenery bgl ?
- Positionable in a mission scenario ?



HTH
ATB
Paul

Share this post


Link to post
Share on other sites

 

Does placeable mean -

- Compileable in a scenery bgl ?

- Positionable in a mission scenario ?

 

I believe that it means both. You can add scenery objects to a .bgl by seeing which objects are placable. Theoretically, any .MODEL Scenery Object is placeable.

 

You can also do this in missions. In the Wedding Party mission, the yacht was placed by using the <MDL_guid> tag to place the Scenery Object...

 

  This meant that you can place any scenery object in your mission by simply using the tag and setting the GUID of the object which you wish to use, alongside the relative "WorldPosition," which consists of a chosen: Latitude, Longitude and Altitude. 

Share this post


Link to post
Share on other sites

I wish I could help here, but this is way over my head, keep up the good work guys! I'm sure you will whip this thing yet. :excl:

Share this post


Link to post
Share on other sites

I can clear some thins up :).  It is likely Orion's list doesn't have everything.  The guid type he is searching for is MaterialVariations, which is correct.  However, not every useable MaterialVariation has @Placeable.  Generally if you see a tag that starts with '@' it is a hint to some Flight SDK tools.  In this case @Placeable means that it will show up in Flight's internal MScenes tool which is used for placing scenery objects (OBX), but in reality any MaterialVar can be placed.  Also, it is possible in Flight to use Autogen Groupings or SeasonalVariations as guids for the Scenery\Library object.  I'm not 100% sure if they can be used for missions though.

 

There are some that probably won't make sense to use such as unique landmarks, "Autogenerated" buildings which are usually used on airports or near high detail areas, or MatVars that are used for SimObjects.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this