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

User avatar
rubenwardy
Moderator
Posts: 6972
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: Bristol, United Kingdom
Contact:

by rubenwardy » Post

If this was installed on the server, will it add additional lag?

Or does the user handle it all
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
Bas080
Member
Posts: 398
Joined: Mon May 21, 2012 15:54
GitHub: bas080
IRC: bas080
In-game: bas080
Location: Netherlands

by Bas080 » Post

What could it be?

10:23:53: ERROR[main]: ServerError: LuaError: error: ...hare/minetest/games/simple/mods/craft_guide/init.lua:259: attempt to index global 'crafts' (a nil value)
10:23:53: ERROR[main]: stack traceback:
10:23:53: ERROR[main]: [C]: in function 'add_node'
10:23:53: ERROR[main]: /usr/bin/../share/minetest/builtin/item.lua:159: in function </usr/bin/../share/minetest/builtin/item.lua:124>

Kays
New member
Posts: 8
Joined: Wed Jul 04, 2012 09:45

by Kays » Post

Attempted to install according to the directions, was able to place the sign but it crashed the game. Restarting allowed me to view the sign but it was empty. I'm assuming I messed something up. In step 2, where do you insert that line. In step 3, can you delete the line or have to comment it out with // or /* . I've tried both but I must have done something wrong.

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

by cornernote » Post

Kays wrote:Attempted to install according to the directions, was able to place the sign but it crashed the game. Restarting allowed me to view the sign but it was empty. I'm assuming I messed something up. In step 2, where do you insert that line. In step 3, can you delete the line or have to comment it out with // or /* . I've tried both but I must have done something wrong.

In step 2, insert the line to default.lua on line 17...

eg:
FIND:
dofile(minetest.get_modpath("default").."/leafdecay.lua")
BELOW, INSERT:
dofile(minetest.get_modpath("default").."/register_craft.lua")

In step 3 you can remove the line, or comment it with -- (2 dashes).

Kays
New member
Posts: 8
Joined: Wed Jul 04, 2012 09:45

by Kays » Post

cornernote wrote:
Kays wrote:Attempted to install according to the directions, was able to place the sign but it crashed the game. Restarting allowed me to view the sign but it was empty. I'm assuming I messed something up. In step 2, where do you insert that line. In step 3, can you delete the line or have to comment it out with // or /* . I've tried both but I must have done something wrong.

In step 2, insert the line to default.lua on line 17...

eg:
FIND:
dofile(minetest.get_modpath("default").."/leafdecay.lua")
BELOW, INSERT:
dofile(minetest.get_modpath("default").."/register_craft.lua")

In step 3 you can remove the line, or comment it with -- (2 dashes).

Whatever I did wrong before, I did right this time around. No longer crashes, and it displays all the recipes exactly as advertised. Very nice.

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

by cornernote » Post

mod updated to 0.1.1 -- see 1st post

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

I was not aware that buttons had been implemented into the inventory. I read through the API and tried to do it myself and couldn't get it to work. flabergasted.

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

by cornernote » Post

Hey ashenk69,

I started by stealing this code (It appears your mod concept made it into core!):
https://github.com/celeron55/minetest_g ... e/init.lua

Did find/replace for creative to craft_guide, then just applied it to the code I stole from you to make the node inventory work.

ashenk69
Member
Posts: 230
Joined: Tue Jul 03, 2012 00:08

by ashenk69 » Post

That's pretty awesome that my idea actually made it into the core of the game.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

Hello everyone!
I tried to install this mod on the minetest v0.4.1 and got this:

Code: Select all

09:36:49: VERBOSE[main]: error_message = ServerError: LuaError: error: ...bin\..\games\minetest_game\mods\craft_guide\init.lua:308: attempt to call field 'create_detached_inventory' (a nil value)
Line #308 contents this:

Code: Select all

local inv = minetest.create_detached_inventory("craft_guide", {
What should I do to make this work?

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

by cornernote » Post

I think create_detached_inventory didn't make it into minetest 0.4.1. If you goto the blog there is a RC release of 0.4.2. That will load it. Other option is to compile from source.

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

Thanks, with RC 0.4.2 it works :)
BTW (sorry for offtop) what do I need to compile minetest under win? Could I get it as all-in-one *.7z file or smth?

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

by cornernote » Post

There's a guide here:
http://minetest.net/forum/viewtopic.php?id=1434

Its really easy if you don't want sound, most of the libs you have to get are for sound to work.

I don't think it can be given as an all-in-one zip because of licensing issues.

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

by madarexxx » Post

Hello!
I love this mode, but it crashes my minetest, and i don't know why - there is not any error or something else in terminal, i have latest build from sources both, minetest and craft_guide. System is Linux Mint 13.
Here is debug.txt http://ompldr.org/vZXpzYg

After removing folder with your mod, it works again.

could someone help me?
Sorry for my bad English, please help me learn it - correct my worst mistakes :)

