Stressed user reference
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.
The 3D shape module
(image)
The 3D shape interface is divided into a preview window, which renders the 3D shape in real-time, and a command interface through which individual modifications to polygons [1] and vertexes are made, as well as toggling of global editing and viewing options. First we'll describe the actions possible on the preview window.
- Left click and drag: rotation around X and Y axes of the 3D model.
- Right click and drag: rotation around Z axis of the 3D model.
- Left + right click and drag: vertical displacement of the model
- Middle click and drag: horizontal and perpendicular-to-screen (doubles as zoom in and zoom out) displacement.
- Left click on any polygon: single polygon selection (does not work properly on some flavours of Linux).
- Shift + Left click on polygons: multiple polygon selection.
- Right click on any polygon: single polygon de-selection (from multiple selections) and selection (can be used if left-clicking is buggy on your system).
The visualisation window is occasionally affected by bugs. Sometimes when changing resources the preview may not appear. In that case, just switch back and forth between resources and the preview will load. Also, screen corruption on the window may occur when editing large files (like GAME1/2) for long periods of time. In that case, just save any modifications if desired and reload the file.
Next, we'll describe the three charts occupying most of the command interface. Details about the values and parameters being edited can be found on Resource file format#3D shapes.
(polygon chart)
The leftmost panel is the polygon chart. It allows for edition of general polygon properties. In order to do so, a polygon must be selected, either via the preview window or by left-clicking any row on the list. The columns of the chart correspond to:
- Unnamed label: ordering index of the polygon.
- Type: sets the type of graphical primitive - particle, line, polygon with 3 to 10 sides, sphere or wheel.
1. back - For the sake of convenience, "polygon" will be taken to stand for graphical primitive in most contexts.