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

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

Uploaded hotfix to github. Should be fine now.

It turns out the item bucket:bucket_empty was crashing minetest. Villagers that are 'servants' have a chance of requesting buckets from the player to trade for coins. I did some further tests and 'bucket:bucket_empty' doesn't even come up as a registered item during gameplay when i list all of the registered items from minetest.registered_items as my mod loads, which is strange because it's just part of the builtin 'bucket' mod from mintest_game. During gameplay when i enter the command, '/giveme bucket:bucket_empty' i get a bucket no problem. Maybe i'm missing some understanding on how the bucket mod loads or mod dependencies. For now i've removed the buckets and will look into this further.
Last edited by ErrorNull on Sat Jul 29, 2017 13:42, edited 1 time in total.

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

Man, you are fast! Will continue testing with hotfixed version.

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

Ok, same parameters as before (new world).

Wandering around the start village, testing the traders. Iceman, Dyemaker, Tin smith - all ok. Farmer, however...

Code: Select all

2017-07-29 10:07:25: ACTION[Server]: singleplayer right-clicks object 384: LuaEntitySAO at (282,2.55,-88)
2017-07-29 10:07:26: INFO[Server]: collisionMoveSimple: maximum step interval exceeded, lost movement details!
2017-07-29 10:07:26: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'villagers' in callback ScriptApiEntity::luaentity_Rightclick(): ...test-0.4.16-win32-msvc\bin\..\mods\villagers/trading.lua:658: attempt to concatenate local 'item_stock' (a nil value)
2017-07-29 10:07:26: ERROR[Main]: stack traceback:
2017-07-29 10:07:26: ERROR[Main]: 	...test-0.4.16-win32-msvc\bin\..\mods\villagers/trading.lua:658: in function 'getTradingFormspec'
2017-07-29 10:07:26: ERROR[Main]: 	...test-0.4.16-win32-msvc\bin\..\mods\villagers/trading.lua:707: in function 'tradeVillager'
2017-07-29 10:07:26: ERROR[Main]: 	...test-0.4.16-win32-msvc\bin\..\mods\villagers/actions.lua:641: in function 'on_rightclick'
2017-07-29 10:07:26: ERROR[Main]: 	...netest-0.4.16-win32-msvc\bin\..\mods\villagers/spawn.lua:781: in function <...netest-0.4.16-win32-msvc\bin\..\mods\villagers/spawn.lua:781>

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

Another hotfix uploaded - to better handle unregistered or misspelled items for trading. I named one item 'flowers:straw' as a possible trade item for farmers when it should have been 'farming:straw'. Blah.

Ok, KCoombes, should be much better now. Hit me with another one! Hopefully takes longer than 30 minutes though. lol. I need to spend more time testing my code before uploading. >_<

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

Success! I have scavenged empty glasses from the start village and sold them to servants at the Chateau without error. Now the only issue is the /villagers list is so long I cannot see the whole thing (needs pages or scrollbar).
screenshot_20170729_112222.png
screenshot_20170729_112222.png (200.79 KiB) Viewed 1077 times

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

KCoombes wrote:Success! I have scavenged empty glasses from the start village and sold them to servants at the Chateau without error. Now the only issue is the /villagers list is so long I cannot see the whole thing (needs pages or scrollbar).
screenshot_20170729_112222.png
Woohoo! I will celebrate by going to bed now. haha. Meanwhile as I am adding more trade items from farming redo and 3d armor, i am updating the code so that certain job titles (eg. housemaids, servants, guests) will not be 100% assigned as traders. This way, not all housemaids and servants will become traders and so won't show on the '/villagers list' .... but i will also improve the list later to show pages.

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

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

by Sokomine » Post

KCoombes wrote: used a bed to pass the night (which failed - might be an issue with the cottages_bed)
The beds from cottages are intentionally passive. They do not allow night skipping or setting of spawn position. The first implementation of the beds mod had some trouble on servers sometimes. Server owners where reluctant to install the beds mod and had suspicions about any bed-like nodes. The cottages beds are only decoration.

If you havn't cottages installed, the chateau will now get beds of the fancy type instead.

@ErrorNull: Please also read what i wrote in the mg_villages thread. Some changes might be intresting, some helpful for testing.
A list of my mods can be found here.

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

Another hotfix! Aligning with sokomine's latest updates to mg_villages mod. Download latest from github from main page, and if not already, update to the latest mg_villages by sokomine as well as the latest optional mods you're using.

