[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

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

by theFox » Post

SFENCE wrote:
Sat Jan 02, 2021 07:17
Why working_villages.villager:dig(pos) method calls minetest.remove_node(pos) instead of minetest.dig_node(pos)?
I used that because minetest.dig_node(pos) drops the items from the node.
I have changed the dig behaviour to use minetest.dig_node(pos).
Now it may happen that villagers occasionally leave the drops behind.
SFENCE wrote:
Sat Jan 02, 2021 07:17
Some ideas:
Add work location -> villager will go to that location after wake up and start to look for his job.
Maybe, you can define job location with two corners of the area, the villager can be walking and looking for a job inside.
I like that idea and I have put it on the to-do list.
SFENCE wrote:
Sat Jan 02, 2021 12:25
Hi.
It looks like there is a bug in saving home position into Lua table working_villages.homes.
When I set home position to a villager, it causes server fault on shutdown and on load (until deleting of file working_villages_homes in world directory).
It looks like it uses villager object like table key instead of inventory name.

I have fixed this bug by change forms.lua file:

Code: Select all

-		villager:set_home(villager.inventory_name,coords)
+		--villager:set_home(villager.inventory_name,coords)
+		working_villages.set_home(villager.inventory_name,coords)
Thanks for finding the bug, I've added the fix.
my mods and subgames (ง'̀-'́)ง

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

I see the sleeping villager is not aligned to the bed correctly.

I fix this problem in my fork of your repository, branch sfence_update_lay_pos_c5b7ef6.
Feel free to use it if you want.
Last edited by SFENCE on Thu Jan 21, 2021 23:08, edited 1 time in total.
cdb_3P0AYqjEIn68

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

The problem with dig node:

if you will want, use code from my forked repository of working_villages branch sfence_update_dig_node_c5b7ef6,

This code eliminates the problem with item drops and adds call of usual callbacks after the node is dug.
cdb_3P0AYqjEIn68

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

Prototype for woodcutter going to job position:

Aviable via branch sfence_update_work_pos_c5b7ef6 on my fork of working_villages repository.
  • Changed villager form -> should be modified to look well.
  • Add async_actions hande_job_pos and goto_jo_pos.
  • Update woodcutter job coroutine to use handle_job_pos immediately after hande_night.
  • Do basic test in-game.
cdb_3P0AYqjEIn68

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

Update of plant collector:

Available via my fork of working_villager repository in branch sfence_update_plant_collector_c5b7ef6.
  • Keep down part of cactus, papyrus (so, they can continue to grow)
  • Add possibility for replant, use it for wheat (solution should be able to support replant plant which needs support, like a bean with beanpole from farming redo)

If you will want, feel free to merge all my changes into your repository.
It looks that code is well expandable, so good job.
cdb_3P0AYqjEIn68

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

First of all: Thank you for your work SFENCE. I am very happy that you are helping me with this project.
I will try to test and merge your changes as soon as I get the time to.
Also: since you are using GitHub and properly forking and branching the project, why not create pull-requests there?
my mods and subgames (ง'̀-'́)ง

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

theFox wrote:
Mon Jan 25, 2021 19:38
First of all: Thank you for your work SFENCE. I am very happy that you are helping me with this project.
I will try to test and merge your changes as soon as I get the time to.
Also: since you are using GitHub and properly forking and branching the project, why not create pull-requests there?
Only small changes for more comfortable usability.
Next time I will try use pull request.
cdb_3P0AYqjEIn68

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

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

by Codesound » Post

hello .... is there a guide on how to use this mod? both the male and the female remain standing once they enter the world. I assign a job, but nothing ..... how do you use this mod?

Thanks

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

Codesound wrote:
Thu Jan 28, 2021 02:06
hello .... is there a guide on how to use this mod? both the male and the female remain standing once they enter the world. I assign a job, but nothing ..... how do you use this mod?

Thanks
Maybe, villagers are paused. By using villager commanding sceptre you can assign job (right-click) and pause/unpause villagers (left-click). If you are pointing at the villager, it should show you his status like a text in game windows.
Spoiler
Like here:
Image
Attachments
screenshot_20210128_072749.png
screenshot_20210128_072749.png (761.05 KiB) Viewed 2221 times
cdb_3P0AYqjEIn68

cuthbertdoublebarrel
Member
Posts: 348
Joined: Tue Apr 14, 2020 16:03
GitHub: cuthbert

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

by cuthbertdoublebarrel » Post

my villagers have all been on the ale . either they are floating above the houses or passed out on the stairs . all they do is sleep .
really glad to see this mod is getting some updates as i thought it was dead .
Project BrutalTest...hide your Petz

User avatar
Codesound
Member
Posts: 365
Joined: Thu Jun 09, 2016 14:56

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

by Codesound » Post

SFENCE wrote:
Thu Jan 28, 2021 06:30
Codesound wrote:
Thu Jan 28, 2021 02:06
hello .... is there a guide on how to use this mod? both the male and the female remain standing once they enter the world. I assign a job, but nothing ..... how do you use this mod?

Thanks
Maybe, villagers are paused. By using villager commanding sceptre you can assign job (right-click) and pause/unpause villagers (left-click). If you are pointing at the villager, it should show you his status like a text in game windows.
Spoiler
Like here:
Image
Many thanks! Now my villagers works...

zadocallen
Member
Posts: 16
Joined: Thu Nov 12, 2020 16:47
In-game: Leuden

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

by zadocallen » Post

Why have you not done the obvious job, Npc Miner?
would modifying the snow clearing job be simplest?
though some thoughts would be

1 find cave
3 build ladders for access
4 search for ores (copper, coal, iron, silver)
5 ores not found, go deeper
6 when storage is full return to surface
7 go to storage bin, deposit ores
8 retrace path to mine.

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

zadocallen wrote:
Fri May 20, 2022 19:21
Why have you not done the obvious job, Npc Miner?
would modifying the snow clearing job be simplest?
though some thoughts would be

1 find cave
3 build ladders for access
4 search for ores (copper, coal, iron, silver)
5 ores not found, go deeper
6 when storage is full return to surface
7 go to storage bin, deposit ores
8 retrace path to mine.
I think the code is not prepared for the miner's job yet.

Pathfinder doe's not support ladders and villagers get often stuck somewhere. Next problem is, that entities are simulated only in some radius around players.
It is not so big problem for jobs like woodcutter/farmer etc. But miners can go deep and leave the active area.

Putting items into storage (chest) is under testing, at the moment.

But I believe, for most jobs, wooden tools can be enough for villagers to use.
Using tools will be probably the next step, I will add.

But theFox is out of time now, so everything takes more time.
cdb_3P0AYqjEIn68

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

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

by Blockhead » Post

Just a suggestion for Miners: the main goal is usually to gather resources, rather than excavate. There is a block game by the name of Colony Survival which involves managing colonists, just like this mod involves managing your villagers. In Colony Survival, Miners only have to be underground, standing on stone and at a certain depth, in order to be able to continuously generate stone and ores. You start by digging a little staircase out for them and they can then get to work mining. Every once in a while they have to empty their inventory - Colony Survival uses crates that access the universally available stockpile, but you could easily just use a normal chest for Minetest. Something like that could probably work for this mod. Here's a wiki link.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

Blockhead wrote:
Tue May 31, 2022 03:56
Just a suggestion for Miners: the main goal is usually to gather resources, rather than excavate. There is a block game by the name of Colony Survival which involves managing colonists, just like this mod involves managing your villagers. In Colony Survival, Miners only have to be underground, standing on stone and at a certain depth, in order to be able to continuously generate stone and ores. You start by digging a little staircase out for them and they can then get to work mining. Every once in a while they have to empty their inventory - Colony Survival uses crates that access the universally available stockpile, but you could easily just use a normal chest for Minetest. Something like that could probably work for this mod. Here's a wiki link.
Yeah. I have played it.
But I am not sure if infinite ore source is a good idea for minetest.
But, can be theoretically maintained with a mod like lava ore gen.
cdb_3P0AYqjEIn68

User avatar
j0j0n4th4n
Member
Posts: 249
Joined: Tue Jan 26, 2021 06:45

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

by j0j0n4th4n » Post

I think the download link is missing some files, I could only run the mod using the recursive git command as instructed. I try first downloading the modutil file separately but that didn't fixed the problem so perhaps there are more files added outside the zip file?
I also have run into a odd problems using this mod, the NPCs don't go to bed at night rather they stop at the door and sit there until dawn.
cdb_894a100ddd76

SFENCE
Member
Posts: 280
Joined: Sun Sep 29, 2019 07:13
GitHub: SFENCE
In-game: SFENCE

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

by SFENCE » Post

j0j0n4th4n wrote:
Fri Jun 03, 2022 06:05
I think the download link is missing some files, I could only run the mod using the recursive git command as instructed. I try first downloading the modutil file separately but that didn't fixed the problem so perhaps there are more files added outside the zip file?
I also have run into a odd problems using this mod, the NPCs don't go to bed at night rather they stop at the door and sit there until dawn.
It is probably a problem comming from github, because git archive command does not support submodules used in this project.

So way is downloading from contentdb or use command git clone --recursive https://github.com/theFox6/working_villages.
cdb_3P0AYqjEIn68

org.cosoc
New member
Posts: 3
Joined: Sun Nov 15, 2020 02:12
GitHub: cosoc

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

by org.cosoc » Post

In order to facilitate the better use of Chinese community users, I moved to our Chinese Forum. Thank you.
https://minetest.cosoc.cn/t/mod-village ... llages/451

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot] and 20 guests