[Mod] Easy crafting table [crafting]
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
Update!
New UI - smaller and more fitting with the other UI elements of minetest.
Also an attempt at getting replacements to work for legacy recipes.
New UI - smaller and more fitting with the other UI elements of minetest.
Also an attempt at getting replacements to work for legacy recipes.
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
This is cool! Caught a bug though. I can double my amount of mese crystals by dropping back the craft output of fragments onto the source crystal… Like so.
Had an idea about making the formspec more like the regular crafting grid. Both to make a transition easier and to reduce the amount of screen space to be traversed moving each item. Could look like this for instance.
Had an idea about making the formspec more like the regular crafting grid. Both to make a transition easier and to reduce the amount of screen space to be traversed moving each item. Could look like this for instance.
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.texmex wrote:This is cool! Caught a bug though. I can double my amount of mese crystals by dropping back the craft output of fragments onto the source crystal… Like so.
It is now fixed!
I don't think that matching the default style is desirable - although it may give a sence of familiarity, the shape of the crafting grid suggests that the shaped recipe still matters, which would confuse new users.texmex wrote:
Had an idea about making the formspec more like the regular crafting grid. Both to make a transition easier and to reduce the amount of screen space to be traversed moving each item. Could look like this for instance.
Also, the number of possible outputs increases quite rapidly with some of the more common incredients, so
I think that the output should have as large a space as possible.
Currently I am matching the style of the moreblocks circular saw - which I think balances these concerns well.
That said - I do agree that the movement distance in the mod is too far, but I would like to decrease it with as little loss of capacity as possible.
I think that adding the arrow may help - but I don't think that I will do such a thing until the mod is atleast feature complete.
I may also add search at some point - but I am still trying to improve the core usability before then.
My current concern is stopping the mod changing what item the user is crafting if the possible output changes (if the user is putting items into the input, or a resource is exhausted).
Avatar by :devnko-ennekappao:
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
Update!qwertymine3 wrote:Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.texmex wrote:This is cool! Caught a bug though. I can double my amount of mese crystals by dropping back the craft output of fragments onto the source crystal… Like so.
It is now fixed!
Item duplication fix. Thank you texmex for finding the bug.
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
You're right, the grid suggests recipes still. This is what I would do then.
Spoiler
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
That's pretty much the one I just changed from -_- (with the exception that the fields were obnoxiously large in mine).texmex wrote:You're right, the grid suggests recipes still. This is what I would do then.Spoiler
That said I may change back, as I'm not sure about the usability of the new interface.
I think I'll consider trying to decouple the mod from the UI - so that we could better discuss these UI designs, and to make it possible to embed in a player crafting window.
I'm also thinking of inverting the fields (adding multiple itemlists into the formspec for each visible inventory) to make the fields fill up from the bottom rather than the top - do you think this wouold be a good idea?
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Sounds good, both of it!I think I'll consider trying to decouple the mod from the UI - so that we could better discuss these UI designs, and to make it possible to embed in a player crafting window.
I'm also thinking of inverting the fields (adding multiple itemlists into the formspec for each visible inventory) to make the fields fill up from the bottom rather than the top - do you think this wouold be a good idea?
Re: [Mod] Easy crafting table [crafting]
Hmm this does the same as minecraft xbox / pocket edition crafting ?
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
Yes - but the crafting table uses it's own inventory rather than the player inventory.IKRadulov wrote:Hmm this does the same as minecraft xbox / pocket edition crafting ?
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Now what happens for me is that the whole client window turns gray and becomes unresponsive instead. macOS, MT 0.4.15.qwertymine3 wrote:Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.
It is now fixed!
- 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]
got away a short time, and now it looks awesome!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
Can you please post the contents of your log file when this happens - I will be unable to reproduce otherwisetexmex wrote:Now what happens for me is that the whole client window turns gray and becomes unresponsive instead. macOS, MT 0.4.15.qwertymine3 wrote:Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.
It is now fixed!
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Sorry, of course. Here you go.
Spoiler
Code: Select all
2017-02-17 19:23:58: ERROR[Main]: ServerError: Lua: Runtime error from mod 'crafting' in callback nodemeta_inventory_OnMove(): ...ary/Application Support/minetest/mods/crafting/table.lua:361: bad argument #1 to 'chat_send_all' (string expected, got nil)
2017-02-17 19:23:58: ERROR[Main]: stack traceback:
2017-02-17 19:23:58: ERROR[Main]: [C]: in function 'chat_send_all'
2017-02-17 19:23:58: ERROR[Main]: ...ary/Application Support/minetest/mods/crafting/table.lua:361: in function <...ary/Application Support/minetest/mods/crafting/table.lua:350>
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
That was just a line for testing and should never have made it into the final commit - it has been removed and the table should work again - thank you for pointing this out.texmex wrote:Sorry, of course. Here you go.Spoiler
Code: Select all
2017-02-17 19:23:58: ERROR[Main]: ServerError: Lua: Runtime error from mod 'crafting' in callback nodemeta_inventory_OnMove(): ...ary/Application Support/minetest/mods/crafting/table.lua:361: bad argument #1 to 'chat_send_all' (string expected, got nil) 2017-02-17 19:23:58: ERROR[Main]: stack traceback: 2017-02-17 19:23:58: ERROR[Main]: [C]: in function 'chat_send_all' 2017-02-17 19:23:58: ERROR[Main]: ...ary/Application Support/minetest/mods/crafting/table.lua:361: in function <...ary/Application Support/minetest/mods/crafting/table.lua:350>
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Seems to work now, thank you! Can't duplicate nor crash it now. :)qwertymine3 wrote:That was just a line for testing and should never have made it into the final commit - it has been removed and the table should work again - thank you for pointing this out.
I will try this out on a private server in parallel with the regular crafting system. So instead of the crafting table giving a larger grid like in MC, it gives others powers. Should work okay.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Another idea: How about an option to simply have the mod scanning player inventory directly instead of the player having to place items in the left column? That would essentially be the craftguide with progressive mode but that you may also craft directly in it.
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
There are a few issues with this idea - the most immediate one being that it would likely introduce a new set of bugs, as both shift clicking items out, and moving items to the crafting inventory both have their own bugs.texmex wrote:Another idea: How about an option to simply have the mod scanning player inventory directly instead of the player having to place items in the left column? That would essentially be the craftguide with progressive mode but that you may also craft directly in it.
There is also issues of practicality:
1. There are 8*4 (32) inventory slots, which would cause a large number of possible crafting combinations - especially for players like me who always have some wood and some stone in their inventory at all times (both very common ingrerdients.
2. It also removes the possibility of using the craftin tables as a persistant workbench to craft a single type of item. I have a work bench with sicks and diamonds for making tools with for example. This also removes any motivation to make more than one other than for convinience.
3. The immediate return o fcrafts into the scanned inventory would cause a large number of updates to the possible outputs - making it quite likely for people to mis-craft items.
4. Some recipes have a 1-1 crafting cost, it would be difficult to allow a player with a full inventory to craft with them and not drop the crafted items.
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Thank you for thinking one step ahead there, those are all very valid points!
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
I just have to say that the mod works smoothly as a parallell crafting system on my server! Thank you again for making this!
Had the idea today of minetest-mods' hopper support for the input section of the bench. Since the introduction of sorter hoppers it could be quite useful for direction certain types of material to different benches, thus purposing them differently (one for tools, one for building blocks etc).
Had the idea today of minetest-mods' hopper support for the input section of the bench. Since the introduction of sorter hoppers it could be quite useful for direction certain types of material to different benches, thus purposing them differently (one for tools, one for building blocks etc).
Re: [Mod] Easy crafting table [crafting]
Hey, all. I've got some plans for a different crafting mod and wanted to steal bits from this one, and in the process of busting this one apart to see how it works I've basically given it a complete rewrite. The main changes were "under the hood" as I moved code around and rewrote it into more generic forms but there's a bunch of little bug fixes and polish tweaks as well. Here's some of what I did:
Download here.
- some crafting recipe inputs weren't being seen by the legacy importer because they were in sparse arrays. For example, you could craft picks without needing sticks for the handle.
- Existing fuel recipes are now detected. The correct time required for furnace recipes is now read from existing crafting recipes.
- Since there's no need to worry about recipe collisions, recipe item counts are now divided by greatest common denominator. So if there's a recipe that takes 6 foos to make 3 bars, the crafting table will let you take 2 foos to make 1 bar instead.
- There's a toggle button on the table formspec that sets the table to produce minimal sized or maximal sized stacks. That is, you can either grab stacks that are the minimum size a recipe can produce, or you can grab stacks that are as big as your inputs will allow them to be.
- There's an option to eliminate default crafting recipes entirely (the grid crafting system is left empty except for the crafting table recipe). You can set this in the Settings -> Advanced Settings -> Mods -> Crafting menu. You might want to re-add some other basic crafts such as wood and stone tools if you use it this way in a subgame, use the "crafting.minetest_register_craft" global to access the original version of the register_craft function.
- internationalization support, though no translations yet.
- Table output is sorted alphabetically.
- The furnace is now identical in form and function to the default furnace. I basically copy and pasted the default furnace's code and then tweaked it to interface with the new crafting system instead of the old one. In fact, if you don't enable the setting to eliminate default crafting recipes the new furnace isn't actually craftable because there's no point to it otherwise.
- Hopper support.
- Dye recipe support. Took a lot of fiddling to make this work, as Qwertymine mentioned earlier dyes use an undocumented "group:flower,color" input requirement pattern.
Download here.
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Good to see progress for this greate crafting system alternative. I must say that I've overlooked the flaws of the former version but it's really good to see they're being fixed.
Keep it up, FaceDeer!
Awesome.There's a toggle button on the table formspec that sets the table to produce minimal sized or maximal sized stacks. That is, you can either grab stacks that are the minimum size a recipe can produce, or you can grab stacks that are as big as your inputs will allow them to be.
I'm trying but I don't follow how the new furnace functions differently than the old one. Didn't know qwertymine wrote a furnace either. What's the difference? (Is there supposed to be a difference to players?)I basically copy and pasted the default furnace's code and then tweaked it to interface with the new crafting system instead of the old one
Hopper support.
Spoiler
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
My furnace allows for shift-clicking of both fuel and input items, and is the only furnace to do that AFIAK.texmex wrote:I'm trying but I don't follow how the new furnace functions differently than the old one. Didn't know qwertymine wrote a furnace either. What's the difference? (Is there supposed to be a difference to players?)I basically copy and pasted the default furnace's code and then tweaked it to interface with the new crafting system instead of the old one
My furnace also has timer catch-up, so that items are smelted while the player was away from the furnace (which I can't see in the new furnace code).
It also has a fuel-grade system for recipes - but this needed mod/subgame support.
Avatar by :devnko-ennekappao:
- qwertymine3
- Member
- Posts: 202
- Joined: Wed Jun 03, 2015 14:33
- GitHub: Qwertymine
- In-game: qwertymine3
Re: [Mod] Easy crafting table [crafting]
I'm happy to see the improvements to the recipe importer - I never got around to properly fixing it's (many) issues.FaceDeer wrote:Hey, all. I've got some plans for a different crafting mod ...
The recipe sub-division was another feature that I intended to do, but never got around to.
The hopper support is also something which players might like, but I'm not too interested in personally.
There are some things which I think mis-features:
1. The button to toggle output stack size: you could already choose to craft the minimum amount by holding the stack and rightclicking.
2. Sorting alphabetically: Mod recipes are generally registered together, so not sorting them may give a better level of local relevence e.g. wooden pick and steel picks should be together rather than steel picks and steel doors.
I'm quite unhappy about the furnace though - as most of the code complexity was to deal with features that the default furnace doesn't have (see my post above)(tldr: shift clicking fuel, timer catch-up, fuel grade system).
Also the default (minetest game?) furnace is licensed under the LGPL2.1 license and can't be copy-pasted into your code without following the license restrictions (make your code LGPL2.1 and state all changes to the file and date at which they were made at the top also give full credit to mintest devs). See https://tldrlegal.com/license/gnu-lesse ... gpl-2.1%29
Avatar by :devnko-ennekappao:
- texmex
- Member
- Posts: 1753
- Joined: Mon Jul 11, 2016 21:08
- GitHub: tacotexmex
- In-game: tacotexmex
Re: [Mod] Easy crafting table [crafting]
Interesting, especially the catch-up feature. Take notes, FaceDeer ;)qwertymine3 wrote:My furnace allows for shift-clicking of both fuel and input items, and is the only furnace to do that AFIAK.
My furnace also has timer catch-up, so that items are smelted while the player was away from the furnace (which I can't see in the new furnace code).
Re: [Mod] Easy crafting table [crafting]
True, but you can still do that if you want. The button makes it safer and more obvious, IMO.qwertymine3 wrote:1. The button to toggle output stack size: you could already choose to craft the minimum amount by holding the stack and rightclicking.
Yeah, I considered that. When I make my planned mod there'll be a lot fewer items in each workshop's output list so I figured I'd want it this way for mine, but I'll add an option to choose which sorting method is preferred and default it to the old way in this one..qwertymine3 wrote: 2. Sorting alphabetically: Mod recipes are generally registered together, so not sorting them may give a better level of local relevence e.g. wooden pick and steel picks should be together rather than steel picks and steel doors.
Sorry about that - I was so focused on getting all the guts of the crafting code isolated into util.lua and legacy.lua that I didn't really pay attention to the other features of the furnace beyond that. My main goal was just ensuring it processed crafts correctly. I'll have another go at it and bring back your version of the furnace.qwertymine3 wrote: I'm quite unhappy about the furnace though - as most of the code complexity was to deal with features that the default furnace doesn't have (see my post above)(tldr: shift clicking fuel, timer catch-up, fuel grade system).
Edit: Quertymine3's original furnace is back, and there's now an option for alphabetizing the table's output available under advanced settings (default is unsorted).
Who is online
Users browsing this forum: Bing [Bot] and 25 guests