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

madarexxx
Member
Posts: 144
Joined: Sat Aug 04, 2012 06:49

by madarexxx » Post

cornernote, you said that if you will use your register method, you will be able to see all craft recipes. What about updating your mod, with alternate recipes viewing support? And it will be cool, if there will be any filter/search for finding all recipes with something.(for example finding all recipes using wood)
Sorry for my bad English, please help me learn it - correct my worst mistakes :)

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

by cornernote » Post

madarexxx wrote:What about updating your mod, with alternate recipes viewing support?
Done! =)
madarexxx wrote:And it will be cool, if there will be any filter/search for finding all recipes with something.(for example finding all recipes using wood)
Yeah, I agree that would be cool. I'll think about how to do that.

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

your mod saved my buttox!
hello, am program. do language in rust. make computer do. okay i go now.

madarexxx
Member
Posts: 144
Joined: Sat Aug 04, 2012 06:49

by madarexxx » Post

Is it possible to optimize craft_guide? Loading takes ages!
Sorry for my bad English, please help me learn it - correct my worst mistakes :)

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

madarexxx wrote:Is it possible to optimize craft_guide? Loading takes ages!
exactly! does it not read from memory and read from the disk?
hello, am program. do language in rust. make computer do. okay i go now.

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

by cornernote » Post

I think it's cos the server hasn't sent on_receive_fields back to the client.

I'll have a look today and see if I can optimize it.

Edit... Just had a look real quick and it seems that it just takes time for the server to give the next page sometimes. If anyone has some code improvements please share, but I can't see how to make it faster.

Edit... To explain in more detail now I am on the PC...

The mod loads all the crafts at the start of the game, and for each craft it puts an item into a detached (shared for everyone on the server) inventory.

When you click NEXT/PREV it simply updates the formspec with the inventory starting at a new starting offset. This is exactly the same way the creative mode works, does that lag sometimes too?
Last edited by cornernote on Tue Sep 25, 2012 01:15, edited 1 time in total.

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

cornernote wrote:does that lag sometimes too?
the real reason has been discovered, the chat box will overlay the buttons, not allowing you to click them
Last edited by jordan4ibanez on Tue Sep 25, 2012 02:07, edited 1 time in total.
hello, am program. do language in rust. make computer do. okay i go now.

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

by cornernote » Post

i ran my eye over it again, and i just don't see how it can be faster, this is the main file:
https://github.com/cornernote/minetest- ... _guide.lua

i'm open to ideas and suggestions, if you don't understand the file tell me and i'll add more (a lot more) comment lines.

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

cornernote wrote:i ran my eye over it again, and i just don't see how it can be faster, this is the main file:
https://github.com/cornernote/minetest- ... _guide.lua

i'm open to ideas and suggestions, if you don't understand the file tell me and i'll add more (a lot more) comment lines.
i'm telling you the reason in the irc channel
hello, am program. do language in rust. make computer do. okay i go now.

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

by cornernote » Post

all the buttons are now at the bottom, away from the chat interface that was preventing them from being clicked.

let me know how it goes

User avatar
Zeg9
Member
Posts: 608
Joined: Fri Sep 21, 2012 11:02
Location: France

by Zeg9 » Post

This is a really useful mod;
I noticed one problem though: it doesn't work fine with 5x5 crafting recipes (used in workbench) :/
Image
↑ The 5x5 workbench is on the "output" field
Last edited by Zeg9 on Fri Nov 02, 2012 09:12, edited 1 time in total.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).

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

by cornernote » Post

UPDATE - added search!

-- thanks @Jeija
Last edited by cornernote on Fri Nov 02, 2012 02:55, edited 1 time in total.

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

YAY :D
hello, am program. do language in rust. make computer do. okay i go now.

madarexxx
Member
Posts: 144
Joined: Sat Aug 04, 2012 06:49

by madarexxx » Post

Found 2 bugs:
1) I put wood planks in output section, put chest on planks, throw away planks, pick them up. Cheat!
2) recipes, containing "group:*" are showing not correctly - there are "unknown item" in recipe.

P.s. what about reverse search? All recipes using wood for example.
Sorry for my bad English, please help me learn it - correct my worst mistakes :)

Michael Eh?
Member
Posts: 391
Joined: Sun Jan 01, 2012 17:21

by Michael Eh? » Post

thanks for the mod. worked perfectly picking up everything installed. Plan to demo mionetest on workstations. This saves having to leave a book of how each mod works.

User avatar
Zeg9
Member
Posts: 608
Joined: Fri Sep 21, 2012 11:02
Location: France

by Zeg9 » Post

