Random Maps: Jump to Version 3.0 Upgrade Guide!
Gab Windows are text windows that you can dynamically put on the game screen, whether they are part of the game’s HUD or a speech bubble above the player or any other NPC. As they interpret text codes (\C, \V, …), it’s super simple to do something with Icons and Variables!
Features
- You can add as many Gab Windows as you want to your Game to create a HUD
- A Gab Window can be used as part of your HUD or as a speech bubble above your hero or an NPC
- Gab Windows understand Message Codes. You can easily choose a Text Color, draw Icons and display Variables!
- Auto Expire: A Gab Window will automatically close itself after x frames (speech bubble) or stay until you remove it using a plugin command (HUD)
- A Gab Window will be less opaque when it covers the player
- You can override the background type (window, dimmed, transparent) and the window skin for each Gab Window
- Open & close animations are played
- Gab Windows are persisted in your save game
JavaScript
MZ users can use Plugin Commands to add or remove Gab Windows, but they can also use JavaScript. MV users must use JavaScript to use this plugin.
Add Gab Window
$gameScreen.addGabWindow(id, {
align: ?,
anchor: ?,
autoExpire: ?,
backgroundType: ?,
backOpacity: ?,
eventId: ?,
fontSize: ?,
height: ?,
hidden: ?,
target: ?,
text: ?,
textPadding: ?,
width: ?,
windowskin: ?,
x: ?,
y: ?,
})
Example
$gameScreen.addGabWindow('helloWorld', {
align: 'center',
autoExpire: 60,
eventId: 0,
text: '\\C[1]Hello World!',
})
Required Arguments
Identifier
You must pass a unique identifier. This helps you to refer to your Gab Window later. It can be any string.
Optional Parameters
Parameters in { } are optional! When not given, the plugin will use a default value. Parameters are a key-pair value, e.g., use {align: ‚left‘} to set text alignment to left.
Text
Text to show. You may use Text Codes (\C, \V, …).
text: '\\C[1]Hello World!',
Due to the nature of JavaScript, you need to escape the backslash symbol. Use \\V[1] instead of \V[1].
Positioning
You have several options to choose from.
When you want to add your Gab Window as part of your game’s HUD, you can simply pass x and y coordinates.
x: 200,
y: 200,
When you want to bind your Gab Window to the player, pass eventId: 0
as a parameter.
eventId: 0,
When you want to bind your Gab Window to an Event, pass an event ID!
eventId: 1 or any other number
You can also use „target“ instead of eventId. „Target“ is a more advanced option. You can choose from:
- Follower 1, Follower 2, Follower 3, …
- Boat, Ship, Airship,
- Event 1, Event 2, …
- Player
Example:
target: 'Follower 1'
Width
The plugin guesses the width automatically depending on the given text.
Alternatively, you may pass a positive number here.
Height
The plugin guesses the height automatically depending on the given text.
Alternatively, you may pass a height value:
height: 100,
All Parameters
align | choose from ‚left‘, ‚right‘, ‚center‘ |
anchor | { x: number from 0 to 1, y: number from 0 to 1} Example: { x: 0.5, y: 1.0 } Default: { x: 0.5, y: 1.0 } when bound to a character, { x: 0, y: 0 } otherwise |
autoExpire | when given, number of frames until this gab window closes itself automatically Default: Window stays opened until closed by plugin command |
backgroundType | choose from 0 (default window) 1 (dimmed background) 2 (transparent) Default: 0 |
backOpacity | number 0 <= x <= 255 |
eventId | – when 0: Gab Window positions above the Player – when any positive number: Gab Window positions above Event with given ID Default: disabled |
fontSize | number |
height | height in pixels When left out, the plugin will calculate the height automatically for you |
hidden | true / false Default: false |
padding | window padding |
target | Choose from: – follower 1, follower 2, follower 3, … – event 1, event 2, event 3, … – boat – ship – airship – player Example: ‚follower 1‘ Default: not used See also: eventId |
text | text to show. You may use Text Codes (\C, \V, …) |
textPadding | number |
width | width in pixels When left out, the plugin will calculate the width automatically for you |
windowskin | name of an image file in /img/system/ (exluding .png) Example: 'Window2' Default: default window skin |
x | position (can be left out when Event ID is passed) |
y | position (can be left out when Event ID is passed) |
Move Gab Window
$gameScreen.moveGabWindow(id, x, y)
Change Text
$gameScreen.gabWindowChangeText(id, text)
Change Gab Window
$gameScreen.changeGabWindow(id, { ... })
You may pass the same parameters as for the method $gameScreen.addGabWindow.
Remove Gab Window(s)
$gameScreen.removeGabWindow(id)
OR
$gameScreen.removeAllGabWindows()
Show/Hide Gab Window(s)
You can temporarily hide and show Gab Windows.
$gameScreen.hideGabWindow(id)
$gameScreen.hideAllGabWindows()
$gameScreen.showGabWindow(id)
$gameScreen.showAllGabWindows()
Map Notetags
You can put this Notetag to any map to disable Gab Windows entirely.
<No Gab Windows>
Download
Download (right-click, save as…)