Cfs Operations

Setclass - Scenery Surface Type Utility
Version 1.0.0

The Setclass utility changes the Surface Type parameter of the default Combat Flight Simulator terrain texture files.

Introduction

The new-style scenery included with Cfs makes use of a terrain texture list. This list is contained within the CLASSLIST.BGL file. The list stores all of the information needed by the terrain rendering component to render the textures and to communicate the appropriate characteristics to the simulator. One piece of information stored in the list is a "Surface Type" value which describes the "feel" that the simulator should transmit if the user's aircraft is in virtual contact with the terrain surface. There are several surface types defined:

[Originally defined by FS98]

Concrete
Grass
Water
Bumpy grass
Asphalt
Short grass
Long grass
Hard turf

[Some new values defined by Cfs]

City
Forest
Psp matting

Appropriately enough, Cfs assigns the "Water" surface type to terrain textures which are predominantly composed of water.

The Problem

Unfortunately, the Cfs simulation engine treats any contact with a surface having the "Water" surface type as a "Crash" condition. This means, of course, that in Cfs we cannot "ditch" our planes, nor can we fly amphibious aircraft and land them on the water.

The Solution

As with the Setscale utility, Setclass offers not really a solution, but rather a work-around. The idea is simple: If Cfs considers textures with the "Water" type to be crashable, then we just assign water textures a different surface type. This is exactly what Setclass allows you do do.

Using Setclass

The Setclass utility is easy to use. Just double-click on the program file. As the program loads, it attempts to locate Cfs by reading installation information from the Registry at:

HKLM\SOFTWARE\Microsoft\Microsoft Games\Combat Flight Simulator\1.00

This Registry key contains a "Path" variable whose value is the location of your Cfs installation.

If Setclass cannot find this Registry key, it displays an error.

Once your Cfs installation is located, Setclass loads the default CLASSLIST.BGL file which lives in:

[Cfsdirectory]\Scenery\All\Scenery

If the file cannot be found, Setclass displays an error.

After mapping the CLASSLIST.BGL file into memory, the program walks through the Bgl code, building an internal list of texture file entries. Once that list is compiled, the Setclass program appears, initially displaying a list of just those textures which have the "Water" surface type. If you have previously changed all of the "Water" surface types to some other value, then Setclass display a list of all textures.

You may select individual entries in the list and the texture file representing that class will be displayed. Note that some texture classes have more than one file. For these classes, Setclass displays the first file in the class.

To change the surface type for a class, you must click on the small box on the left side of the list so that a check appears in the box. If you like, you can click on the "Select All" button and this will check off each element of the list. You may use the "Clear All" button to un-check all of the elements in the list.

Once you have checked at least one texture class, the "Update" button and the "Surface Types" list become active. You must select the Surface Type that you want from the list and then click the "Update" button. Once the update is complete, the Bgl is re-scanned, the list is re-created and then displayed.

Changes to the CLASSLIST.BGL file are immediate; no manual "Save" is needed.

If you decide that you want to revert to the default surface types that the original file contained, you can click the "Default" button. This resets all of the surface types for each texture class to the values in the CLASSLIST.BGL file as shipped by Microsoft.

As with Setscalew, the Setclass window is size-able, so if it's too small for you, just resize it as you would any program's window. Each control includes a "tip" describing it's function.

You may quit Setclass by clicking the "Quit" button, or by pressing the [ESC] key.

Typical Usage Scenario

  • Make a copy of the CLASSLIST.BGL file in:

    [Cfsdirectory]\Scenery\All\Scenery 
  • Run Setclass. 
  • Click "Select All" to select each "Water"-type texture in the initial list. 
  • Select "Bumpy Grass" from the "Surface Types" list. 
  • Click "Update". Note that when the update is complete, you will have an empty list.
  • - Quit Setclass.

The next time you run Cfs, you'll be able to land on the water.

Limitations

This first version of Setclass has two limitations which may be addressed in future versions:

  1. No backup copy of the original CLASSLIST.BGL file is made.
  2. There is no provision for manually opening the CLASSLIST.BGL file; Setclass must be run on a system which has Cfs installed and will only find the single copy referenced in the Registry.

Installation

Installation is simple; just copy the file into a directory anywhere on your system. For ease of use, you may want to create a shortcut for the program on your Desktop.

Download!
 
Home
News
Missions
Campaigns
Gauges
Scenery
Modules
Reference
Links

 

Copyright © 1999-2003 Bill Potvin, II. All rights reserved.
All specifications subject to change without notice.
All items available for download from this site are copyrights of their respective authors.
Items may not be redistributed without the permission of the author.
Products and companies referred to herein are trademarks or registered trademarks of their respective companies or mark holders.