SIMPLE BANK

Just good ol' deposit and withdraw.

  • METTATON
  • 09/17/2015 10:19 PM
  • 4519 views
Banks are always a nice little feature. It'd never hurt to include one in a game, especially so when it requires no scripting. This tutorial does not tell how to create an interest feature. because I've yet to figure it out

You'll need 3 variables and 1 Common Event for this. Name 1 variable 'CurrentG', another 'TransactionG', and the third 'StoredG'. The Common Event's trigger should be a call, by the way.
<>Comment: Clears Transaction, sets CurrentG to party's money.

<>Variable Oper: [000X:TransactionG] Set, 0
<>Variable Oper: [000X:CurrentG] Set, Money
<>Message: Welcome to World Banking, how may I help you?
<>Comment: Set Cancellation Behavior to Choice 3 so cancelling doesn't lead to Withdraw choice.
<>Show Choices: Deposit/Withdraw/Cancel
: [Deposit] Handler
<>Comment: \v[X] refers to StoredG. \c[1] makes 'G' the same colour as the number and is optional. \$ brings up the money window for convenience.
<>Message: You currently have \v[X] \c[1]G\c[0].
Please tell me how much you would like to deposit.\$
<>Input Number: 4 Digit, [000X:TransactionG]
<>Comment: Branch for if inputted number is less than or equal to StoredG.
<>Branch is Var [000X:TransactionG] is V[000X] Less/Equal
<>Comment: Adds TransactionG to StoredG.
<>Variable Oper: [000X:StoredG] +, Var [000X]'s Value
<>Comment: Removes TransactionG from party's money.
<>Change Money: V[000X] Remove.
<>Message: Thank you for banking with us.
<>
: Else Handler
<>Comment: This will deposit ALL the party's money. First variable operation sets TransactionG to CurrentG.
<>Variable Oper: [000X:TransactionG] Set, Var [000X]'s Value.
<>Comment: Adds TransactionG to StoredG.
<>Variable Oper: [000X:StoredG] +, Var [000X]'s Value
<>Comment: Removes TransactionG from party's money.
<>Change Money: V[000X] Remove
<>Message: Thank you for banking with us.
<>
: End
<>
: [Withdraw] Handler
<>Comment: Same as above, \v[X] is StoredG, coloured 'G' optional, \$ is convenient.
<>Message: You currently have \v[X] \c[1]G\c[0].
Please tell me how much you would like to withdraw.\$
<>Input Number: 4 Digit, [000X:TransactionG]
<>Branch if Var [000X:TransactionG] is V[000X] Less/Equal
<>Comment: Branch for if inputted number is less than or equal to StoredG.
<>Branch if Var [000X:TransactionG] is V[000X] Less/Equal
<>Comment: Removes TransactionG from StoredG.
<>Variable Oper: [000X:StoredG] -, Var [000X]'s Value
<>Comment: Adds TransactionG to party's money.
<>Change Money: V[000X] Add
<>Message: Thank you for banking with us.
<>
: Else Handler
<>Comment: Like above, this will withdraw ALL StoredG money. First variable operation sets TransactionG to StoredG.
<>Variable Oper: [000X:TransactionG] Set, Var [000X]s Value
<>Comment: Removes TransactionG from StoredG.
<>Variable Oper: [000X:StoredG] -, Var [000X]'s Value
<>Comment: Adds TransactionG to party's money.
<>Change Money: V[000X] Add
<>Message: Thank you for banking with us.
<>
: End
<>
: [Cancel] Handler
<>Message: Thank you for banking with us.
<>
: End
<>


I find this banking system easier than because if I have 6900 G to deposit, it's easier to input 9000 and deposit all the G I need to. I also don't want to have to go through the dialogue again when the bank teller tells me 'You don't have that much G' and end the event when I accidentally input 6901.

To use, create an event (Bank teller, ATM, etc.) on any map and make their only command call the bank common event. Since this is through conditional branches/common events/variables, it should be usable in any RPG Maker engine but I made it specifically for my 2003 game.