• Tutorials

  • Home
  • SpecialGraphic

    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

    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:
    Parameter [1] = A letter defining the circumstance that caused the script to be executed. See below for a list.
    Parameters returned from the script:
    Parameter [2] = if not empty, graphic will be displayed using pixel at (0,0) as the 'transparent' color.
    Parameter [3] = Names the graphic file. If string is empty, engine will not attempt to display any graphic.
    Parameter [4] = leftmost pixel where the graphic will be displayed.
    Parameter [5] = topmost pixel where the graphic will be displayed.
    Parameter [6] = leftmost pixel within the graphic that will be displayed
    Parameter [7] = topmost pixel within the graphic that will be displayed.
    Parameter [8] = width of the graphic.
    Parameter [9] = 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.

    Context

    None.

    Circumstances under which the hook is called