[Mod] Towntest [towntest] - Grow a town in minetest.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

[Mod] Towntest [towntest] - Grow a town in minetest.

by cornernote » Post

Towntest for Minetest

Grow a town in minetest.

Documentation | GitHub Project

Image

About

This module is open source, so it's distributed freely. If you find it useful then I ask not for your wealth, but simply to spare your time to consider the world we share by watching Earthlings, a multi-award winning film available to watch online for free. A must-see for anyone who wishes to make the world a better place.

Credits

PilzAdam - made the initial NPC entity movement code
VanessaE - contributed buildings
kddekadenz - contributed buildings
ACDC - contributed buildings
Nanuk - contributed buildings
irksomeduck - contributed buildings

License

BSD-3-Clause, Copyright © 2014 Brett O'Donnell
Last edited by cornernote on Thu Jan 16, 2014 11:09, edited 1 time in total.

creeper96
Member
Posts: 25
Joined: Thu Sep 13, 2012 10:52
Location: New Zealand

by creeper96 » Post

Awesome mod corner just one problem where do i put it when i have finished downloading

User avatar
tkerwel
Member
Posts: 213
Joined: Fri Jan 13, 2012 07:35

by tkerwel » Post

first step to Millénaire - NPC village in minetest .... i really love your ideas ... go on like that an i out myself as cornernote fanboy (ups...fanoldy *lol*)
++++ Kung walang tiyaga, walang nilaga. ++++

User avatar
madchicken13
Member
Posts: 741
Joined: Mon Jun 11, 2012 00:41
Location: Shelton, WA
Contact:

by madchicken13 » Post

Im adding this on my Server does it need any other mods?
Minetest-CC = viewtopic.php?pid=122782
My Minetest Mods = MoreBlocks
My Website: http://www.cddo.us/

User avatar
GloopMaster
Member
Posts: 213
Joined: Wed Aug 01, 2012 18:03
Location: http://minetest.net/forum/

by GloopMaster » Post

seems good, however would it be possible to instead create villages on mapgen? I believe this is what you are getting at, however, i'm just giving you a... push in the right direction :3
Meow.

That is all.

User avatar
alexcraft
Member
Posts: 66
Joined: Thu Sep 06, 2012 13:12
Location: minecraft

by alexcraft » Post

i put a chest down i right click on it and it was a normal chest give the command for it or how to craft it
please

User avatar
madchicken13
Member
Posts: 741
Joined: Mon Jun 11, 2012 00:41
Location: Shelton, WA
Contact:

by madchicken13 » Post

There is no Crafting recipe for this And it shouldnt
(I Use this on my server :)
Minetest-CC = viewtopic.php?pid=122782
My Minetest Mods = MoreBlocks
My Website: http://www.cddo.us/

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

by Casimir » Post

/giveme towntest_chest:chest
and then you have one.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

creeper96 wrote:Awesome mod corner just one problem where do i put it when i have finished downloading
Simply download and put the whole download into mods/minetest
tkerwel wrote:first step to Millénaire - NPC village in minetest .... i really love your ideas ... go on like that an i out myself as cornernote fanboy (ups...fanoldy *lol*)
Yes! That was my inspiration. I think coding this in MT/lua will be a LOT easier than coding it in MC/java.

madchicken13 wrote:Im adding this on my Server does it need any other mods?
Yes, it needs default. If your *.we buildings require other nodes then you will need them installed too.

Any other dependancies will be listed in depends.txt and on this page.
GloopMaster wrote:seems good, however would it be possible to instead create villages on mapgen? I believe this is what you are getting at, however, i'm just giving you a... push in the right direction :3
Yep, you guessed it. The plan is for MT to create fully functional NPC villages. However thats a fair way off.

If you would like to help by contributing buildings, npcs, textures, code, etc then please feel free. Any contributors will be added to the credits (when i put them up) on the home page, forum page and readme. Any active contributors will also be given access to write to the git repo.
alexcraft wrote:i put a chest down i right click on it and it was a normal chest give the command for it or how to craft it
please
It's not a normal default:chest. Its a towntest_chest:chest.
madchicken13 wrote:There is no Crafting recipe for this And it shouldnt (I Use this on my server :)
Correct, there is no craft, and the plan is to build it on mapgen, not to craft it.
Casimir wrote:/giveme towntest_chest:chest and then you have one.
Thanks Casimir. Yep thats the only way to get it at the moment. (or use creative inventory)

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Wow.... This is the most impressed I have been by a mod ever. I know Vanessa's houses depended heavilly on other mods like home decor. What did you do to deal with that? Suppose I don't have home decor installed? What if I do install it?
Last edited by Neuromancer on Sat Sep 29, 2012 02:50, edited 1 time in total.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

all the non-standard items are stripped out of the *.we files in this pack. feel free to decorate the house yourself after the NPC builds it

if i decide to include *.we files that need mods then i will add them to the depends.txt

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

cornernote wrote:all the non-standard items are stripped out of the *.we files in this pack. feel free to decorate the house yourself after the NPC builds it

