[Mod] villages built up by villagers [working_villages]

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

[Mod] villages built up by villagers [working_villages]

by theFox » Post

Just like many of you, I wanted some villagers doing some useful stuff.
So I started making a mod which contains villagers doing work.

Planned Features
  • Villagers
    • trading and building up an economy
    • building their houses
    • working / doing their jobs
  • Jobs: miner, farmer and many more
this version:
no crafting recipes yet (you will have to use creative)
Spoiler
  • talk to the villagers by right-clicking them
  • home markers to save the position of the door and the bed
    • some jobs will let the villagers return home at night
    • at home the villagers will go to bed
  • spawn-eggs for villagers
    • female and male
    • just for a nicer look
  • commanding scepter to access the inventory of a villager or to pause/resume his job
  • jobs:
    • builder (builds the building at the next building marker)
    • woodcutter/lumberjack (cutting trees and planting saplings)
    • plant/herb collector (collects all sorts of plants that might be useful)
  • player follower (following any player, night active)
  • testing jobs:
    • snow clearer (clearing snow away)
    • torcher (following player and placing torches in the dark, night active)
Spoiler
Image
Image
Image
view in ContentDB
download latest zip from GitHub
browse on GitHub

License: **MIT**
dependencies: default, modutil?, doors?
Last edited by theFox on Sun Sep 06, 2020 15:56, edited 24 times in total.
my mods and subgames (ง'̀-'́)ง

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

Sounds very intresting. I don't have time to take a closer look at it right now, but from the description it sounds as if the mod provides the NPC willing to do the work. I'm working on a citybuilder mod which will handle the building side of it but not cover npc. The plan is to provide a townhall-chest where cityfounders can pick up plans for structures of level 0 which they can then place somewhere in the landscape and either supply the materials themshelves or let (not yet existing) npc do the work. Upgrades for buildings are certainly planned. It takes some time to build some intresting structures. Perhaps I got carried away a bit and built some of them too large...but the level 6 mine and house are pretty nice :-)
A list of my mods can be found here.

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

I was a little negative so I changed the forum topic.
I also had to fix a fatal bug and I improved the registration for new Jobs.
And I added a Job for clearing away snow... just for fun ;)
my mods and subgames (ง'̀-'́)ง

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] villages built up by villagers [working_villages]

by azekill_DIABLO » Post

cool! i wanna see a picture of it!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

azekill_DIABLO wrote:cool! i wanna see a picture of it!
Added screenshots to the topic!
my mods and subgames (ง'̀-'́)ง

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

theFox wrote: * * trading and building up an economy
The act of trading could be done by my mobf_trader mod. It provides all that's needed. The trades I've set up so far just aren't particulary intresting for players as most things cost as much or more as the crafting indigrents. The traders want to earn a bit after all..
theFox wrote: * * building their houses
With my upcomming citybuilder mod all a mob willing to build a house would have to do is to scan the area where the house will be built for "dig here" indicators and (configured) scaffolding nodes and then either dig or just call the on_rightclick-function of the scaffolding node in the right way. The purpose of the scaffolding nodes is to give the player a vague idea about the dimensions of the building project, to allow placement of house nodes by the player and to fascilitate "helping" for players. And it just looks good if there's some scaffolding instead of a house beeing built bottom-up by a mob waving hands nearby :-)
theFox wrote: * * working / doing their jobs
* Jobs: builder, miner, farmer and many more
Very good! Such workers are very welcome :-)
theFox wrote: * home markers to save the position of the door and the bed
In the version I've tested, doors and beds required manual setup. Scanning for them would be better. citybuilder can certainly provide positions of doors and beds (and other things the workers might be intrested in?). It doesn't do so yet but that would be a minor change. Most of the mg_villages houses built by me would probably be problematic for mobs as there's not much space between all the furniture and even normal players may get stuck by accident sometimes.
theFox wrote: * * some jobs will let the villagers return home at night
* * at home the villagers will go to bed
Very good! I'd love to have such a feature. zorman2000 seems to work on something similar, and ErrorNull provides diffrent clothing and appearance for his mobs.
theFox wrote: * * woodcutter/lumberjack (cutting trees and planting saplings, not night active)
The first lumberjack in the first version of this mod who started his work did something not entirely unexpected: The tree logs of a nearby house where just too tempting :-) He took those from the house first - and only afterwards started searching for real trees. I'm wondering if it might be a good idea to assign a certain area to the lumberjack where he can dig all trees he may find.
A list of my mods can be found here.

User avatar
BrunoMine
Member
Posts: 1082
Joined: Thu Apr 25, 2013 17:29
GitHub: BrunoMine
Location: SP-Brasil
Contact:

