Indie Dev

Hello Guest!. Register a free account today to become a member! Once signed in, you'll be able to participate on this site by adding your own topics and posts, sell your games, upload content, as well as connect with other members through your own private inbox!

Tutorial: Zelda Wallet System through Events

Erie

Villager
Xy$
0.00
So Seeing as this hasn't been done yet for MV through a plugin and seeing as I can't make a plug in as of yet to do this I thought I'd share with others on how to do it through Events :3
Also I think it's worth noting the maxGold based on the switches activated goes with the highest value anyway so if a player misses a wallet and finds it later they won't revert back to having 999 instead of 99999 :)

Before we begin this events tutorial assumes you are using Yanfly's Core Plugin and have set the max Gold below 999. If you do not have this plug in I have made one that can limit the max gold attained. which will be placed in the lower spoiler for you to copy paste and save as MAxCurrency.js and manually place it in your projects javascript plugins folder.

Credits to Eivl for his script with the maxBattleMembers which allowed me to see how plugins were done so if you use this script at the bottom be sure to credit him as all I did was change very little :)

Step 1: Switches
Let's start with the switches choose 2 blank switches and name the first 'Small Wallet' and the second 'Large Wallet' for arguments sake we'll say you did it in switches 1 and 2.
Naming.png

Step 2:
Common Events
Next We'll set up two common events in the same manner

Common.png

Make sure each common event name matches the switch name as to avoid confusion.
Also note how the Trigger is PARALLEL this is VERY IMPORTANT THAT YOU DO THIS.

Step 3:
Adding Scripts
Right click on contents and add a new event. Go to the third page and select script.
Now copy and paste this script into small wallet:
JavaScript:
 (function() {
Game_Party.prototype.maxGold = function() {
return 999;
}
})();
script.png

Now copy and paste the Event into Large Wallet and right click and choose edit.
Change the return value to 99999;



Now for the easy part :3

Step 4: Creating the wallet as an item.
Next we create two items and change them to key items and Consumable as No.

Now go to effects right click and select add. Go to Other tab and select common event.
So now choose Small Wallet or Large Wallet based on your Item. :3

Select apply and save.

Final Step: Setting up the Wallet Event.

On the main page select events and right click and choose quick event ---> treasure chest.
Select either wallet as item received. After the chest has been created select edit one more time and in the bottom of the contents page right for the last time select new and go to control switches.
Activate the switch of whether it is a Small or Large wallet in the chest that was received.

And now you have have your Zelda styled wallet system. :P

JavaScript:
* Erie -MAxCurrency
*
* @plugindesc This plugin allows you to change the max gold
*.
*
* @param MaxGold
* @desc Allows max gold held to be increased or decreased.
*Default:99999999
* @default 99999999
*
* help
* Change the value of MaxGold to change the   *maximum amount of gold that can be attained.
* Thanks to Eivl for the maxbattlmembers which *allowed me to see how this was done.
*
* @author Erie
*/
(function() {
     /*CALLS JAVASCRIPT PARAM NAME  as variable*/
    var parameters = PluginManager.parameters('MAxCurrency');

    /*CALLS @Param NAME as variable */
    var currency = Number(parameters['MaxGold'] || 99999999);

Game_Party.prototype.maxGold = function() {
    return currency;
}
}
)();
Edit. Just a useful note to consider
Bags can be done in the same way for storing higher amounts of items by using
JavaScript:
(function() {
Game_Party.prototype.maxItems = function(item) {
    return 999;
}
})();
 
Last edited:

Sinnistar

Praised Adventurer
Looks like it'd be handy for sure! Being an eventer myself and seeing that heh, I could see some other ways to do it with events but it would be my odd mixing of events to make it work. Definitely looks like a good addition to any game that would use that though! Nice job.
 
Top