ldtteam / minecolonies

Minecolonies minecraft mod
http://minecolonies.com/
GNU General Public License v3.0
664 stars 342 forks source link

Baker deleting bottles #6222

Closed kmanev closed 3 years ago

kmanev commented 3 years ago

Prerequisites

Context

Expected behavior

When baker crafts dough, uses up a water bottle. I would expect they receive an empty bottle.

Actual behavior

When baker crafts dough, uses up a water bottle. No empty bottle is given back to baker.

This is the dough recipe: https://github.com/ldtteam/minecolonies/blob/version/1.16.3/src/main/resources/data/minecolonies/crafterrecipes/baker/bread_dough3.json No bottle is in the product of the recipe.

Steps to reproduce the issue

  1. Make a baker craft bread.
  2. Reproduced

Logs

-Nolog

Notes

Searching the whole source code for "bottle" (since the name "minecraft:glass_bottle" etc.) in order to find if any code is supposed to "compensate" the recipe found no related results. Was this intended to "lose" the bottle or? Couldn't reason why it would be like that...


Viewers

Mekle001 commented 3 years ago

This is by design. the recipe using a water bottle uses much less wheat, but adds a glass cost through the bottle usage.

Moleculor commented 3 years ago

As someone who hasn't yet reached a point where I've built a baker (so I honestly don't know what options there are), is there a way we can we opt for a 3-wheat, no ground-glass option?

gattsuru commented 3 years ago

I think that's the default (https://github.com/ldtteam/minecolonies/blob/1ee39f2454beecdb15edb2d89cbee63b82ed8258/src/main/resources/data/minecolonies/crafterrecipes/baker/bread_dough.json) for bakeries under level 3, but not upgrading the hut past that level does stop them from learning Chorus Bread/Cookie Dough/Pumpkin Pie.

Mekle001 commented 3 years ago

What gattsuru said. The thinking is that by the time you are ready to upgrade your bakery to level 3+, you likely have a crusher and a glassblower, which gives you full automation of the enhanced recipe. The University research for "Gilded Hammer" which reduces the crusher requirements to be 1:1 is also within reach.

kmanev commented 3 years ago

I don't fully see the logic in the use of glass in making bread. Seems quite random. Wheat is so cheap to produce that one must be crazy to go for unsustainable glass production to feed the town. The glass bottles can indeed be automated, but the sources are not sustainable (you will run out of cobblestone eventually, I don't even have stone now, because all of it goes for massive walls around the town etc..) and your miners (even if they live through mobs, drowning or just getting stuck in a corner somewhere) will not mine cobblestone indefinitely.

So now I have to destroy my level 5 bakery and rebuild it to level 2 only to get them to produce bread using the vanilla recipe.

Also don't forget that even 3 wheat for 1 bread is more expensive than vanilla as it needs smelting, but I guess that is a reasonable price for automation.

Mekle001 commented 3 years ago

Part of the point was to produce a sink for the water bottles produced by the fisherman. In my experience, the fisherman produces enough water bottles at higher levels to become a problem with clogging the warehouse. This is 100% sustainable, as once the fisherman gets going, he eventually will produce a fishing rod with mending and unbreaking on it.

I will also point out that the higher efficiency recipe is 1 wheat, 1 water for 2 dough, vs 3 wheat for 1 dough.

What if there were a research that gave you a 25% chance of 'not breaking the bottle' when making dough? So, you'd get one bottle back for every 4 water bottles used.

Moleculor commented 3 years ago

I can see the dilemma here. If you've built a colony that focuses more on baking and just flat out doesn't have a fisher, the baker is (apparently? see below) going to eat every bottle of water you put in to the system, and that costs you significant resources (one sand block plus a little fuel per bottle).

If you have a fisher that is high enough level, you're buried in bottles.

This is just my opinion, and feel free to prove me wrong, but from a design perspective I feel like a research option to keep 25% of bottles isn't really going to solve either issue? A fisher is still likely to overwhelm someone's storage, and a lack of a fisher is still going to be consuming large quantities of sand.

