Categories

From FSDeveloper Wiki
Revision as of 07:47, 24 April 2008 by BASys (talk | contribs) (Creating New Categories)
Jump to: navigation, search

Overview

Categories are the way that FSX separates the missions. You can see them on the mission selection screen; the default categories in FSX are:

  • Tutorial
  • Just for Fun
  • The Good Life
  • Backcountry
  • Emergency
  • Airline Pilot
  • Challenges

FSX Acceleration adds these:

  • Racing
  • Military
  • Test Pilot
  • Law Enforcement
  • Acceleration

Every mission must belong to at least one category, but can belong to more. The categories your mission belongs to are set in the ScenarioMetadata node.

As with many FSX objects, categories are known by GUIDs, long strings of characters like this:

{93290E1B-CDE3-4263-B7AE-B8F87F99D901}

It's the GUIDs that need to be entered into the ScenarioMetadata Category field, not the category name.

Creating New Categories

If your mission doesn't fit into one of the existing categories, you can create a new one. Maybe you want a category for all of your own missions, so that players can find them easily. Do try to use an existing one if possible though; if there are too many categories then it will be just as hard to find a mission as if there were no categories at all.

Creating a new one is easy if you can use a text editor! The categories are all defined in XML files, in the Categories folder under your FSX installation. There will be at least one, and possibly more of these files already.

  • FSX uses FSCategories.xml
  • FSX Acceleration adds FSXXCategories.xml

Don't change these files! When you upgrade or patch FSX, your changes will be lost. Also, if you give your mission to other people then your edited copy of, say, FSCategories.xml would kill other people's missions if they've also changed the same file.

Instead, create a new file containing only the new categories you need. The easiest way is to copy FSCategories.xml to, say, MyCategories.xml . Use a sensible name, so that other people's category files don't clash with yours. Once you've copied it, you can edit it using most text editors. Notepad will do fine, but don't use Wordpad (or Word, OpenOffice etc.) because they will change it in unexpected ways.

The top of the category file has some details which must be unchanged. The very last line must be left intact too. Between these are the actual category descriptions. This XML fragment shows a category file with a single new category, but you can add as many new categories as you need to a single XML file.

<?xml version="1.0" encoding="Windows-1252"?>

<SimBase.Document Type="AceXML" version="1,0" id="FSCategories">
    <Descr>AceXML Document</Descr>
    <Filename>MyCategories.xml</Filename>

    <SimMissionUI.ScenarioCategory id="{82c19bb4-1779-43d8-b7d1-8c6a6f8b17d0}">
        <Descr>This is a new category just for my missions.</Descr>
        <Title>My New Missions</Title>
        <PreviewImage>banner_mymissions.bmp</PreviewImage>
    </SimMissionUI.ScenarioCategory>

</SimBase.Document>

The key parts you need to change are:

  • Filename. This should match the actual filename of the file it's in.
  • Descr. This is the descriptive text that appears in the FSX Mission GUI.
  • Title. This is the new category's title, used in the drop-list of the FSX Mission GUI.
  • PreviewImage. The name of a bitmap with your new category's banner.
  • id (Part of the SimMissionUI.ScenarioCategory). This is the GUID (unique identifier) for your new category, see below.

As always, XML is very fussy! All the special symbols, and even the case of the words, is important. If you change "Descr" to "descr" for example, it won't work.

The only other thing you have to do is create a banner image. The easiest way is again to copy one of the existing ones and then edit that using your favourite image editor. Make sure the image's filename matches the name given under "PreviewImage" in the XML file.

Now you can run FSX and see "My New Missions" appear in the category list.

GUID

Create the GUID using -

Recommend the latter, it's part of several MS SDKs, but available standalone for Exchange.

Related

Internal

External

If you haven't found what you're looking for here, then we'd recommend, (in order of preference) -

  • AVSIM - Mission downloads (newest first).