[Mod] Craft Guide [craft_guide] - Shows crafts for all loade

User avatar
Krock
Developer
Posts: 4650
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Krock » Post

Interesting copper amount in image 1, bottom right.

I already missed those features - thank you!
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by cornernote » Post

Linuxdirk wrote:Hooray for using Vim. g, g, =, G … And BAM, everything is indented properly :)
I did that, gg=G ... it did a very poor job. seems it doesn't see "end" as a reason to un-indent.

Is there a plugin or something I have to use to get vim to know lua?

User avatar
Nathan.S
Member
Posts: 1147
Joined: Wed Sep 24, 2014 17:47
GitHub: NathanSalapat
IRC: NathanS21
In-game: NathanS21
Location: Bigsby Texas
Contact:

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Nathan.S » Post

Excellent work guys, very glad to have a craft guide that works with groups and everything.
I record Minetest videos, Mod reviews, Modding tutorials, and Lets plays.
Check out my website, and brand new Minetest Modding Course

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Linuxdirk » Post

cornernote wrote:I did that, gg=G ... it did a very poor job. seems it doesn't see "end" as a reason to un-indent.
Works properly here.
cornernote wrote:Is there a plugin or something I have to use to get vim to know lua?
Check your .vimrc for filetype plugin indent on being set and you have the Lua stuff installed.

Code: Select all

$ pacman -Ql vim-runtime | grep lua
vim-runtime /usr/share/vim/vim74/doc/if_lua.txt
vim-runtime /usr/share/vim/vim74/ftplugin/lua.vim
vim-runtime /usr/share/vim/vim74/indent/lua.vim
vim-runtime /usr/share/vim/vim74/syntax/lua.vim
Check your distribution’s documentation on how to list all files provided by a defined package and check if your distribution uses vim-runtime for providing the “base stuff” for vim.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by cornernote » Post

Code: Select all

$ pacman -Ql vim-runtime | grep lua
no output

Code: Select all

$ sudo apt-get install vim-runtime
vim-runtime is already the newest version.
Im using vim on ubuntu 14.04 lts.

I also found a Notepad++ plugin called "Indent by Fold", which seems to do the trick, although it doesnt correctly indent elseif.

User avatar
Linuxdirk
Member
Posts: 3219
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Linuxdirk » Post

cornernote wrote:Im using vim on ubuntu 14.04 lts.
I have no idea how that works on Ubuntu. Maybe search for Vim plugins in the repository. The plugins are very common and should be installed by default when installing vim-common imho. Maybe there is an additional package providing the filetype plugins.

Is apt-get capable of listing all files provided by a defined package, like pacman -Ql does on Arch Linux?

Maybe manually search for the files. Since Debian alters almost all packages and Ubuntu takes most packages from Debian and alters them, too (at least they did the last time I checked) I can’t help you here, sorry :)

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

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Sokomine » Post

Miner59 wrote: - "you need" list
That's something I've been missing for some time, especially when dealing with complex technic receipes and trying to determine a suitable price for them in a shop.

This nice new feature might also be extremly intresting for a new machine. It'd list the indigrents, and when everything has been inserted, the machine would start crafting. Surplus intermediate products could be put into the output slots as well.

It would also be great if this new feature could be available for unified_inventory and other craft-guide mods out there.
A list of my mods can be found here.

Miner59
Member
Posts: 46
Joined: Mon Sep 22, 2014 19:14

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Miner59 » Post

Hi Sokomine,

Code: Select all


This nice new feature might also be extremly intresting for a new machine. It'd list the indigrents, and when everything has been inserted, the machine would start crafting. Surplus intermediate products could be put into the output slots as well.

Ok, a new powerful machine will always be good.
But I thought better about it and don't found a good item where it could be really useful to craft it directly from basic items. If you tell this machine for example to make glass panes directly, and you later need glass blocks you don't have any. And machines like a battery box for example I build maybe one, not many of it.
Maybe it is useful for factory-like autocrafting, but I don't have experience with this kind of playing minetest.xD

And there are always open questions, like what to do when a item has alternate recipes or what to do if an item needs to be cooked first, you need add the fuel needed, too, I think.


I thought maybe a better machine is a kind of slot machine for selling items, which calculates automatically a good price. You just put the items you want to sell in the machine. The machine then knows that this item needs for example 10 copper and 5 wood to craft. When a copper costs 20 coins and a wood 1 coin, the item will be selled for
205 coins, for example. Maybe make it 5% expensiver for every crafting step needed.
You maybe can then set a option, if prices should be normal, cheap or expensive.
So a machine which makes selling things a bit easier.