if i decide to include *.we files that need mods then i will add them to the depends.txt
Don't worry about it. I think it's best that you did strip out the non-standard stuff. Mods that depend on too many other mods lead to a to a mod explosion. Simple is good.

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

What about for those of us who want Immediate Gratification. Shouldn't there be a super-chest or a prefab chest, that when you place it the building appears almost immediately like from world edit? (also you don't have to stock it with materials, it comes pre-filled with all the materials it needs.) If you want to build epic villages you might not want to wait for your buildings to be built. Ok, I''m getting impatient for my buildings to be built. I want to see them all. ;)
Last edited by Neuromancer on Sat Sep 29, 2012 12:16, edited 1 time in total.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

Neuromancer wrote:What about for those of us who want Immediate Gratification. Shouldn't there be a super-chest or a prefab chest, that when you place it the building appears almost immediately like from world edit? (also you don't have to stock it with materials, it comes pre-filled with all the materials it needs.) If you want to build epic villages you might not want to wait for your buildings to be built. Ok, I''m getting impatient for my buildings to be built. I want to see them all. ;)
Deploy Nodes does that, but there is no gui to choose the buildings, its random (small, medium, large)

feel free to take chunks of code from both to make a new mod that lets you choose which building.

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Nanuk's_chapel has 2 unknown items in it. Any idea what mod I need for it?

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post


cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

many updated to NPC movement... he now takes items from the chest then moves (instead of instantly teleporting) to within a few nodes of where the block is about to be placed. once he gets there the block is added.

you can kill him, and he will lose his inventory.

be builds from the ground up so it looks more realistic

thanks @PilzAdam for all the help

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cornernote wrote:many updated to NPC movement... he now takes items from the chest then moves (instead of instantly teleporting) to within a few nodes of where the block is about to be placed. once he gets there the block is added.

you can kill him, and he will lose his inventory.

be builds from the ground up so it looks more realistic

thanks @PilzAdam for all the help
Thank you for this awesome mod!

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

<PilzAdam> cornernote, add a field for food that the worker can take to be faster for some time

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Can you remove the items that the worker takes instantly from the items needed list and not if they are placed?

User avatar
Neuromancer
Member
Posts: 958
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Post

Deploy Nodes does that, but there is no gui to choose the buildings, its random (small, medium, large)

feel free to take chunks of code from both to make a new mod that lets you choose which building.
It was easy enough to get him to stop checking to see if I had material

Code: Select all

        if true then
        --if inv:contains_item("main", v.name) then
            -- take from the inv
            --inv:remove_item("main", v.name.." 1")
            inv:remove_item("needed", v.name.." 1")
But I wanted to speed him up.
I tried the following:

Code: Select all

-- register_abm
minetest.register_abm({
    nodenames = {"towntest_chest:chest"},
    interval = .01,  --was orginally 1
    chance = 1,
    action = towntest_chest.build,
})
But he doesn't seem much faster. Do you have any idea where the best place to get him building really fast would be?
Last edited by Neuromancer on Sun Sep 30, 2012 03:32, edited 1 time in total.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

https://github.com/cornernote/minetest- ... t.lua#L129

change this:
npc:moveto({x=pos.x,y=pos.y+1.5,z=pos.z},2,2,0,function(self,after_param)

to this:
npc:moveto({x=pos.x,y=pos.y+1.5,z=pos.z},10,2,0,function(self,after_param)

the arg after the pos is the speed at which he will move.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Neuromancer wrote:

Code: Select all

-- register_abm
minetest.register_abm({
    nodenames = {"towntest_chest:chest"},
    interval = .01,  --was orginally 1
    chance = 1,
    action = towntest_chest.build,
})
AMBs cant have a interval < 1.

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

put apples or an item with groups.food=[1|2|3] to make npc move faster

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

some ideas from IRC:

<PilzAdam> new feature: dont allow him to replace blocks; only if he gets a tool he will try to dig them and bring the result to the chest

<PilzAdam> for the future: you have to create a house where workers live and they go at daytime to work and at the evening you have to give them food

<PilzAdam> hire & fire would be nice
<PilzAdam> "I will build for you for 10 iron"
<PilzAdam> "I will go collect some wood for you for 1 bread"
<PilzAdam> "I will protect you for 1 day for 2 steel ingots"


<cornernote> can object have formspec ?
<PilzAdam> no :-(
<cornernote> i know a hacky way
<cornernote> onpunch, turn him into a node
<cornernote> then abm to turn him back
<cornernote> actually
<cornernote> that will work really well
<cornernote> cos then he stops moving
<cornernote> faces you
<cornernote> and hes a chest
<cornernote> with mapgen, something like 1 or 2 chests per region will be placed
<cornernote> cos each will generate a whole village
<cornernote> will probably have to flatland under it
<cornernote> or the workers can do that
<cornernote> as a player you join a village
<cornernote> and perhaps can rob from other villages

Post Reply

Who is online

Users browsing this forum: No registered users and 29 guests