As someone who has yet to actually build a baker (and so I'm "suggesting blindly" here), maybe simply the ability to toggle both the level 1 recipe and the level 5, once the higher tier recipe becomes available?

Mekle001 commented 3 years ago

That is another option, move the efficient recipe to being behind a research rather than a building level. But I see it as a bit of a wash with the research to return bottles, and this is why:

It could be done like others with chances rising with subsequent levels, when means if you choose to research it, you don't need the fisher. If you have the fisher, don't research it. It effectively is the toggle you're asking for, just requires thought and planning before throwing the the switch.

Moleculor commented 3 years ago

Is that the right thing for research? Research feels like it's always something objectively better, rather than just a trade-off, or worse, a mistake for someone who didn't realize what they were clicking or wants to change something up in their village later.

Mekle001 commented 3 years ago

You're right about what research has been so far, though we've started to add changes that require a bit more thought.

Most research trees across games have tradeoffs. We have some where you can pick a branch, and the other branch isn't available anymore, and thus is a switch you've thrown, especially in the combat tree. Focus on archers or knights. Not both. Pick the wrong one for your biome and colony setup, and you'll be regretting it later. You can probably overcome, but it won't be cheap.

There are parts of the research tree that require that you build a fisherman, including the sifter and all the minimum-stock researches. As such, there is a reasonable expectation that a fisherman will be built.

I'd also argue the researches I've proposed are significantly better for some players, and the goal isn't to get people to just blindly research everything. There is a significant rewrites coming of both the research system to make it better and more clear, and of the sifter to increase it's value to all colonies, and easier to manage.

I also want to note: glass bottles is a recipe that can improve, so with usage it will become one block of glass to create 3 glass bottles, bringing a single loaf of bread to 1/2 a wheat, and 1/6th of a cobblestone in raw materials cost excluding fuel costs)

Now, there is a separate issue where some colony types consume stone far faster than the miner produces it, especially in modded worlds where there are additional stone types to reduce your cobblestone. I consider that a very separate issue, though a valid one.

At the end of the day, we balance minecolonies for an otherwise vanilla world, and work to provide the abilities for modpack makers to configure it for better balance within their packs.

Moleculor commented 3 years ago

A tangential thought occurred to me: How do water/fishers/bakery factor in to a Nether-based colony? And does that impact this particular topic? I'd imagine an recipe change that shifts to something requiring water would be a significant downgrade for someone set up in the Nether, but maybe there's something I'm not aware of.

gattsuru commented 3 years ago

If you enable extradimensional colonies, builders can and will place water in the nether as part of construction, including for those fisher structures that include their own ponds. I think they fish a little slower, but at least in vanilla, the loot tables are the same.

It's a lot of items to import, but if you're making a nether colony you're not exactly playing for easy mode anyway.

Empty water bottles can be filled at a lvl3 baker automatically, no water required, if you don't want to dedicate a fisher.

Moleculor commented 3 years ago

Interesting. I can see why extradimensional colonies would be something needed to be enabled in the config, since placing water in the Nether is something I've not seen many mods be willing to do. Hopefully such a setting is dimension specific, so if someone wants to enable End colonies, but not Nether, that's doable?

But that's beside the point. Back to the topic...

Personally, I'm not even in the position @kmanev is in. I don't have a baker, my fisher hasn't had a fishing pole in ~100 in-game days, I don't have a crusher, etc.

I don't know enough about future plans and such to say whether or not a certain research option would be a good or bad thing, and I don't feel like I have enough experience with the mod to provide much useful design feedback. I can only share the fears/worries/thoughts that I have based on my limited experience with the current system, and hope those help y'all make great decisions.

To that end, here's what I think about:

Maybe a research option is a great solution. Maybe there's a different route entirely. I honestly don't know. But it feels a little weird that the 'best' answer to dealing with water bottles is the baker, of all things. I can see why it was a solution, but it feels... hacky? Somehow? Like it's a good-enough-for-now fix that's waiting for a better solution later.

If there ends up being a research option, I'd personally lean more towards 'research that gives you the ground-glass recipe' than the X% bottle one. And not as a research item that I have to choose between an either/or set, nor as one that's a prerequisite for others, though having prerequisites of its own would probably be fine. But at that point we've literally recreated my original suggestion of it being an toggleable option in the bakery, with a few extra steps, and put it in the research UI rather than the bakery UI. Does that make it more fun and intuitive? Is it easier to code? Will it result in fewer questions from new people on Discord? 🤷‍♂️

I suspect the fishing water bottle frequency is taken straight from 'nilla Minecraft? and thus feels designed for players fishing for a short while, not a colonist making it their full time job. A bottle when fishing is literally classified as junk and is there in 'nilla Minecraft to break up the gameplay monotony of cod, cod, cod, salmon, pufferfish, cod, salmon, salmon, salmon. If vanilla fishing drop rates create problems for colonies, I'm personally more inclined to want to remove water bottles from the options for a fisher, even if that means removing it from the player getting them as well, and removing the ground-glass recipe from the bakery. But fishing up entire bottles of water never did feel 'right' to me, anyway, even in 'nilla Minecraft, so I'm biased.

