Page 7 of 7

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Fri Jul 27, 2018 09:27
by daddaaddaaad
Sokomine wrote: Maybe they don't want to freeze their feet ,-)
You're probably right :D

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Mon Dec 03, 2018 00:31
by Diamond knight
Is this mod still being developed? I would hate to see one of the few quality villager mods die.

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Fri Feb 01, 2019 15:04
by trungus
Hi Guy

I first place I want to thanks to ErrorNull, this mod is great! I'm testing it for a small home server and I like it a lot.
I have a question, anybody knows any way to lower the quantity of villagers?, the machine used as a server is quite old so if I have too many entities the lag rise up fast.
So far I check the code of villagers and villages looking for a way to do it, without success, I only understand that villagers come to live with a kind of spawner but I couldn't find any that register it o control it.
Mi machine run on a bare Debian Stretch, 1GB Ram with a compiled version of Minetest 0.4.17.1 with LuaJit.

Best Regards and Thank you in advance.
Trungus

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Sat Feb 02, 2019 16:09
by ErrorNull
hey guys, thanks for the kind words. it's been a while for sure.. and glad to see my mod is still being poked and prodded around here. i've just been busy with real life stuff. since it appears there's still mild interest in this mod, i'll plan to continue improving my villagers mod soon.
trungus wrote:I have a question, anybody knows any way to lower the quantity of villagers?, the machine used as a server is quite old so if I have too many entities the lag rise up fast. So far I check the code of villagers and villages looking for a way to do it, without success, I only understand that villagers come to live with a kind of spawner but I couldn't find any that register it o control it.
Trungus

the quantity of villagers is automatically determined by Sokomine's villages mod, in which a predetermined number of beds are installed within each spawned building. The quantity of my villagers simply matches the number of beds. i could possibly introduce an option that reduce the 100% bed-correspondence to say 80% or 50%. I'll look into it once i jump back into this...

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Sun Feb 03, 2019 12:43
by trungus
ErrorNull wrote:hey guys, thanks for the kind words. it's been a while for sure.. and glad to see my mod is still being poked and prodded around here. i've just been busy with real life stuff. since it appears there's still mild interest in this mod, i'll plan to continue improving my villagers mod soon.
trungus wrote:I have a question, anybody knows any way to lower the quantity of villagers?, the machine used as a server is quite old so if I have too many entities the lag rise up fast. So far I check the code of villagers and villages looking for a way to do it, without success, I only understand that villagers come to live with a kind of spawner but I couldn't find any that register it o control it.
Trungus

the quantity of villagers is automatically determined by Sokomine's villages mod, in which a predetermined number of beds are installed within each spawned building. The quantity of my villagers simply matches the number of beds. i could possibly introduce an option that reduce the 100% bed-correspondence to say 80% or 50%. I'll look into it once i jump back into this...
You are joking? ... your work is great, I fly around the village and I can see plenty of life if the server, if you found some way to help me to reduce the numbers of villagers, will be great.

About "real life stuff", I know exactly what you say, this is the third time that I working with my childs to assembly a server, is not easy man, I hope your life should be a bit easiers now, we need a time for fun, just fot the sake of the fun.

Best Regards and Thanks again

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Thu May 16, 2019 15:17
by Meaty
Hello and thank you for the awesome mod!

I have, perhaps silly, question: when I enable only mg_villlages, handle_schematics, and villagers on 5.0.1, all works fine except the fact that villagers do not move. They stand still near the buildings, turn around every 3-4 seconds but does not walk. The /villagers list shows Walked 0 for each of them. All mods are taken from the GitHub and have the latest versions.
Is there any way to debug such behavior? What sort of logs should I check in order to troubleshoot that?
Thanks!

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Thu May 16, 2019 15:25
by ErrorNull
Meaty wrote:Hello and thank you for the awesome mod!

