thefox6 / working_villages Goto Github PK
View Code? Open in Web Editor NEWA mod for minetest that adds villagers performing work
Home Page: https://content.minetest.net/packages/theFox/working_villages/
License: MIT License
A mod for minetest that adds villagers performing work
Home Page: https://content.minetest.net/packages/theFox/working_villages/
License: MIT License
Playing with the woodcutter again.
I've observed the woodcutter repeatedly try to move to cut a log that it cannot access. The move to fails (can't find path), but it keeps selecting the log as the best job. There were no other trees around.
To work around this, it would be nice to remember an unreachable log target and exclude it for a while.
This could be done by recording the failed target in a table with the key set to minetest.pos_to_string(pos)
. The value could be the number of minutes to persist. Every minute a cleanup task could run that removes all expired entries.
If that approach were used, the woodcutter would give up after the first failed attempt and do something else for a while.
I've also seen it repeatedly try to plant a sapling in an area that is not allowed. I used the 'areas' mod to protect an area. The woodcutter repeatedly attempted to plant a sapling in the same spot in the protected area.
Modifying is_sapling_spot()
to check for protection fixed half the issue, but we can't reasonably check above the plant spot.
The default.sapling_on_place()
function checks above the tree, but we don't know the exact dimensions of the final tree, so we can't check early. We need to detect that the place failed and remember it and not try again.
None of this needs to or should be permanent. I'm thinking a 3 minute memory is enough. It doesn't have to be specific to any one woodcutter, either.
I have a patch that does this. I'll submit it shortly.
If I start a single player game and give a woodcutter a sapling, it will continue to plant saplings forever.
Expected behavior
Creative mode is really handy for testing working_villagers. I expected the villager to have one less sapling after planting one.
Log
Nothing useful in the log
Desktop
Minetest 5.6.1 (Linux)
As a side note, it is oddly biased to -X.
Fixed by #35
Describe the bug
Crash/shutdown when asking a builder what he does.
To Reproduce
If known, steps to reproduce the behavior:
2019-09-10 17:16:58: ACTION[Main]: Server: Shutting down
The window can only be closed then:
Quit message received.
Expected behavior
A clear and concise description of what you expected to happen.
Screenshots
If applicable, add screenshots to help explain your problem.
Log
-------------
Separator
-------------
2019-09-10 17:16:08: WARNING[Main]: Could not load icon file '/app/share/icons/hicolor/128x128/apps/minetest.png'
2019-09-10 17:16:08: WARNING[Main]: Could not load icon file '/home/game/.local/share/flatpak/app/net.minetest.Minetest/x86_64/stable/26a3834daeb0cc252e4561945048922210512ee69663e421f35c3eaf513b5352/files/bin/../share/minetest/misc/minetest-xorg-icon-128.png'
2019-09-10 17:16:34: ACTION[Main]: [working_villages] loading...
2019-09-10 17:16:34: ACTION[Main]: [working_villages] loaded in 0.0225 s
2019-09-10 17:16:35: ACTION[Main]: World at [/home/game/.minetest/worlds/wvtest]
2019-09-10 17:16:35: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30001.
2019-09-10 17:16:35: WARNING[Main]: Client side scripting is disabled by client.
2019-09-10 17:16:35: ACTION[Server]: OmitPavement [127.0.0.1] joins game.
2019-09-10 17:16:35: ACTION[Server]: OmitPavement joins game. List of players: OmitPavement
2019-09-10 17:16:47: ACTION[Server]: OmitPavement takes working_villages:villager_male_egg from creative inventory
2019-09-10 17:16:49: ACTION[Server]: OmitPavement takes working_villages:villager_female_egg from creative inventory
2019-09-10 17:16:52: ACTION[Server]: OmitPavement uses working_villages:villager_male_egg, pointing at [node under=-4,8,2 above=-4,9,2]
2019-09-10 17:16:54: ACTION[Server]: OmitPavement uses working_villages:villager_female_egg, pointing at [node under=0,8,5 above=0,9,5]
2019-09-10 17:16:56: ACTION[Server]: OmitPavement right-clicks object 2: LuaEntitySAO at (-4,8.5,2)
2019-09-10 17:16:58: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'working_villages' in callback on_playerReceiveFields(): /home/game/.minetest/mods/working_villages/talking.lua:5: attempt to index a nil value
2019-09-10 17:16:58: ERROR[Main]: stack traceback:
2019-09-10 17:16:58: ERROR[Main]: /home/game/.minetest/mods/working_villages/talking.lua:5: in function 'text_constructor'
2019-09-10 17:16:58: ERROR[Main]: /home/game/.minetest/mods/working_villages/forms.lua:186: in function 'constructor'
2019-09-10 17:16:58: ERROR[Main]: /home/game/.minetest/mods/working_villages/forms.lua:48: in function 'show_formspec'
2019-09-10 17:16:58: ERROR[Main]: /home/game/.minetest/mods/working_villages/forms.lua:128: in function 'receiver'
2019-09-10 17:16:58: ERROR[Main]: /home/game/.minetest/mods/working_villages/forms.lua:71: in function </home/game/.minetest/mods/working_villages/forms.lua:66>
2019-09-10 17:16:58: ERROR[Main]: ...52/files/bin/../share/minetest/builtin/game/register.lua:419: in function <...52/files/bin/../share/minetest/builtin/game/register.lua:399>
2019-09-10 17:16:58: ACTION[Server]: OmitPavement leaves game. List of players:
2019-09-10 17:16:58: ACTION[Main]: Server: Shutting down
Desktop (please complete the following information): from Flatpak.
Minetest 5.0.1 (Linux)
Using Irrlicht 1.8.4
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_GETTEXT=1
USE_SOUND=1
USE_CURL=1
USE_FREETYPE=1
USE_LUAJIT=1
STATIC_SHAREDIR="/app/share/minetest"```
- Other mods activated: beds, doors (cannot disable them).
The town hall should handle:
2021-03-09 12:54:43: ACTION[Main]: [working_villages] loading init
2021-03-09 12:54:43: WARNING[Main]: Undeclared global variable "modutil" accessed at .../../mods/working_villages/working_villagers/init.lua:8
2021-03-09 12:54:43: ACTION[Main]: Server: Shutting down
2021-03-09 12:54:44: ERROR[Main]: ModError: Failed to load and run script from /home/minetest/minetest/bin/../mods/working_villages/working_villagers/init.lua:
2021-03-09 12:54:44: ERROR[Main]: /home/minetest/minetest/bin/../mods/working_villages/working_villagers/modutil/portable.lua: No such file or directory
2021-03-09 12:54:44: ERROR[Main]: stack traceback:
2021-03-09 12:54:44: ERROR[Main]: [C]: in function 'dofile'
2021-03-09 12:54:44: ERROR[Main]: .../../mods/working_villages/working_villagers/init.lua:9: in main chunk
Minetest 5.4.0 (Linux)
Using Irrlicht 1.8.4
Using Lua 5.1.5
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=0
USE_SOUND=1
USE_FREETYPE=1
Error causes server to shutdown.
Villagers can't properly walk up a stair. If one stands on the lower step of a stair he won't go up...
"Description"
When a villager is following a path, if it is blocked by a mob fence, then the villager will get to the fence then get stuck repeatedly jumping at the fence.
To Reproduce
Create a MOB FENCE and a villager of type "plant_collector"
Place some plant on both sides of the MOB FENCE.
Activate the villager.
Expected behavior
Villager should collect plants on their side of the MOB FENCE,
then when no more plants on their side of fence, villager should walk round fence, and not try jumping over the MOB FENCE.
Screenshots
N/A
Log
N/A
Desktop (please complete the following information):
Describe the bug
The builder can not complete construction due to the bed_bottom name being changed to bed_foot in the beds mod and door_hidden being removed entirely from the doors mod.
To Reproduce
see description
when the (job) item is removed from the global job_inv and added to the villager's job inv, the item is not removed from the global job_inv. This is probably correct behavior.
when the item is removed from the villager's job inv to the global job_inv, it is duplicated.
the duplicate items are cleared from the global job_inv when the server is restarted.
job_inv.on_put() contains a commented-out line that, when uncommented, fixes the behavior.
--inv:remove_item(listname, stack)
stack:clear()
Minetest v5.6.0
2022-08-06 11:57:31: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'working_villages' in callback luaentity_Step(): ...ds/working_villages/working_villagers/job_coroutines.lua:42: error in job_thread ...ry/Application Support/minetest/mods/sickles/lib/api.lua:69: attempt
2022-08-06 11:57:31: ERROR[Main]: to index local 'itemstack' (a nil value): stack traceback:
2022-08-06 11:57:31: ERROR[Main]: ...ry/Application Support/minetest/mods/sickles/lib/api.lua: in function 'after_dig_node'
2022-08-06 11:57:31: ERROR[Main]: ...ods/working_villages/working_villagers/async_actions.lua:121: in function 'dig'
2022-08-06 11:57:31: ERROR[Main]: ...king_villages/working_villagers/jobs/plant_collector.lua:88: in function <...king_villages/working_villagers/jobs/plant_collector.lua:69>
2022-08-06 11:57:31: ERROR[Main]: stack traceback:
2022-08-06 11:57:31: ERROR[Main]: [C]: in function 'error'
2022-08-06 11:57:31: ERROR[Main]: ...ds/working_villages/working_villagers/job_coroutines.lua:42: in function 'resume'
2022-08-06 11:57:31: ERROR[Main]: ...minetest/mods/working_villages/working_villagers/api.lua:952: in function <...minetest/mods/working_villages/working_villagers/api.lua:937>
A villager spawned in my farm. Server crashes after it starts digging wheat.
Describe the bug
The second kind of sign the build marker when placed or right-clicked crashes the game.
Describe the bug
Villager can not jump on Block with snow on it.
To Reproduce
0. Generate word with snow (like Seed 6422333087495876490, V7 generator)
Expected behavior
Ignore snow and just jump on it.
Desktop (please complete the following information):
Describe the bug
Same as title. Can't set bed position using coordinates or near commands
To Reproduce
If known, steps to reproduce the behavior:
Right click on villager using villager staff
Set coordinates in any slot that uses them or enter near in the slots
Coordinates or the word 'near' disappears and does not get set
Expected behavior
The chest/bed/storage/etc to be set
Screenshots
n/a
Log
Nothing indicated in log at all, not an error just a bug.
I have used coordinates both by themselves and put into ( ) but nothing is able to be set making villager useless
Desktop (please complete the following information):
minetest --version
to find it.]Additional context
Add any other context about the problem here.
Villagers should be able to give the user information about the village they live in.
The user should be able to ask questions about where for example the blacksmith can be found.
Whenever I try to open up the world, it says that there's an "unexpected symbol near (character)". I've attatched the debug file for my game to try and show you what happened
debug.txt
Is your feature request related to a problem? Please describe.
The pathfinding is rather limited and can't venture into unknown regions or to faraway goals.
Also the A* algorithm is not quite optimized for changing paths and needs to be recalculated every time.
Describe the solution you'd like
A continuously planning and quick updating algorithm like D*-lite could be used instead of the A*.
Describe alternatives you've considered
The pathfinder works so far and could also be improved, by just walking to the best node found so far.
However that does not guarantee finding the actual path.
Describe the bug
All the houses are suspended above the ground. A part of the garden seems to be under the bottom of the house. I guess it may be related to the unevenness of the ground, but I am not sure it was uneven everywhere (cannot check right now because I downgraded Minetest and a mod won't load).
One house seemed to have a slit going into the bottom instead of a door in a wall.
Information
Sorry about everything being as in #5 for now.
This mod reqired (modpath)/modutil/portable.lua, but there have no modutil directory!
Similar to how some formspec options allow us to use near
to get a reasonable value for the fields, there should be an option to generate the villager's name using the getname
mod if it is present.
I would also like to see more variety in the textures/models used for villagers. I tried ripping the assets from mobs_npc, but they didn't display right.
2021-03-13 15:04:04: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'working_villages' in callback luaentity_Step(): ...orking_villages/working_villagers/job_coroutines.lua:42: error in job_thread ...rking_villages/working_villagers/modutil/logging.lua:11
2021-03-13 15:04:04: ERROR[Main]: : bad argument #2 to 'format' (string expected, got userdata)
2021-03-13 15:04:04: ERROR[Main]: stack traceback:
2021-03-13 15:04:04: ERROR[Main]: [C]: in function 'error'
2021-03-13 15:04:04: ERROR[Main]: ...orking_villages/working_villagers/job_coroutines.lua:42: in function 'resume'
2021-03-13 15:04:04: ERROR[Main]: ...n/../mods/working_villages/working_villagers/api.lua:929: in function <...n/../mods/working_villages/working_villagers/api.lua:914>
Minetest 5.4.0 (Linux)
Using Irrlicht 1.8.4
Using Lua 5.1.5
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=0
USE_SOUND=1
USE_FREETYPE=1
Error causes server to shutdown.
Describe the bug
When a woodcutter places a sapling, the default game tries to log_player_action(), but player is nil.
To Reproduce
Create a villager. Set the job to woodcutter. Toss it a sapling. Woodcutter places it. Crash.
Expected behavior
The woodcutter places the sapling.
Log
2022-10-07 16:41:54: [Main]: Automatically selecting world at [/home/user/.minetest/worlds/test]
2022-10-07 16:41:56: ACTION[Main]: [MOD] Animalia [0.4] loaded
2022-10-07 16:41:56: WARNING[Main]: Not registering alias, item with same name is already defined: mushroom:brown_natural -> flowers:mushroom_fertile_brown
2022-10-07 16:41:56: WARNING[Main]: Not registering alias, item with same name is already defined: mushroom:red_natural -> flowers:mushroom_fertile_red
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loading init
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loading modutil portable
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loading logging
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loaded logging
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loading LuaVenusCompiler
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loaded LuaVenusCompiler
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loading local_require
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loaded local_require
2022-10-07 16:41:56: ACTION[Main]: [working_villages] setting modutil global
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loaded portable
2022-10-07 16:41:56: ACTION[Main]: [working_villages] loaded init in 0.0188 s
2022-10-07 16:41:56: ACTION[Main]: [building_sign] loading...
2022-10-07 16:41:57: ACTION[Main]: [building_sign] loaded init in 0.0070 s
2022-10-07 16:41:57: ACTION[Main]: World at [/home/user/.minetest/worlds/test]
2022-10-07 16:41:57: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:56271.
2022-10-07 16:41:58: WARNING[Main]: Texture "youngtree2branch.png" of youngtrees:youngtree2_middle has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: This warning can be a false-positive if unused pixels in the texture are transparent. However if it is meant to be transparent, you *MUST* update the nodedef and set use_texture_alpha = "clip"! This compatibility code will be removed in a few releases.
2022-10-07 16:41:58: WARNING[Main]: Texture "molehills_dirt.png" of molehills:molehill has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "ferns_fern_trunk_top.png" of ferns:fern_trunk has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "ferns_tree_fern_leave_big_end.png" of ferns:tree_fern_leave_big_end has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "ferns_fern_trunk_big_top.png^ferns_tree_fern_leave_big_cross.png" of ferns:fern_trunk_big_top has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "ferns_fern_trunk_big_top.png" of ferns:fern_trunk_big has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "bushes_leaves_1.png" of bushes:bushbranches1 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "bushes_leaves_2.png" of bushes:bushbranches3 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "bushes_leaves_1.png" of bushes:bushbranches2 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "bushes_leaves_2.png" of bushes:bushbranches4 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_1.png" of trunks:twig_1 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_2.png" of trunks:twig_2 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_3.png" of trunks:twig_3 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_4.png" of trunks:twig_4 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_5.png" of trunks:twig_5 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_7.png" of trunks:twig_7 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_8.png" of trunks:twig_8 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_9.png" of trunks:twig_9 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_10.png" of trunks:twig_10 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_11.png" of trunks:twig_11 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_12.png" of trunks:twig_12 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_twig_13.png" of trunks:twig_13 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss.png" of trunks:moss_plain_0 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss_fungus.png" of trunks:moss_with_fungus_0 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss.png^[transformR90" of trunks:moss_plain_1 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss_fungus.png^[transformR90" of trunks:moss_with_fungus_1 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss.png^[transformR180" of trunks:moss_plain_2 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss_fungus.png^[transformR180" of trunks:moss_with_fungus_2 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss.png^[transformR270" of trunks:moss_plain_3 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "trunks_moss_fungus.png^[transformR270" of trunks:moss_with_fungus_3 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "default_tree.png^trunks_root_mask.png^[makealpha:0,0,0" of trunks:treeroot has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "default_jungletree.png^trunks_root_mask.png^[makealpha:0,0,0" of trunks:jungletreeroot has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "default_pine_tree.png^trunks_root_mask.png^[makealpha:0,0,0" of trunks:pine_treeroot has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "animalia_nest.png" of animalia:nest_song_bird has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily.png" of flowers:waterlily has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "default_sign_wall_wood.png" of working_villages:building_marker has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "default_sign_wall_wood.png" of building_sign:building_marker has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_22.5.png" of flowers:waterlily_225 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_45.png" of flowers:waterlily_45 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_67.5.png" of flowers:waterlily_675 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_small_1.png" of flowers:waterlily_s1 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_small_2.png" of flowers:waterlily_s2 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_small_3.png" of flowers:waterlily_s3 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_waterlily_small_4.png" of flowers:waterlily_s4 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_sunflower.png" of flowers:sunflower has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_seaweed.png" of flowers:seaweed has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_seaweed_2.png" of flowers:seaweed_2 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_seaweed_3.png" of flowers:seaweed_3 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "flowers_seaweed_4.png" of flowers:seaweed_4 has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "dryplants_grass.png" of dryplants:grass has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: WARNING[Main]: Texture "dryplants_hay.png" of dryplants:hay has transparency, assuming use_texture_alpha = "clip".
2022-10-07 16:41:58: ACTION[Server]: singleplayer [127.0.0.1] joins game. List of players: singleplayer
2022-10-07 16:42:01: ERROR[Main]: ServerError: AsyncErr: Lua: Runtime error from mod 'default' in callback luaentity_Step(): ...ds/working_villages/working_villagers/job_coroutines.lua:42: error in job_thread Runtime error from mod 'default' in callback item_OnPlace(): .../minetest/games/m
2022-10-07 16:42:01: ERROR[Main]: inetest_game/mods/default/functions.lua:730: attempt to index local 'player' (a nil value)
2022-10-07 16:42:01: ERROR[Main]: stack traceback:
2022-10-07 16:42:01: ERROR[Main]: .../minetest/games/minetest_game/mods/default/functions.lua:730: in function 'log_player_action'
2022-10-07 16:42:01: ERROR[Main]: ...hare/minetest/games/minetest_game/mods/default/trees.lua:575: in function 'sapling_on_place'
2022-10-07 16:42:01: ERROR[Main]: ...hare/minetest/games/minetest_game/mods/default/nodes.lua:734: in function <...hare/minetest/games/minetest_game/mods/default/nodes.lua:733>
2022-10-07 16:42:01: ERROR[Main]: [C]: in function 'resume'
2022-10-07 16:42:01: ERROR[Main]: ...ds/working_villages/working_villagers/job_coroutines.lua:35: in function 'resume'
2022-10-07 16:42:01: ERROR[Main]: ...minetest/mods/working_villages/working_villagers/api.lua:952: in function <...minetest/mods/working_villages/working_villagers/api.lua:937>: stack traceback:
2022-10-07 16:42:01: ERROR[Main]: [C]: in function 'place_node'
2022-10-07 16:42:01: ERROR[Main]: ...ods/working_villages/working_villagers/async_actions.lua:223: in function 'place'
2022-10-07 16:42:01: ERROR[Main]: ...s/working_villages/working_villagers/jobs/woodcutter.lua:63: in function <...s/working_villages/working_villagers/jobs/woodcutter.lua:43>
2022-10-07 16:42:01: ERROR[Main]: stack traceback:
2022-10-07 16:42:01: ERROR[Main]: [C]: in function 'error'
2022-10-07 16:42:01: ERROR[Main]: ...ds/working_villages/working_villagers/job_coroutines.lua:42: in function 'resume'
2022-10-07 16:42:01: ERROR[Main]: ...minetest/mods/working_villages/working_villagers/api.lua:952: in function <...minetest/mods/working_villages/working_villagers/api.lua:937>
2022-10-07 16:42:01: ACTION[Server]: singleplayer leaves game. List of players:
2022-10-07 16:42:02: ACTION[Main]: Server: Shutting down
Desktop (please complete the following information):
Minetest 5.6.1 (Linux)
Using Irrlicht 1.9.0mt8
Using LuaJIT 2.1.0-beta3
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_CURL=1
USE_GETTEXT=1
USE_SOUND=1
STATIC_SHAREDIR="/usr/share/minetest"
STATIC_LOCALEDIR="/usr/share/locale"
Mods activated:
animalia
anvil
biome_lib
bonemeal
creatura
mesecons
mobkit
mobs
mobs_npc
moreores
plantlife_modpack
working_villages
worldedit
Function that crashes (in default/functions.lua)
function default.log_player_action(player, ...)
local msg = player:get_player_name()
if player.is_fake_player or not player:is_player() then
if not log_non_player_actions then
return
end
msg = msg .. "(" .. (type(player.is_fake_player) == "string"
and player.is_fake_player or "*") .. ")"
end
for _, v in ipairs({...}) do
-- translate pos
local part = is_pos(v) and minetest.pos_to_string(v) or v
-- no leading spaces before punctuation marks
msg = msg .. (string.match(part, "^[;,.]") and "" or " ") .. part
end
minetest.log("action", msg)
end
This is probably a bug in the Minetest default game. But maybe there is a way to provide a fake player.
Describe the bug
Game won't load.
To Reproduce
At Startup
Log
ModError: Failed to load and run script from C:\Users\Frank\Downloads\Games\minetest-5.3.0-win64\bin..\mods\working_villages\building_sign\init.lua:
...in64\bin..\mods\working_villages\building_sign/util.lua:1: attempt to call field 'make_loggers' (a nil value)
stack traceback:
...in64\bin..\mods\working_villages\building_sign/util.lua:1: in main chunk
[C]: in function 'dofile'
...in64\bin..\mods\working_villages\building_sign\init.lua:16: in main chunk
Check debug.txt for details.
Desktop (please complete the following information):
Additional context
That's a bummer.
Describe the bug
Not sure if it's a bug or not
I often get this error pop up in my chat area when WV is active:
ERROR[Server]: [working_villages] error in job_thread D:\Games\Minetest\bin..\mods\leads/internal.lua:40: attempt to call method 'get_player_control' (a nil value): stack traceback:
D:\Games\Minetest\bin..\mods\leads/internal.lua: in function 'on_place'
...ods\working_villages\working_villagers/async_actions.lua:233: in function 'place'
...s\working_villages\working_villagers/jobs/woodcutter.lua:90: in function <...s\working_villages\working_villagers/jobs/woodcutter.lua:69>
I'm not sure if this is a bug or just a simple glitch. It doesn't stop the game or anything and the NPCs still do their job so I'm not understanding this one.
Describe the bug
on_construct() in building_marker calls areas.check_existing(), but that function does not exist.
To Reproduce
If known, steps to reproduce the behavior:
Expected behavior
The marker should place successfully in the world.
2021-09-06 16:35:40: ERROR[Main]: [vector_extras] vector.cross already exists.
2021-09-06 16:35:40: ACTION[Main]: hb.register_hudbar: health
2021-09-06 16:35:40: ACTION[Main]: hb.register_hudbar: breath
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loading init
2021-09-06 16:35:40: WARNING[Main]: Undeclared global variable "modutil" accessed at ...\bin..\mods\working_villages\working_villagers\init.lua:8
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loading modutil portable
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loading logging
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loaded logging
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loading LuaVenusCompiler
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loaded LuaVenusCompiler
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loading local_require
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loaded local_require
2021-09-06 16:35:40: ACTION[Main]: [working_villages] setting modutil global
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loaded portable
2021-09-06 16:35:40: ACTION[Main]: [working_villages] loaded init in 0.0250 s
2021-09-06 16:35:40: ACTION[Main]: [building_sign] loading...
2021-09-06 16:35:40: ACTION[Main]: [building_sign] loaded init in 0.0100 s
2021-09-06 16:35:40: WARNING[Main]: ^[(T@3d_armor_ui)3d_armor_ui: Mod loaded but unused.^[E
2021-09-06 16:35:40: WARNING[Main]: ^[(T@3d_armor_ip)3d_armor_ip: Mod loaded but unused.^[E
2021-09-06 16:35:40: ACTION[Main]: [MOD]moreblocks: recipe for carts:brakerail production: 18 => 27
2021-09-06 16:35:40: ACTION[Main]: [MOD]moreblocks: recipe for carts:powerrail production: 18 => 27
2021-09-06 16:35:40: ACTION[Main]: [MOD]moreblocks: recipe for default:paper production: 1 => 4
2021-09-06 16:35:40: ACTION[Main]: [MOD]moreblocks: recipe for default:sign_wall_wood production: 3 => 4
2021-09-06 16:35:40: ACTION[Main]: [MOD]moreblocks: recipe for default:sign_wall_steel production: 3 => 4
2021-09-06 16:35:41: ACTION[Main]: [MOD]moreblocks: recipe for carts:rail production: 18 => 27
2021-09-06 16:35:41: ACTION[Main]: ---- Dark Age Version 1.3 is Loading! ----
2021-09-06 16:35:41: ACTION[Main]: [MOD] Mobs Redo loaded
2021-09-06 16:35:41: ACTION[Main]: hb.register_hudbar: satiation
2021-09-06 16:35:42: ACTION[Main]: World at [C:\local\minetest\minetest-5.2.0-win64\worlds\World19]
2021-09-06 16:35:42: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:37719.
2021-09-06 16:35:51: ACTION[Server]: Josephus [127.0.0.1] joins game. List of players: Josephus
2021-09-06 16:35:53: ACTION[Server]: Josephus places node building_sign:building_marker at (3880,5,-2128)
2021-09-06 16:35:53: ERROR[Main]: Access denied. Reason: This server has experienced an internal error. You will now be disconnected.
2021-09-06 16:35:53: ACTION[Main]: Server: Shutting down
2021-09-06 16:35:53: ACTION[Server]: Josephus leaves game. List of players:
2021-09-06 16:35:54: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'building_sign' in callback item_OnPlace(): Runtime error from mod 'building_sign' in callback node_on_construct(): ...in64\bin..\mods\working_villages\building_sign\init.lua:62: attempt
2021-09-06 16:35:54: ERROR[Main]: to call field 'check_existing' (a nil value)
2021-09-06 16:35:54: ERROR[Main]: stack traceback:
2021-09-06 16:35:54: ERROR[Main]: ...in64\bin..\mods\working_villages\building_sign\init.lua:62: in function <...in64\bin..\mods\working_villages\building_sign\init.lua:60>
2021-09-06 16:35:54: ERROR[Main]: [C]: in function 'add_node'
2021-09-06 16:35:54: ERROR[Main]: ...netest\minetest-5.2.0-win64\bin..\builtin\game\item.lua:368: in function <...netest\minetest-5.2.0-win64\bin..\builtin\game\item.lua:258>
2021-09-06 16:35:54: ERROR[Main]: stack traceback:
2021-09-06 16:35:54: ERROR[Main]: [C]: in function 'add_node'
2021-09-06 16:35:54: ERROR[Main]: ...netest\minetest-5.2.0-win64\bin..\builtin\game\item.lua:368: in function <...netest\minetest-5.2.0-win64\bin..\builtin\game\item.lua:258>
Desktop (please complete the following information):
Additional context
This is using the current master branch, b99842a
There are a few mods that work on the same basic principle as flying ships
: they move nodes, including their metadata.
I want to put a village aboard a ship. The villagers are currently somewhat-functional aboard such a teleportation apparatus.
Progress on #4 will hopefully lay some of the groundwork to fully support this feature. We need a centralized registry of villages. And villagers must be able to be registered as members of particular villages. That should expose enough of an API so that other mods, such as a flying ships
redo could update the location of the village, and iterate the members of the village, updating their pos_data. Alternatively/ideally, we would expose a relocate() function in this API.
I've added some PoCs (gardener
and wizard
) who use items as the player would. I want to extend this feature so that other bots (woodcutter
, miner
, landscaper
, and snow clearer
) use their wield items to :dig()
. Since tool use will be cross-cutting, affecting multiple AIs, the logic should probably go in async_functions.lua
, and should handle cycling worn items before breakage (see #24)
Better fake_player emulation should make it easier and more seamless/transparent to integrate with various tools, appliances, etc., as well as laying the groundwork for us to support hb mods like mana, hunger, a pooper redo, etc. We may be able to get hbhunger poison effects automatically if we can fix :is_player()
Create a miner who travels deep underground to search for ores. The challenge here will be that, naively, the miner will not be active underground unless the player goes along.
Villagers get stuck sometimes.
I think the problem here is with our get neighbor ground level function. The ground is walkable, but there's not enough headroom.
little drop-offs can trap AIs
Stairs quirk: villagers get stuck unless approaching raised doorway head-on
They don't share a space well.
Wandering villagers tend to fall into crevices.
I've started experimenting with pathfinding logic in my hider
villager job, and so far my attempts are no better.
This is further complicated by that some AIs should "use" crevices for strategic advantage.
This is a basement lobby trap in a unit testing facility. I want to make amphibious guards who will hide on the water-floor until triggered by the presence of a player, at which point the player has no idea the number or direction of guards surrounding him. There are also villagers (in secure laboratories) and normal guards on that floor who need to not fall into the water.
It would be nice to handle ladders...
...and trapdoors
Describe the bug
Various deprecated warnings reported in debug.txt when using mod in Minetest 5.7.0
These functions:
setvelocity(), getvelocity(),
setyaw(), getyaw(),
setacceleration()
To Reproduce
Use mod in Minetest 5.7.0, then review the debug.txt log file located in the Minetest executable directory.
Expected behavior
Should not be using deprecated functions, so should not get warnings.
Screenshots
N/A
Log
N/A
Desktop (please complete the following information):
Additional context
N/A
Firstly, how are the jobs crafted? In jobs/empty, it says they're created by writing on the empty job... how does one write on the empty job?
TODO
This issue was reported for Alive AI:
Describe the bug
Sometimes I am suddenly in the complete dark (blackness), and moving doesn't help. Actually, moving more does help: the problem is that a house has appeared where I am!
Desktop (please complete the following information):
Minetest version: - 5.0.1 in Debian (I suppose it was package 5.0.1+repack-2~bpo10+1).
Additional context
I uninstalled the mod for now, as it was annoying and filled the space with all the poorly placed houses. I also uninstalled some other mods and downgraded Minetest.
Describe alternatives you've considered
I would like to see the ability to use schematics from Handle Schematics as an alternative to World Edit.
Saving and loading schems from this mod is easier and more reliable than world edit for handling schematics. Plus H-S doesn't have overlapping text in the notification area as with World edit.
Additional context
Add any other context eg. screenshots about the feature request here.
If a woodcutter is moving to plant a sapling when it is time for sleep and there are no beds, it will SIT and continue to slide across the ground.
There is a missing self.object:set_velocity{x = 0, y = 0, z = 0}
around self:set_animation(working_villages.animation_frames.SIT)
.
To Reproduce
Expected behavior
It should stop moving when it sits down.
Screenshots
A screenshot wouldn't help.
Log
No logs are generated for this.
Desktop
Minetest 5.6.1 (Linux)
Using the master branch of working_villagers
MineTest 5.4.1
ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'working_villages' in callback luaentity_Step(): ...ds\working_villages\working_villagers/job_coroutines.lua:42: error in job_thread ...mods\working_villages\working_villagers/jobs/builde
2021-08-02 11:47:11: ERROR[Main]: r.lua:41: attempt to get length of field 'nodedata' (a nil value)
2021-08-02 11:47:11: ERROR[Main]: stack traceback:
2021-08-02 11:47:11: ERROR[Main]: [C]: in function 'error'
2021-08-02 11:47:11: ERROR[Main]: ...ds\working_villages\working_villagers/job_coroutines.lua:42: in function 'resume'
2021-08-02 11:47:11: ERROR[Main]: ...4\bin..\mods\working_villages\working_villagers/api.lua:929: in function <...4\bin..\mods\working_villages\working_villagers/api.lua:914>
The pathfinder fails to check clearance when computing a path that includes a jump.
The result is that it creates an invalid solution.
Here is an ASCII illustration of the side-view. s=start, d=destination.
XXXZ
d
s XXX
XXXXXXX
The villager can stand on any node on the path between S and D, but there is a jump that requires a clear spot above the node before the ledge. The 'Z' node is blocking the jump.
I discovered this when I tossed down a sapling and there was tree leaves blocking the path.
It looks like there is an unused function named check_clearance()
in pathfiinder.lua
that was intended to handle this.
Describe the solution you'd like
I expected the path to go left or right a bit and then hop up on the ledge.
Describe alternatives you've considered
The simple fix would be to fix pathfinder.lua to use something like check_clearance()
if the neighbor move requires a jump.
Minetest has a built-in pathfinder that appears to handle this situation. But it doesn't do diagonals, have the ability to climb/descend a ladder, or handle water, so I don't consider it usable as-is. Quite a pity, because pathfinding is something that should/could be handled in C++ for performance reasons.
Another option is to rebase workiing_villager on top of a different module that handles all the low-level movement.
I've looked at mobkit and creatura. Both handle pathfinding and basic functions and have decent "AI" hooks.
Additional context
I didn't take a screenshot of the original problem, but I was able to reproduce it easy enough with cobblestone instead of tree leaves.
In the screenshot, a woodcutter is trying to reach a sapling.
Courier/Burglar:
Trash Collector:
Blacksmith:
Excavator:
Pioneer:
Merchant:
Manager:
City planner:
Catching-throwing:
Hide & seek:
Hide & shoot:
Flanker:
Hide & attack:
Trapper:
Rangers:
Tank:
Healer:
Resurrector:
Pathmaker:
Demolition:
Captain / pilot:
Describe the bug
Minetest crashes and won't restart when changing a new NPC's profession to a guard.
To Reproduce
Log
-------------
Separator
-------------
2019-09-10 17:41:22: WARNING[Main]: Could not load icon file '/app/share/icons/hicolor/128x128/apps/minetest.png'
2019-09-10 17:41:22: WARNING[Main]: Could not load icon file '/home/game/.local/share/flatpak/app/net.minetest.Minetest/x86_64/stable/26a3834daeb0cc252e4561945048922210512ee69663e421f35c3eaf513b5352/files/bin/../share/minetest/misc/minetest-xorg-icon-128.png'
2019-09-10 17:41:39: ACTION[Main]: [working_villages] loading...
2019-09-10 17:41:39: ACTION[Main]: [working_villages] loaded in 0.0178 s
2019-09-10 17:41:39: ACTION[Main]: World at [/home/game/.minetest/worlds/makeguard]
2019-09-10 17:41:39: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30001.
2019-09-10 17:41:40: WARNING[Main]: Client side scripting is disabled by client.
2019-09-10 17:41:40: ACTION[Server]: OmitPavement [127.0.0.1] joins game.
2019-09-10 17:41:40: ACTION[Server]: OmitPavement joins game. List of players: OmitPavement
2019-09-10 17:41:48: ACTION[Main]: Server: Shutting down
2019-09-10 17:42:18: ACTION[Main]: [working_villages] loading...
2019-09-10 17:42:18: ACTION[Main]: [working_villages] loaded in 0.0179 s
2019-09-10 17:42:18: ACTION[Main]: World at [/home/game/.minetest/worlds/wvmakeguard]
2019-09-10 17:42:18: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30001.
2019-09-10 17:42:18: WARNING[Main]: Client side scripting is disabled by client.
2019-09-10 17:42:18: ACTION[Server]: OmitPavement [127.0.0.1] joins game.
2019-09-10 17:42:18: ACTION[Server]: OmitPavement joins game. List of players: OmitPavement
2019-09-10 17:43:14: ACTION[Server]: OmitPavement takes working_villages:commanding_sceptre from creative inventory
2019-09-10 17:43:14: ACTION[Server]: OmitPavement takes working_villages:villager_female_egg from creative inventory
2019-09-10 17:43:17: ACTION[Server]: OmitPavement uses working_villages:villager_female_egg, pointing at [node under=50,9,291 above=50,10,291]
2019-09-10 17:43:19: ACTION[Server]: OmitPavement right-clicks object 2: LuaEntitySAO at (50,8.5,291)
2019-09-10 17:43:24: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'working_villages' in callback luaentity_Step(): /home/game/.minetest/mods/working_villages/api.lua:902: error in job_thread /home/game/.minetest/mods/working_villages/util.lua:6: attempt
2019-09-10 17:43:24: ERROR[Main]: to call method 'format' (a nil value)
2019-09-10 17:43:24: ERROR[Main]: stack traceback:
2019-09-10 17:43:24: ERROR[Main]: [C]: in function 'error'
2019-09-10 17:43:24: ERROR[Main]: /home/game/.minetest/mods/working_villages/api.lua:902: in function </home/game/.minetest/mods/working_villages/api.lua:860>
2019-09-10 17:43:24: ACTION[Server]: OmitPavement leaves game. List of players:
2019-09-10 17:43:24: ACTION[Main]: Server: Shutting down
After restart:
-------------
Separator
-------------
2019-09-10 17:47:13: WARNING[Main]: Could not load icon file '/app/share/icons/hicolor/128x128/apps/minetest.png'
2019-09-10 17:47:13: WARNING[Main]: Could not load icon file '/home/game/.local/share/flatpak/app/net.minetest.Minetest/x86_64/stable/26a3834daeb0cc252e4561945048922210512ee69663e421f35c3eaf513b5352/files/bin/../share/minetest/misc/minetest-xorg-icon-128.png'
2019-09-10 17:47:16: ACTION[Main]: [working_villages] loading...
2019-09-10 17:47:16: ACTION[Main]: [working_villages] loaded in 0.0184 s
2019-09-10 17:47:16: ACTION[Main]: World at [/home/game/.minetest/worlds/wvmakeguard]
2019-09-10 17:47:16: ACTION[Main]: Server for gameid="minetest" listening on 0.0.0.0:30001.
2019-09-10 17:47:17: ACTION[Server]: OmitPavement [127.0.0.1] joins game.
2019-09-10 17:47:17: ACTION[Server]: OmitPavement joins game. List of players: OmitPavement
2019-09-10 17:47:17: WARNING[Main]: Client side scripting is disabled by client.
2019-09-10 17:47:20: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'working_villages' in callback luaentity_Step(): /home/game/.minetest/mods/working_villages/api.lua:902: error in job_thread /home/game/.minetest/mods/working_villages/util.lua:6: attempt
2019-09-10 17:47:20: ERROR[Main]: to call method 'format' (a nil value)
2019-09-10 17:47:20: ERROR[Main]: stack traceback:
2019-09-10 17:47:20: ERROR[Main]: [C]: in function 'error'
2019-09-10 17:47:20: ERROR[Main]: /home/game/.minetest/mods/working_villages/api.lua:902: in function </home/game/.minetest/mods/working_villages/api.lua:860>
2019-09-10 17:47:20: ACTION[Main]: Server: Shutting down
Desktop (please complete the following information):
Minetest 5.0.1 (Linux)
Using Irrlicht 1.8.4
BUILD_TYPE=Release
RUN_IN_PLACE=0
USE_GETTEXT=1
USE_SOUND=1
USE_CURL=1
USE_FREETYPE=1
USE_LUAJIT=1
STATIC_SHAREDIR="/app/share/minetest"```
The other village mods have a nice selection of schematics. Ours is quite limited.
TODO
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.