Set the quest Balloon on the NPC's head.
A downloadable project
Fixed it so that it runs when you press start and won't stop until you command it to clear.
version 1.0.2
Fixed the overlapping of the same ID on other maps.
version 1.0.3
Added conditional command opening based on switch ID and variable and positioning.
SetPlayerIcon iconIndex Set the Balloon for the player character.
Set the number as follows
Added the ability to make balloons disappear.
A. Installing the Revised Plugin
- Backup Your Project:
- Always create a backup of your RPG Maker MZ project before making changes to plugins to prevent data loss.
- Replace the Existing Plugin File:
- Navigate to your project's
js/plugins
directory. - Locate the existing
PLK_Balloon_NPC.js
file. - Replace it with the revised plugin code provided above.
- Ensure that the file is saved correctly without any syntax errors.
- Navigate to your project's
- Open RPG Maker MZ and Access Plugin Manager:
- Launch RPG Maker MZ.
- Open your project.
- Navigate to
Tools
>Plugin Manager
.
- Remove the Old Plugin Entry (If Present):
- If
PLK_Balloon_NPC
is already listed, select it and clickDelete
to remove the old version.
- If
- Import the Revised Plugin:
- In the Plugin Manager, click the
Import
button. - Select the updated
PLK_Balloon_NPC.js
file from yourjs/plugins
directory. - The plugin should now appear in the list with the latest version (
1.0.3
).
- In the Plugin Manager, click the
- Enable the Plugin:
- Ensure that the
Status
checkbox next toPLK_Balloon_NPC
is checked, indicating that the plugin is enabled.
- Ensure that the
- Restart RPG Maker MZ (If Necessary):
- Sometimes, restarting RPG Maker MZ ensures that the plugin loads correctly, especially after updates.
B. Using Plugin Commands with Conditions and Numerical Positioning
1. Setting a Balloon for an NPC with Conditions and Numerical Positioning
Objective: Display a balloon above NPC ID 3
when switch 10
is ON and game variable 5
equals 7
, lasting for 120
frames (2 seconds), with an xOffset
of 10
and a yOffset
of -20
.
Steps:
- Open the Event Editor for NPC ID
3
:- Navigate to the map containing NPC ID
3
. - Double-click on the NPC to open the Event Editor.
- Navigate to the map containing NPC ID
- Add a Plugin Command:
- Click on
New Event Command
(the red button). - Select
Plugin Command
from thePlugin
tab.
- Click on
- Configure the
SetNPCIcon
Command:- Command:
Set NPC Balloon
- NPC ID:
3
- Balloon Icon Index:
2
(Assuming this corresponds to your desired balloon graphic) - Display Conditions:
- Switch ID:
10
(This switch must be ON) - Variable ID:
5
(This variable must equal7
) - Variable Value:
7
- Switch ID:
- Duration (Frames):
120
(2 seconds) - X Offset:
10
(Moves the balloon 10 pixels to the right) - Y Offset:
-20
(Moves the balloon 20 pixels upward)
(Note: Replace the image URL with an actual screenshot if available.)
- Command:
- Save and Test:
- Save the event.
- Playtest the game.
- Ensure that NPC ID
3
displays the balloon above them only when switch10
is ON and game variable5
equals7
. - The balloon should appear 10 pixels to the right and 20 pixels above the NPC and disappear after 2 seconds.
2. Clearing a Balloon from an NPC
Objective: Remove any balloons from NPC ID 3
.
Steps:
- Open the Event Editor for NPC ID
3
:- Navigate to the map containing NPC ID
3
. - Double-click on the NPC to open the Event Editor.
- Navigate to the map containing NPC ID
- Add a Plugin Command:
- Click on
New Event Command
. - Select
Plugin Command
from thePlugin
tab.
- Click on
- Configure the
ClearNPCBalloon
Command:- Command:
Clear NPC Balloon
- NPC ID:
3
- Command:
- Save and Test:
- Save the event.
- Playtest the game.
- Ensure that NPC ID
3
no longer displays any balloons.
3. Setting a Balloon for the Player with Conditions and Numerical Positioning
Objective: Display a balloon to the right of the player when game variable 8
equals 10
, lasting for 180
frames (3 seconds), with an xOffset
of 15
and a yOffset
of -10
.
Steps:
- Open the Desired Event (e.g., Map Start):
- Navigate to the event where you want to set the player's balloon (e.g., at the map's starting point).
- Double-click to open the Event Editor.
- Add a Plugin Command:
- Click on
New Event Command
. - Select
Plugin Command
from thePlugin
tab.
- Click on
- Configure the
SetPlayerIcon
Command:- Command:
Set Player Balloon
- Balloon Icon Index:
3
(Assuming this corresponds to your desired balloon graphic) - Display Conditions:
- Switch ID:
0
(Ignored) - Variable ID:
8
(This variable must equal10
) - Variable Value:
10
- Switch ID:
- Duration (Frames):
180
(3 seconds) - X Offset:
15
(Moves the balloon 15 pixels to the right) - Y Offset:
-10
(Moves the balloon 10 pixels upward)
- Command:
- Save and Test:
- Save the event.
- Playtest the game.
- Ensure that the player displays the balloon to the right only when variable
8
equals10
. - The balloon should appear 15 pixels to the right and 10 pixels above the player and disappear after 3 seconds.
4. Clearing a Balloon from the Player
Objective: Remove any balloons from the player character.
Steps:
- Open the Desired Event:
- Navigate to the event where you want to clear the player's balloon.
- Double-click to open the Event Editor.
- Add a Plugin Command:
- Click on
New Event Command
. - Select
Plugin Command
from thePlugin
tab.
- Click on
- Configure the
ClearPlayerBalloon
Command:- Command:
Clear Player Balloon
- Note: No additional parameters are required.
- Command:
- Save and Test:
- Save the event.
- Playtest the game.
- Ensure that the player character no longer displays any balloons.
5. Troubleshooting the Conditions Parameter
If the conditions parameter or the balloon positioning using xOffset
and yOffset
is not working as expected, follow these troubleshooting steps:
A. Verify the Plugin File
- Check for Syntax Errors:
- Ensure that the plugin file (
PLK_Balloon_NPC.js
) is free from syntax errors. - Even a minor typo can prevent the plugin from functioning correctly.
- Ensure that the plugin file (
- Ensure Proper Struct Definition:
- The
@struct~Conditions
must be correctly defined within the plugin comments. - Each parameter within the struct should have the correct annotations (
@param
,@text
,@desc
,@type
,@default
).
- The
B. Re-import the Plugin
- Remove the Existing Plugin Entry:
- In RPG Maker MZ's Plugin Manager, select
PLK_Balloon_NPC
and clickDelete
.
- In RPG Maker MZ's Plugin Manager, select
- Re-import the Revised Plugin:
- Click the
Import
button. - Select the updated
PLK_Balloon_NPC.js
file.
- Click the
- Enable the Plugin:
- Ensure the
Status
checkbox is checked.
- Ensure the
- Restart RPG Maker MZ (If Necessary):
- Sometimes, restarting RPG Maker MZ helps in recognizing new struct definitions.
C. Use the Plugin Command Interface Correctly
- Access Plugin Commands via Event Editor:
- Open the Event Editor for the desired NPC or player.
- Select the Correct Plugin Command:
- Choose
Set NPC Balloon
orSet Player Balloon
from the Plugin Commands list.
- Choose
- Fill in the Parameters Using Provided Fields:
- NPC ID / Balloon Icon Index: Enter the numeric ID or index as required.
- Display Conditions:
- Switch ID: Use the dropdown to select the appropriate game switch.
- Variable ID: Use the dropdown to select the appropriate game variable.
- Variable Value: Enter the required value for the variable.
- Duration (Frames): Enter the number of frames (60 frames = 1 second). Use
0
for indefinite display. - X Offset: Enter the desired horizontal offset.
- Y Offset: Enter the desired vertical offset.
(Note: Replace the image URL with an actual screenshot if available.)
- Avoid Manual JSON Input:
- Do Not manually enter JSON strings in the
conditions
parameter. - Use the provided fields to ensure proper formatting and data entry.
- Do Not manually enter JSON strings in the
D. Check for Plugin Conflicts
- Disable Other Plugins Temporarily:
- In the Plugin Manager, disable other plugins to check if there's a conflict.
- Enable them one by one to identify if a specific plugin is causing the issue.
- Review Plugin Load Order:
- Some plugins need to be loaded before or after others.
- Adjust the load order if necessary to resolve conflicts.
E. Inspect Developer Console for Errors
- Open Developer Tools:
- During playtesting, press
F8
to open the developer console.
- During playtesting, press
- Look for Error Messages:
- Any errors related to the plugin will be displayed here.
- Common errors include JSON parsing issues or undefined variables.
- Address the Errors:
- Based on the error messages, make necessary adjustments to the plugin code or Plugin Commands.
F. Ensure Correct Switch and Variable IDs
- Verify Switch and Variable IDs:
- Open
Database
>System
>Switches
andVariables
. - Ensure that the IDs used in the Plugin Commands correspond to existing switches and variables.
- Open
- Set Correct Values:
- For variable conditions, ensure that the game variables hold the correct values during testing.
6. Example Plugin Command Usage
Example: Setting a Conditional, Timed Balloon Above an NPC with Numerical Positioning
Objective: NPC ID 7
should display balloon index 4
above them only when switch 12
is ON and game variable 6
equals 3
, lasting for 150
frames (2.5 seconds), with an xOffset
of 5
and a yOffset
of -15
.
Steps:
- Open the Event Editor for NPC ID
7
:- Navigate to the map containing NPC ID
7
. - Double-click on the NPC to open the Event Editor.
- Navigate to the map containing NPC ID
- Add a Plugin Command:
- Click on
New Event Command
. - Select
Plugin Command
from thePlugin
tab.
- Click on
- Configure the
SetNPCIcon
Command:- Command:
Set NPC Balloon
- NPC ID:
7
- Balloon Icon Index:
4
(Assuming this corresponds to your desired balloon graphic) - Display Conditions:
- Switch ID:
12
(This switch must be ON) - Variable ID:
6
(This variable must equal3
) - Variable Value:
3
- Switch ID:
- Duration (Frames):
150
(2.5 seconds) - X Offset:
5
(Moves the balloon 5 pixels to the right) - Y Offset:
-15
(Moves the balloon 15 pixels upward)
(Note: Replace the image URL with an actual screenshot if available.)
- Command:
- Save and Test:
- Save the event.
- Playtest the game.
- Ensure that NPC ID
7
displays the balloon above them only when switch12
is ON and game variable6
equals3
. - The balloon should appear 5 pixels to the right and 15 pixels above the NPC and disappear after 2.5 seconds.
Clearing the Balloon from NPC ID 7
Steps:
- Open the Event Editor for NPC ID
7
:- Navigate to the map containing NPC ID
7
. - Double-click on the NPC to open the Event Editor.
- Navigate to the map containing NPC ID
- Add a Plugin Command:
- Click on
New Event Command
. - Select
Plugin Command
from thePlugin
tab.
- Click on
- Configure the
ClearNPCBalloon
Command:- Command:
Clear NPC Balloon
- NPC ID:
7
- Command:
- Save and Test:
- Save the event.
- Playtest the game.
- Ensure that any balloons previously set for NPC ID
7
are now removed.
7. Final Recommendations
- Ensure Proper Struct Definition:
- The Conditions struct must be correctly defined within the plugin's metadata.
- Ensure that there are no syntax errors or typos in the struct definition.
- Use the Plugin Command Interface Correctly:
- Always use the provided fields in the Plugin Command interface to set conditions and position offsets.
- Avoid manual JSON input to prevent formatting issues.
- Regularly Test Plugin Commands:
- After setting up Plugin Commands, playtest frequently to ensure balloons appear and disappear as intended.
- Backup Your Project:
- Before making significant changes or updates to plugins, always back up your project to prevent data loss.
- Customize Balloon Graphics:
- You can create custom balloon graphics to enhance visual appeal.
- Ensure that the balloon index corresponds to the correct graphic in your resources.
- Seek Further Assistance if Needed:
- If issues persist after following these steps, consider reaching out to RPG Maker communities or forums for additional support.
Terms of use
No duplication or distribution is permitted.
Can be used in commercial games
I ask you to specify "Palatkorn"
in your game credits only
Updated | 18 days ago |
Status | Released |
Category | Other |
Rating | Rated 5.0 out of 5 stars (1 total ratings) |
Author | Palatkorn |
Tags | RPG Maker MZ |
Download
Click download now to get access to the following files:
Comments
Log in with itch.io to leave a comment.
I think i've found a bug/issue with your script.
So i've tied a quest marker to show above my event #78's head for a quest. It's all working fine. Swaps colors etc when its supposed too, ends when i tell it to and all that.
I created a new map.. as i was adding stuff.. i got to event #78 on THAT new map and when i test run the game on map 1 the quest marker is there over the npcs head.. but if i go onto map 2 (a completely different map) the event that's #78 also shows the quest marker on it too.
I tested a few things, created same map entirely as i had copy/pasted the same map but that wasnt the issue, tried turning all my plugins off also that i'm using and kept just the balloon script on and it still happens on both maps. Here's a vid of whats happening..
Thanks for the problem, I am fixing it.
I fixed it to version 1.0.3, please try again.
Added conditional command opening based on switch ID and variable and positioning.
Ah.. thanks for this.. the patch was so quick.
I'll test it out shortly and report back.
Thanks!
EDIT: Your patch sorted the issue out, thanks! :)
First, thanks for this great script.
How do I make a bubble appear above the NPC's head without having to talk to him?
I'm trying to show a yellow exclamation above it's head to show it has a quest to pick up, then once I accept the quest it displays a grey exclamation, then when I can hand in the quest (when all tasks are done or items collected) it displays a red exclamation.
I tried having event page 1 run as parallel with the code to display the yellow exclamation but it don't work. Though if I put the code just so I talk to him it works, so it seems this wont work on events that's set to parallel.
Unless i'm missing something, i'm very new to MZ so maybe i'm not understanding something. Any fix for this?
First open EV00x, then create and set trigger to automate in content, set all balloon display, in event command select control switch to A = On, then go back to original EV00x, create 2 new bars without setting anything in them, select switch self = A and done, the management will be done automatically.
ah thanks for this!
Any option for alternative with displaying icon above character?
You can give me your ideas and I will fix them.
I would be soo happy if you could make option to display icon over player's head, so we can use it for "carry item" mechanics.
I have added that option for you, feel free to reload.
Are you sure it's updated? I see only option for setting baloon like before in plugin commands.
Yes I tested it, I think you need to remove the old one first.