I have, perhaps silly, question: when I enable only mg_villlages, handle_schematics, and villagers on 5.0.1, all works fine except the fact that villagers do not move. They stand still near the buildings, turn around every 3-4 seconds but does not walk. The /villagers list shows Walked 0 for each of them. All mods are taken from the GitHub and have the latest versions.
Is there any way to debug such behavior? What sort of logs should I check in order to troubleshoot that?
Thanks!

Hi Meaty,

I would look into the 'functions.lua' and 'actions.lua' as this is where i defined the code the villager movement. i haven't looked into my code for a while, but suspect that with the latest minetest version, may have something to do with how villagers are [failing] verifying if a node in front of them is clear or not for walking forward. hope that helps.

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Sat Dec 14, 2019 12:32
by MyordasMineTest
Can you add marrying/loving a villager?

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Sat Mar 28, 2020 17:15
by MattCommish
Hi!
I am a teacher running a class for elementary school kids in Minetest. I am not very tech savvy. I have installed your villagers mod. For the curriculum I am trying to do, I'd like to try to spawn villagers in towns that the kids are designing and building? Is that possible to do? If you could let me know how, it would be a huge help!
Thanks so much,
Matt

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Mon Apr 13, 2020 04:44
by Devy
MattCommish wrote:Hi!
I am a teacher running a class for elementary school kids in Minetest. I am not very tech savvy. I have installed your villagers mod. For the curriculum I am trying to do, I'd like to try to spawn villagers in towns that the kids are designing and building? Is that possible to do? If you could let me know how, it would be a huge help!
Thanks so much,
Matt
Hi, I looked at the Github here: https://github.com/ErrorNull0/villagers ... s.lua#L150 and doing

Code: Select all

/villagers list
should do something. I have not tested it.

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Thu Nov 12, 2020 09:49
by WyomingWill
Does Villagers work for the newer Minetests like Version 5.3?
I've included only the mods: cottages, handle_schematics, mg_villages, and villagers.

The villagers appear, but they only "turn" and "stand". They do converse and
one can trade with them.

But they do not walk around or budge from their initial spots.

The code appears to imply that they CAN walk around, but I'm unable to get
that behavior no matter what I do to modify the code. Sometimes I've been able
to get a little "leg jitter" from the traders, but that's it.

I found the following video, which indicates that the villagers could walk in the past?

https://www.youtube.com/watch?v=Q7RXlWu3IrA

I do see that "Meaty" asked about this in 2019. Has there been any resolution? If not, I'll poke around some more.

This is a really terrific mod and I appreciate all the work you have done with it. I'm going to introduce this to my grandson this weekend. ;-)

Thanks, Bill

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Wed Dec 23, 2020 21:34
by Hagrid669
It's really a very, very good mod for villagers in mg_village. Unfortunately, with recent minetest updates somethings should have changed (I think) about how position and collision box are determined, and so villagers no longer move themselves from site.
As suggested by the author I'm going to look, as soon as I can, into the 'functions.lua' and 'actions.lua' where the movement code is defined. The suspect that may have something to do with how villagers are [failing] verifying if a node in front of them is clear helped me a lot: if I clear one block below NPC feet they start moving, infact!

Thanks for this great mod!
I'm gonna let you know if I can correct the code to fit Minetest version 5.1.1. I have.

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Sun Jan 10, 2021 09:44
by WyomingWill
I have made a few changes to the code to get the villagers moving. Unfortunately they now can walk over water and in the air, but perhaps this will help people get a start.... at least my grandson was amused by things and it was good enough. Walking over the water was sort of fun, actually, as villagers escaped their little islands.

In actions.lua:

I replaced:
-- if not minetest.registered_nodes[nodenames[1]].walkable then
with:
if false then

Also, I replaced:
-- if not minetest.registered_nodes[nodenames[1]].walkable then
with:
if not nodenames[1] == "air" then

and, I replaced:
-- if tNodeDrawtype == "airlike" or tNodeDrawtype == "signlike" or tNodeDrawtype == "torchlike" then
with:
if tNodeDrawtype == "airlike" or tNodeDrawtype == "signlike" or tNodeDrawtype == "torchlike" or tNodeDrawtype == "normal" then