Code: Select all

It would also be great if this new feature could be available for unified_inventory and other craft-guide mods out there.
Yeah if a author of one of the other craft-guide mods is interested, they can use the code. I think cornernote will not be against it, too.
If they ask, I will help them when needed.

Nomis
Member
Posts: 26
Joined: Tue Dec 02, 2014 23:30

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Nomis » Post

Could do with this on Clip

wappo
New member
Posts: 5
Joined: Sun Mar 22, 2015 02:29
Location: Japan

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by wappo » Post

Minetest 4.12
Do not show all items.
No work, Next Page button.

Miner59
Member
Posts: 46
Joined: Mon Sep 22, 2014 19:14

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Miner59 » Post

Hi,
I added new features to craft guide:

1. Prepare to craft:
You can copy the craft recipe directly in your crafting grid, if you have enough items for it.
You can choose to craft 1, 10 or 99 items. If you don't have enough items as you want to craft, maximum amount is moved to crafting grid.
I don't think it is a too big help for players, it just saves you from moving every item to craft grid yourself, and then most time you forgot the exact crafting recipe and have to look in craft guide again. But if you don't want it in craft guide please say your opinion.

2. Locked craft guide+locked craft pc:
This look exactly the same like a normal craft guide or craft pc, except they have a button to lock the craft guide in the current state. I think it is very useful on server, because you can inform player about crafting recipes of items and other players can't mess it up again when they show craft recipes of other items.
But players can still look other craft recipes, the craft guide just restores to the locked state when they exit the formspec again. Locked craft guide still need a protection from a protection mod, where it gets placed. It isn't protected from digging it by itself.
It is crafted with a craft guide or a craft pc and an iron ingot.

I think I will make a pull request for feature 1 and I'm unsure with feature 2 because it seems only useful for server owners. If you interested I added a download to this post with all 2 features added.


Screenshot:

Image


Edit: removed download
Last edited by Miner59 on Sat May 23, 2015 11:55, edited 1 time in total.

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

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Sokomine » Post

Miner59 wrote: 1. Prepare to craft:
You can copy the craft recipe directly in your crafting grid, if you have enough items for it.
It's good to see that that feature of unified_inventory is supported by this mod as well. It's very practical and helps a lot..
Miner59 wrote: 2. Locked craft guide+locked craft pc:
Such a feature would be needed on servers that *don't* have a craft guide installed. But then, this one won't be installed either. It could still be useful in some situations.
A list of my mods can be found here.

Miner59
Member
Posts: 46
Joined: Mon Sep 22, 2014 19:14

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Miner59 » Post

Hi,
I completely forgot to handle tool wear and item metadata. So everytime you copy a crafting recipe all your tools get repaired. Should be fixed soon, pull request is waiting.
Such a feature would be needed on servers that *don't* have a craft guide installed. But then, this one won't be installed either. It could still be useful in some situations.
I think it is very well needed on servers with a normal crafting guide available sometimes.
I wrote the code to lock craft guides not especially because I want to make a pull request with it, but because I wanted to build a information house where players can look what mods and items are available on the server.
I placed the item I want to show, and above it a locked craft guide, where I searched for the recipe for this item.
Without a locked version this would not have been possible, because the next player who came would have choosen to show a different recipe.

Another usage could be in your house, which is protected but other people can look around inside.
If you have a craft guide in your house then other people often switch to other pages and add or delete bookmarks.
For me this is no real problem, I often have to laugh a bit because most time people (especially noobs) lock for diamonds, diamond sword and you have it added to your bookmarks.


Here is a download with a fixed version with copy- craft recipe buttons and locked craft guides and craft PCs:
Attachments
minetest-craft_guide-master.zip
craft_guide.zip
(22.74 KiB) Downloaded 105 times

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

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Sokomine » Post

Miner59 wrote: I wrote the code to lock craft guides not especially because I want to make a pull request with it, but because I wanted to build a information house where players can look what mods and items are available on the server.
I placed the item I want to show, and above it a locked craft guide, where I searched for the recipe for this item.
Yes, that's certainly a valid application. I've built crafting schools on more than one server (Redcrab, VE-Realtest). Most servers by now do have too many diffrent blocks for showing them all in one place.
A list of my mods can be found here.

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by amadin » Post

