Forum

Notifications
Clear all

MCPE/Bedrock Custom Economy System

McBedrock
(@mcbedrock1)
Illustrious Member Admin

Custom Economy System

 

BRING THE CAPITALISM TO YOUR WORLD, this addon let you create your own economy system using scoreboard compatible coins, debit cards, trader and even loot tables, perfect for realm , map makers or even juts a world with friends

 

Before start

In the current version (1.16.200) this addon requires two experimental gameplay active, if you’re gonna use it on a realm or server don’t worry,  is  easy to solve
Experimental features in realms:
  • Download a copy of your world 
  • Enable this 2 experiments, that will create a copy of your world

  • Replace your current world in with the copy, DON’T OPEN THE WORLD
  • Install the add-on

Experimental features in servers:

  • Change the minecraft storage to “External”
  • Download your world and export it to Minecraft
  • Open Minecraft and activate the experimental features showed before
  • Close the game
  • Go to games/com.mojang/minecraftWorlds and find the carpet of the copy world
  • To be sure it’s the right world open levelname.txt, this file contains the name of the world
  • Some server can use the carpet, if that’s your case export the carpet of the world to you server replacing the current one
  • If not, compress all the files in the carpet, export the .zip

 

  • Install the addon

Coins


Coins are one of the main parts of this add-on, they allow the player to have physical money that can use to trade with player or the coin trader, a customizable villager that I explain on this article. There’s Coins of 1 2 5 10 20 50 and 100, all can be crafted and uncrafted on the bigger and the smaller ones.
 
Coins can be obtained customizing the trades of the coin trader, using the debit card also explained after the coins or can be dropped by hostile mobs when killed by the player, there’s a 15% chance to drop a coin that can be increased on a. 5% for looting level, if a coin it’s dropped there’s a  90% chance to drop a simple coin, and 10% chance to drop a coin 5 , but this only happens if you’re using an complementary add-on that you can download here with the main one, for default mobs won’t drop coins
The recipes of the coins are listed below, this recipes are only toake easier carry bunch of coins in a smaller space, you must get it from another source firts
 
 
Ingredients
Coin × 2
Result
Coin 2 × 1
 
Ingredients
Coin × 5
Result
Coin 5 × 1
 
 
Ingredients
Coin × 1
Coin 2 × 2
Result
Coin 5 × 1
 
 
Ingredients
Coin 5 × 2
Result
Coin 10 × 1
 
Ingredients
Coin 10 × 2
Result
Coin 20 × 1
 
Ingredients
Coin 10 × 1
Coin 20 × 2
Result
Coin 50 × 1
 
Ingredients
Coin 50 × 1
Result
Coin 100 × 1
 
Ingredients
Coin 100 × 1
Result
Coin 10 × 10
 
Ingredients
Coin 50 × 1
Result
Coin 10 × 5
 
Ingredients
Coin 20 × 1
Result
Coin 10 × 2
 
Ingredients
Coin 10 × 1
Result
Coin × 10
 
Ingredients
Coin 5 × 1
Result
Coin × 5
 
Ingredients
Coin 2 × 1
Result
Coin × 2
Coins also can be dropped by hostile mobs when killed for the played if you are using the special behavior pack, this can be used to emulate other games economy sistem, like TLOZ 

Coin Trader


This is a villager with customizable trades, can be used instead of the typical scoreboard stores, coin trades only appear if are called using the call Bell, and disappear if there’s no player nearby them, to see how customize the trades check the tutorial at the end of this article
 
Call Bell Recipe:

Ingredients:
  • Stick × 1
  • Gold Ingot x 1
  • Gold nugget × 1

Result

 
  • Call Bell × 1

To use the Call Bell you just have to “eat” the item, right click  you’re playing on PC or keep the screen pressed I’d you play in Pocket Edition, doing this the bell will sound and a coin trader appear on the same place that you, once you finished your trades just leave the trader, its presence don’t affect the any entity around, 

Debit Cards


 Debit cards are selled for the coin trader, but you can also use command blocks to give them to the players, this item makes the add-on compatible with scoreboard stores. In first places coins can be converted in score values, to transform a coin in score you must “eat” it, the coin desapears and you get its value on scores, the card can convert this scores back to coins, this work the same like coins, except that the card don’t desapears, you can see how this works on the video below

 

      Use with scoreboards