madarexxx wrote: 1) I put wood planks in output section, put chest on planks, throw away planks, pick them up. Cheat!
:O I just noticed that, I have to remove the mod from my server now -_-
madarexxx wrote: 2) recipes, containing "group:*" are showing not correctly - there are "unknown item" in recipe.
P.s. what about reverse search? All recipes using wood for example.
+1 (if someone is going to work on this mod :P)
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).

User avatar
qwrwed
Member
Posts: 326
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Post

Zeg9 wrote:
madarexxx wrote: 1) I put wood planks in output section, put chest on planks, throw away planks, pick them up. Cheat!
:O I just noticed that, I have to remove the mod from my server now -_-
I thought that only happened in old versions?

User avatar
GloopMaster
Member
Posts: 213
Joined: Wed Aug 01, 2012 18:03
Location: http://minetest.net/forum/

by GloopMaster » Post

qwrwed wrote:
Zeg9 wrote:
madarexxx wrote: 1) I put wood planks in output section, put chest on planks, throw away planks, pick them up. Cheat!
:O I just noticed that, I have to remove the mod from my server now -_-
I thought that only happened in old versions?
Which IIRC are the only available ones.
Meow.

That is all.

frenchfan=binou

by frenchfan=binou » Post

hello everybody :)
Zeg9 wrote:
madarexxx wrote: 2) recipes, containing "group:*" are showing not correctly - there are "unknown item" in recipe.
P.s. what about reverse search? All recipes using wood for example.
+1 (if someone is going to work on this mod :P)
With this version (and later i guess) :

Minetest 0.4.4 (zip) :

https://github.com/downloads/celeron55/minetest/minetest-0.4.4-win32.zip
minetest-0.4.4-win32(CRC32=FB9B9F9A).zip = thank you for adding the CRC32 please, this is better.
The parentheses are there because it is an addition by myself.

If you do directly on the server (source) do this please :
minetest-0.4.4-win32-CRC32=FB9B9F9A.zip ; thank you in advance for the use of this suggestion.
The problem with the decoding of the code by a mod :

I have the bug "unknown item" in the mod CraftGuide = "group:stone" = the model "group:" is the problem !

For example, wanting to see how to make a stone sword (sword_stone), i get the block "unknown item" in the workshop = "C:\Fonctionne sans installation\Minetest\textures\base\pack\unknown_item.png" on place the good block (stone).

"sword_stone" = I get "unknown item" in the workshop only for "group:stone", but not for "default:stick" !

"C:\Fonctionne sans installation\Minetest\bin\debug.txt"

Code: Select all

24:59:59: ACTION[ServerThread]: [CraftGuide] pseudohere requests recipe 1 for default:sword_stone
24:59:59: ACTION[ServerThread]: [CraftGuide] {recipe = {1 = {1 = "group:stone"}, 2 = {1 = "group:stone"}, 3 = {1 = "default:stick"}}, output = "default:sword_stone"}
(note: action taken at the same instant ; info because i changed the private infos, username and pseudo)

Does someone can please, thank you in advance, update code CraftGuide to fix this problem ?

Page and link source of the mod used, and which does not work properly :

cornernote/minetest-craft_guide · GitHub :
https://github.com/cornernote/minetest-craft_guide

ZIP :
https://github.com/cornernote/minetest-craft_guide/archive/master.zip <= here.

I use, minetest-craft_guide-master(CRC32=998E650B).zip (commits 2012-11-08 05:30:08)

prevent stealing of items · 95c4df8 · cornernote/minetest-craft_guide · GitHub :
https://github.com/cornernote/minetest-craft_guide/commit/95c4df8418036542be95ef566f181c58d6a0001b

(I also use minetest-mod-mesecons-master(CRC32=A732607F).zip)

Solution, or the discovery of the problem (by chance ; sic) :

"C:\Fonctionne sans installation\Minetest\mods\minetest\minetest-craft_guide-master\craft_guide\api_craft_guide.lua"

English / French (model or source by defaut) / ...
C:\Works with an installation
C:\Works with no installation
20120130-03h00

C:\Fonctionne avec installation
C:\Fonctionne sans installation

Code: Select all

