Special Graphic


At certain tines during gameplay this hook is called to allow the designer to display an arbitrary graphic on top of whatever else has been displayed. The location, size, and transparency are all options.




Search Order

This hook should be attached to a 'Global' Special ability. A 'Global' Special Ability is a Special Ability that has been defined but need not be attached to a character, event, etc. The name of this Special Ability is always “SpecialGraphics”. This Special Ability may have as many hooks (or scripts) as are needed by the designer. The names of the scripts are arbitrary except that that the characters before the first dollar sign ('$') determine under what circumstances the hook will be called.

Example: A hook named “APF$Display Compass” will be executed in circumstance 'A', 'P', or 'F'.

If more than on hook satisfies the 'circumstance' then they will all be run in alphabetic order. For example:



AFP$CompassDisplay

AFP$DisplayCompass

APF$DisplayCompass

Context

  1. None

Parameters

All but one of the hook parameters are 'Return' parameters. The engine sets all the return parameters to an empty string before activating the hook. The hook modifies those parameters if it wants a graphic to be displayed. The following parameters are required:

Parameter provided to the script

  1. A letter defining the circumstance that caused the script to be executed. See below for a list.

Parameters returned from the script.

  1. If not empty then the graphic will be displayed using the pixel at (0,0) as the 'transparent' color.

  2. Names the graphic file. If this string is empty the engine will not attempt to display any graphic.

  3. The leftmost pixel where the graphic will be displayed.

  4. The topmost pixel where the graphic will be displayed.

  5. The leftmost pixel within the graphic that will be displayed

  6. The topmost pixel within the graphic that will be displayed.

  7. The width of the graphic.

  8. The height of the graphic

The graphic will not be stretched or distorted in any way. It is a pixel-for-pixel copy from all or a portion of the source graphic onto the game's window. Parameters 4 through 7 allow you to choose a frame of a larger graphic. For example, you might have a graphic of a compass with four frames for the four directions and you could choose one depending on the party's direction. Or you might have a graphic with a daytime frame and a nighttime frame.

Circumstances under which the hook is called