[Mod] Easy crafting table [crafting]

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 » Mon Feb 13, 2017 21:27

Update!

New UI - smaller and more fitting with the other UI elements of minetest.
Image

Also an attempt at getting replacements to work for legacy recipes.
Avatar by :devnko-ennekappao:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Wed Feb 15, 2017 19:37

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.
Image
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

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 » Wed Feb 15, 2017 20:33

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.

Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.
It is now fixed!
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.
Image

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.

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:
 

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 » Wed Feb 15, 2017 20:35

qwertymine3 wrote:
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.

Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.
It is now fixed!

Update!

Item duplication fix. Thank you texmex for finding the bug.
Avatar by :devnko-ennekappao:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Wed Feb 15, 2017 20:47

You're right, the grid suggests recipes still. This is what I would do then.
+ Spoiler
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

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 » Wed Feb 15, 2017 21:00

texmex wrote:You're right, the grid suggests recipes still. This is what I would do then.
+ Spoiler

That's pretty much the one I just changed from -_- (with the exception that the fields were obnoxiously large in mine).
Image 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:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Wed Feb 15, 2017 22:08

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?

Sounds good, both of it!
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

IKRadulov
Member
 
Posts: 19
Joined: Thu Nov 10, 2016 11:02

Re: [Mod] Easy crafting table [crafting]

by IKRadulov » Wed Feb 15, 2017 23:57

Hmm this does the same as minecraft xbox / pocket edition crafting ?
 

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 » Thu Feb 16, 2017 08:52

IKRadulov wrote:Hmm this does the same as minecraft xbox / pocket edition crafting ?

Yes - but the crafting table uses it's own inventory rather than the player inventory.
Avatar by :devnko-ennekappao:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Fri Feb 17, 2017 12:52

qwertymine3 wrote:Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.
It is now fixed!

Now what happens for me is that the whole client window turns gray and becomes unresponsive instead. macOS, MT 0.4.15.
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

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

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 » Fri Feb 17, 2017 18:13

texmex wrote:
qwertymine3 wrote:Thank you for finding that bug - made a simplfication error with one of my bug-fixes previously.
It is now fixed!

Now what happens for me is that the whole client window turns gray and becomes unresponsive instead. macOS, MT 0.4.15.

Can you please post the contents of your log file when this happens - I will be unable to reproduce otherwise
Avatar by :devnko-ennekappao:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Fri Feb 17, 2017 18:25

Sorry, of course. Here you go.
+ Spoiler
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

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 » Fri Feb 17, 2017 22:02

texmex wrote:Sorry, of course. Here you go.
+ Spoiler

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.
Avatar by :devnko-ennekappao:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Sat Feb 18, 2017 09:37

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.

Seems to work now, thank you! Can't duplicate nor crash it now. :)

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.
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Sun Mar 05, 2017 16:25

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.
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

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 » Sun Mar 05, 2017 20:36

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 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.

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:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Sun Mar 05, 2017 22:46

Thank you for thinking one step ahead there, those are all very valid points!
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Thu Apr 20, 2017 21:56

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).
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

FaceDeer
Member
 
Posts: 462
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Easy crafting table [crafting]

by FaceDeer » Sun Apr 30, 2017 02:22

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:

  • 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.

Here's where my fork currently lives. At some point I may pull it apart further but I think I'm done working on it for the next few days so I figured I should let everyone know about it. It should be usable in its current form.

Download here.
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Sun Apr 30, 2017 08:22

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.
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.

Awesome.
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

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?)
Hopper support.

+ Spoiler

Keep it up, FaceDeer!
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

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 » Sun Apr 30, 2017 10:42

texmex wrote:
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

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?)


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).

It also has a fuel-grade system for recipes - but this needed mod/subgame support.
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 » Sun Apr 30, 2017 10:55

FaceDeer wrote:Hey, all. I've got some plans for a different crafting mod ...


I'm happy to see the improvements to the recipe importer - I never got around to properly fixing it's (many) issues.
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-lesser-general-public-license-v2.1-%28lgpl-2.1%29
Avatar by :devnko-ennekappao:
 

User avatar
texmex
Member
 
Posts: 1726
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: texmex

Re: [Mod] Easy crafting table [crafting]

by texmex » Sun Apr 30, 2017 11:18

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).

Interesting, especially the catch-up feature. Take notes, FaceDeer ;)
Mods | Support Mesehub: bc1qluuests9rxmlnvpjrhsnyjg9ucwy6z3r0y3srw
 

FaceDeer
Member
 
Posts: 462
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

Re: [Mod] Easy crafting table [crafting]

by FaceDeer » Sun Apr 30, 2017 14:35

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.


True, but you can still do that if you want. The button makes it safer and more obvious, IMO.

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.


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: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).


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.

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).
 

PreviousNext

Return to WIP Mods



Who is online

Users browsing this forum: MSN [Bot] and 3 guests