[Mod] Easy crafting table [crafting]

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

[Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Easy to use alternative to the default crafting window.
Image
-- Depends: default (table recipe), intllib?, hopper?
-- License: Mit
-- Download: https://github.com/Qwertymine/crafting/ ... master.zip
-- Source: https://github.com/Qwertymine/crafting
-- Credits: FaceDeer - Support for other mods and many fixes and other feature additions.
Last edited by qwertymine3 on Mon May 08, 2017 19:02, edited 2 times in total.
Avatar by :devnko-ennekappao:

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] Easy crafting table [crafting]

by D00Med » Post

O.o does this do what I think it does?...It doesn't seem to work for me(0.4.14-dev)
But it looks awesome!
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

D00Med wrote:O.o does this do what I think it does?...It doesn't seem to work for me(0.4.14-dev)
But it looks awesome!
Can you please describe how it doesn't work?
Please note that this doesn't re-define the player inventory screen - you have to create a crafting table to use it.
The recipe for the crafting table is 4 group:wood in a square.
Avatar by :devnko-ennekappao:

User avatar
D00Med
Member
Posts: 949
Joined: Sat Feb 07, 2015 22:49
GitHub: D00Med
Location: Australia...somewhere

Re: [Mod] Easy crafting table [crafting]

by D00Med » Post

I run a new world with the mod and the normal crafting table is there.
Oh ok thanks, that would be the problem
Look! I have a signature :]
My subgame: viewtopic.php?f=15&t=14051#p207242

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

Re: [Mod] Easy crafting table [crafting]

by SegFault22 » Post

Thank you! I will be using this in my server, if I ever get around to making it, and until this functionality gets added to the engine (which may be never - in that case I will use this always)

Since this makes it possible to combine piles of metal dust in numbers greater than 9 (to make alloys), is specifically why I will use this. Alloys are an important part of some mod I'm working on (or, more accurately, the mod makes it easier to add base materials and alloys) - the only ways to make alloys wherein a small amount of one metal or several metals is added to a large amount of other metals, are either implementing a whole bunch of (unnecessary, and problematic) small-dust-piles, tiny-dust-piles, pinch-dust-piles and so on - or depend on your mod to allow regular whole dust-piles to be combined, for example: 10 Copper dust + 1 Silver dust + 1 Gold dust to yield "Hepatizon" (impossible with crafting grid: 10+1(2) > 9), and 16 iron dust + 9 nickel dust to yield "Invar" (also impossible with crafting grid: 16+9 > 9)

I could add new highly complex recipes that were so impossible before, it's going to take some time to remember them and implement them, using your mod to make the recipes possible.

Due to how this mod works, all of the recipes on my server will be shapeless, and that is actually an advantage. I realize that the player crafting grid can't make different nodebox-nodes like stairs and sideways-stairs when they both have the same shapeless recipe, but this mod enables the multiple recipe outputs to appear because they are separate recipes, and it makes sense to require a crafting table/station/workbench be used to make stuff like stairs anyways. I won't change the crafting grid in the player inventory to 2x2, though, because that would be too much "like minecraft".

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Update!

Added furnace with shift clicking (listring) support for both ingredient and fuel!

Craft with a ring of stone with a coal lump in the middle.
Avatar by :devnko-ennekappao:

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Important Bugfix Update!

Fixed a bug which caused a loss of items when crafting items using the shift key (listring functionality)
Avatar by :devnko-ennekappao:

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

Re: [Mod] Easy crafting table [crafting]

by azekill_DIABLO » Post

+1
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
cx384
Member
Posts: 654
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Easy crafting table [crafting]

by cx384 » Post

Nice mod,
it works with bigger crafting recipes, too.
But maybe you should increase the input slots, because it is possible to have 25 different items in one crafting recipes. (with this mod)


ERROR

Code: Select all