You can create scoreboard stores using this add-on, there’s a tutorial about how

Sell ítems:

  • Get a command block
  • Put 6 command block in line

  • In the first one write this command

 
  • In the second one write the messenge that will be displayed if the player doesn’t have enough money using /title

  • All the block after the first one must have the their settings set on “Chain” and “Always Active”
  • The third block will give the player the selled item if it has enoug money, use this format, I’m selling a diamond Sword for 10 coins

/give @p[tag=buying,scores={coin=”price”..}] “item” “number of items



  • The next block remove the coins from the scoreboard, use this format for the command

/scoreboard players remove @p[tag=buying, scores={coin=”price”..}] coin “price”

 


  • The next block overlaps the previous message with a new one if the players buys the item, use /title for this, you can copy the command, this block also must have the “conditional” setting active, this change how the block looks

  • The last one removes the tag, just copy the command in the image

 

At the end all must looks like this

The sistem that I created on this tutorial sells 1 diamond Sword for 10 coins

Buying player’s ítems: Just use the previous machine with a few changes

  • Replace the messenge on the second block

  • Replace the command of the third block with this format, this takes the item from the player inventory

/clear @p[tag=buying] “item” 1


  • Write on the next block the command that gives coins to the player with this format

/scoreboard players add @p[tag=buying] coin “amount_of_coins”

 
  • This command block also must have the “conditional” settings active

  • The whole thing looks like this

This second sistem takes 1 diamond Sword from the player inventory and returns 10 coins

On both of the you must activate the first block to buy/sell the item

 

           

             Display Sistem

When using scoreboards a current problem its the “offline” players, that are showed even if they’re not on-line, to solve this the add-on has its own display sistem, just write the command below and a command block box will appear, activating the display sistem
 
/function set_display
 

For default the scoreboard value it’s showed on the pause menu, but you can change this using the botones on one side of the box, that are showed in the image

 

To keep I working even without players nearby this machine uses mysterious command block magic (Also knowed as ticking area) to keep the nearby chunks charged, so if you need move the box to a new location or just wanna delete it use first the boton on one side, of the machine, this delete both, the machine and the ticking area.

 

And don’t worry, the machine itself won’t cause any lag, other addons like “F3 Bottom” use this too without even say it, just be sure noone builts big farms or lag machines nearby the box.

Customization

On this section I’ll explain how to customize the addon as you like more, this is directly related  with the in-game content, because you can easily change how the addon works with this for that it’s better do this before even install the add-on, if you like the addon as I made it you can skip this part. As example I created a second complementary addon based on the TLOZ saga rupees that you can also download here, however you can use any coin you want. I can’t use images that are not from the game, but its not necesary just follow the steps one by one and you’ll br  fine, anyeays if you have any questions leave a comment, if its necesary I’ll made a review of this addon with a tutoriak about yhe cuztomization,
To customize the addon,you will need:
  • A zip extractor/compressor
  • A pixel art editor, I recommend IsoPix
  • A text editor, I use Quick Edit
  • Install Json Genie (Only if you will edit the trader)

Extract the files

  • Download the addon and change its extension to .zip, on mobile devices this can be donde just renaming the file, in PC it’s different depending of your operative sistem

 

  • Extract the . zip file, you’ll get two carpets, one with the textures and another one with the behaviors

Names: First we’ll edit the names of the items and the trader, here  where you use the text editor

  • Enter in the resource pack carpet, open the carpet ” text” and find a file called “en_us.lang
  • Change the extension to .txt 

 

  • Open the file, the change the name of every item for whatever you want, you can know what are renaming for the id’s

Coin -> id:coin

 

 

Coin 2 -> id:coin2

 

Coin 5 -> id:coin5

 

Coin 10 -> id:coin10

 

Coin 20 -> id:coin20

 

Coin 50 -> id:coin50

 

Coin 100 -> id:coin100

 

Debit Card -> id:card

 

Call Bell -> id: bell

 