I not see any items in "Craft guide" but they present in game and i can craft they. No errors in log, name of directory is /mods/minetest-craft_guide-master/, downloaded here https://github.com/cornernote/minetest-craft_guide, 0.4.12. What I did wrong?
Image
I found an answer for my question - if crafts are not loading then it is probably because craft_guide is loaded after the other crafts. To fix this simply create a depends.txt in the module in question, and add the contents craft_guide. EG: crafts from default mod are not available - create games/minetest_game/default/depends.txt with the contents: craft_guide

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

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Sokomine » Post

amadin wrote: create games/minetest_game/default/depends.txt with the contents: craft_guide
Please don't! That used to be the way things where done in the old craft-guide times. By now, the api has helpful functions, i.e. `minetest.get_all_craft_recipes, and mods ought to use that.
A list of my mods can be found here.

amadin
Member
Posts: 549
Joined: Tue Jun 16, 2015 16:23

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by amadin » Post

Sokomine wrote:
amadin wrote: create games/minetest_game/default/depends.txt with the contents: craft_guide
Please don't! That used to be the way things where done in the old craft-guide times. By now, the api has helpful functions, i.e. `minetest.get_all_craft_recipes, and mods ought to use that.
But this tip helped me. And maybe you add a button "Back" under search, because i think after using search, many peoples don't know how to open again a full list of items (is seen in the screenshot).
Image

Murdoc
New member
Posts: 8
Joined: Thu May 21, 2015 06:41

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Murdoc » Post

Hi, I've run into a problem that I didn't see mentioned in this thread yet. The craft guide (either one) has been crashing the whole game on me. Actually it makes the whole window go white and won't do anything else. The crash is triggered by either changing the page (sometimes needs to do it twice), or looking at an alternate recipe. In order to see if it was a mod incompatibility, I tried it out with no other mods and it was fine. I then tested it out with my other mods, and found that the only one it doesn't like is the moreblocks mod. I tried different combinations and that is the only consistent element in the crashing. I even tried getting the latest version of both craft guide and moreblocks and that hasn't helped either.

lun
New member
Posts: 2
Joined: Sun Sep 13, 2015 09:59
GitHub: lun
IRC: lun
In-game: lun

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by lun » Post

lol mod

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Napiophelios » Post

lun wrote:lol mod
can you be more specific please;
your posted reply makes absolutely no sense.

User avatar
cessna151
Member
Posts: 35
Joined: Thu Sep 24, 2015 20:36
In-game: cessna151
Location: Indiana, USA

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by cessna151 » Post

mod installed, how do i get it in the game?
---“For once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.”---

User avatar
cessna151
Member
Posts: 35
Joined: Thu Sep 24, 2015 20:36
In-game: cessna151
Location: Indiana, USA

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by cessna151 » Post

I finally discovered /giveme craft_guide:sign_wall

Once i got it i discovered the crafting recipe. Can this info be added to the OP?
---“For once you have tasted flight, you will forever walk the earth with your eyes turned skyward, for there you have been, and there you will always long to return.”---

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by cornernote » Post

cessna151 wrote:I finally discovered /giveme craft_guide:sign_wall

Once i got it i discovered the crafting recipe. Can this info be added to the OP?
done.

User avatar
Fixer
Member
Posts: 904
Joined: Sun Jul 31, 2011 11:23
IRC: Fixer
In-game: Fixer
Location: Ukraine

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by Fixer » Post

Hi, I know at least two servers with craft_guide, I think it is yours (looks similar to screenshot, has guide and PC), here few problems for you:
1) bookmarks are not working (tested on two servers)
2) search is not usable at all... type TNT as example.... you get nothing
3) unknown blocks, say, for groups of things, like wool (could be intended) but maybe it can be done more nicely.

User avatar
jan6
Member
Posts: 64
Joined: Wed Dec 02, 2015 17:58
GitHub: jan69
IRC: jan6
In-game: jan6
Location: Estonia

Re: [Mod] Craft Guide [craft_guide] - Shows crafts for all l

by jan6 » Post

I really want a reverse search that will return items that recuire X ingredient (the one I search for) to craft
,also a problem is that it doesn't get some recepies for example empty bucket and darkage bricks are craftable just like anything else but the guide doesn't find their recepies (on a server at least, haven't tried on singleplayer), I guess is that it can find recepies only for mods in the same directory? (only in ~/.minetest/mods ?)
Last edited by jan6 on Wed Mar 23, 2016 07:55, edited 1 time in total.
I know everything, exept what I know...
I have a secret..it's so secret even I don't know what it is

Post Reply

Who is online

Users browsing this forum: No registered users and 30 guests