(That's a change I think I can personally accomplish with datapacks? Which, if this ends up being a problem for me like it is for @kmanev and a better solution doesn't exist by then, I'll happily pursue that as an option.)

(Sorry for the novel. I've spent hours trying to write this, and trim it down, and think about it, and try to come across as "I want to be helpful", but I have to give up at some point and hit the green button.)

gattsuru commented 3 years ago

Fishers use vanilla (or vanilla-as-modified-by-other-mods) loot tables, so they're exposed to the datapack system in /minecraft/loot_tables/gameplay/fishing/fish.json, /minecraft/loot_tables/gameplay/fishing/junk.json and /minecraft/loot_tables/gameplay/fishing/treasure.json. Enough of the fishing "trash" table is useful (lily pads, string, leather) that I don't think it'd be a good ideal to disable it entirely in the mod, but overriding it for your personal instance is doable.

The bread dough recipe for level 3 or higher bakeries is minecolonies/crafterrecipes/baker/bread_dough3.json. You can either override it directly by having a file with the same location but different contents, or Crafter Recipes support a "remove:resourceLocation" approach if you want to have a more complicated approach.

That said, I'm not sure that's the underlying problem; there's a lot here that sounds like it's far downstream of resource balancing, ui, or warehouse inventory management.

Moleculor commented 3 years ago

That said, I'm not sure that's the underlying problem; there's a lot here that sounds like it's far downstream of resource balancing, ui, or warehouse inventory management.

Yeah, I'm having a hard time nailing down exactly what the 'best' issue to solve is. Of course, I only have about 80 hours in the mod, so I likely lack a ton of information.

Obviously, bottle spam is undesired. But then I'm also of the opinion that bottles made by the player shouldn't be destroyed. If the player invests resources in to something, a colonist shouldn't be able to destroy it.

Actually, I think that's a great philosophy in general: If the player makes something, the colonists shouldn't be destroying it. Whether that's glass bottles or cosmetic builds.

... crazy thought, but is there a way for NBT tags to be applied to colonist-made items? So that a bottle fished up by a fisher is tagged with minecolonies:breakable or however NBT tags work/look so that if it's used in a recipe by another colonist it gets destroyed, but if the tag is lacking from the item, the item is returned?

And that tag would only be applied if 100% of the ingredients that went in to it also had the tag?

So, a fisher fishes up a bottle? That item is tagged as breakable. It doesn't get returned when used by the bakery. A miner mines up iron ore? Tagged as breakable. Smelted in to ingots by a colonist? Those ingots are breakable. Are all three ingots used to make a bucket by a colonist? The bucket is also breakable and doesn't get returned when used by a colonist.

But if you give iron ingots you personally mined and smelted to that same blacksmith (or whomever would make a bucket)? Since the ingredients don't have the breakable tag, the bucket won't either. If you personally mine up ore and give it to the colonists, they won't have the tag, so what's smelted from them won't either.

I don't know if that's doable, feasible, sane, or a good idea. And there'd probably be "exploits" (like, say, a player grabbing nine iron ingots with the tag, crafting them in to a block to wipe the tag, then crafting them back in to ingots without the tag) that wouldn't even be worth trying to prevent. But just a crazy thought, and just one based on my own opinion, which is ignorable.

Mekle001 commented 3 years ago

@Moleculor, I appreciate the time you've put into this. You've covered a lot of ground, from the official modpack, to the fishing loottables, and unexpected consequences. I'll address a few that stood out to me as I read through.

One of the problems we face in every change we make is doing it against a long-term plan. So, for instance: We expect there to be multiple consumers of water bottles, since the potion maker than is on the drawing boards will require them. There are other places where they may show up too.

Another issue is the cross-crafter interactions, which is very much by design. Our variety of crafters by definition means there are dependencies, and if you want full automation you will need at least one of everything. Does that limit the type of play? Potentially, though it's fairly accurate too. A fishing village survived by trade for the things they didn't produce themselves. In the case of minecolonies, the only trade we support is between the colony and the player themselves. So, if you're willing to fill the needs that the colony doesn't, that's your choice.

Thematically, I believe it makes sense for water to be involved in the bread making, and we added the recipe to the baker to fill the bottles. We also tuned it to be really cheap when used a lot. Frankly, it was a nice side effect to solve the fisher problem. I will think more on this, perhaps the right answer is a research, but one that nothing else is dependent on, and a choice to 'improve' the dough recipe.

Now, it should be noted that we also changed the baker to not infinitely craft bread, so it won't fill the warehouse. Bread is only made when requested from somewhere. If you want a stock of it, you need to put in a prestock request. You can do that at the warehouse, cook, or baker (though at the baker, I suggest dough rather than bread).

As for the fishing loottables, you have some interesting points. However, to do that right means loottables that adapt to the fisher, and today we don't have that capability, though I am working with another dev to provide exactly that ability, so who knows what we might do in the future.

This brings me to the official modpack. Many of the capabilities we're talking about here weren't in existence when that modpack was put together. Almost none of the modpack customization abilities existed when the 1.15 one was put together, and I don't think the 1.16 has really caught up to the new abilities yet. For instance, it might make sense to add recipes to convert many of the modded cobblestones to normal cobblestone, for that particular pack.

Ok, more has come in while I was typing this up.

I have a pretty strong reaction to the 'breakable' tag, as it's a massive amount of work, and increases the complexity and rules significantly.

Moleculor commented 3 years ago

Thank you!

One of the problems we face in every change we make is doing it against a long-term plan. So, for instance: We expect there to be multiple consumers of water bottles, since the potion maker than is on the drawing boards will require them. There are other places where they may show up too.

Yeah, you guys occasionally release an update or two. /s Clearly you've got plans for where this mod is going. 😄 And it's why I wanted to emphasize that I'm new to this whole thing, only have 80 hours, can't see the whole picture. I definitely recognize there's stuff I do not know.

A fishing village survived by trade for the things they didn't produce themselves. In the case of minecolonies, the only trade we support is between the colony and the player themselves.

I've seen intimations in Discord that there's a bit of a joke about intercolony trading being a fairly common topic brought up in the #suggestions channel. At first I thought it was one of those "Often requested, but never going to happen" types of things, but I did a little bit of looking and have found references as far back as 2016 stating that inter-colony trading is a goal (#81), and as recently as March seeming to say much the same (#4535).

Considering we were just talking about long-term plans, is this an indication that trading is no longer going to happen? Or that it's still so far out in the future that it doesn't even qualify as a long-term plan that's worth planning for at the moment?

Because if inter-colony trading is still on the table, it feels (from my inexpert, outsider, I don't know what I'm talking about perspective) like it'd be wiser to not necessarily balance everything around pushing a player towards having one-of-everything or make design decisions that are too intimately tied in with the idea of having one-of-everything, so that when trading does become a thing, it becomes a thing that is easier to make worth doing?

i.e. It'd be easier to encourage trading through specialization if specialization doesn't also come with ugly costs of frustrating mod<->vanilla interaction.

Plus, that frustrating mod<->vanilla interaction still occurs to newer players first starting out, not just end-game colonies, etc, and it'd be worth addressing it in those situations as well.

Thematically, I believe it makes sense for water to be involved in the bread making,

Oh, definitely.

Unfortunately, the vanilla bread recipe was added back months before buckets were even in the game, not to even think about bottles, and I'm pretty sure buckets with lava in them not being destroyed was a year or two after bottles. The idea of any recipe returning a used version of an item wasn't even a glimmer in anyone's eye back then. The bread recipe from vanilla Minecraft is terrible in the context of the rest of vanilla Minecraft.

But if the baker is going to use the vanilla recipe in early stages, what is the good reason to take that option away from players in later levels? Yes, one can argue that the level 3 recipe is more efficient if you have water bottles, but if you don't, it probably isn't?

But perhaps the baker should never use the vanilla recipe? More on that below...

Now, it should be noted that we also changed the baker to not infinitely craft bread, so it won't fill the warehouse.

Okay, good to know it'll lean more towards wheat filling things up than bottles. And wheat stacks... hm. More on stacking below...

For instance, it might make sense to add recipes to convert many of the modded cobblestones to normal cobblestone, for that particular pack.

Maybe that's where I make my first datapack. 😅

I have a pretty strong reaction to the 'breakable' tag, as it's a massive amount of work, and increases the complexity and rules significantly.

Ah, please, nothing with crazy amounts of work and complexity and rules. I'm honestly impressed with whatever it is you guys have going on under the hood of this mod (most mods seem to have separate versions for 1.15, 1.16, and somehow y'all have one version for everything, and at some point I may try learning how), and I don't want things to be harder or complicated.

But I had a different idea that might be easier...


What if the problem is just that water bottles don't stack? And that's fixable by not storing them with water in them?

Can the fisher just be made to empty out water bottles when caught, or when delivered to the warehouse, or at some other stage (or multiple stages) of the whole process?

I mean, at some point you're also going to be making potions, which also don't stack, so if you want to get rid of potions, it'll either be throw it out, drink it, or have some colonist convert it to an empty bottle?

You can then...

...require bakeries to use bottles of water from level 1, and return empty bottles after use. Why even make the vanilla recipe a thing? Just make bottles of water a requirement for the Bakery at all levels, and simply improve the efficiency of the recipe to make dough as you level the bakery (as I vaguely gather it works with other buildings). This brings the bakery behavior in line with other buildings, and doesn't have this special snowflake case of a bakery behaving one way at levels 1 and 2, but then surprising a player at level 3 with a different method of operation. Which honestly feels a little bit like part of the problem: "It was doing this and I liked that and planned around it, and now it's not doing that, and I can't get it back."

...make 'bread needs water to bake' true for the entire time, which I honestly think should be true in Vanilla, too.

...not worry about fisheries overwhelming storage space with bottles. At least no more so than you need to worry about farms overwhelming with carrots/wheat/fish/whatever. Because now every bottle they catch is just one more in a stack of 64, rather than one more entire inventory slot consumed by the voracious bottle gods.

...not worry about a diminishing supply of bottles from a fisher as their fishing pole gains levels of Luck. You have bottles being returned now.

...already have a system in place that might be useful for whatever potion making system y'all have planned, where 'bad' stuff might need to be removed from a bottle before it's used, or removed if stock levels are changed and the potion is no longer 'desired', so they take the bottle back to the warehouse??

...not frustrate players by destroying items they may have worked hard to obtain in the early game.

ravenbuilder934 commented 3 years ago

Trading is planned. Eventually.

Mekle001 commented 3 years ago

So, I should note. When this recipe was added to the baker, there was no ability to return the bottles. They aren't considered containers (like a bucket) by vanilla, which means that during crafting they are consumed. My very recent changes (a week or so ago?) make it a viable option.

The biggest reason we don't use research MORE for this sort of thing is that it's currently a big pain to add researches. With the rewrite that is in code review, that becomes simple, and datapackable. So, expect to see more of that sort of thing in the near future.

As for emptying water bottles, there isn't a good way to do that right now. However, once the sifter rework is done, it's possible we could have somebody responsible for 'item cleanup' in the warehouse, similar to the way a smelter converts ore to ingots.

I have some ideas, but I'm hesitant to share the details at the moment. let me think them through a bit more.

kmanev commented 3 years ago

Just a quick note of opinion: you have all explained many aspects how/why/etc something could be done. I would argue that it is also for the best to enable as much options to the player as possible. For example, allowing crafting of bread with glass bottles that are consumed, but being also able to disable the autofilling of new bottles(so it just uses the ones from the fisher but no requesting to craft more). Another recipe using bucket with water can be added with much less or no benefits to how much wheat is used per bread. I think this mod pairs extremely well with giving a lot of choices to the player in general, instead of deciding on only one most optimal option. Or any other options idk. Just i feel having options is nice. Otherwise it is cool that things get debated (y)

Mekle001 commented 3 years ago

@kmanev Frankly, I agree with you. It all comes down to capabilities and time.

There isn't a 'disable' button on recipes today, so the best you can do is delete it. However, if you delete it, the next time it does a check for 'are all the predefined recipes configured' how does it know it was deleted, and to not add it back?

Picking which recipe to use when there are two with the same output is tricky. We have a few examples of it today, but all of them have a single ingredient, so the logic of "whichever recipe we have more of the input for in the warehouse" works well, with a fall back of first in list if it can't resolve that. In what you're describing, I think it would end up falling back to first in list. So, it won't be smart about using the bottles, and then falling back to buckets.

So, yes, I'd love to give options, where it's reasonable to do so. Most of the features I've worked on are specifically to enable that, but there is a lot still to do. :)

ravenbuilder934 commented 3 years ago

Supply chain issues aside, it can't be healthy for colonists to be eating ground glass in their bread.