Stressed user reference

From Stunts Wiki
Revision as of 06:01, 7 February 2010 by Duplode (talk | contribs) (A reference for stressed users)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

This article aims to be a full-fledged documentation of stressed functions and capabilities. It should be taken as under construction for the foreseeable future. The current version of the article covers revision 53 of stressed.

General program organization

stressed is an editor of resource files of various kinds. A new session of the program looks like this:

(insert blank screenshot)

To the left of the screen is the resource list (1, shown with the right-click drop-down menu activated). It is empty on the screen shot because a blank resource file is created on opening a new session. The functions on the drop-down menu are available for all sorts of resource files, and are explained below:

  • Move first/up/down/last: change the position of a resource on a resource list.
  • Sort: sorts resources alphanumerically.
  • Insert: inserts resources on the position before the latest-selected resource. The user will be prompted to choose the type of resource to be created. Currently available options are bitmap, shape and text resources.
  • Duplicate: duplicates a resource. The user is expected to provide a different 4-letter ID for the duplicate.
  • Rename: renames a resource.
  • Remove: removes a resource.

Naturally, all drop-down commands other than Sort and Insert require selecting a resource with a left-click.

The right part of the screen is occupied by the interface to the various resource-handling modules, which will be covered in detail shortly.

stressed is capable of opening any proper resource file, but will only parse adequately bitmap, 3D shape and text resources. IDs for known resources of the recognized kinds are stored in an internal database. If a resource is not listed on the database, the user will be prompted to choose either ignoring the resource or attempting to parse as one of the supported types.

Another important observation is with regard to file formats. stressed will open resource files of all kinds irrespective of extension. Compressed files will be uncompressed by the integrated stunpack program. On using the Save command, the originally opened file will be overwritten, with the same extension, irrespective of any file format changes; while with using Save As the user will be expected to provide the correct file extension. It is important to remember that stressed does not compress files on saving; therefore, the unpacked-file extensions should always be used, and after the editing work is done any compressed bitmaps or 3D shape files (.PVS, .P3S) should be moved away from the game folder so that the unpacked files are loaded. Please refer to the Resource file format article for the correct file extension usage.

The bitmap module

(image)

The upper part of the module allows editing of the parameters described on Resource file format#Bitmap Images:

  • Width and Height: bitmap dimensions in pixels.
  • X and Y: coordinates of the upper-left corner of the bitmap. These are usually screen coordinates (on a 320x200 pixel grid, with the (0,0) point being on the upper-left corner of the screen); for some bitmaps, such as dashboard alpha masks, however, the coordinates may be relative to another bitmap.
  • Miscellaneous number fields: unknown1 and unknown2 fields.

The main window displays the currently loaded bitmap. Finally, the commands on the lower part of the screen are:

  • Alpha: toggles display of transparency:
  • 1X, 2X and 4X: zoom levels of the bitmap display.
  • Import and Export: allow importing of and exporting to external image files, making bitmap edition possible with regular image editors. Supported formats are PNG, Windows Bitmap (.bmp) and JPEG - PNG being by far the most convenient option.

A couple extra observations must be made on the importing process. Stunts uses a 256-bit palette, with the FF value being reserved for transparency. stressed can handle RGB images on import, converting them to the correct palette, as well as transparency on image files. Using indexed files actually may make things harder, as you will need to set up the external image editor to use the palette, and transparency data will be lost.