ERROR[Main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback nodemeta_inventory_OnMove(): /.../.minetest/mods/crafting/table.lua:151: attempt to index local 'craft_using' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: 	/.../.minetest/mods/crafting/table.lua:151: in function 'pay_items'
ERROR[Main]: 	/.../.minetest/mods/crafting/table.lua:311: in function </.../.minetest/mods/crafting/table.lua:303>
Speicherzugriffsfehler
Can your read this?

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

cx384 wrote:Nice mod,
it works with bigger crafting recipes, too.
But maybe you should increase the input slots, because it is possible to have 25 different items in one crafting recipes. (with this mod)
I think I'll make it configurable at some point.
cx384 wrote: ERROR

Code: Select all

ERROR[Main]: ServerError: Lua: Runtime error from mod '*builtin*' in callback nodemeta_inventory_OnMove(): /.../.minetest/mods/crafting/table.lua:151: attempt to index local 'craft_using' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: 	/.../.minetest/mods/crafting/table.lua:151: in function 'pay_items'
ERROR[Main]: 	/.../.minetest/mods/crafting/table.lua:311: in function </.../.minetest/mods/crafting/table.lua:303>
Speicherzugriffsfehler
How did you cause this error? It looks like you were able to put an item which you don't have the resources to craft into the output list, and then tried to move it to the storage.
I could quickly fix this crash, but I would like to know whether this can cause a duplication or item loss bug.
Avatar by :devnko-ennekappao:

User avatar
cx384
Member
Posts: 654
Joined: Wed Apr 23, 2014 09:38
GitHub: cx384
IRC: cx384

Re: [Mod] Easy crafting table [crafting]

by cx384 » Post

qwertymine3 wrote:How did you cause this error?
Sorry I cant remember.
Can your read this?

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

cx384 wrote:
qwertymine3 wrote:How did you cause this error?
Sorry I cant remember.
OK, I've patched the crash, it should now print an error message if this happens again.
Avatar by :devnko-ennekappao:

User avatar
Desour
Member
Posts: 1473
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [Mod] Easy crafting table [crafting]

by Desour » Post

nice mod!
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Update!

Fixed crashes when using the furnace with group smelting recipes.
Avatar by :devnko-ennekappao:

u34

Re: [Mod] Easy crafting table [crafting]

by u34 » Post

+1 nice mod

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

Re: [Mod] Easy crafting table [crafting]

by MineYoshi » Post

+10 Nice crafting style if i say so.
Have a nice day! :D

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Update!

Added catch-up code for the furnace. Furnaces can now smelt while you are not in the area!

Not thoroughly tested, please reply if there are any issues.
Avatar by :devnko-ennekappao:

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Update!

Fixed an item loss bug with the crafting table (when trying to pay with over a stack of one item).
Avatar by :devnko-ennekappao:

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

Re: [Mod] Easy crafting table [crafting]

by SegFault22 » Post

This mod has become so awesome! I will look into replacing the player inventory crafting system with the code from this mod, for my server in the future if I ever get around to creating it.

Since the player inventory can be modified as it is written in Lua, it is likely possible to do this - and in that case we (someone) could make a pull request for this to be added to the builtin Lua stuff (where the inventory Lua code is), and a configuration option for it to be enabled/disabled at the server end, and possibly even get it enabled by default for all newer versions!

This system is so much better than the old method, that it would be very beneficial for this to be added into the builtin "system" and enabled by default. Minecraft is still using that crappy old 3x3 grid, so implementing this feature will give Minetest something which Minecraft doesn't really have ("pocket edition" has something like it, but that isn't really minecraft because it lacks most of the features of the other versions). It would be totally unnecessary to specify a shape for crafting recipes, since many recipes using the same ingredients can be chosen by the player based on their output, instead of choosing the output based on the pattern of the input items.

Remember what I said in that other thread about mixing metal dusts to create alloys? That is also something which Minecraft mods can't even accomplish - without creating a special device/machine to perform the task, or changing how the crafting system works and making it be more like this. The most complicated alloys you can really make in Minecraft mods are stuff like crude Bronze/Brass and Invar, but the composition ratios for these are also sub-optimal due to the 9 slots in the crafting grid.

