RMMZ - Custom Shop System Plugin
A downloadable plugin
About:
This is a custom shop plugin made for RPG Maker MZ. Changes the overall look of the shop and adds some neat features
- Parallax background support.
- Shop Music
- Chat with the Shop Owner
- Control Switches and variables with the chat options.
- Triggered Events:
- Trigger common events to trigger once you leave the shop based on certain conditions, such as spending X amount of gold, buying a certain item and specific switch/variable values.
Call Script Setup:
In order to use the custom shops, you must add a call script in the event before you call the shop.
Example 1:
This example is just a basic setup. It sets up 3 chat lines and 3 responses. You can have more of less chat options by adding more { text: lines. Just be sure to have the comma at the end of all of them except for the last one.
$gameSystem.setShopConfig({ ownerPicture: "People1_5", // Picture file in img/pictures/ ownerPictureX: 430, // X position of the shopkeeper picture ownerPictureY: 106, // Y position of the shopkeeper picture parallax: "Shop1", // Parallax background file in img/parallaxes/ music: "Town8", // Background music file in audio/bgm/ defaultChat: "Welcome to my shop!", // Default message shown in the chat window chatOptions: [ // Array of chat options { text: "How's business?", response: "It's been great lately!" }, { text: "Any special deals?", response: "Check out my rare items!" }, { text: "Tell me about yourself", response: "I'm just a humble merchant..." } ] });
Example 2:
You can add variable and switch operations to the chat responses. Switches can be set to true for On, and false for off. Variables can use "add", "subtract", "multiply" and "divide". id: is the variable number, value is the amount you want to add/subtract/multiply/divide by.
{ text: "How's business?", response: "It's been great lately!", switch: { id: 1, value: true } // Sets switch 1 to true }, { text: "Any special deals?", response: "Check out my rare items!", variable: { id: 1, value: 2, operation: "multiply" } // Multiplies variable 1 by 2 },
Events
You can add triggered events that play common events after leaving the shop. For example, if you spend X amount of gold you can trigger common event 001 or something. Of if you purchase a specific item trigger another event. The events section go below the chatOption section.
events: [ { condition: { totalGoldSpent: 500 }, eventId: 1 }, // Trigger event 1 when 500 gold is spent { condition: { itemBought: { type: 0, id: 1 } }, eventId: 2 }, // Trigger event 2 when item ID 1 is bought { condition: { variable: { id: 1, value: 1 } }, eventId: 3 }, // Trigger event 3 when variable 1 is 1 { condition: { switch: { id: 1, value: true } }, eventId: 4 } // Trigger event 4 when switch 1 is true ]
Terms of use
This plugin is free to use in all free and commercial projects. You are free to edit the code to your own needs. All I ask is for in return is credit.
Please do not redistribute or repost on other websites.
Status | Released |
Category | Assets |
Author | TheStrahl |
Tags | custom-shop, plugin, RPG Maker MZ |
Download
Click download now to get access to the following files:
Leave a comment
Log in with itch.io to leave a comment.