Re: [Mod] villages built up by villagers [working_villages]

by BrunoMine » Post

I'm dedicating myself to improve the intelligence of NPCs.
I would accept help to improve my npcs behavior from mod sociedades (in this new development stage).
If you have the patience for that, of course...

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

BrunoMine wrote: I'm dedicating myself to improve the intelligence of NPCs.
I would accept help to improve my npcs behavior from mod sociedades (in this new development stage).
If you have the patience for that, of course...
It would be great if modders could cooperate on creating such a nice villagers mod as you suggested. There's enough work for all :-) Hope this will work out. I'm working on the schematics/houses part.
A list of my mods can be found here.

User avatar
Casimir
Member
Posts: 1206
Joined: Fri Aug 03, 2012 16:59
GitHub: CasimirKaPazi

Re: [Mod] villages built up by villagers [working_villages]

by Casimir » Post

I agree with Sokomine.

I really hope some time we could get all those mob/village mods work together to create something like the one vision I had every since I got started with minetest.

Having villages where you can make friends with the mobs living htere and then add them to your team, employ them for work, play them (like in MirceaKitsune's creatures), take over the village, change to bird view and continue playing like a RTS game (Settlers or something the like), collaborate with or fight against other players and their civilisations.
Kind of a game that incorporates all scales, from the single person to the whole population.

We more or less have the basic elements already distributed in several mods. The hard part is to establish standards and combine what's there.

Back to the mod the topic is about: It's really fun to use. With my selfplanting threes I have the villagers cutting trees all the time and don't have to aid the in any way. They gather wood and spread the forest at the same time :]

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] villages built up by villagers [working_villages]

by azekill_DIABLO » Post

awesome!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
pandaro
Member
Posts: 327
Joined: Sun Jan 08, 2012 21:34
GitHub: pandaro
Location: behind

Re: [Mod] villages built up by villagers [working_villages]

by pandaro » Post

It's nice to see ideas shared by experienced modders grow into something acclaiming. Why do not you join forces in a single common project?
It would be curious to see the result, good luck at all!

bell07
Member
Posts: 604
Joined: Sun Sep 04, 2016 15:15
GitHub: bell07

Re: [Mod] villages built up by villagers [working_villages]

by bell07 » Post

I did a small code review and tested the mod. I really like it :thumbsup:

But I miss two things:
1. Please add the code to an versions-control tool like github. That make it easier for other modders to contribute small and big changes to you, and make it easier to apply proposed changes after review to the mod for you.
2. Please write an API documentation. The documentation should help other modders to provide new jobs and villagers without reading the whole source code of working_villager

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

Its nice to hear that many people have the same idea or even had the vision (was that coincidence?) when playing Minetest.

To your answers:
I already had a look for a builder and found the npcf_builder out of the npcf mod and I am busy copying. But I will have to make the scanning and planning.

I know I have to write a documentation for my api and its already on my to-do list.

I had the idea that ordering would be an easy solution for trading, so the villagers order the stuff they need at the home of the villager that produces the things.

The problem with the compact houses with not much space is a hard thing, I guess I will also use path finding in the house.

I thank you all for the great suggestions, I will have a look what I can do for simpler cooperation (making the mod).
my mods and subgames (ง'̀-'́)ง

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

theFox wrote: Its nice to hear that many people have the same idea or even had the vision (was that coincidence?) when playing Minetest.
Guess we all just wish for some more life ingame :-) Someone to share the world with. It's so empty in singleplayer.
theFox wrote: I already had a look for a builder and found the npcf_builder out of the npcf mod and I am busy copying. But I will have to make the scanning and planning.
My citybuilder mod is making progress. All a mob will need to do there is to locate two types of nodes - one a digging indicator, the other a scaffolding node - and dig the amount of nodes found in the metadata of the digging indicator and call a function with the position of the scaffolding node in order to actually build. That's a diffrent way from the usual one (mob stands there or walks around and places nodes) but afaik it looks much better if there's some scaffolding showing which shape the final building will take. Also fascilitates moving around without fly.
theFox wrote: I had the idea that ordering would be an easy solution for trading, so the villagers order the stuff they need at the home of the villager that produces the things.
Villagers having jobs and creating the diffrent nodes is certainly nice. I've started the basics in mobf_trader, but without better trade offers, players are usually better off to just craft the things themshelves.
theFox wrote: The problem with the compact houses with not much space is a hard thing, I guess I will also use path finding in the house.
That would be very nice. It might be sufficient to do that once per house.
A list of my mods can be found here.

