How to automatically show an item get notification?

Hi guys!

I wonder if there is a way to avoid doing this all the time I build a treasure chest:

Change items: Potion + 4
Message: You has found 4 Potion!

I want to avoid writing these texts manually because I could do a typo and I lose time.

Is there a plugin or something to automatically detect when the user get items, store the item ID and quantity?

For example store item ID on variable 11 and quantity on variable 12, this way I could write a message like this:

Change items: Potion + 4
Message: You has found \ni[11] x\v[12]!

to show this message:

You has found Potion x4!

If the above is not possible using plugins:
  • Is the last item and last quantity stored internally in any game variable?
  • Is there a way to build a listener for gaining items?
MOG_TreasurePopup plugin will save you
that idea would not prevent you from needing to place a show text anyway. and going through variables is an additional step.

I suggest asking for a plugin that manipulates the change item command itself by adding a message to the message queue.
this would require you to place a default message in the plugin, something like "you gained %1 %2" and then you would only place the change item command in the event, completely eliminating the need for a show text or storing the other info

EDIT: Ninja'd
MOG_TreasurePopup plugin will save you

Thank you so much for showing me this plugin!

I suggest asking for a plugin that manipulates the change item command itself by adding a message to the message queue.

You are absolutely right.

Thank you both, using MOG plugin I made a very simply and basic plugin to show messages as Andar suggested:

JavaScript:
//=============================================================================
// ItemMessage.js
//=============================================================================

/*:
* @plugindesc Shows messages when you get money, items, weapons and armors
* @author stramin
*/

// GOLD
var _itemMessage_Command125 = Game_Interpreter.prototype.command125; // Set Gold
Game_Interpreter.prototype.command125 = function() {
    _itemMessage_Command125.call(this);
    this.showItemMessage("$",this.operateValue(this._params[0], this._params[1], this._params[2]));
    return true;
};
// ITEM
var _itemMessage_Command126 = Game_Interpreter.prototype.command126; // Set Items
Game_Interpreter.prototype.command126 = function() {
    _itemMessage_Command126.call(this);
    this.showItemMessage($dataItems[this._params[0]].name,this.operateValue(this._params[1], this._params[2], this._params[3]));
    return true;
};
// WEAPON
var _itemMessage_Command127 = Game_Interpreter.prototype.command127; // Set Weapons
Game_Interpreter.prototype.command127 = function() {
    _itemMessage_Command127.call(this);
    this.showItemMessage($dataWeapons[this._params[0]].name,this.operateValue(this._params[1], this._params[2], this._params[3]));
    return true;
};
// ARMOR
var _itemMessage_Command128 = Game_Interpreter.prototype.command128; // Set Armors
Game_Interpreter.prototype.command128 = function() {
    _itemMessage_Command128.call(this);
    this.showItemMessage($dataArmors[this._params[0]].name,this.operateValue(this._params[1], this._params[2], this._params[3]));
    return true;
};
// MESSAGE
Game_Interpreter.prototype.showItemMessage = function(item,amount) {
    if(amount>0 && SceneManager._scene.constructor.name==="Scene_Map") {
        $gameMessage.setBackground(2);
        $gameMessage.setPositionType(2);
        var separator=" x";
        if(item=="$")separator="";
        $gameMessage.add("You have found "+item+(amount>1?separator+amount:"")+".");
    }
};


It changes this:
Change items: Ether + 2
Change money: + 101
Change weapons: Vara de madera + 1

into this:
1602448840206.png


Thank you so much!

Original thread: https://forums.rpgmakerweb.com/threads/how-to-automatically-show-an-item-get-notification.128571/