A downloadable asset pack

Buy Now$2.00 USD or more

Dynamic Placeable Objects & Durability System

Ever wanted to let your players build a camp, set traps, or place down furniture that has a limited number of uses? This plugin for RPG Maker MZ gives you the power to do just that!

Transform simple items from the database into "kits" that can place fully functional events anywhere on the map. With a powerful and flexible dual-durability system, you can control not only how many times a kit can be used, but also how many times the placed event itself can be interacted with before it breaks.

Perfect for survival games, crafting systems, base-building mechanics, or any RPG that needs a deeper level of resource management.

Key Features

  • Place Events from Items: Use an item from the inventory to place a pre-configured event on the map in front of the player.
  • Persistent Events: Placed events are fully interactive, and their state is saved, surviving menu changes and save/load cycles.
  • Pick Up and Relocate: Let players pick up their placed events to retrieve the "kit" item, allowing for strategic relocation.
  • Dual-Durability System:
    • Kit Durability: Control how many events a "kit" item can create before it's completely used up.
    • Event Durability: Control how many times a placed event can be interacted with before it breaks.
  • Stack-Friendly Logic: The durability system correctly handles stacks of items. When one item from a stack is consumed, the next one is ready to be used with its full durability.
  • Easy to Configure: All logic is controlled through simple Notetags in the item database and Plugin Commands in events. No complex scripting required!
  • Customizable Feedback: Set custom sounds and messages for placing, picking up, and breaking events.

How It Works: The Core Concept

The system is built on a simple "template" logic:

  1. The "Storage" Map: You create a hidden map that acts as a storage for all your placeable event "templates" (like a tent, a campfire, a trap, etc.).
  2. The "Placeable Item": You create an item in the database (e.g., "Tent Kit"). Using a special Notetag, you link this item to a specific template event on your storage map.
  3. The "Placed Event": When the player uses the "Placeable Item", the plugin creates a perfect copy of the template event on the player's current map.

The Durability System Explained (Very Important!)

The most powerful feature of this plugin is its dual-durability system. To understand it, let's use the metaphor of a "Container for Broken Items".

The Notetag has 4 values: <PlaceableTemplate: MapID, EventID, KitUses, Interactions>

Kit Uses (The 3rd Value): The Container

This value represents how many times a "Kit" item can be fully consumed. Think of this number as the size of a "container for broken items". If the value is 3, the container can hold 3 broken items.

  • Placing and picking up an event does NOT break it, so it does NOT fill the container.
  • Only when a placed event BREAKS (after its interactions are used up), it gets put into the container.
  • When the container is full (e.g., 3 broken items out of 3), the "Kit" is considered used up. The container then empties itself (the counter resets), ready for the next stack of Kits you buy or craft.

Interactions (The 4th Value): The Event's Lifespan

This value represents the "lifespan" of each individual event you place. It's the number of times you can interact with it before it breaks and ends up in the "container".

Why This Logic?

This "container" system correctly handles item stacks. It prevents a situation where using up your first "Tent Kit" would render all other Tent Kits in your inventory useless. When one kit is consumed, the system resets, allowing the next item in the stack to start its own cycle of uses from zero.

Setup Guide: Step-by-Step

  1. Create the Storage Map & Template Event:
    • Create a new map (e.g., Map ID 2) and name it "Storage".
    • On this map, create an event (e.g., Event ID 1). This is your template. Customize its appearance and commands.
  2. Create the Placeable Item & Notetag:
    • In the Database -> Items, create a new item (e.g., "Tent Kit").
    • Set it to "Consumable".
    • In its Effects, make it call a Common Event.
    • In the Note box, add the tag: <PlaceableTemplate: 2, 1, 3, 5> (for Map 2, Event 1, 3 Kit Uses, 5 Interactions).
  3. Create the Common Event:
    • In the Database -> Common Events, create a new event.
    • Add a single command: Plugin Command -> PlaceableObjects -> Place Object.
  4. Configure the Template Event:
    • To allow the player to pick up the event, add this command to the template event: Plugin Command -> PlaceableObjects -> Pick Up This Event.
    • To make the event wear out with use, add this command where the interaction happens (e.g., after resting): Plugin Command -> PlaceableObjects -> Increase Interaction and Check.

Notetag Reference

Use this in the item's note box. All parameters after the first two are optional.

<PlaceableTemplate: MapID, EventID, KitUses, Interactions>

  • <PlaceableTemplate: 2, 1>
    Infinite Kit Uses, Infinite Interactions.
  • <PlaceableTemplate: 2, 1, 3>
    The Kit is consumed after 3 event BREAKS. Each event has infinite interactions.
  • <PlaceableTemplate: 2, 1, , 5>
    The Kit has infinite uses, but each event breaks after 5 interactions. (Leave the 3rd value blank)
  • <PlaceableTemplate: 2, 1, 3, 5>
    The Kit is consumed after 3 event BREAKS, and each event breaks after 5 interactions.

Plugin Commands Reference

  • Place Object
    Use this in: A Common Event called by an item.
    What it does: Places a copy of the event linked in the item's notetag.

  • Pick Up This Event
    Use this in: The template event on your storage map.
    What it does: Removes the placed event and returns the "Kit" item to the player.

  • Increase Interaction and Check
    Use this in: The template event on your storage map.
    What it does: Increases the event's interaction counter. If it reaches the limit, the event breaks and consumes one Kit Use.

Terms of Use

This plugin is free to use in both non-commercial and commercial projects. Credit is appreciated but not required. Please do not redistribute this plugin file directly. Instead, link to this itch.io page.

Purchase

Buy Now$2.00 USD or more

In order to download this asset pack you must purchase it at or above the minimum price of $2 USD. You will get access to the following files:

PlaceableObjects.js 18 kB

Leave a comment

Log in with itch.io to leave a comment.