Better than Emerald: ------------------------- v1.1 Update! Back up your saves before installing/updating
Simple mod, replaces emerald in villager trading recipes with gold nuggets (soon to be ingots) gold ingots (soon to be gb / gi / gn), BECAUSE GOLD IS BETTER THAN EMERALD. Will work on balancing economy further later, keep an eye for updates.
About the mod:
I had wanted to add a gold-based trading system to the game some time ago but never got around to it. When it was officially announced that villager trading was going to be a thing, I understandably got very excited! ... only to find _jeb had done so through adding a new ore >.<. While the team did deliver a solid trading system, the currency just didn't make sense to me, so I decided to tweak it. Thus the mod.
- You could say I was underwhemeralded it wasn't gold, ba dum tsh! xD ... I shouldn't breed.
I actually have a whole slew of features I've always wanted for myself (and would love to learn a little more about java by implementing them), but I figured here would be a good place to start. On top of learning java to do this, I'm also sort of panning out the community response. Your support will mean more content in the future.
8/4/12: Below is a mock up of what the new trading gui could look like. Note this was done in photoshop, not in-game (thus a few pixel errors).
8/1/12: v1.1 updated, nuggets replaced with ingots, for the time being. Started work on gb / gi / gn currency system.
Here is the code for the change calculator, for those interested:
class YellowBrick {
// Each item/service available for trade will be given a value between 3-243, in gold nuggets.
// A villager picks a value from a range somewhere between these two numbers, guided by the base value for the item (which narrows the range it can choose from further).
// 1 gold block = 9 ingots = 81 nuggets , with the most expensive items in the trade lists being worth 3 gold blocks.
// The player will be able to offer up any combination of gold blocks/ingots/nuggets that meets or exceeds the items value.
// Price will be shown in blocks/ingots/nuggets, with total charge divided into the greatest units possible.
// Villagers will return change with the same process, determined by the difference between offer/item.
// Here is the process for determining charge/change, with the given value of 91 producing 1 block, 1 ingot, and 1 nugget.
public static int valueItem;//value of the item, will be based upon individual villager's recipe lists
public static int valueBullion;//greatest value of item in gold blocks
public static int valueBar;//greatest value of item in gold ingots, after blocks
public static int valueCoin;//greatest value of item in gold nuggets, after blocks and ingots
public static void main(String args[]){
valueItem=91; // declared value for the transaction, will be updated by villager as needed
if (valueItem/81>=1){
valueBullion=valueItem/81;
}
else{
valueBullion=0;
}
if((valueItem-(81*valueBullion))/9>=1){
valueBar=(valueItem-(81*valueBullion))/9;
}
else{
valueBar=0;
}
if(valueItem-(81*valueBullion)-(9*valueBar)>=1){
valueCoin=valueItem-(81*valueBullion)-(9*valueBar);
}
else{
valueCoin=0;
}
/** Checks the values via console; this set will return 91 , 1 , 1 , 1 */
System.out.println(valueItem);
System.out.println(valueBullion);
System.out.println(valueBar);
System.out.println(valueCoin);
// This implies TWO things:
// A) A villager with an item valued at 91 nuggets will display a price of 1 block, 1 ingot, and 1 nugget, OR
// A villager returning 91 nuggets in change will give the same units.
}
}
Experienced coders, please feel free to correct me here if you find that this does not work for all values. I ran a pretty exhaustive test for the algorithm in excel, but A-I did so in haste, B-I'm an amateur at programming, and C-excel is NOT java. Errors are more than possible.
Older:
7/31/12: Uploaded v1.0, emeralds replaced with nuggets. At work now, but expect an update from nuggets to ingots this evening tomorrow.
Also expect a sharp change in the exchange rate in the future.
Detail's below:
I'll be rewriting so you can use gold blocks (gb), ingots (gi), or nuggets (gn) for you transactions. The rates of emerald(e) to gold should roughly follow 6e : 1gb > 2e : 3gi > 2e : 27gn .
The step after would be to rebalance the trade lists, as the emerald ones were quite skewed on their own. Things like being able to bake bread and turn a tidy profit, etc. I also have to remove all gold from the trade lists. Will add more ideas/tweaks as I go.
Test it out, and feel free to give any suggestions as far as pricing (wool should be worth x, cookies are worth x)! In the future I will make recipes require combinations of gold blocks, ingots, and nuggets: sort of a dollar/coin system. You will be able to interchange the three in the recipes. Feedback on this would be appreciated!
Thank you mystery downloaders! Please remember to comment, follow, or endorse if you like the idea, or if you try the mod for yourself. Your support is what keeps me working on this!
!Also please report instances where emerald persists as the trade material (I caught one myself on a quick test run, see screens). This will help me weed out these problem. CAUTION: Always back up your saves BEFORE installing/updating!! Each villager mob saves its trade lists/recipes to the world file. This means if a villager generated an emerald recipe before installing/updating/uninstalling the mod, it will keep that recipe (this holds true for recipes generated by different versions of the mod). However, new recipes added to its lists will draw from whatever the most current code is; i.e., they will update with vanilla/1.1/1.2/beyond rules, according to what you have installed. Each trade has a chance of replacing a previous recipe, so subsequent trades should eventually replace the offending recipe. I'm looking into some way around making users update villagers manually like this, but in the meantime if you don't want to put in the effort I suggest starting a new world.
considering how easy it is to get gold nuggets i would recommend making the prices 3-5x more than the emerald prices
The idea is to balance it according to supply/demand, yes. I was thinking gold ingot prices would be roughly twice as steep as emerald, and nuggets being worth 1/9 an ingot ?? This way ingots act as dollar currency, and nuggets like coins.
I made this very quickly this morning, fooling around in the MCP pre-release. I plan to overhaul it. I'm going to re-write it so you can use ingots AND/OR nuggets for your purchases. Say something cost an ingot and three nuggets, you could pay with exact change or two ingots. You may or may not get exact change back, I haven't thought that far into it yet Villagers will return change accordingly.
Edit: updated to ingots, preparing for gb/gi/gn update. Stay tuned
-----------------------------------------------------------------------------------------------------------About the mod:
I had wanted to add a gold-based trading system to the game some time ago but never got around to it. When it was officially announced that villager trading was going to be a thing, I understandably got very excited! ... only to find _jeb had done so through adding a new ore >.<. While the team did deliver a solid trading system, the currency just didn't make sense to me, so I decided to tweak it. Thus the mod.
I actually have a whole slew of features I've always wanted for myself (and would love to learn a little more about java by implementing them), but I figured here would be a good place to start. On top of learning java to do this, I'm also sort of panning out the community response. Your support will mean more content in the future.
-----------------------------------------------------------------------------------------------------------Changelog:
Older:
-----------------------------------------------------------------------------------------------------------Screenshots:
v1.1:
2 , so far so good
... Crap. That'll have to be tweaked.
Nobody's perfect guys.
Older versions:
Test
Check
Double Check
Third time's the-- Oops
-----------------------------------------------------------------------------------------------------------Downloads:
Download v1.1- adfly
Dowload v1.1- mediafire direct
Older Versions:
Download v1.0- adfly
Dowload v1.0- mediafire direct
-----------------------------------------------------------------------------------------------------------Installation:
Standard non-modloader
1. Download
2. Open .zip
3. Drop into Minecraft.jar
4. Delete Meta-Inf folder
5. Enjoy
-----------------------------------------------------------------------------------------------------------Conflicts: Anything that modifies oc.class (EntityVillager)
-----------------------------------------------------------------------------------------------------------Endorsements/Disclaimers:
Test it out, and feel free to give any suggestions as far as pricing (wool should be worth x, cookies are worth x)! In the future I will make recipes require combinations of gold blocks, ingots, and nuggets: sort of a dollar/coin system. You will be able to interchange the three in the recipes. Feedback on this would be appreciated!
Thank you mystery downloaders! Please remember to comment, follow, or endorse if you like the idea, or if you try the mod for yourself. Your support is what keeps me working on this!
!Also please report instances where emerald persists as the trade material (I caught one myself on a quick test run, see screens). This will help me weed out these problem.CAUTION: Always back up your saves BEFORE installing/updating!! Each villager mob saves its trade lists/recipes to the world file. This means if a villager generated an emerald recipe before installing/updating/uninstalling the mod, it will keep that recipe (this holds true for recipes generated by different versions of the mod). However, new recipes added to its lists will draw from whatever the most current code is; i.e., they will update with vanilla/1.1/1.2/beyond rules, according to what you have installed. Each trade has a chance of replacing a previous recipe, so subsequent trades should eventually replace the offending recipe. I'm looking into some way around making users update villagers manually like this, but in the meantime if you don't want to put in the effort I suggest starting a new world.The idea is to balance it according to supply/demand, yes. I was thinking gold ingot prices would be roughly twice as steep as emerald, and nuggets being worth 1/9 an ingot ?? This way ingots act as dollar currency, and nuggets like coins.
I made this very quickly this morning, fooling around in the MCP pre-release. I plan to overhaul it. I'm going to re-write it so you can use ingots AND/OR nuggets for your purchases. Say something cost an ingot and three nuggets, you could pay with exact change or two ingots.
You may or may not get exact change back, I haven't thought that far into it yetVillagers will return change accordingly.Edit: updated to ingots, preparing for gb/gi/gn update. Stay tuned