Independent Items - [MZ]

● ARCHIVED · READ-ONLY
Started by Dungeonmind 14 posts View original ↗
  1. Independent Items

    Independent Items

    Everyone should know what this one does. It allows you to use independent items in your game. Simply by using note tags, you can set items, weapons, or armour in the database to be independent. What this means is that items with this note tag will never stack. Its properties will become unique, almost as if a new item were added to the database. Even though this plugin is pretty straight-forward on its own, it can be used to support more advanced plugins later. I have future plugins planned that will require this to work.

    Features

    • Using note tags, you can make items, weapons, and armour independent.
    • In the plugin parameters, you can choose to hide the “: 99” information all together for independent items only.
    • Compatibility patches have been made to other DM Series plugins to work with independent items.

    Compatibility

    Terms of Use

    1. Licence Terms:
      • By purchasing or downloading the plugin, you acknowledge that you have received or been provided access to a licence agreement, and you agree to the terms and conditions outlined in that licence agreement. Failure to comply with these terms may result in licence revocation.
    2. Ownership and Redistribution:
      • The plugin and its code are the exclusive property of Dungeonmind. You may use the plugin in your RPG Maker projects, but you may not resell, redistribute, or claim ownership of the plugin/code itself, except as specifically permitted in the licence agreement.
    3. Code Usage:
      • The plugin/code is licensed for use in RPG Maker MV/MZ projects as specified in the licence agreement. You may not extract or reuse code in other plugins or non-RPG Maker projects without express permission.
    4. Usage Restrictions:
      • If the plugin is downloaded without purchasing a commercial licence, it is for non-commercial use only. Commercial use requires a licence purchase from the official website or any officially supported platform like itch.io.
    5. Confidentiality:
      • The plugin/code is confidential and should not be shared with anyone without express permission from Dungeonmind.
    6. Modification:
      • You are permitted to edit the plugin/code for the purposes of your personal projects, as specified in the licence agreement. Any other modifications, including redistribution or reuse of modified code, require express permission from Dungeonmind.
    7. Attribution Requirements:
      • As specified in the plugin's licence agreement, providing credit is required. Please refer to the licence for specific credit requirements.
    8. Precedence:
      • In the event of any conflict or inconsistency between the terms outlined here and the licence agreement, the terms of the licence agreement shall take precedence.

    Download

    Link to plugin page

    Happy Rpg Making!
  2. independentItems_102.png

    Hi, I'm back with an important bug fix.

    You can download the latest build over here.
  3. indpendentItems_103.png

    Hello fellow RPG Makers,

    I am back with another bug fix for this plugin. Independent weapons and armor were not being recognized when starting from an actors initial equipment in the game.
  4. hello, this plugin creates different IDs for weapons, and if I want to use check in conditional branch like weapon with IDs 1 in database but I have 3 independent weapons from database ID1 in inventory, none of them will satisfy the condition right? or is it a bug because the condition is not met for me, only after I delete notetag <independentItem>
  5. Thank you for reaching out. You're correct—when the <independentItem> notetag is used, the plugin generates unique IDs for each instance of the item, weapon, or armor. This means that even if the original item has an ID of 1 in the database, any independent copies created will not match that ID in conditional branches.

    So in your case, having three independent weapons derived from database ID 1 will not satisfy a condition that checks specifically for weapon ID 1. This behavior is expected and not a bug. If you remove the <independentItem> notetag, the items will retain their original database ID and the condition will work as intended.
  6. VallinVl said:
    hello, this plugin creates different IDs for weapons, and if I want to use check in conditional branch like weapon with IDs 1 in database but I have 3 independent weapons from database ID1 in inventory, none of them will satisfy the condition right? or is it a bug because the condition is not met for me, only after I delete notetag <independentItem>

    You can try this inside the script section of a Conditional Branch:

    Code:
    $gameParty.allItems().find(item => item.name == 'Dragon Sword')
  7. Aerosys said:
    You can try this inside the script section of a Conditional Branch:

    Code:
    $gameParty.allItems().find(item => item.name == 'Dragon Sword')
    thank you, it works! but it checks all items in inventory, does it possible make for only equiped weapon/armor?
  8. Any actor of the party has Dragon Sword:
    Code:
    $gameParty.find(actor => actor.equips().find(item => item.name == 'Dragon Sword'))

    N-th actor of the party (starting from 0) has Dragon Sword:
    Code:
    $gameParty.members()[0].equips().find(item => item.name == 'Dragon Sword')

    Actor with ID 1 in database has Dragon Sword:
    Code:
    $gameActors.actor(1).equips().find(item => item.name == 'Dragon Sword')
  9. Independent Items Update: V1.04!

    Revisiting Old Code with New Eyes

    Almost two years ago, I wrote the first version of my independent item plugin. At the time, I was still finding my footing as a plugin developer — my code worked, but it leaned heavily on global scope, nested helpers, and inventory searches that weren’t always reliable. It solved the problem, but it wasn’t elegant.

    Coming back to it now, with two years of growth and experience, I immediately saw opportunities to improve. My skills have changed drastically: I’m more comfortable with encapsulation, cleaner APIs, and writing code that anticipates edge cases instead of patching them after the fact.

    What Changed

    • Encapsulation: I wrapped the entire plugin in an immediately invoked function expression (IIFE). This isolates scope, prevents global leakage, and makes the plugin safer to use alongside others.
    • Deterministic conversion: I fixed gainIndependentItem function so it returns the newly created object. Instead of scanning the party inventory to guess which item was created, I can now equip the exact instance immediately.
    • Cleaner startup logic: With the return value available, the startup conversion loop is straightforward: detect base items with <independentItem>, call gainIndependentItem, and equip the returned object.

    Reflection

    Looking back, it’s clear how much my approach to plugin development has matured. Two years ago, I was focused on “making it work.” Today, I’m focused on making it maintainable, predictable, and developer‑friendly. This refactor isn’t just about fixing a bug — it’s about rewriting old code with the standards I hold myself to now.

    It’s satisfying to see how far I’ve come. Revisiting old projects is humbling, but it’s also a reminder that growth is constant. The plugin is stronger now, and so am I as a developer.

    Download

    Plugin Download Page!
  10. Hi @Dungeonmind ! Do you have any idea why independent items would be destroying the shop scene window for me? For whatever reason, independent items seems to totally interfere with the basic (not the DM Core shop, I'm not using) shop scene, causes chaos with pricing (specified item costs do not function), and when I "purchase" anything it sets gold to NAN and malfunctions. If I turn off independent items everything works fine... Any ideas?

    Ah, I see this is already an error duplicated from another user:

    "I think there might be a small bug!
    When I try to buy an item that does not have the <independentItem> tag, it sets my gold to
    NaN (Not a number?) and then I can’t buy anything else.
    To be sure, I tested this with all other non-DM plugins unchecked."

    This is a bummer, since I built a whole socket / gem upgrade system around this and Turan's item suite :( lol but don't want ALL items in game to be independent items / non-stackable.
  11. Hi @orgint,

    Thank you for reaching out and providing such clear details on the issue. I've identified the cause of the 'Not a Number' (NaN) gold value when purchasing non-independent items in the shop scene and have implemented a fix. This should now resolve the pricing and gold malfunction you were experiencing.

    I've included this fix in the latest update for the DM_IndependentItems plugin. You can find the updated changelog below.

    Independent Items: V1.05!

    What's New?


    Version 1.05 of the DM_IndependentItems plugin is now available, bringing an important bug fix.

    Bug Fixes
    • Fixed an issue in the shop scene (Scene_Shop.prototype.doBuy) where purchasing non-independent items would incorrectly calculate gold deduction, leading to a 'Not a Number' (NaN) gold value and subsequent malfunctions. Gold transactions for all item types should now function correctly.
    Changelog
    DM_IndpendentItems_Update105.png

    Plugin Download Page!
  12. I feel like I mentioned this for a prior version - the filename for the current download is incorrect. It's missing a letter: "DM_IndpendentItems.js" - so the plugin parameters will not load correctly.
  13. Thank you for bringing this to my attention again. You are absolutely right; the filename for the download was indeed incorrect.

    I've investigated and discovered that there was a typo in the underlying HTML code which was causing the filename to be generated incorrectly as DM_IndpendentItems.js, even though the uploaded file was spelled correctly. I've now rectified this issue.

    If you ever encounter this again or any other issue, please don't hesitate to let me know.
  14. Dungeonmind said:
    Hi @orgint,

    Thank you for reaching out and providing such clear details on the issue. I've identified the cause of the 'Not a Number' (NaN) gold value when purchasing non-independent items in the shop scene and have implemented a fix. This should now resolve the pricing and gold malfunction you were experiencing.

    I've included this fix in the latest update for the DM_IndependentItems plugin. You can find the updated changelog below.

    Independent Items: V1.05!

    What's New?


    Version 1.05 of the DM_IndependentItems plugin is now available, bringing an important bug fix.

    Bug Fixes
    • Fixed an issue in the shop scene (Scene_Shop.prototype.doBuy) where purchasing non-independent items would incorrectly calculate gold deduction, leading to a 'Not a Number' (NaN) gold value and subsequent malfunctions. Gold transactions for all item types should now function correctly.
    Changelog
    View attachment 362689

    Plugin Download Page!
    Did some quick testing tonight! Seems to be working properly now! Will let you know if anything else comes up :)