Cfs Operations

Setdp - Damage Profile Scaling Utility
Version 1.0.1

This utility scales the damage box values in an aircraft Damage Profile file. It is a 32 bit console mode program designed as a companion to the Setscale utility.

It extracts each of the values located under the BOXES section of the Damage Profile file and "scales" each of entries values, multiplying by the specified scale.

This version fixes a problem where the .DP file is not always completely updated under Windows 9x.

Quick Start

To use Setdp, simply change to the aircraft directory of the aircraft you want to modify and run the program, specifying the name of the .DP file. For example:

C:\>cd [CFS Directory]\Aircraft\Foo
C:\>Setdp FOO.DP

Details

Before operating on a Damage Profile file, Setdp creates a backup copy of the file using the following naming convention:

Dpbasename.Zyyyymmddhhmmss.DP

where "yyyymmddhhmmss" is the date and time when the utility began to process the specified file. For example, given a Model file called:

FOO.DP

a backup file would be created that looks something like this:

FOO.Z19990528130823.DP

The "Z" in the timestamp is designed to keep the backup file lower in the collating sequence than the original file. This should ensure that the original file always appears first in a standard directory listing.

Setdp is designed to remove this backup file if processing fails for any reason.

When Setdp operates on a Damage Profile, it does not operate on the original file. Instead, a temporary file is created and the contents of the Damage Profile is copied onto it. Setdp then operates only on this temporary file and, if the update is successful, copies the contents of the temporary file onto the original. The temporary file is designed to be removed under all circumstances.

Finally, if the update is successful, Setdp removes any existing .CDP, or "compiled damage profile" file. CFS will re-generate this file the next time the Damage Profile is referenced.

Setdp has been tested on Windows NT Version 4 with SP5, Windows NT Version 5 Beta 3, Windows 95 OSR2 and Windows 98.

Finally, although every effort has been made to make Setdp as robust and error free, such perfection in software is inpractical. As a result, you should ALWAYS BACKUP the aircraft container before using Setdp against A Damage Profile.

Usage/Help

Usage: Setdp [-nologo] [-hvx?] [-s Scale] Dpfile [Dpfile ...]

Options:

  • h - Help, (this)
  • s - Specify the scale value to set. Default is 2.
  • v - View Only. View the current scale without updating it.
  • x - Debug. Emit [numerous] debug messages.
  • ? - Usage.
  • nologo - Don't display copyright information.
  • Scale - The scale value to update the Damage Box values with.
  • Dpfile - The name of the Damage Profile file to modify.

With no parameters, other than the name of a Damage Profile file, Setdp adjusts the Damage Box values in the specified Damage Profile file by mulitplying them by the [default] value "2".

The "-s" option can be used to specify a different scale.

A backup copy of the original Damage Profile file is created using a name built in the following format:

Dpbasename.Zyyyymmddhhmmss.DP

where "yyyymmddhhmmss" is the date and time when the utility began to process the specified file.

Installation

Installation is simple; just copy the .EXE file into a directory listed in the %Path% Environment variable, the Windows directory, the Windows\Command directory or the Windows\System directory.

The distribution also includes debug symbols. This file should be copied into %SystemRoot%\Symbols\Exe, in order for the debugger to find it. The .DBG symbol file is needed only if you want to run the program under a debugger such as ntsd. The file is not needed for any other reason than to make the internal symbols available to the debug program.

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.