BBmine
Member
Posts: 3476
Joined: Sun Jul 12, 2015 22:51
GitHub: BBmine
IRC: BBmine
In-game: Baggins
Location: USA

Re: [Mod] villages built up by villagers [working_villages]

by BBmine » Post

Looks like it might be interesting. I see you have screenshots, but I couldn't really see any villages (Unless they aren't there yet)

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

BBmine wrote:Looks like it might be interesting. I see you have screenshots, but I couldn't really see any villages (Unless they aren't there yet)
They are not implemented yet. A builder who builds the houses is planned as you can see if you read the last few posts.
my mods and subgames (ง'̀-'́)ง

User avatar
azekill_DIABLO
Member
Posts: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [Mod] villages built up by villagers [working_villages]

by azekill_DIABLO » Post

great work anyway
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

theFox wrote: They are not implemented yet. A builder who builds the houses is planned as you can see if you read the last few posts.
It's time for my citybuilder mod to get suitable villagers. I'm currently taking a look at implementations of pathfinding. Your mobs are a good start, but they still have some problems and need to learn a bit more. The pathfinding from the engine seems to have its limits. The mobs have difficulties getting to the door and entering the house, even with the position outside of the door stored. Or perhaps I misunderstood that parameter on the sign?
A list of my mods can be found here.

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

Sokomine wrote:The mobs have difficulties getting to the door and entering the house, even with the position outside of the door stored. Or perhaps I misunderstood that parameter on the sign?
Yes I know they are having problems with doors, because you can't find a path through doors (not even trough opened ones).

To make the villagers understand doors, I just added the parameter "position outside near door".
The position needs to be reachable and in front of the door.
A sleepy Villager tries to get to this position and if he reached it he goes straight to bed.
When he wakes up in the morning he goes to the given position outside and continues his work.
If there is a door in his way he opens it.
If villagers are night active, they haven't got this behavior.

I really need a better solution for pathfinding inside houses, has anyone got ideas how to make the villagers find their way?
my mods and subgames (ง'̀-'́)ง

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

theFox wrote: A sleepy Villager tries to get to this position and if he reached it he goes straight to bed.
When he wakes up in the morning he goes to the given position outside and continues his work.
If there is a door in his way he opens it.
If villagers are night active, they haven't got this behavior.
That's what I like about this mod a lot. It's how I expect villagers to be.
theFox wrote: I really need a better solution for pathfinding inside houses, has anyone got ideas how to make the villagers find their way?
Use burlis new pathfinder algorithm with some slight modifications.

When I took a closer look at your mod, I noticed that it seems to be a fork of Maidroid? That mod never caught my attention because I didn't like the droid's texture very much. And it doesn't have the sleep-at-night-function. Still, maybe you ought to mention somewhere that your mod started as a fork?
A list of my mods can be found here.

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

Sokomine wrote:That's what I like about this mod a lot. It's how I expect villagers to be.
That's why I'm making it.
Sokomine wrote:When I took a closer look at your mod, I noticed that it seems to be a fork of Maidroid? That mod never caught my attention because I didn't like the droid's texture very much. And it doesn't have the sleep-at-night-function. Still, maybe you ought to mention somewhere that your mod started as a fork?
Yes... I started with a copy of the Maidroid mod, and I am mentioning it in the description.
But I don't call it a fork because, I planned to rewrite the api and it's going to be far away from maidroid.
Last edited by theFox on Sat Jun 03, 2017 15:05, edited 1 time in total.
my mods and subgames (ง'̀-'́)ง

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

Latest changes:
  • descriptions for the api
  • updated home marker textures
  • way better pathfinding
  • bugfixes
Last edited by theFox on Tue Aug 01, 2017 14:45, edited 1 time in total.
my mods and subgames (ง'̀-'́)ง

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

Latest changes:
  • woodcutter collects dropped saplings
  • better obstacle handling
  • bugfixes
my mods and subgames (ง'̀-'́)ง

User avatar
theFox
Member
Posts: 192
Joined: Sun Feb 12, 2017 14:08
GitHub: theFox6
In-game: theFox
Location: Germany

Re: [Mod] villages built up by villagers [working_villages]

by theFox » Post

new version
  • I fixed the pathfinding through doors!
  • I added a new job: the plant collector.
  • I added a better collisionbox for laying villagers.
  • and api improvements and bugfixes.
my mods and subgames (ง'̀-'́)ง

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] villages built up by villagers [working_villages]

by Sokomine » Post

Good to see that the mod is still under development. Perhaps it could provide ressource-gathering functionality as a lib for other mods in the future?
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: Skamiz Kazzarch and 21 guests