- Updated villager spawn position to use y-pos of village and not the mob spawner

- /villagers list command only shows villagers that actually have trade items regardless of job title. Before, it listed all villagers with a job title.

- Ensured that certain job titles (clay trader, lumberjack, servant, housemaid, etc) do not always have items to trade, but only after a probability check.

- Trade items for certain job titles will be different depending on the surrounding region. So far this is implemented for 'stairmakers' but will reflect on other jobs as well (for those that makes sense anyway). Example, snowy region = snow and ice stairs, desert region = sand and desert stairs, etc.

- Tested 'village_ruins' mod and seem like ruins now spawn okay and i even see villagers there. But, I'll wait a while before I put the official ruins-mod-is-fully-supported seal on my villagers mod. I'm sure someone (like KCoombes) can crash it. LOL.

KCoombes
Member
Posts: 427
Joined: Thu Jun 11, 2015 23:19
In-game: Knatt
Location: SW Florida, USA

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

by KCoombes » Post

First run-through detected only an issue with a trader requesting cotton, but not recognizing the cotton in my inventory.

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

KCoombes wrote:First run-through detected only an issue with a trader requesting cotton, but not recognizing the cotton in my inventory.
I think it might have something to do with how the default farming mod just aliases all farming:string into farming:cotton... and uses the same texture. Currently villagers with job title farmer, horsekeeper, and saddler have a chance to sell you farming:string, but some others may also have farming:cotton to sell (or looking to buy)... which is of course a bit redundant. My suspicion is that you might have in fact possessed farming:string while a trader was looking to buy farming:cotton from you. I dunno.. will look into that further, BUT it might not be a continued issue if by adding Farming Redo mod, if farming redo actually makes string and cotton different. ...

LouisCyfer
Member
Posts: 46
Joined: Sun Jun 25, 2017 02:24
GitHub: LouisCyfer

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

by LouisCyfer » Post

I haz a question because I'm either too dump to see or just didn't recognised yet .. hope you mind I ask.
How to get coins?

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

Another question from another person : How do you kill a villager ?

If there is none, could you make a way ?

Also, robbing villagers could be fun.

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

LouisCyfer wrote:I haz a question because I'm either too dump to see or just didn't recognised yet .. hope you mind I ask.How to get coins?
Hi LouisCyfer - the latest v0.17 adds a few silver and gold coins to a new player at the start of a new map. Also, if you are the server admin you can use normal Minetest chat command like...
/giveme villagers:coins xxx
/giveme villagers:coins_gold xxx

...where "xx" is the number of coins you want. Of course this is kind of cheating. If you want to follow a real gameplay, you can find villagers that will give you a coin or two in exchange for things like a book, ice, stone, flowers, etc. These type of villagers have job title of landlord, housemaid, ore_seller, potterer, saddler, stoneminer, and schoolteacher. Happy hunting! =)

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

Lord_Vlad wrote:Another question from another person : How do you kill a villager ?
If there is none, could you make a way ?
Also, robbing villagers could be fun.
Right now all villagers are invincible when you punch them. But I will consider adding more realism in a future update by allowing players to knock out villagers (they lie on the ground) and you can take their money or items. Of course i will need to add a big consequence for those actions, like everyone in the village will refuse to trade with you and the (invincible) town guard will hunt you down for several days. ^_^

LouisCyfer
Member
Posts: 46
Joined: Sun Jun 25, 2017 02:24
GitHub: LouisCyfer

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

by LouisCyfer » Post

ErrorNull wrote:
LouisCyfer wrote:I haz a question because I'm either too dump to see or just didn't recognised yet .. hope you mind I ask.How to get coins?
Hi LouisCyfer - the latest v0.17 adds a few silver and gold coins to a new player at the start of a new map. Also, if you are the server admin you can use normal Minetest chat command like...
/giveme villagers:coins xxx
/giveme villagers:coins_gold xxx

...where "xx" is the number of coins you want. Of course this is kind of cheating. If you want to follow a real gameplay, you can find villagers that will give you a coin or two in exchange for things like a book, ice, stone, flowers, etc. These type of villagers have job title of landlord, housemaid, ore_seller, potterer, saddler, stoneminer, and schoolteacher. Happy hunting! =)
very awesome! ty

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