(...)
-- create_inventory
craft_guide.create_inventory = function(inv, search)
    local craft_guide_list = {}
    for name,def in pairs(minetest.registered_items) do
        -- local craft_recipe = minetest.get_craft_recipe(name);
        -- if craft_recipe.items ~= nil then
        local craft = craft_guide.crafts[name];
        if craft ~= nil then
            if (not def.groups.not_in_craft_guide or def.groups.not_in_craft_guide == 0)
                    --and (not def.groups.not_in_creative_inventory or def.groups.not_in_creative_inventory == 0)
                    and def.description and def.description ~= "" then
                if search then
                    if string.find(def.name, search) or string.find(def.description, search) then
                        table.insert(craft_guide_list, name)
                    end
                else
                    table.insert(craft_guide_list, name)
                end
            end
        end
    end

    table.sort(craft_guide_list)
    for i=0,inv:get_size("main"),1 do
        inv:set_stack("main", i, nil)
    end
    inv:set_size("main", #craft_guide_list)
    for _,itemstring in ipairs(craft_guide_list) do
        inv:add_item("main", ItemStack(itemstring))
    end
end


-- allow_metadata_inventory_move
(...)
if craft ~= nil then

and def.description and def.description ~= "" then

=> ~= !!! ??? ("&#126;" = "~" = tilde)

Tilde - Wikipedia, the free encyclopedia :
http://en.wikipedia.org/wiki/Tilde

Does someone can please, thank you in advance, update code CraftGuide to fix this problem ?

It should, please, be a guide minetest installed by default (as the same thing on the xbox with Minecraft, at best, if possible), because now, all possible assistance is scattered and fragmented, on the web, what is it, how to use, how to make it, and with the translation of all this information and i hope (man(s) and or woman(s) blessed are you) function "automatical recipe" (same as xbox, at best, if possible) ; (else there is a sort of "tied sale" of the game with internet).

Ho, a discovery today, please use it to view / convers the files correctly dynamically (for a graphical user interface (please) to change with interactive help files configurations) ; Dos2unix / Unix2Dos - Text file format converters = http://dos2unix.sourceforge.net/ ; source info = dos2unix | Free software downloads at SourceForge.net - Liens éclairs = http://bajazet.fr/shaarli/?emc7Ug via Dossier : Demander une augmentation - Comment répondre aux 11 principales objections - Liens en vrac de sebsauvage = http://sebsauvage.net/links/?bJ0s3w

((My previous message ; still valid but the mod CraftGuide is a good (very good) beginning of a solution, to refine and complete of course : http://minetest.net/forum/viewtopic.php ... 157#p56157 ; 2012-12-11-16h52m29 UTC+0100 (15:52:29 = forum)))

Thank you very much in advance.

User avatar
neko259
Member
Posts: 805
Joined: Sun Jun 19, 2011 06:51

by neko259 » Post

Great mod!
s3tuPDfUv2IyvXHzPmE31MQvnWULv1zj

rarkenin
Member
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Post

For those users with give, can it display the item code so we aren't guessing around?

Edit: Or just let users with give get items easily right from the guide?
Last edited by rarkenin on Wed Dec 26, 2012 16:10, edited 1 time in total.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.

User avatar
Zeg9
Member
Posts: 608
Joined: Fri Sep 21, 2012 11:02
Location: France

by Zeg9 » Post

rarkenin wrote:For those users with give, can it display the item code so we aren't guessing around?

Edit: Or just let users with give get items easily right from the guide?
--> Just fork creative mode so it only shows to players with give
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

rarkenin wrote:For those users with give, can it display the item code so we aren't guessing around?

Edit: Or just let users with give get items easily right from the guide?
I don't think anyone's maintaining this anymore. I was going to, but I couldn't figgure out how to get it to do what it needed to to take it in the direction I thought it should go. Sorry.
Zeg9 wrote:
rarkenin wrote:For those users with give, can it display the item code so we aren't guessing around?

Edit: Or just let users with give get items easily right from the guide?
--> Just fork creative mode so it only shows to players with give
I plans to do that actually, but right now, I'd also have to fork inventoty_plus to make it compatible with the creative fork. Maybe I should just build creative mode/give into inventory_plus ....

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

Look into RealBadAngel's Unified Inventory mod. It has a the craft guide built in, which displays the actual item/node name as you were wanting. Requires very recent git (it depends on some features not found in older 0.4.4-dev builds).

http://minetest.net/forum/viewtopic.php?id=3933
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
0gb.us
Member
Posts: 841
Joined: Sun Sep 16, 2012 01:55
Location: 0gb.us:30000
Contact:

by 0gb.us » Post

RealBadAngel's Unified Inventory is great, but has one problem. It doesn't allow the adding of menu pages, but rather, it takes over the entire menu. For people who use inventory_plus, switching may mean giving up other things. In addition, some people may not want bags installed, which are built into RealBadAngel's Unified Inventory. Especially since there's a bug in bags that cause items to be lost if the bags are accenentally switched with items still in them.

I just looked at it on your server though, and the craft guide does look great!

Post Reply

Who is online

Users browsing this forum: No registered users and 15 guests