• Do not use Discord to host any images you post, these links expire quickly! You can learn how to add images to your posts here.
  • Eevee Expo's webhost has been having technical issues since Nov. 20th and you might be unable to connect to our site. Staff are also facing issues connecting, so please send a DM to Cat on-site or through Discord directly for faster service!
Resource icon

any version Eventing an ATM System 2025-03-08

This resource does not pertain to any specific version of Pokémon Essentials.
Do you want your players to be able to save money for any reason? Maybe the trainers in your game are surprisingly tough and your players might burn through all of their money before they can beat them, or maybe there's something particularly expensive that you may want to tempt them into saving. Either way, this tutorial will provide players with an ATM, to let them save money as needed!

This tutorial uses no external plugins, and is all contained in a Common Event called wherever it's needed. To set it up, you'll need the following:
  • Three open variables
  • An item to access the ATM
  • (Optional) A graphic for an ATM
For this tutorial, we're going to be using variables 97, 98, and 99, and a new item called a Bank Card. The variables will be used for the following:
  • V97: The player's on-hand money
  • V98: The player's banking balance
  • V99: The transaction amount for withdrawing or depositing money
Here's the graphics I used:
543a190fc072dec74f6467b34a47e0f9666b01d1.pnj
24cfdd5a422a520014ef5d186a3b4dfc3b73ad2e.pnj

a9a548307d0628f378f017c3949950ecee186991.pnj


STEP ONE: CREATING YOUR ATM
First, decide how the player is going to access the ATM. Is it a banker NPC, or is it a standalone ATM? Either way, you'll need to decide what kind of event is going to call the ATM event. For this example, I repurposed a PC sprite by pulling one out of the tilesets, and created an alternate "on" version for simple aesthetics.

Make the event as you normally would. Start the event with a conditional branch to confirm that the player has the item needed to access it, in this case a Bank Card. If they don't have a Bank Card, put a little flavor text; if they have one, call the Common Event that holds our actual ATM event.
df2ca622f9c64080ec0b6ae5ed3a8ea5dd282aa5.pnj


STEP TWO: SETTING UP THE PREREQUISITES
Now that we have an ATM installed, we need to give it some functionality. First, we'll start by setting up our variables. We need one variable that stores the player's on-hand money, one that stores the player's bank balance, and one that stores the transaction we're going to process. I'll be referring to these as V97, V98, and V99, respectively.
fd3de19879dde0c50c09b5a90800d6432585409c.pnj


Now that we have the variables, let's give the ATM functionality. After whatever fluff text you put at the start of your event, set up a label that we'll be jumping to periodically, called "Menu". This lets the player perform multiple transactions without exiting the whole event after each transaction. Provide four choices: one for checking balance, one for withdrawals, one for deposits, and one to exit entirely. Set the exit choice as the cancel option, so the player can back out of using the ATM with one button.
2174f8dcff300d1dc977e1bf6d4ac9bcc3d0a27b.pnj


Note that we also initialized V97 and V99 here. This is a fallback in case somehow we don't change them before exiting the ATM menu, or don't change them before jumping back to the label.

STEP THREE: CHECKING THE PLAYER'S BALANCE
The first option, "Balance", is the simplest one. It just shows how much money the player has in their bank account. Create a simple message that displays the amount stored in V98, then jump back to the menu label.
e0df26d0719e0e8e4647ef575b841a46e4399548.pnj


STEP FOUR: WITHDRAWING MONEY
The second option, "Withdraw", withdraws money from the player's bank account to their on-hand money. There are a few steps we'll need to take before we can process the transaction here, so let's get those out of the way first.

First, create a new label, we'll call it "Withdraw". This will bring us back to the top of this option if something goes wrong. Re-initialize V97 and V99 here; you'll see why in a bit.
c9a7417b2973997549dd5d888851cb767c422d08.pnj


Ask the player how much money they'd like to withdraw. Make sure you show their balance as well, so they know how much they have to work with. Use an "Input Number" command and store the amount to V99; I used 5 digits, so the player can withdraw up to 99,999 in one transaction.
20e093d001a5ebb8002cee11deb0c23dcd64e412.pnj


Now, we need to set up some conditional branches. They don't need to have any "else" branches, because if any of them return true, it'll jump back and not process the transaction.

First, set a conditional branch that checks that V99 isn't greater than V98 (that the transaction amount isn't greater than the bank balance). If the condition returns true, the player doesn't have enough to cover the transaction. Alert the player that they can't complete the transaction, and jump back to the start of the Withdraw option.
361ba2f5dca07b8c9b17b79a0669cf25413e25bd.pnj


Next, set a conditional branch using the script option that ensures that completing this transaction wouldn't put the player over the game's money cap (default is 999,999). This is why we needed V97. I used the following script for the conditional branch:
Code:
Expand Collapse Copy
$game_variables[97] + $game_variables[99] > 999999
If this returns true, the player's transaction will take them over the money cap, and they can't complete the transaction. Again, jump back to the start of the Withdraw option.
8089e96b77682e99859fb5a654851e89bd4b5c19.pnj


Finally, set a conditional branch that checks if V99 is equal to 0, meaning that the player isn't withdrawing anything. If the player does that, jump back to the main ATM menu instead.
da8900aff4c867879439212de756ac779c306ef2.pnj


Now, if the player has input an amount that doesn't flag any of these conditions, we can process the transaction. Use the "Change Gold" command to add V99 to the player's on-hand money, then use "Control Variables" to deduct V99 from V98. Inform the player of their transaction and their new balance, then jump back to the main ATM menu (which, as we've set up, initializes V99). Congratulations, you've created an ATM withdrawal!
d5649caca5814a978811c05a335fa513ad0d266d.pnj


STEP FIVE: DEPOSITING MONEY
Now that we know how to withdraw money from the player's account, we can now add money instead. The overall steps are almost the same.

Create a label for the Deposit option, and initialize V97 and V99 just like before. Ask the player how much they'd like to deposit using the "Input Number" option once again, just like before, but this time show the player the maximum amount they can deposit.
d90f92563957fbcffb8775178c1051bac3dc7d0c.pnj


The conditional branches this time are a little different. For the first one, instead of comparing V98 and V99, we're comparing V97 to V99, which determines if the player has enough to deposit.
7890ee2478c396d5c711f33318adb29d3f0a9b28.pnj


We don't need to add a conditional branch comparing any caps this time, unless you decide you want to add a limit to how much money the player can save. The conditional branch checking if V99 == 0 is the same, just with different flavor text.
302ed6d0bdd897e4afad7dd1d84bea5a9753ea46.pnj


As long as the player has enough money to cover the transaction and the transaction amount isn't 0, we can process the deposit. Using the "Change Gold" command, deduct V99 from the player's money. Then, using "Control Variables", add V99 to V98. Let the player know how much they've deposited and what their new balance is, and jump back to the main ATM menu.
d02e7304d7b10e3dcac2b6c9fac3df7b8c5921a0.pnj


And now you're done! Now your player can withdraw or deposit money to a bank account!

STEP SIX: EXPANDING THE SYSTEM
Now that you have an ATM and a separate money system, you can expand further on what the player can do. Maybe you want to let them overdraw their account, but penalize them by taking money from their winnings until it's paid off. Maybe you want to offer online shopping using their bank account instead of on-hand money. Maybe instead of starting out with money on hand, they'll start out with money in their account. This system is simple, but it's a base--you can build upon it however you like!
Credits
No credit necessary!
  • Like
Reactions: Appletun's Apples
Author
Pandappuccino
Views
194
First release
Last update

Ratings

0.00 star(s) 0 ratings
Back
Top