4aiman
Member
Posts: 1208
Joined: Mon Jul 30, 2012 05:47

by 4aiman » Post

2 maderexxx:
I'm too have linux mint 13 (mate) and this mod works fine with minetest 4.2 RC1 (or later if exist).
Besides, I couldnt find any info in the debug.txt related to this mod...
Maybe it's some sort of conflict? Could you try to remove all mods but craft_guiide and see what would happen?
Although, which mod is logging this:
19:04:45: INFO[main]: cmd 67 count 0
?
I've never saw any with such "output".
Last edited by 4aiman on Tue Aug 07, 2012 07:24, edited 1 time in total.

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

by madarexxx » Post

I've got a compromise - delete flags mod, and everything works!
Sorry for my bad English, please help me learn it - correct my worst mistakes :)

skalrynd
New member
Posts: 3
Joined: Thu Jul 26, 2012 01:33

by skalrynd » Post

ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...minetest/worlds/world/worldmods/craft_guide/init.lua:308: attempt to call field 'create_detached_inventory' (a nil value)

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

by cornernote » Post

skalrynd wrote:ERROR: An unhandled exception occurred: ServerError: LuaError: error: ...minetest/worlds/world/worldmods/craft_guide/init.lua:308: attempt to call field 'create_detached_inventory' (a nil value)
your version is not new enough.

pagliaccio
Member
Posts: 65
Joined: Tue Jul 31, 2012 07:38
Location: italy

by pagliaccio » Post

how i find a stairs mod?
it is request for this mod but i not find

marcos
New member
Posts: 4
Joined: Wed Jul 25, 2012 20:10

by marcos » Post

can you plz help me i extracted the mod to the mods folder i did what i had to do but it says faliled to load and run help me plz

pagliaccio
Member
Posts: 65
Joined: Tue Jul 31, 2012 07:38
Location: italy

by pagliaccio » Post

marcos wrote:can you plz help me i extracted the mod to the mods folder i did what i had to do but it says faliled to load and run help me plz
you have a stairs mod? i can't find it...

User avatar
Gambit
Member
Posts: 453
Joined: Sat Oct 29, 2011 19:31
Location: United States

by Gambit » Post

Hello, first I'd like to say this is a useful mob and I know a lot of people would welcome it.

However, wouldn't it be more logical to build this mod around bookshelves rather than signs? Bookshelves have no use so far other than decorations, and by modding the bookshelves to act as the guide, it would give it more purpose.

Or is that not possible yet?
Current Projects: MineToon | PixelBOX
Gambit's Checkmate Server - 43.65.296.232 - port: 30001

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

by cornernote » Post

Good idea. Vanessae said something similar. I suck at desing, if someone can do some textures I can add a craft bookshelf.

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

by madarexxx » Post

Cornernote, thank you for this mod, it works fine, but i found 3 issues in it:
1) It crash Minetest if you have many mods and world have some dropped things (about 1 stack is enough for crash)
2) If there is two or more recipes which are producing same thing, you can see only one of them. What about adding buttons near a craft window, which will switch recipes?
3) It works slow sometimes (not critical, but is a little irritating)

And what about a function, to find, in which recipes is this thing using. It will be very useful for people, who have many mods.

Thanks you very much
Sorry for my bad English, please help me learn it - correct my worst mistakes :)

tjefferson
New member
Posts: 1
Joined: Sat Aug 18, 2012 16:55
Location: wisconsin

by tjefferson » Post

ok i am learning alot about minetest but i can't figure this out
11:52:11= error[main]= moderror= failed to load and run c\users\daddy\desktop\minetest-0.4.2-rc1-d38b465-win32\bin\..\mods\minetest\cornernote-minetest-craft_guide-a28d7f9\init.lua if you can help me on this and please make it simple i don't understand alot of computer terms so if you please can make it lamen terms. thanks so much for your help.

Post Reply

Who is online

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