With your mod, and number of any dust can be combined with any number of other dust to produce an alloy with a specific composition ratio, that is closer to reality (or just more precise, if it includes materials which don't exist or are not yet known in reality). Also, we don't have to worry about recipe conflicts ever again (as long as none of the recipes get overwritten by other recipes with the same input items, which should not happen and is also a "feature" of minecraft).

This feature you have created with this mod, alone could draw lots of attention to this game from people who play Minecraft, especially those who dislike the grid crafting system or have experienced recipe conflicts or have wished that they could use a better system that is much faster. For example, there's this minecraft mod called GregTech, which adds lots of machines - but those machines have very complex crafting recipes, requiring several primary components which must be crafted (such as motors, cables, machine hulls, circuits and whatnot) before you can even arrange the recipe for a machine. This gives people the perception that the mod is extremely difficult to use, due to the machines being so complicated, but the difficulty is actually caused by amplification of the "bottleneck effect" of the grid crafting system. Over half of the time you spend crafting any machine (actually crafting, not acquiring and processing materials) is wasted in moving items around between the grid and the inventory, just to get the correct pattern for each recipe, only to then complete said recipe almost instantly by clicking on the output item and obtaining it.

But with your system, the time needed to craft a machine can be easily reduced to a few seconds in most cases; as soon as you craft cables or other primary components (for example), the recipes which are using them will appear as soon as said primary components are put into anywhere within the input "field". If GregTech could have used a system like this from the start, people wouldn't think it is nearly as difficult as they currently believe it is, because crafting would be much easier, and thus much quicker.

This system will be an important part of any mod which adds complicated machines. Soon I will be working on a power system library and a mod which uses it for some machines and stuff - the mod will depend on this mod, as it enables complicated recipes which use more than 9 items, of which I can make lots of use.

Thank you for making this awesome mod; I honestly believe that it is bringing the best improvement to this entire game since the modding API was created.

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

Update!

Performance improvements for furnace catch-up and proper textures for the crafting table.
These textures were re-purposed from Blockmens' crafting mod.
Avatar by :devnko-ennekappao:

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

Re: [Mod] Easy crafting table [crafting]

by azekill_DIABLO » Post

this is great!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: [Mod] Easy crafting table [crafting]

by Wuzzy » Post

Yeah, it's a nicer approach than the default one. I can feel the pain SegFault22 feels. SegFault22 has quite nicely summarized what is wrong with the current crafting system. Also interesting to hear that Minecraft mods basically just work around this crappy system by adding tons and tons of intermediate recipes which is, as you have noted correctly, is only fake difficulty. (To those who missed it, I ranted very harshly about the existing crafting mess here: viewtopic.php?f=5&t=15353).

About the mod itself:

In terms of usage what is already very good is that it is WAY more intuitively to use, the user is completely freed of having to memorize various shapes and crafting is much faster and involves less clicks.

The implementation still seems a bit experimental to me.

Groups are not properly supported yet. Try to make a Minetest Game sandstone from 3 sand and 1 desert sand. In the normal crafting grid it works but not with your crafting table.
Repairing recipes don't work as well but I think these may make more sense with a different block.

It seems a bit silly that you first need to craft the crafting table using the … bad crafting grid it is supposed to replace. But as a proof-of-concept this is probably enough.

What makes this mod pretty annoying to use is that I am apparently forced to craft as many items as possible in one go. There is no easy or obvious way to just perform one or 10 crafts explicitly, instead of all at once and consuming almost all items in the input in the process.

I think the furnace is out of place. There is nothing wrong with the smelting recipes in Minetest, those work just fine. So I would just remove the furnace, subgames do a much better job in adding furnaces.

The mod is quite greedy in screen space. Which means that it will probably be hard to integrate it into the which should IMO the final goal. I don't think it is really needed to show such an excessive amount of output slots.

Overall, I like the general direction of trying to get away from Minetest's legacy crafting system. I am not really happy with your particular implementation and I think maybe more experimentation with different HUD concepts should be tried.

But I see the potential that some well implemented clever approach can make Minetest's crafting system look, like, really retarded (because it is). Which hopefully will convince the devs to replace the current system.
But maybe you should increase the input slots, because it is possible to have 25 different items in one crafting recipes. (with this mod)
I think this is a bit overkill. I agree this is another bottleneck but it is unlikely to be hit. I mean, what mod would add such an extreme recipe? For comparison: The default player inventory only has 32 slots. So your use case sounds pretty contrived. I think we don't even have a recipe with 16 DIFFERENT items. But I'm pretty sure the mod can be easily adjusted in case such an extreme recipe should actually come along.


EDIT:
I've found another error in the implementation: Replacements are not handled correctly. Replacements are are core feature, rarely used but they are useful for a couple of recipes.
Try it out with my wateringcan mod to get an example for a mod which uses replacements.
This mod adds this recipe:
Water Bucket + Empty Watering can → Full watering can.
Replacements: Water Bucket → Empty Water bucket.

To be precise, this is how the craft works:

BEFORE:
Water Bucket, Empty Watering can
AFTER:
Empty Bucket, Full Watering can (the empty bucket will replace the water bucket in the input grid)

In your mod, however, the water bucket is consumed completely. What should happen instead is that after a craft, after the water bucket was consumed, an empty bucket must be inserted into the input grid.


EDIT:
The shortame “crafting” is already taken:
viewtopic.php?t=5641
Please pick another one (if you can).

hajo
Member
Posts: 606
Joined: Thu Oct 13, 2016 10:45
Location: DE
Contact:

Re: [Mod] Easy crafting table [crafting]

by hajo » Post

This is an awsome mod !

Howevery, it doesn't produce colored dyes, such as flowers-->dye.
But coal-->black dye works.

Also, when crafting the table (or looking thru all that creative stuff),
the icon for the craftingtable has no name or tooltip, so it might be overlooked.

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

I've had quite a long break from minetest, so I've taken a while to get back to:
Wuzzy wrote: The implementation still seems a bit experimental to me.
This mod was made was made for my own personal use (in a subgame that I was making) and then ported to minetest game for others to use as a POC - so yes it is quite experimental, but it is good enough for my own use.
I'll shy away from some of your critiques on this basis, but thanks for taking the time to notice them.

That said, before anything else, I would like to correct you on this point:
Wuzzy wrote: What makes this mod pretty annoying to use is that I am apparently forced to craft as many items as possible in one go. There is no easy or obvious way to just perform one or 10 crafts explicitly, instead of all at once and consuming almost all items in the input in the process.
The stacks can be picked up and right-clicked into a free slot to craft the smallest unit possible - and middle-clicked to produce the smallest number >= 10.

Some of your observations were deliberate choices on my part - when making this mod I was looking for a minecraft-esque crafting flow; where crafting centers around multiple crafting nodes, but some simple recipies can be made in a more limited crafting grid (if you can remeber the recipe)
Wuzzy wrote: It seems a bit silly that you first need to craft the crafting table using the … bad crafting grid it is supposed to replace. But as a proof-of-concept this is probably enough.
Wuzzy wrote:Repairing recipes don't work as well but I think these may make more sense with a different block.
The reason for the furnace is to add a furnace with full shift-clicking support (fuel and items), which (AFIAK) is not done by any other mod at this time. It probably has quite poor technical mod interaction - but shift clicking and catch-up for time unloaded (this was just before that was added to minetest game - so it was a bigger feature at the time) and I think that the improved furnace interaction complements the craftin table quite well. Also this was for my own sub-game, so I needed a furnace for it.
Wuzzy wrote: I think the furnace is out of place. There is nothing wrong with the smelting recipes in Minetest, those work just fine. So I would just remove the furnace, subgames do a much better job in adding furnaces.
I thought that proper groups would be quite hard to do, so I went for an alternative which I thought was good-enough - the most represented node of a group will represent that group exclusively, which saved me quite a bit of time - obviously not production quality solution though. ( That said, it doesn't really make sense that different products can be easily mixed and matched in a single recipe).
Wuzzy wrote: Groups are not properly supported yet. Try to make a Minetest Game sandstone from 3 sand and 1 desert sand. In the normal crafting grid it works but not with your crafting table.
The replacements were very much an after-thought - I don't use any recipes with replacement, so it is almost untested. Thanks for pointing this out. I think that I may have forgotten to impliment replcement in my minetest -> internal mod recipe format conveter.
Wuzzy wrote: I've found another error in the implementation: Replacements are not handled correctly.
These are due to my most being quite lazily re-targeted to minetest from my own subgame, where these mode more sense.
Wuzzy wrote: The mod is quite greedy in screen space. Which means that it will probably be hard to integrate it into the which should IMO the final goal. I don't think it is really needed to show such an excessive amount of output slots.
Wuzzy wrote: EDIT:
The shortame “crafting” is already taken:
viewtopic.php?t=5641
Please pick another one (if you can).
I'll change the short-name if I give up on my own sub-game, as until then minetest-game is not the primary intended audience of this mod, but the secondary one. (Also it is quite likey that I will eventually modify the player inv, so then this would be incompatible with crafting anyway).
Last edited by qwertymine3 on Thu Feb 09, 2017 22:53, edited 1 time in total.
Avatar by :devnko-ennekappao:

User avatar
qwertymine3
Member
Posts: 202
Joined: Wed Jun 03, 2015 14:33
GitHub: Qwertymine
In-game: qwertymine3

Re: [Mod] Easy crafting table [crafting]

by qwertymine3 » Post

hajo wrote:This is an awsome mod !

Howevery, it doesn't produce colored dyes, such as flowers-->dye.
But coal-->black dye works.

Also, when crafting the table (or looking thru all that creative stuff),
the icon for the craftingtable has no name or tooltip, so it might be overlooked.
Thanks for the comment, I will look into it.

EDIT:
Turns out there is an un-documented (at least not in lua_api.txt) multi-group crafting syntax (group:dye,basecolor_white). This would/will take quite a bit of time to fix - so don't expect wool to be craftable any time soon.
Avatar by :devnko-ennekappao:

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 34 guests