Please note that these are TOTAL hacks, done in desperation and confusion, as I poked around in the code trying to understand it and they are clearly not the right way to do things.

But, as I said, it might help someone figure the right way to do it, and I've love to hear about that.

I made other small mods to prevent crashes due to "nil" items, but I believe the three changes above made villagers start moving.

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Mon Apr 05, 2021 20:55
by stefapi
A bug fix for the code of villagers.

In actions.lua :

@@ -11,7 +11,7 @@
--check vertical pos at villager's lowerbody
+ nodenames = villagers.getNodeName({x=pos.x, y=pos.y+1, z=pos.z})
- nodenames = villagers.getNodeName({x=pos.x, y=pos.y, z=pos.z})

@@ -21,7 +21,7 @@
--check vertical pos at villager's upperbody
+ nodenames = villagers.getNodeName({x=pos.x, y=pos.y+2, z=pos.z})
- nodenames = villagers.getNodeName({x=pos.x, y=pos.y+1, z=pos.z})

@@ -31,7 +31,7 @@
--check vertical pos below villager's feet
+ nodenames = villagers.getNodeName({x=pos.x, y=pos.y, z=pos.z})
- nodenames = villagers.getNodeName({x=pos.x, y=pos.y-1, z=pos.z})
local nodename = nodenames[2]

@@ -434,7 +434,7 @@
-- air, ladders/signs, and torches
+ if tNodeDrawtype == "normal" or tNodeDrawtype == "airlike" or tNodeDrawtype == "signlike" or tNodeDrawtype == "torchlike" then
- if tNodeDrawtype == "airlike" or tNodeDrawtype == "signlike" or tNodeDrawtype == "torchlike" then

This seems to work great and Mobs are no more falling in water.

Tested with Minetest version 5.3

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Thu Sep 16, 2021 16:52
by ShadMOrdre
I'm not sure that either of those are the correct fixes to this issue. While reviewing the code, I came across many deprecated calls, which to seem to have an impact. My main updates were getting those calls updated, adding a nametag, updating the character.b3d model to the one included in the most recent MTG release, (specifically adding a models folder and placing the model in that folder inside the villlagers mod folder, so that it grabbed the correct model, instead of one that might still be randomly lurking in the mod soup.)

I am actively working on both villagers and advanced_npc, and both seem to play well enough with each other that I can run both simultaneously. The advanced_npcs have custom villages, while these villagers spawn in the standard mg_villages villages.

As soon as I ensure that the code does not depend on any custom mods or other customizations that would prevent working with MTG, I'll post a release.

Image

Image


Shad

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Mon Sep 20, 2021 16:53
by Jackknife
I used to be able to get mg_villages to work on older versions of Minetest but it doesn’t work in the latest version.
A bunch of errors showed up and I had no idea what was wrong with it.
I can figure out how to fix some coding errors but I’m very limited in what I know.
Because the villages didn’t show up neither did the villagers, it gave me some coins
But that was about it.

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Wed Nov 17, 2021 15:40
by mcaygerhard
Devy wrote:
Mon Apr 13, 2020 04:44
Hi, I looked at the Github here: https://github.com/ErrorNull0/villagers ... s.lua#L150 and doing

Code: Select all

/villagers list
should do something. I have not tested it.
the mobf_traders already have "/trader <type>" .. cos when i try to command "/villagers list" the server crash

Re: [Mod] Villagers for Minetest [villagers][v0.17]

Posted: Fri Jul 14, 2023 19:18
by ErrorNull
hi everyone. happy to see the lingering interest in this mod. but, i'm back to minetest modding. currently learning how to create custom meshes in blender.

i do plan to update this villagers mod eventually, but that will be much later down the road. i'm working on a full game mod for minetest, and once the core features are developed, like new terrain blocks, inventory items, player attributes, survival mechanisms, procedurally spawning buildings, mobs, etc. ...these NPC's may resurface again. i'll have a new forum post about it in the WIP Games section when ready.