Redesigning the broken crafting system

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Redesigning the broken crafting system

by Wuzzy » Post

I think the current default crafting system is pretty broken.

Reasons:
  • It is time-consuming to put a particular shaped recipe into the crafting grid.
  • Shaped crafting recipes are not obvious, rather complex and hard to remember.
  • Shaped recipes are basically completely pointless as they add nothing to gameplay. What matters in crafting are the item types and number of items it consumes. In principle, all shaped recipes could be replaced by a shapeless recipe without any change in gameplay.
  • Even for shapeless recipes you need to patiently place at least 1 item per slot, even if they are all equal like for 4 wheat → flour.
  • A recipe can only consume exactly 1 item per input slot.
  • … which means a recipe can only consume as much items as the size of the crafting grid allows. So for 3×3 grids, a recipe can only consume 9 items at once. Not item stacks. Items. Which leads us to the next problem:
  • It doesn't scale, i.e. it performs very poorly at large item numbers. Try registering a recipe with 1000 equal items. It would require a crafting grid of the size 32×32! And it would be very painful for the user to put all items into the slots (at least 1000 clicks).
  • For shaped and shapeless recipes, it is not possible for the same input to yield multiple possible results, for the user to choose from
  • Mods can accidentally overwrite existing crafting recipes—without warning. (https://github.com/minetest/minetest/issues/4382)
  • Registering a toolrepair recipe forces all tools to be repairable, with no way for mods to defend against this (this is an issue with mods like Technic)

IMO the list of things I hate about the crafting system are numerous enough that I think it is very justified to suggest a major redesign of the crafting system.



I propse this system:

Definition
First, the definition format of crafting recipes needs to be changed, at least partially.
  • A new simplified recipe type is added, called “combine” which requires a certain number of items of particular type or types. It is very similar to shaped and shapeless recipes, but with a greatly simplified definition
  • The shaped and shapeless recipes will be replaced by combine recipes
  • Legacy support for shaped and shapeless recipes will be provided; they will internally all be transformed to “combine”-type recipes
  • The concept of the “shape” of input items will be completely removed from the player's perspective
  • The definition of the input of a combine recipe contains a simple list of item types and a number of items per item type. This could be done via itemstrings.
  • 2 recipes with the same input items will be explicitly allowed (no overwrites)
  • Registering a recipe with same item items (+item counts) AND output items should be forbidden or ignored, since it is redundant and can be skipped safely.
  • fuel and smelting recipes will remain unchanged
This has an interesting implication: The meaning of the input grid changes: Now each slot is not just for a single item, but for a single item type. This means, a 3×3 grid does not just allow for crafts with 9 items, but for crafts with up to 9 different item types. The item count is now only limited by the maximum stack size

Example:

Code: Select all

{"default:apple 5", "default:leaves 2"}
Input recipe requires 5 apples and 2 leaves.

Crafting
For the user, crafting should work like this:
  • The requirements are simplified: For the output to become “active” (i.e. showing the output item(s)), it is first checked if all item types in the input match the item types of any recipe (not more, not less item types). And then it is checked if the sum of all items matches the minimum requirement of any recipe. All recipes which pass the test will be craftable.
  • When there are excess items in the input grid, items will be consumed starting from the top left, then going to the right slot, then to the next row, and so on
  • Output is chosen from one of (possibly) multiple alternatives (see below)
Example:

5A 2L __
__ __ __
__ __ __

number = size of itemstack
A = apple
L = leaves
_ = empty

This is a valid input which will match above example.

Example 2:

A L A
A A A
_ L _

This would *also* be a valid input which matches above recipe because only the
total sum of all item counts. It is the equivalent to a shapeless recipe.

Example 3:
A99 A99 A99
L99 L99 L99

Also valid, since it matches the minimum requirement. Of course, when crafting, only 5 apples and 2 leaves are consumed. To demonstrate the consumption rule, here's how the input grid should look like this after a single craft:

Input:
A94 A99 A99
L97 A99 A99

Example 4:
A5 L2 X1

Where X is any other item. This would be invalid and would yield no output. For an output to be triggered, the *exact* item types must be in the grid, not more, not less. The “X” is the one item type too much.



Output
The output slot is changed by something more powerful: A dedicated output drop-down list.
This drop-down list is an entirely new widget which comes in place of the traditional output slot and lists all possible outputs from the given input and the user chooses the desired output.

Now first I need to explain the widget:
It is similar to a drop-down list but not the same. Its list entries
are the full-sized item icons. By clicking on the “arrow” you expose
the other crafts. By clicking on a list entry, either in the drop-down
lists “open” or “closed” state, you craft the item once. The usual other
shortcuts (middle and right click) from the current output slot should apply
here as well.
Important! The drop-down list must not be closed after clicking on a list
entry, this should only be done by clicking on the “arrow”. This allows
items to be crafted as quickly as with the current output slot. If drop-down
is closed, the drop-down list is closed. The only visible item
of the drop-down list will be the item which has been crafted previously
as long the crafting conditions allow it. For convenience, the drop-down list
should also be closed when the formspec is closed.

Output example:
Assume in the input grid one slot is occupied with 99 wheat, the rest is empty.
Assume we have 2 “combine” recipes:

- 4 wheat yield 1 flour.
- 9 wheat yield 3 straw.

This means, our input has 2 possible outputs, since both recipes can be crafted
with our current input.

The output slot will show the flour recipe first (no logic behind that one).
If the user clicks it, flour is crafted. If the user wants to try the other
recipe, the user clicks on the arrow, then clicks on the straw icon. Done!



Fixing tool repair
Simple: Minetest should only make tools repairable if they don't belong to the new special group “disable_repair=1”.



Syntax
Syntactically, combine recipes could be very similar to shapeless recipes. The input is a list of itemstrings.
But they will allow for numbers of items to be specified in the itemstrings.
Also, it should be discouraged or even forbidden for any item type to appear twice in the list.

Example:

Code: Select all

{
	type="combine",
	input={"default:apple 5", "default:leaves 2"},
	output="default:dirt",
}
Means: 5 apples + 2 leaves → 1 dirt

An equivalent recipe:

Code: Select all

{
	type="shapeless",
	input={"default:apple", "default:apple", "default:apple", "default:apple", "default:apple", "default:leaves", "default:leaves"},
	output="default:dirt",
}
Example 2:

Code: Select all

{
	type="combine",
	input={"example:dirt 1000"},
	output="example:compressed_dirt",
}
Equivalent shaped or shapeless recipes would be very, very large so I don't write them down here. ;-)


Legacy support
Since mods will still continue to have “shaped” and “shapeless” recipes, some legacy support must be added.
This can be done by a very simple algorithm:

- Count the number of each item type in all the input slots.
- Create a new table with the accumulated items expressed as itemstrings
- Use this new table as the new input
- Change the type to "combine"

Example:

Code: Select all

{
	input={{"example:stone","example:wood","example:wood",},
		{"example:stone","",""",},
		{"example:stone","example:wood","example:wood",},
		},
	output="example:woodstone",
}
With using our algorithm, this recipe can now be interpreted to be the equivalent of this one:

Code: Select all

{
	type="combine",
	input={"example:wood 4","example:stone 3"},
	output="example:woodstone",
}

Benefits of the proposed system
  • Much faster to use (less clicking, less pointless item alignment)
  • Easier-to-remember recipes
  • Allows a much higher number of items to be used in a single craft
  • Simplified yet more powerful crafting definitions
  • Focus on gameplay rather than memorizing strange shapes
  • No crafting collisions
  • Tools which aren't supposed to be repaired can't be repaired anymore
Limits
  • Maximum possible number of items depends on crafting grid size and item stack size, but this number is now much, much larger (stack_max per slot) than the current limit (1 per slot).
Feedback
Any comments?
Last edited by Wuzzy on Tue Dec 06, 2016 21:59, edited 1 time in total.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Redesigning the broken crafting system

by burli » Post

TLDR

How you would distinguish between an axe and a picaxe if you don't have the shape?

Edit: ok, I read it now. You want to have multiple outputs, one for each possible recipe

Just make it more easier and completely remove the crafting grid. Just search for the item you want to craft, hit a craft button, and if you have the required items in your inventory the item is crafted and the items are removed

But I think, the crafting system is part of the game. Remembering the recipes is part of the game. I don't want to change this

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

burli wrote:How you would distinguish between an axe and a picaxe if you don't have the shape?
Just pick the different output from the output drop-down list. Read the section “output” of my post.
Did you play Terraria?
Just make it more easier and completely remove the crafting grid. Just search for the item you want to craft, hit a craft button, and if you have the required items in your inventory the item is crafted and the items are removed
Sadly, this approach will fail as soon group crafts come into play. Which items of the inventory should be consumed then? Better for the player to explicitly define the input items.
But I think, the crafting system is part of the game. Remembering the recipes is part of the game. I don't want to change this
Well, I don't propose to remove crafting recipes altogether. Just the shaped ones because they are extremely limiting in what kinds of crafting recipes modders can come up with, and they are annoying to click through, especially for complex ones. If modders want to add a craft with, let's say 1000 stone, they can't do it. Hell, even just 10 stones are already too much for a 3×3 grid, since all crafts can only consume 1 item per slot.

My proposed system would look from the player perspective as if all recipes are now shapeless, plus that recipes may now consume more than 1 item per slot, plus the same recipe may give you different outputs.
Also, it stops being fun if you have to remember thausands of shapes.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Redesigning the broken crafting system

by burli » Post

Suggestion: make a workbench that works like this

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

Well, I want the core crafting system to be changed because I think it is broken. A workbench is very mod-specific and would implement my proposal only for that one mod. The core crafting system will still remain broken.
So this is not helping much.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Redesigning the broken crafting system

by burli » Post

You can read normal recipes and add you own, to demonstrate you concept

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

I am not going to write a mod just to give you a proof-of-concept. If my proposal isn't already clear, just ask questions.

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: Redesigning the broken crafting system

by Sokomine » Post

The existing shape-based crafting system is good for basic gameplay. Even later on, quickly crafting a pick or a chest from a receipe stored in memory is usually the fastest and most convenient way. As soon as the amount of nodes increases, craft guides become necessary. Unified_inventory does a good job in that regard: Just click on the desired node, select the craft receipe you want, and click how many (1, 10, all) shall be prepared in your crafting grid. My circular saw and similar machines take a diffrent approach by offering a selection of shapes into which an input material can be turned. RealTest does it in yet another way: Provide the shape in form of a paper with a plan on it, provide the material, and get the desired item from your "machine". Maybe we just need differnt approaches for diffrent situations.

The suggested extension here could be helpful for creating very expensive items without having to remember (or create! modders don't usually like that either) thousands of complex receipes, to get rid of stacks of cobble (i.e. "sell" a stack by crafting it into a coin).

An option to select the desired output in case of conflicting receipes would also be a very good idea. Conflicting receipes are a pain for server admins and also for modders. Players who can't obtain what they want due to the conflict aren't entirely pleased either. So this is a very good idea.
A list of my mods can be found here.

User avatar
MineYoshi
Member
Posts: 5373
Joined: Wed Jul 08, 2015 13:20
Contact:

Re: Redesigning the broken crafting system

by MineYoshi » Post

I accept!
+1000!
Have a nice day! :D

Byakuren
Member
Posts: 818
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: Redesigning the broken crafting system

by Byakuren » Post

I support this proposal. For register_on_craft callbacks, how do you propose legacy support for mods which used the old_craft_grid parameter? Also, I think craft callbacks in the new system should receive something similar to old_craft_grid, except it is a 1D table where each index holds the itemstack that matched the corresponding index in the recipe. If metadata depends on the metadata of the input items, or on the item chosen as a representative of an item group, for example, it will be useful to have this info.
Every time a mod API is left undocumented, a koala dies.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Redesigning the broken crafting system

by burli » Post

Ok, my suggestion:

Wait until simple fast inventory is finished
Write a mod that creates a new tab. It doesn't matter because this would be a mod anyway

This mod can than be used as additional crafting or as a replacement

But I wouldn't use a drop-down list as output. I would suggest 8 inventory slots. A drop-down list breaks the visual style and usage style of Minetest.

If the output has more than 8 items use arrows to flip between the pages.

Let the mod learn what the most common items are and place them first, for example, if you put iron and sticks to the crafting field in most cases the iron picaxe will be in first place, followed by the iron axe, iron shovel and iron hoe

But I still don't see this as a replacement. So +1 for the idea, -1 for default. The player or server admin should still be able to decide which crafting system he wants to use. I have an idea for a game that would never be possible with this crafting system

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

burli wrote:Wait until simple fast inventory is finished
This will not be part of core so your suggestion fails already. I don't need to comment on the related suggestions.
But I wouldn't use a drop-down list as output. I would suggest 8 inventory slots. A drop-down list breaks the visual style and usage style of Minetest.

If the output has more than 8 items use arrows to flip between the pages.

Let the mod learn what the most common items are and place them first, for example, if you put iron and sticks to the crafting field in most cases the iron picaxe will be in first place, followed by the iron axe, iron shovel and iron hoe
This is a good alternative suggestion. But I disagree that a drop-drown list would break the visual style of Minetest. First, Minetest already supports basic drop-down lists (not just in the way which would be required for my proposal). Second, Minetest hardly has any visual style worth mentioning, to be honest. :D
But I still don't see this as a replacement. So +1 for the idea, -1 for default. The player or server admin should still be able to decide which crafting system he wants to use.
Having TWO tabs in the inventory for basically the same crafting thing, just displayed differently is not going to help usability.
My idea was that the new crafting system should be superior to the old crafting system in every aspect, so that users don't really have a good reason to stick with the old one. Also, when keeping the current system along the new one, mods and Minetest have to support 2 crafting systems which isn't really pretty. Also, what are your arguments for keeping the current system? Is there anything in the new system which is not possible, but it is possible in the current system?

Rubenwardy is also not aiming to make the Simple Fast Inventory for Minetest Game optional since there is no point for users not to have it.
I have an idea for a game that would never be possible with this crafting system
Please tell me exactly which crafting recipe would be impossible with my suggested system.
For register_on_craft callbacks, how do you propose legacy support for mods which used the old_craft_grid parameter?
For legacy mode, I guess all combine recipes could be just provided as if they were shapeless recipes. If multiple items of the same kind are required, they will be distributed among the slots.

For example, a combine recipe with an input of 4 wheat could be seen (for legacy mods) as a shapeless recipe with the input of 1 wheat, 1 wheat, 1 wheat, 1 wheat. Note that this is only done for “tricking” old mods when they are still working with the old crafting system, not to completely support the old crafting system anymore.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Redesigning the broken crafting system

by burli » Post

Wuzzy wrote: This will not be part of core so your suggestion fails already. I don't need to comment on the related suggestions.
It will be part of Minetest Game, as far as I know.
This is a good alternative suggestion. But I disagree that a drop-drown list would break the visual style of Minetest. First, Minetest already supports basic drop-down lists (not just in the way which would be required for my proposal). Second, Minetest hardly has any visual style worth mentioning, to be honest. :D
Might be, but any kind of item "handling" uses item stacks like a chest
Having TWO tabs in the inventory for basically the same crafting thing, just displayed differently is not going to help usability.
I didn't say that both crafting grids should be active at the same time. I said, that the player should be able to choose between them.
My idea was that the new crafting system should be superior to the old crafting system in every aspect, so that users don't really have a good reason to stick with the old one. Also, when keeping the current system along the new one, mods and Minetest have to support 2 crafting systems which isn't really pretty. Also, what are your arguments for keeping the current system? Is there anything in the new system which is not possible, but it is possible in the current system?
Well, first reason is, that I like shaped recipes. I know that it is sometimes a bit tricky to place the items and it has limitations, but it gives the player the feeling of a little bit control. Some shapes might be pointless, but the basic shapes makes sense.
Rubenwardy is also not aiming to make the Simple Fast Inventory for Minetest Game optional since there is no point for users not to have it.
Because it doen't change the gameplay. I just makes the inventory tab more flexible and easier to use for mods.
Please tell me exactly which crafting recipe would be impossible with my suggested system.
It's not about which recipe would be impossible, it's about that even more complex recipes would be possible in a 2x2 grid. 2x1 would be enough for a picaxe.

My idea is, to make survival harder by disabling the ability to craft everything everywhere. I want a 2x2 crafting grid for simple items like torches and I want to place workbenches to the world where the player can craft more complex items. Workbenches are not digable and not craftable. You will find them in villages, sheds, in dungeons or mines. Your crafting system would make this idea impossible to realize.

Everything in Minetest is designed for builders, not for survival. It comes with no real challenge and adding more challenges to make better survival experience is hard or impossible.

I don't say, that your idea is bad. I say, that it shouldn't be the only crafting system. Your crafting system makes crafting easier, but it kills possible gameplay ideas

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

I didn't say that both crafting grids should be active at the same time. I said, that the player should be able to choose between them.
That's exactly what I am opposing. Just stick with one crafting system, using 2 systems in the same game does nothing but add to the confusion. Also, you are forgetting that I am designing the proposed system with backwards-compability in mind.
Because it doen't change the gameplay. I just makes the inventory tab more flexible and easier to use for mods.
My proposal also doesn't change the gameplay. Well, almost; the grid size restriction is partly lifted. I come to that later. Shapes are completely irrelevant to gameplay; each shaped recipe could be done as shapeless, it would still require the exact same amount of items. And if you insist on shapes so much, they would still work, by the way. By my algorithm, your shaped pickaxe in the crafting grid still works as the number of items is still the same. The only “difference” is that players won't be FORCED anymore to use that pointless and time-consuming shape-alignment. It's like as if all shaped recipes have become shapeless.

About your concerns about grid sizes:
Well, the problem with multiple crafting grid sizes is, that it is very hard to balance for “outsiders” (mods not in the subgame itself).
Currently, you simply can't safely write a mod with a recipe larger than 3×3. If you do, you have to assume this recipe is completely (!) uncraftable in most subgames, unless the player added some mods manually. This is not good. Also, it is pretty tricky when modders adding new recipes are forced to think about the crafting grid which MAY be used in-game. I mean, 2×2, 3×3, 4×4, etc. But why not going crazy and doing 2×1, 1×2, 3×1, 4×2, etc. In such a system, it is pretty hard for modders to just add a recipe which just works out of the box in all subgames.

But I agree, the ability to craft everything everywhere is another reason why the current crafting system is bad. It might be desired for some subgames, but certainly not all, I fully understand and agree with your concern.

I agree that it would be very nice to have some pre-crafting requirements for recipes as well. But I don't think the current limitation of a crafting grid size is a good way idea to implement it. It's a pretty arbitrary and hardly managable restriction.

Pre-crafting requirements should be more straight-forward IMO. Like the player must be near some node (or nodes) XYZ or must have a tool ABC in the inventory. Or maybe assign each crafting *recipe* one or more groups, and each crafting grid (no matter if in main inventory menu, or in a node's formspec) has its own group, and only recipes matching this group could be crafted in this grid. For a “super crafting grid” which can craft everything (like in Minetest Game), the special group “crafts_everything” could be used.
For example, you could add a node with a crafting grid of group “wood”, it is able to craft all recipes in the wood group but nothing else.
IMO I like any of those ideas more than using the recipe size. Using the recipe size as a crafting requirement seems more like a cheap hack IMO.

But thanks for pointing out the use case with crafting requirements. If you have more ideas for use cases you wish from a good crafting system, just post them here, maybe it could go into the proposal.

Finally: Minetest should just have ONE good crafting system which is generic enough so that mods and subgames can easily interact with eath other. And it should be still powerful enough to fit several needs, like creative, survival, huge crafting numbers, etc. My suggestion partially builds on the existing system which I seek to replace.
Having two crafting systems is not good as this will force modders to use pointless boilerplate code everywhere and as a modder myself I wouldn't like that at all. Therefore I also included legacy info in my proposal; we should rather make sure that some backwards-compability is maintained rather than to keep the existing system in its entirety.

User avatar
burli
Member
Posts: 1643
Joined: Fri Apr 10, 2015 13:18

Re: Redesigning the broken crafting system

by burli » Post

If you find a good solution to limit crafting than I will support this proposal

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Redesigning the broken crafting system

by rubenwardy » Post

With sfinv, you can replace/override/delete tabs. I didn't think this needed to be part of core. You could always add checks for advanced inventories and if none are installed, just do a standard override
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

Even if sfinv is part of core, it would not change my proposal in any way,

User avatar
rubenwardy
Moderator
Posts: 6969
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

Re: Redesigning the broken crafting system

by rubenwardy » Post

I know, it's an implementation detail which is irrelevant when talking about the gameplay value of this change
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Redesigning the broken crafting system

by azekill_DIABLO » Post

+1 you mean a terraria like crafting? would be great! i love terraria crafting. also the current builds does not allow to correctly rezise the crafting window. it needs to modify the crafts
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

Re: Redesigning the broken crafting system

by SegFault22 » Post

A drop-down list may not be able to fit lots of options before it runs off the bottom of the screen. I suggest using an embedded list that is only as tall as the window, and if there are more entries than fits into the window a scroll-bar is used to navigate to the other entries. That way, the options are always visible and there isn't really any need to close the list anyways. If the list needs to take more space than the existing crafting system, there could be a button placed where the grid currently is which navigates to a different window with the list of crafting options on one side, and (possibly) a list of all inventory items on the other side. For example, if the player has 2 stacks of 99 wood planks, it would appear in the list of inventory items as 198 wood planks (saving space because it only has to display one icon and a number for each type of item). The inventory-items list could also be scrolling, but if the player knows what is needed for any crafting operation then there would be no need to check the list - it is only there for convenience (such as, to tell if you have enough items after some number of crafting operations have been done).

Is this reasonable?

EDIT: This crafting system would work very well with some mod I am working on, because it will make it easier to combine metal dusts into "mixed metal dusts" that are smelted to produce alloys with a specific ratio of material not limited by the total of ratio numbers being no greater than 9 (for example, you have 6 iron dust 1 chrome dust 1 manganese dust and 1 nickel dust, yielding stainless steel - 6 + 1*3 = 9 - this is the only way to fit the recipe into the crafting system as it is now, and the ratio is slightly wrong anyways) and if you want to make an alloy of 36% nickel and 64% iron (invar), it is currently, with the grid system, only possible either through several intermediary steps with mixed dusts of incorrect, unusable ratios until the last step (BAD), or a "rounded" recipe with 1 nickel dust for every 2 iron dust (close, but incorrect) - it would be much better to use your crafting method, which would allow it to be exact, using 9 nickel dust and 16 iron dust to get the proper ratio. Obviously, with the current grid-system 9 nickel dust and 16 iron dust would need a much larger grid than 3*3, such as a "dust mixing workbench" with a grid at least 5*5 (or much bigger for more fine ratios), which is just stupid.

Any way you look at it, your method comes out on top as the easiest and best way to complete this kind of crafting operation. Even if we do end up making a "dust mixing workbench" or just "dust mixing bin", it will be a lot easier to implement and use it with your method (the only reason to make a "workbench" or "bin" like that, if your method becomes part of the game, would be to make it difficult or more realistic to mix metal dust piles, which isn't really necessary in the first place)

User avatar
Wuzzy
Member
Posts: 4778
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy
Contact:

Re: Redesigning the broken crafting system

by Wuzzy » Post

Thanks for your thoughts on this, SegFault22. Thanks for showing a particular use case, this shows that my proposal is not just about realigning some widgets ;-). The fact that you can't crunsh numbers as you please with the current system was one of the reasons why I came up with the thread in the first place.

I had the idea when I first thought of implementing a simple crafting recipe which would require 1000 items of the same type to craft another item.
I quickly realized this was impossible with the current system, unless it involves ugly intermediate steps, which is, as you already said, bad.
Item stacks support numbers of up to 65535, so IMO there is no reason why crafting recipes should not support high numbers as well.

Your suggestion for the crafting widget sure sounds interesting, I think it sounds a bit better than my original widget suggestion. Seeing multiple possible crafts at all times is certainly an usability improvement. I am not sure if I understood everything, so could you maybe draw some example images so we could better understand what you mean?

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

Re: Redesigning the broken crafting system

by SegFault22 » Post

I'm glad that you like my suggestion. I'm not very good at drawing this kind of stuff though, but I'll try. Here's an image I butchered up to represent the idea:
Image
The stack of 65520 sticks is combined with the stack of 15 sticks in the left side, showing the total number of sticks at 655335. On the right side are output items, such as wood planks from tree, sticks from wood planks, torches from sticks and the coal, and the stick-looking thing is a "tool handle" from my mod, which is made from sticks.

There aren't any tool handle items displayed in the left-side list, but since there are the items needed to make it, the recipes for pickaxes using the pickaxe heads and tool handles are listed as possible outputs - this is not necessary, but it would be nice, if the system could automatically calculate recipe "chains", where intermediate items that are needed to craft something can be automatically crafted from the items needed to make the intermediate item, if the items are available - kinda like the "crafting table III" minecraft mod, except no crafting table is needed. This isn't really necessary, because the recipe for a pickaxe could just call for whatever number of ingots and whatever number of sticks and be a lot simpler, but I think it's cool because there could be other recipes using the tool heads and tool handles, or a special process needed to make them (forging metal in a forge, or casting liquid metal, to make the tool head).

The scroll bar is only necessary when there are too many items in the list to be displayed in the "window"; if there are 8 or less options, the entire scroll bar or just the scroll-drag-button in the middle could be omitted, to signal the player that the list is not scrollable because all options are visible. However, this is also not necessary - you could just make it not scroll when the top/bottom buttons are clicked, and the scroll-drag-button being stuck in place.

The used mese pickaxe isn't in the list on the left because there isn't a recipe using it, but if there were a recipe using it, it would appear (if you had two damaged ones, they would both appear due to the tool repair recipe)

Also, the arrow is there for legacy purposes, and to show the player which list is for input and which one is for output.

The input list items should be static, so that the player can't remove them and duplicate items.

I think that is all I have to show, or all that I can think of. If something I said isn't clear, let me know, and I'll explain better.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Redesigning the broken crafting system

by azekill_DIABLO » Post

awesome but i would better like the output scrollable list and then the required items.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

Re: Redesigning the broken crafting system

by SegFault22 » Post

azekill_DIABLO wrote:awesome but i would better like the output scrollable list and then the required items.
It is probably going to be very difficult to implement just the part of the system which handles recipe calculations from the items in the player's inventory - that would cause the GUI end to be relatively easy to make configurable, so you could have it appear however you want, without changing the underlying system at all.

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: Redesigning the broken crafting system

by azekill_DIABLO » Post

Yeah. i always want impossible things with the current system.
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Post Reply

Who is online

Users browsing this forum: No registered users and 4 guests