Coin -> id:coin_trader

 

  • The squares are emojis of the coin logo that you can also customize, if for some reason you erase one and you need to paste it back you can copy this ”   “
  • You can also use color text, just paste this symbol ” § ” and after it write a number or letter, depending or what you write the text will change, you can see al the combinations here
  • Once you changed the names save the file and change the extension back to .lang
  • Now to change how the scoreboard display name go to the behavior pack, find the carpets functions and change the extension of “display.mcfuntion” to .txt

 

  • Use the emoji and color text like in ten previous file if you want
  • Open the file and change the last part of the command
  • Save the file and change the extension back to .mcfunction

Textures

  • First create textures for every coin, the card and the trader if you want, the textures for the items must be a 1×1, you can use any size but must be a 1×1

 

  • Replace the original textures in Custom Economy Resource Pack/textures/items with the new ones, keeping the same names

 

  • To edit the emoji download this image
  • Create or paste your icon for the emoji on the image over the coin icon, it must feet into the white square, if you wanna make something bigger that a 16×16 pixels use this page to expand the image, the icon must be on the left side of the square

 

  • Erase the non used pixels and save the image with the same name it has

 

  • Replace the original image inside the carpet “font”  for the new one
  • In both cases you can just move the files to the carpets, because they have the same name of the original ones the device will ask you if you wanna overwrite them, just say yes

 

With that you have finished to create your custom coin, unlike the TLOZ add-on that I created you can use this add-on instead of the main one, if you are going to use a scoreboard store with this add-on you can stop here, if not see how customize the trades for the coin trader .

Coin Trader: This can be the harder part to understand because we need to edit the code directly, I know not all knows about json code, that why we’ll use json Genie, it make edit json code A LOT easier, in this case I won’t use images to explain, I made a video instead,I think  the video is enough it has the same explanations, but you can also see the instructions listed below, read them at the same time that you see what I do in the video and you’ll be fine

 
  • First open the app and find the coin trader table file, it’s inside trading/economy_trades
  • Go inside “trades” and clone the last one object
  • Edit the trades as you want, there’s 3 parta, “wants” define the item or items and their amount that you must give to the trader, “gives” it’s the same thing but with the items that you obtain and “experience reward” defines if the player will get it not xp for that especifice trades
  • When definig the items you “quantity” defines the amount of items, maximum 64, and “items” it’s the id.of the items, for this addon the id’s are

Coin -> id:coin

Coin 2 -> id:coin2

Coin 5 -> id:coin5

Coin 10 -> id:coin10

Coin 20 -> id:coin20

Coin 50 -> id:coin50

Coin 100 -> id:coin100

Debit Card -> id:card

Call Bell -> id: bell

  • If you wanna make trades with items from other addons you need to know it’s id, you can use the /give command to know or extract the files of the addon use Json Genie yo open their respective files and find it’s id
  • Once you finish save the file, find it on the correct carpet and replace the old one with the new one, you must keep the name and location not the file
  • On the video I made a trade that gives you 2 of dirt and xp, but you can do whatever you want, sell items for coins and buy other using them

Closing the addon: Once you have finished compress the resource and behavior pack carpets in a .zip file, change the extension back to .mcaddon and export the addon, if you have exported it before delete it from minecraft first, you can see too on the video

 

Extras

  • TLOZ commentary add-on, this replace the coins for rupees
  • Loot tables behaviour packs, enable this allow the hostile mobs to drop 1 coin with a 15% percent when killed for a player

 

 
 
Changelog
  • Removed all images that are not from the game, tutorials included

Installation

 
  • Enable experimental features (More info at the beginning of this article
  • Download And install the packs
  • Customize the add-on first, you can see how on the previous tutorials
  • Activate the add-on, including the complementary add-ons if you'll we use them
  • Enter to your world and write this command, 

/function set_display

Deliting the add-on

  • Delete the command blocks machine using the boton on one side of the machine
  • Delete all the items and entities of the add-on from the world 
  • Remove the addon

 

creator: https://www.youtube.com/channel/UCyPtUZQN4GzW7Be4jX3whuA

Downloads

 

Quote
Topic starter Posted : 11/02/2021 11:50 am
Share: