Template:VisuMZ Common Event Menu Plugin Commands

From Yanfly.moe Wiki
Jump to navigation Jump to search

The following are Plugin Commands that come with this plugin. They can be accessed through the Plugin Command event command.

---

Common Event Menu Plugin Command

CommonEventMenu Layout 062 Standard Sub-Corner-List.png

CommonEventMenu Command1.png

This is the Plugin Command that lets you create the Common Event Menu. The Common Event Menu is inaccessible from any other way.

---

Common Event Menu: Start
- Start a Common Event Menu with the below settings.

  Common Events:
  - Select the Common Events you want shown in the menu.

    Cancel Event:
    - Runs this Common Event when Cancel is pressed.
    - Insert 0 to disable Cancel.

  Layout:
  - Pick a layout to use for the Common Event Menu.
  - Select "Custom" to position windows via JavaScript.
  - Picking '-' will not create any Common Event Menus.
  - Look on Yanfly.moe for a visual list of all the layouts.

    Custom Layout:
    - Modify the settings for a Custom layout.
    - Requires the above parameter to be "Custom".

  Optional Settings:
  - Optional settings for the Common Event Menu.

!! WARNING !!

Not all pre-made layouts work with all screen resolutions as this is very much so the case if you plan on using a smaller-than-normal screen resolution. If a specific layout does not work with a resolution you want, pick another layout that works. These layouts are made under the industry standard of a 16:9, 1280x720 screen resolution.

---

CommonEventMenu Command2.png

Common Events (Sub Settings)
- Select the Common Events you want shown in the menu.

  Specific ID's:

    ID(s):
    - Select the Common Events you want displayed in the menu based on their
      exact ID's.

  ID Range:

    Range Start:
    - Select the Common Event ID range to start from.
    - This will select all the ID's up to the end range.

    Range End:
    - Select the Common Event ID range to end with.
    - This will select all the ID's from the start range.

  JS:

    Custom JS:
    - Create a list of Common Event ID's with JavaScript.

  Filters:

    Empty Name:
    - Apply filter for Common Events without a name?

    ----- Name:
    - Apply filter for Common Events with ----- in their name?

---

CommonEventMenu Command3.png

Custom Layout (Sub Settings)
- Modify the settings for a Custom layout.
- Requires the above parameter to be "Custom".

  Main Windows:

    JS: List Window:
    JS: Picture Window:
    JS: Help Window:
    JS: Sub Window:
    - Determine how this Window is positioned.
    - Only applies with Custom layouts.

  Extra Windows:

    JS: Extra Window 1:
    JS: Extra Window 2:
    JS: Extra Window 3:
    JS: Extra Window 4:
    JS: Extra Window 5:
    JS: Extra Window 6:
    JS: Extra Window 7:
    JS: Extra Window 8:
    JS: Extra Window 9:
    JS: Extra Window 10:
    - Determine how this Extra Window is positioned.
    - Only applies with Custom layouts.

!! WARNING !!

These settings do NOT apply to Custom Layouts in order to reduce confusion for the game dev. If the game dev wishes to implement them in, then utilize Scene_Base's "isBottomHelpMode" and "isRightInputMode" functions when inserting the JavaScript code needed.

---

CommonEventMenu Command4.png

Optional Settings (Sub Settings)
- Optional settings for the Common Event Menu.

  All Windows:

    Background Type:
    - Select the background type for all of the Common Event Menu windows.
      - 0 - Window
      - 1 - Dim
      - 2 - Transparent

    Boundary Size:
    - Pick the boundary size for the layout.
    - Does NOT apply to Custom Layouts.
      - Full      (Game Screen)
      - UI Size   (UI Resolution)
      - Padded    (16 px Border)
      - Huge      (32 px Border)
      - Large     (48 px Border)
      - Medium    (64 px Border)
      - Small     (96 px Border)
      - Tiny      (128 px Border)
      - Micro     (160 px Border)
      - Wut       (192 px Border)

  List Window:

    List Columns:
    - The number of columns the List Window has.
    - Use 'auto' to determine it automatically.
    - You may use JavaScript.

    Auto Select:
    - Which Common Event should be selected at the start?
    - Use 'last' for last picked ID.
    - You may use JavaScript.

    Auto-Sort ID's:
    - Automatically sort the Common Event's inserted into the Plugin Command
      by their database ID's?
    - This only applies to the "Specific" and "Custom JS" list where the
      order of the ID's inserted can be controlled. "ID Range" settings are
      always going to be sorted by ID.
    - This can be disabled for those who wish to manually switch around the
      order of their displayed Common Event ID's.

    Text Alignment:
    - How do you want the text to be aligned for the List Window?

  Cancel Button:

    Show Cancel Button:
    - Show the Cancel Button?
    - Requires a Cancel Common Event.

    Button Scale:
    - Scale the button size by this much.

    Button Position:
    - Select where the button appears.

    Button Offset X:
    - Offset the Cancel Button X position by this much.

    Button Offset Y:
    - Offset the Cancel Button Y position by this much.

  Picture Window:

    Auto-Fit Image:
    - Automatically fit the picture to the size of the Picture Window if the
      picture is larger than the window?

    Image Anchor X:
    - Pick how the picture is anchored horizontally in the Picture Window.

    Image Anchor Y:
    - Pick how the picture is anchored vertically in the Picture Window.

---