FIAT - Idea for a complete economy plugin!

Discussion in 'Plugin Requests' started by roracle, Oct 22, 2020.

Thread Status:
Not open for further replies.
  1. Offline

    roracle

    FIAT - Complete Economy
    For Spigot 1.16.3 (and 1.16.4, prepped for 1.17)

    Note: The following is a suggestion and is worth discussing if need be. I've worked on this for three days to see if I could get something comprehensive written down to share with others, and if I had the skill, I'd code it myself. However, this is a more all-inclusive economy plugin to help keep server economies stable and prices low so new players can still compete with legacy players.

    There is no time limit regarding when this needs to be done, but I hope a developer out there would see the necessity for something like this and pick it up. With the advent of 1.17 on the horizon, the changes to mobs and drops in the past few point updates, and so many other things created a perfect storm that eliminated traditional item-based economy systems. This is the answer to that disruption.

    Constructive criticism and discussion is welcome. I will probably get offended at it, so this is my reminder to keep myself in check. :)

    Please, for your consideration, I give you FIAT: Fully Integrated Adventurer Trading

    [coalore][ironore][goldore][diamondore]

    FIAT - Complete Economy (open)

    I've spent a lot of time trying to come up with a solution to a big problem I see on legacy servers with dedicated player bases. Money. There is no good method of minting coins in a game of Minecraft without going to mods. But for Spigot based servers, there should be an easy solution that provides a level of minimal technical know-how from the players but strong enough to provide a robust solution for any server.

    As Minecraft changes, we should be able to change with it. Simple economy plugins aren't really around anymore, and the ones around seem to be riddled with bugs or incompatibility issues. We also see a feature competition, but the features aren't enough to stand out or have too large of administrative overhead to keep in order. This can be changed if we think about what a long-term server might need. There should be a way to regulate things to keep prices low so new players don't have an economic paywall because of runaway server economies.

    But the future of Minecraft servers is a more playful environment as well. Being able to present your players with something unique that doesn't cost much RAM overhead is the goal. And it is safe to say that the utility of economy plugins are indeed a necessity of larger servers.

    This can cover different playstyles as well. Using flexible settings, this could accommodate your server's method of play in new ways. If you pay players for their work through the Jobs plugin, then large banknotes could help players back up their cash or even distribute it to other players easily.

    Features:
    1. Specify which items are worth how much.
    2. A command that will sell the items you specify as money for their value.
    3. Banknotes that use maps so images can be loaded from a web address or image file.
    4. Viewing your current money also shows how much you have as items in inventory.
    5. Virtual accounts created by admins to compensate for Towny, Factions, and many other plugins.

    (Note: There are plugins that handle taxation and will filter taxes to a server account specified in their configuration, and this plugin should be able to create virtual accounts as you would see in many economy plugins.)

    The goal of FIAT is to create a closed economy where trade is done with cash-on-hand. There should be an option where a player can't use /pay, but instead must use an item to initiate a payment.


    BASICS (open)

    A few "config" settings to start with:
    Code:
    usingperms: false  # If set to true, use your permission manager to set up permissions.
    money:
      symbol: ₴
      decimal: .
      big: dollar
      bigplur: dollars
      small: cent
      smallplur: cents
    wallet-size: 100000  # Max amount of money a player can hold at any given time.  Set to -1 for infinite.
    
    roleplay: true  # Set to false to enable use of /money, /balance, /pay /deposit and /note commands.  If set to true,  the below settings will be active.  More on this later.
    ignore:
      jobs: true  # Eliminate incoming & outgoing money from the Jobs plugin.
      mcmmo: true  # Eliminate incoming & outgoing money from the mcMMO plugin.
    


    ITEM ECONOMY (open)

    This is similar to Gringotts, but the players will not have "vaults" to store these in. The goal is to get the ore into the money system and grow the economy.

    Item default values:
    Coal Ore - 0.50
    Iron Ore - 1.00
    Quartz Ore - 2.00
    Redstone Ore - 5.00
    Gold Ore - 10.00
    Lapis Ore - 20.00
    Diamond Ore - 50.00
    Emerald Ore - 100.00
    Ancient Debris - 500.00 (this one is optional)

    Config example:
    Code:
    denominations:
      - item: coal_ore  # All items in this list are blacklisted from player shops.
      value: 0.50
      - item: iron_ore
      value: 1.00
      - item: nether_quartz_ore
      value: 2.00
      - item: redstone_ore
      value: 5.00
      - item: gold_ore
      value: 10.00
      - item: lapis_ore
      value: 20.00
      - item: diamond_ore
      value: 50.00
      - item: emerald_ore
      value: 100.00
      - item: ancient_debris
      value: 500.00
    
    Admins should be able to set anything they want as the value. By default, the logic is regarding the value placed on the ORE because the actual metals/materials the ore produces are consolidated in a base-9 fashion, making it extremely difficult to price, and when you do price them you can see how outrageous those costs can be. Defaults should be perfect for any server.

    Players start with nothing in their accounts. This is a game, after all. Players get a virtual account when they log in the first time, standard economy plugin stuff.



    BANK NOTES (open)

    Bank Note items are also set in the config. The name would be set in the config, and the value is in the lore. The banknotes are map items. By default, the plugin would get the next maps available that haven't been used in order to process this information. Maps would be able to have a picture put on it as well so the server has unique looking money.

    (Note: because most will be using their account as "debit", banknotes are recommended for large sums when players want to back up their cash or give a large amount to another player. It is NOT recommended to use this for a small amount like we usually have in our wallets in the real world, as that's just debit with extra steps.)

    By default, I would suggest the following method of configuring:
    Code:
    usenotes: true
    
    indestructable: false  # Set to true if you don't want fire or lava to destroy these notes.
    
    notename: Bank Note  # This is always in bold and the color is set by the notevalues section below.
    loreformat:
      line1: &a<symbol><large>&2<decimal>&a<small>  # The decimal is a different color to throw off any  hackers trying to manipulate an item.
      line2-norp: (right-click to redeem)  # Not used if roleplay is set to true.
      line2-rp: (Redeem at Teller)  # Not used if roleplay is set to false.
    
    notevalues:  # These would be the only values a player can get.  There would be no in-betweens, no  minimum, no maximum, just what the admin sets here in the config.
      - value: 10000  # Example of the value of the server's smallest note.
      color: &7  # This color code is set in the bank note's name.
      - value: 50000  # All items in this list are blacklisted from player shops.
      color: &5
      - value: 100000
      color: &e
      - value: 500000
      color: &2
      - value: 1000000
      color: &3
      - value: 1000000000
      color:&6
    
    The plugin could also look for images in the plugin's images folder, and the name of the image should correspond to the note value. So the image used for the ₴10,000 banknote would be called 10000.png and so on.

    Players could right-click this note and be given a choice to cash it by typing /confirm or something similar. Auto cashing of a note is not recommended as it can easily happen by accident, so confirmation is needed by the player.

    Doing /note list command will display the different notes you can exchange for. Next to the list, it will tell the player how many of that banknote they can purchase.

    When purchasing banknotes, the first thing it looks for is notes in the player's inventory and trades them up before dipping into the player's virtual account for any remainder. This way the max wallet amount is bypassed when trading banknotes in the case it's far lower than the banknotes would allow for.


    DEBIT CARDS (open)

    The Debit Card system is designed to enhance regular gameplay. Many want a "vanilla" feel to their plugin servers, and there's no easy way to do that with current economies. But the best we can do is try.

    Players will get a debit card if it's the plugin's first time seeing them. If roleplay is set to true, all commands are disabled except one. Players can use one command only: /card. If the player already has a card in inventory, it will not produce another. The card is soul bound. If it's in a chest, another card can be produced, but players are recommended to keep just the one.

    The debit card introduces a new way of economics as players. It would be easy to simply send items and money through commands, but the debit card would facilitate a more interactive play style. While holding the card, a player can right-click another player and get a message about how much you wish to send to them. This means players must be in proximity to each other to use this.

    The card would be a paper item with an enchantment glow. The settings would be something as follows:

    Code:
    cardname:  Debit Card  # Formatting and colors accepted on this line.
    cardlore1:  <player>  # Player's name.
    cardlore2:  <symbol><big>.<small>  # Updated with each use as the current balance.
    


    SIGNS (open)


    Players are limited to creating signs by default.

    [Deposit] Will deposit all your ores and give you the appropriate amount of money.
    [Withdraw] Will show a player the admin shop interface.



    PLAYER SHOPS (open)

    Creating shops will keep the economy in line with itself, and may eliminate the need for Vault if no other plugin will be interacting. When using shops (player or admin) the money is only taken and added to the virtual account, and no inventory items are affected (unless depositing all in an admin shop).

    The steps to create a new shop would be as follows:

    1. Place a chest (single or double).
    2. Put up to 36 items in the chest (only the first 36 unique, non-blacklisted items are detected).
    3. Shift+Right-click creates a villager on top of the chest.
    4. Owner can right-click the villager to get a shop management menu.

    Shop management menu (for shop owners, double chest interface):
    First row:
    1. Set Type (lore will say if selling, buying, or both)
    2. (empty)
    3. Edit Villager (will open a new interface)
    4. (empty)
    5. Admin Shop (only if the player has fiat.admin.shop permission, empty otherwise)
    6. (empty)
    7. Remove shop (requires confirmation).
    8. (empty)
    9. Close shop management interface.
    Second Row: empty.
    Remaining Rows:
    Each will be the item in the chest, one for each unique object. Only the first 36 are in the shop.
    Hovering over these items will show item name, price set, and if it's buying the item or selling.
    Right-clicking the item will change buy/sell/both statuses (if in both mode, does nothing if in buy or sell mode). Left-clicking will allow you to enter a price in the chatbox.

    Editing the villager appearance will give another menu with a row of villager types and another row of villager levels:

    First Row:
    1. Back to Management
    2-8. (empty)
    9. Close Shop
    Second Row: (empty)
    Third Row: Villager skins
    Fourth Row: (empty)
    Fifth Row: Villager level

    Other players will interact with the villager and clicking the chest will yield no results. When they click the villager, they should get a similar chest interface as the owner. If roleplay is set to true, they can only do this while holding a debit card.

    Shop use menu (for shoppers, double chest interface):
    First row:
    1. Player's current balance.
    2-8. Empty
    9. Close shop.
    Second Row: Empty.
    Remaining rows:
    All the items for sale or trade at that shop.

    Patrons can see the description, stock, and price if they mouse over the item in question. Left-clicking an item being sold will ask in the chat how many of that item you would like saying something like "How many would you like to buy. You may purchase up to <max>." Where <max> is a calculation based on how much money you have divided by the cost of the item, rounded down. Right-clicking the item will only work if the shop is in sell or both mode.


    ADMIN SHOPS (open)

    Admin shops would be created the same way as player shops are at first, but if a player has fiat.admin.shop they have access to "Set as admin shop" button. When clicking "Set as admin shop", it will switch over to the Bank Teller name, remove the rename button, set to buy/sell, remove the buy/sell button, and have unlimited amounts of the items. The item rows are automatically populated with denomination items, from smallest to largest. Buying and selling work the same way as player shops.

    What the player sees when using an admin shop:
    First Row:
    1. Balance (Displays a player's balance as lore)
    2. (empty)
    3. Deposit (sells all currencies in your inventory)
    4. (empty)
    5. Bank Notes (if in currency view. If in Bank Note view, it will say Currency.)
    6. (empty)
    7. Player Shop (if player is shop owner and has fiat.admin.shop otherwise it's empty)
    8. (empty)
    9. Leave Shop
    Second Row: Empty.
    Remaining rows:
    Items used for currency (if in currency view) and banknotes available (if in banknote view).

    Admin shops will create a villager as well, but it will have the name "<tellername>" and cannot be changed except in the config.

    If the admin wishes to sell more than the default items in the currency denominations, they can put more items in the chest to sell (up to 36 minus denominations).

    Bank note view will open a similar interface but only have the bank note items.


    PERMISSIONS & COMMANDS (open)

    I would recommend using the plugin to handle permissions so it's a drag and drop plugin and fully configurable from the config file. However, if admins want to get more specific, these would be available.

    For creating new virtual accounts, it would be recommended if the admin would prefix it with "server-" or something similar.
    Code:
    fiat.*
      Permission: .admin
      Command:  /fiat new <account>  # Create virutal accounts for server (like taxes, towny, etc)
      Permission: .use
      Command:  n/a  # Access to all fiat.use.* commands
    
    fiat.admin.*
      Permission: .set
      Command:  /fiat set <big.small>  # Set the amount of a virtual account.
      Permission: .give
      Command:  /fiat give <big.small>  # Add to a virtual account.
      Permission: .take
      Command:  /fiat take <big.small>  # Remove from a virtual account.
      Permission: .reload
      Command:  /fiat reload  # Reloads the plugin's config.
      Permission: .shop
      Command:  n/a  # Allows creation of admin (unlimited) shops.
    
    fiat.use.*
      Permission: .top
      Command:  /money top  # Top 10 accounts on the server.
      Permission: .pay
      Command:  /pay <user> <big.small>  # Pay another player.
      Permission: .balance
      Command:  /money or /balance  # Totals of items, notes, virtual account, and a sum total.
      Permission: .banknote  # Allows purchasing of a banknote
      Command:  /note <list|buy>  # list will show available sizes, buy will purchase a note.
      Permission: .deposit  # Allows depositing of money items in inventory.
      Command:  /deposit  # Deposits all money items in inventory for equivalent virtual value.
      Permission: .card  # Allows the player to obtain a debit card when they log in.
      Command:  /card  # Asks to confirm or deny acquiring a new debit card, gives if confirm.
      Permission: .swipe  # Allows payment to be made by right-clicking a player or shop.
      Command:  n/a
      Permission: .shop  # Allows the creation and use of shops.
      Command:  n/a
      Permission: .sign  # Allows creation of signs.
      Command:  n/a
    
    When a player does /deposit or deposits via a sign or a teller, it will only deposit up to the maximum wallet amount. Anything else will remain in the player's inventory and make change.


    CONCLUSION (open)

    Fiat is a modern solution to an old problem. One-stop, done and done. Compatibility with vault is an option for other plugins that would access the economy. Admins could use something like the Bank plugin so players can deposit their virtual accounts in and gain interest, adding another level of excitement to the server.

    All default values as described in this overview are enough for any server.

    Players can show off their wealth by displaying their billion-dollar banknotes for all to see. They could invest in netherite and build nethrite structures as a flex of their financial prowess. Anything is possible, and a good economy plugin is the first step in making new players and old players more leveled out so that cash can flow and players can always have fun!


    Some personal ramblings regarding this topic... (open)

    I've played Minecraft for a long time, and most of my Minecraft experience was through Bukkit and Spigot servers. I remember when the Spigot project was in limbo, and Bukkit was unavailable for a long time. We had to use Rainbow or some other server software. But in all these iterations of playing Minecraft on public plugin-based servers, the one problem that always stood out was this: the money system was useless.

    Many years ago, I began working with economy plugins, shops, and other non-economy plugins to try to fix the issues I was having. The first thing I noticed about many servers was that it was too easy to get money. Jobs or mcMMO would make payments to the players (something that can be disabled in the config, but no one does that). This meant that the more a player played, the more money they would generate. This would cause legacy players to have so much money that new players couldn't benefit from the shops they established. There was a barrier to entry that many people would never have gotten to.

    For a long time, I felt a gold system would be best. This would be based on the gold ingot and complimented by the iron ingot for lower denominations. But the fact that gold and iron can be farmed was an oversight that I tried to fix with loot drop plugins, but updates kept throwing the system for a loop. That's when I realized the only solution was to sell ores themselves as the currency. Ores have varying values depending on who's playing and the level of gear they have (or skills in mcMMO, Jobs, etc). But the one thing every player would have in common is that the ores aren't reproducible, unlike the farmable gold and iron.

    Taking this revelation, it was apparent there was a way to ensure a steadily growing economy was in play. Players would have to earn their money, not just be given it. The ores were valuable, and players could price them differently depending on how much value they put on it. But the server would have a base price value. The server bank would determine the prices for the ores.

    In order to determine default prices, I needed to find a resource that was precious and had varying value. I spent some time looking at rarity of ores in Minecraft and concluded (after a lot of math) the best prices for these ores. You could even drop the price of all the items by half and get even more value out of each dollar.

    What I set out to do was to come up with a more inclusive economy solution. It started as trying to find something lightweight to work simply with all my other plugins, then I figured if such a plugin would be needed, might as well get the entire experience done in one plugin. This could knock out a number of other plugins that would be required to achieve the same result.

    It was probably noted by everyone who reads this that Nether Gold Ore was removed from the equation. Nether Gold Ore was taken out because it was hard to price it alongside the rest while still having regular gold ore, and the rarities were so different it was a hard call. Nether Quartz Ore was another issue with similar rarities. Though it is a precious ore, it's not exactly hard to come by, making it hard to place in the denominations. I included it in the defaults as a way to keep the pricing of fuel and iron low, as they can be more plentiful than Nether Quartz Ore, while the quartz has utility for Redstone making it a higher value.

    The future will have copper ore as well, so that's something to keep in mind. But this plugin I am suggesting has the flexibility to change to fit Minecraft of the future.
     
    Last edited: Oct 24, 2020
  2. Offline

    DoodleRichard

    Sounds like a fun project! I sent you a message regarding the project. Would love to collaborate with you while coding this plugin! Seems like a lot of ideas to be implemented.
     
Thread Status:
Not open for further replies.

Share This Page