minetest-mods / craftguide Goto Github PK
View Code? Open in Web Editor NEW:book: The most comprehensive Crafting Guide on Minetest
License: Other
:book: The most comprehensive Crafting Guide on Minetest
License: Other
Steps to reproduce
I have no idea what's going on, but sometimes the formspec closes after pressing Enter for doing a search (the filtering is correctly applied, though).
... like gravel and ice. Revision d0b3cf2
As example, creative inventory:
Crafting guide:
Some blocks are missing, you can't find them via search either.
The current progressive API can filter recipes. The default implementation does filter the recipes based on inv_items
table that contain the "revealed" items. The inv_items
table is a part of the default progressive implementation and should be replaceable by custom logic.
Since 92cf230 the inv_items
table is used for all progressive implementations that is not always right.
My propoasal is to introduce new API function
to be overriden directly:
craftguide.is_revealed(itemname, player)
or same way as for recipes:
craftguide.set_item_filter(name, function(itemname, player))
craftguide.add_item_filter(name, function(itemname, player))
to wrap around inv_items, and use them in default recipe filter.
For my use-case craftguide_reveal I need only the item filter, the recipe filter is the same but with access to the doc_item revealed table instead of inv_items
The LV Furnace seems not to be recognized when searching for furnace
(and other related keywords) although it has a recipe and crafting it works. Unified inventory for example has no issues finding the furnace and showing the recipe – so it generally is registered as expected.
~/.minetest/mods/craftguide$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
~/.minetest/mods/unified_inventory$ git status
On branch master
Your branch is up to date with 'origin/master'.
nothing to commit, working tree clean
~/.minetest/worlds/test $ grep ' = true' world.mt
creative_mode = true
load_mod_mesecons_extrawires = true
load_mod_mesecons_lamp = true
load_mod_mesecons_hydroturbine = true
load_mod_mesecons_torch = true
load_mod_mesecons_wires = true
load_mod_mesecons_powerplant = true
load_mod_mesecons_gates = true
load_mod_mesecons_random = true
load_mod_mesecons_insulated = true
load_mod_mesecons_receiver = true
load_mod_mesecons = true
load_mod_mesecons_doors = true
load_mod_mesecons_switch = true
load_mod_mesecons_luacontroller = true
load_mod_mesecons_solarpanel = true
load_mod_mesecons_detector = true
load_mod_craftguide = true
load_mod_mesecons_commandblock = true
load_mod_mesecons_button = true
load_mod_extranodes = true
load_mod_technic_chests = true
load_mod_mesecons_blinkyplant = true
load_mod_wrench = true
load_mod_mesecons_lightstone = true
load_mod_mesecons_delayer = true
load_mod_mesecons_fpga = true
load_mod_mesecons_pressureplates = true
load_mod_mesecons_walllever = true
load_mod_mesecons_alias = true
load_mod_mesecons_stickyblocks = true
load_mod_mesecons_microcontroller = true
load_mod_mesecons_materials = true
load_mod_mesecons_movestones = true
load_mod_mesecons_mvps = true
load_mod_concrete = true
load_mod_mesecons_noteblock = true
load_mod_mesecons_pistons = true
load_mod_technic = true
load_mod_technic_worldgen = true
load_mod_pipeworks = true
load_mod_unified_inventory = true
Unable to use craftguide after upgrading to minetest 0.4.16
previous version was 0.4.9 (ubuntu trusty)
any ideas? awesome mod btw
2017-10-09 22:15:22: [Main]: Automatically selecting world at [/home/mike/.minetest/worlds/test]
2017-10-09 22:15:26: WARNING[Main]: NodeDefManager: Ignoring CONTENT_IGNORE redefinition
2017-10-09 22:15:26: ACTION[Main]: .__ __ __
2017-10-09 22:15:26: ACTION[Main]: _____ |__| ____ _____/ |_ ____ _______/ |_
2017-10-09 22:15:26: ACTION[Main]: / \| |/ \_/ __ \ __\/ __ \ / ___/\ __\
2017-10-09 22:15:26: ACTION[Main]: | Y Y \ | | \ ___/| | \ ___/ \___ \ | |
2017-10-09 22:15:26: ACTION[Main]: |__|_| /__|___| /\___ >__| \___ >____ > |__|
2017-10-09 22:15:26: ACTION[Main]: \/ \/ \/ \/ \/
2017-10-09 22:15:26: ACTION[Main]: World at [/home/mike/.minetest/worlds/test]
2017-10-09 22:15:26: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:52310.
2017-10-09 22:15:29: ACTION[Server]: singleplayer [127.0.0.1] joins game.
2017-10-09 22:15:29: ACTION[Server]: singleplayer joins game. List of players: singleplayer
2017-10-09 22:16:15: ERROR[Server]: Item "craftguide:book" not defined
2017-10-09 22:22:24: ERROR[Server]: Item "craftguide:book" not defined
2017-10-09 22:22:34: ERROR[Server]: Item "craftguide:book" not defined
I am not able to get the recipe "tree" -> "wood". If I search for tree I get only the recipe the tree is burneable. The button "Recipe x / y" is not shown.
If I search for "wood" at the first, I see the recipe. But if I click to tree, the issue appears again.
Edit: By the way, I do not see the recipe the wood is burneable ...
If you are in progressive mode, started out with an empty craftguide, then you walk to a stone and type in /craft
, the game claims there is no recipe for it.
When you mine the stone (thus reveal its recipes), then use the same command on another stone, it suddenly works.
I think this behaviour is actually correct in principle (you first have to collect the source item to “earn” more recipes), but the message is VERY misleading.
It says “No recipe for this node: X” but this isn't true. There is a recipe, you just don't know it yet. ;-)
I suggest:
In Progressive Mode, the error message should say “You don't know a recipe for this node: X”. This implies there might be a recipe for the stone, you just haven't found it out yet.
This function checks that the variables provided must all be strings, but that's clearly not the case. width
is a number and items
is a table.
The "craftguide:sign" should not be in group wood. They are a lot of recipes using with group:wood. Currently it is possible to use the "craftguide:sign" to craft armor, boot lader and much more.
Occasionally I play on servers that use Unified Inventory. The built-in crafting guide also allows users to see what materials are used for. If it is not outside of the scope of this mod, could it be possible for this to be a new feature in this mod? I love craftguide, but I miss being able to view item's usage.
If a player leaves the server while progressive mode is active, the mod crashes!
Originally found by RonnyBarthmann:
https://git.minetest.land/Wuzzy/MineClone2/issues/516#issuecomment-8507
My fix on my fork of craftguide
:
https://repo.or.cz/MineClone/MineClone2.git/commitdiff/78e5322f5791718d9afdef9c67d21f3be152d2cd?hp=50db5f5b855a59b53c27c36769adee66100527e5
Installed 128413c version of crafting guide along default minetest_game. Running it in creative mode.
On the first page of crafting guide those crafts are not working, no recipe at all:
It seems next pages are not affected. Bug appeared in revision f3ce043
There should be an option to register a sfinv page for a crafting guide. Something similar is done for sfinv_buttons. Would be nice to have this. I tried a little but kept running into issues. Likely because I don't know what I am doing with this mod. I came up with this idea when I was playing on the MustTest server, and noticed that they have a craft guide page, but are not using your craft guide. What do you guys think?
This would require an optional dependency on sfinv.
In order to make the wiki table fully green on the craftguide
row, this is now possible to show the replacements
and repairing
recipes. These "recipes" need to be collected manually and registered as custom recipes.
BTW, @Wuzzy2, this wiki page needs an update (sfinv
integration, /craft
command, custom recipes API).
I'd like to use area-tooltips on certain item image buttons, as they show up quicker than the element-tooltips and for another technical reason. Problem: there is no way to override the default tooltips on the item buttons, they show up right after the area-tooltips.
The craftguide does support currently 2x modes for items selection: "All items" and "Crafteable by items in inventory", managed by game setting "craftguide_progressive_mode".
My proposal is to allow the player to the switch between the modes using a new button/toggle.
Maybe with interface like (pseudocode) craftuide.register_selection("progressive", {recipe_in_inv = function() }
to allow to add additional selection views by other mods.
the smart_inventory builtin crafting guide know the next selection modes
I am interested to port some of them to new craftguide-addon mods if possible
2019-02-22 15:06:54: ERROR[Main]: Malformed translation line "
2019-02-22 15:06:54: ERROR[Main]: "
The locale file: https://github.com/minetest-mods/craftguide/blob/master/locale/craftguide.fr.tr
Looks like a newline is appended to every string.
OS: Windows 10.
@Wuzzy2 says the german translations do not cause that.
@Ekdohibs Any explanation?
If you're in progressive mode, it seems you cannot reveal items that are only useful as fuels.
Examples in Minetest Game: Leaves, Dry Shrub.
How to repro in MTG:
Compare with “non-Progressive Mode” in which the leaves show up.
The following patch updates the code to the new config api:
update_config_api.txt
Some concepts for possible layout improvements to the lower part of the crafting guide:
Smaller Alternate button and grid shifted to the left to be more centred and aligned.
Shifted back out to the right (and then some), but now has a separate display for fuels. This means you keep the selected item in the same place all the time, and all fuels get the same visual indicator, even if they have recipes.
Alternative layout based around the same ideas as # 2, but this time everything is more centred again and should still look well balanced for selected items that are not fuels.
Hello. Can you do me a favor?
Can you please relicense this under the MIT License or a similar permissive license? Or if you don't want that: LGPLv2.1 (preferably with the “or later” clause).
There are some subgames (including my own) licenced under the LGPL (mainly because it's the license which Minetest uses) and it would be hard, if not impossible to legally include your mod into subgames, as the GPLv3 is incompatible with any version of the LGPL.
Personally, I think the MIT License makes more sense because it lowers the entry barrier for subgame inclusion the most. But as I said, LPGL would be fine, too.
This mod contains English words like "Alternate", "Burning time" etc.
Will it be possible to make the mod support translation? You could implement any kind of translation tools, not just intllib (though it's more convenient to use intllib as it has gettext .po support)
hud_move
in the engine (see this comment), probably doable with minetest/minetest#10524 mergedcore.clear_craft()
override and empty the caches accordinglyThis text shows up in tooltip of lava bucket. [Minetest Game]
It's correct that it will be replaced, but by crafting? No.
This is a fuel recipe, so the item will be replaced not by crafting, but by burning / being used as fuel. Two possibilities:
This mod calls the debug
Lua library, which it shouldn't do.
You should exert care when using this library. The functions provided here should be used exclusively for debugging and similar tasks, such as profiling. Please resist the temptation to use them as a usual programming tool: they can be very slow. (…)
Please add a to feature hide the crafting recipes for items if they have the group not_in_craft_guide=1
.
This group is pretty standard, it is used in zcg
, craft_guide
, unified_inventory
and MineClone 2.
2019-06-29 13:12:51: ACTION[Main]: Server: Shutting down
2019-06-29 13:12:52: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'craftguide' in callback on_playerReceiveFields(): /home/mtxanadu/.minetest/mods/craftguide/init.lua:409: attempt to index a nil value
2019-06-29 13:12:52: ERROR[Main]: stack traceback:
2019-06-29 13:12:52: ERROR[Main]: /home/mtxanadu/.minetest/mods/craftguide/init.lua:409: in function 'get_tooltip'
2019-06-29 13:12:52: ERROR[Main]: /home/mtxanadu/.minetest/mods/craftguide/init.lua:500: in function 'get_recipe_fs'
2019-06-29 13:12:52: ERROR[Main]: /home/mtxanadu/.minetest/mods/craftguide/init.lua:674: in function 'make_formspec'
2019-06-29 13:12:52: ERROR[Main]: /home/mtxanadu/.minetest/mods/craftguide/init.lua:695: in function 'show_fs'
2019-06-29 13:12:52: ERROR[Main]: /home/mtxanadu/.minetest/mods/craftguide/init.lua:900: in function 'on_receive_fields'
2019-06-29 13:12:52: ERROR[Main]: /home/mtxanadu/.minetest/mods/craftguide/init.lua:939: in function </home/mtxanadu/.minetest/mods/craftguide/init.lua:937>
2019-06-29 13:12:52: ERROR[Main]: /usr/share/minetest/builtin/game/register.lua:419: in function </usr/share/minetest/builtin/game/register.lua:399>
This points to this line inside get_tooltip() function:
tooltip = reg_items[item].description
Green wool, magenta wool, and red wool display the correct tooltip but the wrong dye in their recipes. Green wool shows wool + dark green dye, magenta wool shows wool + purple dye, and red wool show wool + pink dye.
How to repro:
/giveme craftguide:book
Apparently the craftguide seemed to have “missed” the fact that you had wooden planks in your inventory.
You could also try this:
/giveme craftguide:book
I wanna bet there are a couple of other situtations how this could happen. :-(
Seems like this particular commit added the code
b2a7f54#diff-d7d74284e2e39f6c06d199c8e2bedbd0R384
This causes a crash in current stable Minetest version 0.4.17.1 when on master
branch of craftguide because minetest.register_on_mods_loaded
is an upcoming 5.0.0 feature.
Blocker: a function to the engine modding API must be added to render nodebox and mesh nodes as flat textures.
The display_api by @pyrollo should be used.
I propose the use of semantic versioning and github tags.
The actual version of craftguide is incompatible with stable version of Minetest (0.4.14) and if someone want compatible version of mod is inconvenient search for commits.
I propose github tags, it's more easy for download, too.
(Note: I use bower and minetest bower to manage my mods. Semantic versioning and github tags will make my life easier, too 😃)
My suggestion isn't create versions tags like Minetest but create own version tags.
Steps to reproduce:
Please also note the progressive selection should be refresheable in case of active search using search button
Could you do a fork or something that has the craft guide in inventory? Maybe below/above the output box on the crafting grid?
In progressive mode, you currently start out with an empty crafting guide, but if you open the craftguide, the error message is not helpful: “no items to show”.
Please add a hint, something like like: “Collect items to reveal more recipes.”. This hint should only be shown if all of these conditions are true:
When I open craftguide, Minetest crash.
2016-12-09 21:33:15: ACTION[Server]: USER uses craftguide:book, pointing at [node under=15,3,-22 above=16,3,-22]
2016-12-09 21:33:15: ERROR[Main]: ServerError: Lua: Runtime error from mod 'craftguide' in callback item_OnUse(): /home/USER/.minetest/mods/craftguide/init.lua:66: attempt to call field 'colorize' (a nil value)
2016-12-09 21:33:15: ERROR[Main]: stack traceback:
2016-12-09 21:33:15: ERROR[Main]: /home/USER/.minetest/mods/craftguide/init.lua:66: in function 'get_formspec'
2016-12-09 21:33:15: ERROR[Main]: /home/USER/.minetest/mods/craftguide/init.lua:234: in function </home/USER/.minetest/mods/craftguide/init.lua:228>
Minetest: 0.4.14 (standard deb installation)
OS: Ubuntu 16.04
There is a digging recipe for stone → cobblestone, but the craftguide ignores digging results for anything else. This does not make sense.
Either the craftguide should show all digging results, or none of them. Anything “in between” is inconsequent and weird.
I suggest to add an API call which I would consider very crucial and important would be “open the crafting guide”. xD
It could look like this:
craftguide.show(selected_item, is_reverse)
→ opens craft guide with the current filter applied.
→ selected_item
: optional param, if set, this item is pre-selected. If the item does not exist or has no recipe, use the player's previous selection. By default, player's previous selection is used
→ is_reverse
: optional param. if true, use reverse crafting mode, if false, use “forwards crafting” mode, if nil, use player's previous selection
In 5.0.0 it is now possible to detect when a player inventory changed:
minetest.register_on_player_inventory_action
Currently, this mod updates the progressive mode discovered items by polling. I request this behaviour to be optimized accordingly.
In Hamlet's Quest mods are stored in subfolders, or modpacks.
In MT v0.4.17 everything was fine, now the craftguide isn't showing the recipes of some mods.
These are: anvil, handholds, breadcrumbs, sounding_line and ropes.
I have tried updating each and every mod's mod.conf, I have tried with the new modpack.conf, eventually I've discovered that moving player_api in the mods' root folder (../minetest/games/game/mods/) helped to show some more recipes (don't ask me why). I have also tried removing the hq_tweaks folder to be sure that no modifications done by me were interfering.
Eventually I tried moving every mod from the modpacks (../minetest/games/game/mods/modpack/) to the mods' root folder (../minetest/games/game/mods/), and the craftguide was correctly showing every recipe.
Until I tried the gravelsieve mod (which I had put in ../minetest/mods/), once again the recipe wasn't being shown.
Have you any idea why this could be possibly happening? I am getting crazy trying to figure where is the issue.
The following shapeless recipe from Minetest Game to craft a “Book With Text” is not shown in the crafting guide:
Book With Text (`default:book_written`) + Book (`default:book`)
This is a spcial recipe to copy the contents of the book with text into the book.
This recipe clearly needs to be shown in the crafting guide.
I also know the reason. In craftguide:get_init_items
, the function filters out items with not_in_creative_inventory=1
. This is the case for “Book With Text”.
I think this check should be removed, but I can also see the intention here: To reduce possible recipe clutter. However, I think there could be a better way to hide certain recipes.
I suggest to replace the check against not_in_creative_inventory
, with not_in_craft_guide
. The new group is already being used by zcg
and craft_guide
and could be defined like this: “Crafting recipes which have this item as a result will not be shown in the crafting guide. The item may still be shown as an ingredient.”
What do you think?
It looks like some of the png files in the textures directory trigger warnings with recent versions of libpng. To fix them, using "mogrify *.png" is enough to fix things.
Trying to start a world with craftguide 0.4.17 on minetest 0.4.17.1 fails:
ERROR[Main]: ModError: Failed to load and run script from /home/cweiske/.minetest/mods/craftguide-0.4.17/init.lua:
ERROR[Main]: /home/cweiske/.minetest/mods/craftguide-0.4.17/init.lua:24: attempt to call field 'get_translator' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: /home/cweiske/.minetest/mods/craftguide-0.4.17/init.lua:24: in main chunk
ERROR[Main]: Siehe debug.txt für Details.
minetest was installed from the Debian package repository (0.4.17.1+repack-1
).
Probably because translations are only available since 0.5.
For progressive mode, I'd like to suggest a convenience function to “reveal” new recipes to a player by API call (as if the player had collected the item).
I also suggest a callback that fires whenever a new recipe is revealed.
Use case:
So for example, mods and games could reveal some basic but crucial “starter” recipes (like wood, torch). And they could reveal groups of items on certain events.
Craftguide v1.8; MT v5.0.1; MTG v5.0.1; OS Debian 10
This happens with the binoculars:
ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'craftguide' in callback on_playerReceiveFields(): .../craftguide/init.lua:621: bad argument #7 to 'fmt' (string expected, got nil)
ERROR[Main]: stack traceback:
ERROR[Main]: [C]: in function 'fmt'
ERROR[Main]: .../craftguide/init.lua:621: in function 'get_recipe_fs'
ERROR[Main]: .../craftguide/init.lua:724: in function 'make_formspec'
ERROR[Main]: .../craftguide/init.lua:734: in function 'show_fs'
ERROR[Main]: .../craftguide/init.lua:1008: in function 'fields'
ERROR[Main]: .../craftguide/init.lua:1041: in function '?'
ERROR[Main]: .../minetest/bin/../builtin/game/register.lua:419: in function <.../minetest/bin/../builtin/game/register.lua:399>
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.