PLUGIN/2.0

Translated Document

  • This document has been translated from the original Japanese by members of the Ukagaka Dream Team community.
  • To see the original document, click here.
  • To submit corrections/updates, see our repository to open an issue or find where to contact us.
  • Last modified:

    Reference: PLUGIN/1.0 (External site)

    Preface

    PLUGIN/2.0 is a revision of the old specification (1.0), implemented in SSP.

    This standard is under development and is subject to significant changes.

    Version design philosophy and impact assessment

    Design concept

    The SAORI group will be modified so that users can easily communicate with the main unit and ghosts, and the "convenience functions" that have been dispersed among the ghosts will be integrated to improve convenience for users.

    It would be better to shift the burden from the plugin developer to the execution environment... maybe.

    Processing system

    Please be prepared as this assumes that various burdens will be transferred to the processing system. (bitter smile)

    Plugin author

    Since a new request export is defined for the call, there is no need to consider conflicts with PLUGIN/1.0.

    Notifying ghosts of scripts, events, etc. becomes very easy.

    Ghost author

    Even if a particular plugin is not supported, it is not fatal because of the default script specification (see below).

    If you really don't want the default script to ruin the atmosphere, let's deal with it...

    Version impact assessment

    It's convenient and easy to use because you can handle a small group of functions for each ghost all at once.

    entity

    Two files are required: a configuration file "descript.txt" and a dll file.

    DLL

    See the DLL page.

    ※YAYA/KAWARI as PLUGIN users and module authors can skip this section.

    request provisions

    A typical example of a request is as follows. ※Line feed vode = CR+LF

    GET PLUGIN/2.0
    ID: OnGhostChange
    Charset: UTF-8
    Reference0: 54
    
    NOTIFY PLUGIN/2.0
    ID: OnMenuExec
    Charset: UTF-8
    Sender: Crystallite
    Reference0: 17982
    

    Terminate with a blank line. Note that, as with other DLL specifications, it is not necessarily zero-terminated.

    The PLUGIN/2.0 format basically follows the SHIORI/3.0 specification.
    It consists of an ID header, which is an event identifier, and a Reference header, which is an arbitrary number (8 or more) of additional information.
    The contents of the Reference will vary depending on the ID.

    If you want to include newlines in the contents of References, etc., or if you want to specify that they must be included, it is *strongly recommended* (though not a specification) that you specify that only the characters you want to avoid are URL-encoded such as %8f%73.

    The contents of Sender will be the name of the ghost when invoked, according to the calling specifications from the ghost side described later.
    When called from the main side, the Sender header itself will disappear or an empty string will be assigned.
    Note that it does not include "the name of the main unit (SSP, CROW, etc.) like SHIORI.

    See the PLUGIN Event page for the type of request (ID) that will be notified.

    response provisions

    An example response is shown below. ※Line feed code = CR+LF

    PLUGIN/2.0 200 OK
    Charset: Shift_JIS
    Target: 54
    Event: OnResourceLow
    EventOption: notify
    Reference0: 19
    Reference1: 31
    Reference2: 65
    Script: Script~
    ScriptOption: nobreak,notranslate
    

    ※Only for processing systems that support multiple launches※ If there is a ghost that matches the Target among the currently running ghosts, it will be processed by that ghost.
    If "__SYSTEM_ALL_GHOST__" is specified, "all running ghosts" will be notified.

    If not applicable, or if nothing is specified, an appropriate ghost will process it depending on the system.
    In addition, if called using the call specifications from the ghost side described below, it will return to the calling ghost unless explicitly specified in the Target header.

    ※In a processing system that does not support it, there is only one ghost in the first place, so that ghost will be called every time.

    Event/Reference

    The Event and Reference headers are events sent to the ghost side.
    If the ghost does not respond to this, the default script, the Script header, is played.

    ScriptOption

    ScirptOption is an option specification that applies only to Script header content.

    notranslate
    Don't go through ghost translation.
    nobreak
    Execute the specified script after the end of the current talk, without interrupting.

    EventOption

    EventOption is an optional specification that applies only to Event header content.

    notify
    Notify ghosts of specified events via notify

    Event, EventOption, Reference, Target, Script, and ScriptOption are all optional.
    For example, if you only want to send events and do not need the default script, omit the Script/ScriptOption header.
    ※If you only want to send the script, the opposite is true.

    Plugin ID

    See the ID section of the Plugin Settings.

    descript.txt

    See the Plugin Settings page.

    Ghost side extension

    Script extensions

    \![raiseplugin,(Plugin name or ID),(Event),Reference0...]
    \![notifyplugin,(Plugin name or ID),(Event),Reference0...]
    

    Sends the specified event to the specified plugin. Unless a target is specified on the plugin side (system_any), the response from the plugin is preferentially assigned to the ghost that executed raiseplugin, so it can be used in a similar way to SAORI.

    The send command is GET in the case of \![raiseplugin], and NOTIFY in the case of \![notifyplugin].

    SHIORI Event extension

    See the installedplugin section.