ErrorNull wrote:
Lord_Vlad wrote:Another question from another person : How do you kill a villager ?
If there is none, could you make a way ?
Also, robbing villagers could be fun.
Right now all villagers are invincible when you punch them. But I will consider adding more realism in a future update by allowing players to knock out villagers (they lie on the ground) and you can take their money or items. Of course i will need to add a big consequence for those actions, like everyone in the village will refuse to trade with you and the (invincible) town guard will hunt you down for several days. ^_^
So it's not planned to have a way to remove a specific villager from a village you find too crowded ? Robbing is fun and all, but removing some villagers undefinatly has real good points. Maybe hitting them again with more than 1 damage (so not the hand) while they are knocked out ?

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

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

by Sokomine » Post

Lord_Vlad wrote: So it's not planned to have a way to remove a specific villager from a village you find too crowded ? Robbing is fun and all, but removing some villagers undefinatly has real good points. Maybe hitting them again with more than 1 damage (so not the hand) while they are knocked out ?
Poor villagers :-( They're very peaceful and don't harm anyone. If you really think a village is too crowded...perhaps you could give a villager large amounts of money (or gold) - so that he'll buy a large house elsewhere and disappear :-)
A list of my mods can be found here.

User avatar
Lord_Vlad
Member
Posts: 112
Joined: Thu Jul 20, 2017 07:58

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

by Lord_Vlad » Post

Sokomine wrote:
Lord_Vlad wrote: So it's not planned to have a way to remove a specific villager from a village you find too crowded ? Robbing is fun and all, but removing some villagers undefinatly has real good points. Maybe hitting them again with more than 1 damage (so not the hand) while they are knocked out ?
Poor villagers :-( They're very peaceful and don't harm anyone. If you really think a village is too crowded...perhaps you could give a villager large amounts of money (or gold) - so that he'll buy a large house elsewhere and disappear :-)
Well, you could do anything really, it can be to give them money or just to tell them to move underground. Whatever, as long as there is a way.

Giving a large amount of gold isn't survival-friendly though.

User avatar
Stix
Member
Posts: 1385
Joined: Fri Aug 04, 2017 14:19
IRC: nil
In-game: Stix [+alts]
Location: USA

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

by Stix » Post

10 out of 10, this is a great mod!
Hey, what can i say? I'm the bad guy.

lonestar
Member
Posts: 54
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

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

by lonestar » Post

The only issue I see at the moment, villagers are walking in the air and not on ground
screenshot_20170806_204436.png
screenshot_20170806_204436.png (759.93 KiB) Viewed 1077 times
running minetest 0.4.1.6 dev as well as latest minetest game

I am using the latest from github
handle schematics
mg villages
mob world interaction
village gambit
villagers
village ruins
village sandcity

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

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

by Sokomine » Post

lonestar wrote: The only issue I see at the moment, villagers are walking in the air and not on ground
Very recent versions of MT introduced an offset for the player. What happened to your villagers looks very similar. Perhaps something was changed in the engine recently in that regard?
A list of my mods can be found here.

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] Villagers for Minetest [villagers][v0.17]

by azekill_DIABLO » Post

hitbox received changes, and the player model was totally redone with a one block offset!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

Hotfix! Updated to adjust for new hitbox and player offsets.
Another formal update is coming soon which will have villagers offer trades that include items from farming redo and 3d armor. I have been occupied lately with another minor project. But minetest is still my primary one! Stay tuned...
Lord_Vlad wrote:Well, you could do anything really, it can be to give them money or just to tell them to move underground. Whatever, as long as there is a way. Giving a large amount of gold isn't survival-friendly though.
Having some way to remove the villager by paying them gold or even killing them does add some interesting interactivity. I may explore that in a later update.
Stix wrote:10 out of 10, this is a great mod!
Thanks Stix! Glad you like it!

...and thanks everyone for your continued interest in my villagers.

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] Villagers for Minetest [villagers][v0.17]

by azekill_DIABLO » Post

is it enough stable to be put in voxellar?
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
ErrorNull
Member
Posts: 271
Joined: Thu Mar 03, 2016 00:43
GitHub: ErrorNull0

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

by ErrorNull » Post

azekill_DIABLO wrote:is it enough stable to be put in voxellar?
Well, i think you will need to try and judge for yourself. I haven't received much error/crashe reports lately. Just be sure to use a new map. I would be curious to find out if any multi player interaction with the villagers will arise any new errors and crashes... WIP!

Post Reply

Who is online

Users browsing this forum: No registered users and 13 guests