[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 » Fri Sep 28, 2012 10:55

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

by creeper96 » Fri Sep 28, 2012 11:24

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 » Fri Sep 28, 2012 11:53

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

by madchicken13 » Fri Sep 28, 2012 13:27

Im adding this on my Server does it need any other mods?
 

User avatar
GloopMaster
Member
 
Posts: 213
Joined: Wed Aug 01, 2012 18:03

by GloopMaster » Fri Sep 28, 2012 14:07

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

by alexcraft » Fri Sep 28, 2012 15:23

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

by madchicken13 » Fri Sep 28, 2012 23:36

There is no Crafting recipe for this And it shouldnt
(I Use this on my server :)
 

User avatar
Casimir
Member
 
Posts: 1101
Joined: Fri Aug 03, 2012 16:59

by Casimir » Fri Sep 28, 2012 23:45

/giveme towntest_chest:chest
and then you have one.
 

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

by cornernote » Sat Sep 29, 2012 01:03

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: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 29, 2012 02:49

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 » Sat Sep 29, 2012 03:15

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: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 29, 2012 03:38

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: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 29, 2012 12:14

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 » Sat Sep 29, 2012 12:36

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: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sat Sep 29, 2012 13:23

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 » Sat Sep 29, 2012 16:48

 

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

by cornernote » Sat Sep 29, 2012 16:51

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

by PilzAdam » Sat Sep 29, 2012 16:53

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 » Sat Sep 29, 2012 17:02

<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

by PilzAdam » Sat Sep 29, 2012 17:37

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: 793
Joined: Tue Jun 12, 2012 22:28
GitHub: Neuromancer56

by Neuromancer » Sun Sep 30, 2012 03:31

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

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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 » Sun Sep 30, 2012 06:54

https://github.com/cornernote/minetest-towntest/blob/master/towntest_chest/init.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

by PilzAdam » Sun Sep 30, 2012 07:57

Neuromancer wrote:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
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 » Sun Sep 30, 2012 09:16

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 » Sun Sep 30, 2012 09:19

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
 

User avatar
Echo
Member
 
Posts: 121
Joined: Tue Jul 31, 2012 08:11

by Echo » Sun Sep 30, 2012 10:07

as long as the npc's don't found a union and demonstrate for more food... ;-)
 

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

by Neuromancer » Sun Sep 30, 2012 13:49

cornernote wrote:some ideas from IRC:
<cornernote> as a player you join a village
<cornernote> and perhaps can rob from other villages

If you rob from other villages there should be consequences like in Ultima.
 

Gage
Member
 
Posts: 45
Joined: Mon Sep 10, 2012 10:17

by Gage » Mon Oct 01, 2012 00:48

the init lua file wont work HELLLPPP!!!!
 

Gage
Member
 
Posts: 45
Joined: Mon Sep 10, 2012 10:17

by Gage » Mon Oct 01, 2012 00:59

i wanna play this so bad im using 4.3 urghhhhhhhhhhhh
 

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

by cornernote » Mon Oct 01, 2012 02:01

can you paste the error you get? have a look in debug.txt
 

Next

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 39 guests

cron