Reasons to build a home

Reasons to build a home

Postby Rochambeau » Tue Aug 28, 2018 8:56 am

I really like building houses/castles/towers/etc. in minetest because it makes a lot of fun. But when playing in survival mode, I sometimes ask myself:
Why should I design a super duper castle if a 5x5x2 dirt cube with no windows has the same benefits? Unless you're playing with mobs that could kill you at night, there is no reason to build a home at all.

So I'm planing to create a mod, that motivates the player to build a home and would like to ask for ideas.

Let's start with:

- players can't place chests, furnaces and beds in the wild but only in a room -> motivation to build a house, or at least dig a cave
- only one chest/bed/furnace per 27 blocks of room (3x3x3) -> motivation to build bigger houses with multiple rooms
- health regenerates quicker at home
- hunger grows slower at home
- eating at home doubles the effect
- farming is only possible within a 15 block radius around a house/barn (hoes only work there)
- ?

Requirements:
- room detection (definition? four walls, floor, roof?, windows?, door?, carpet?)
- overriding several on_place functions
- ?

Of course, such a mod would be a big restriction of minetest game, but it would add a new facet to the survival aspect of minetest.

What do you think?
Rochambeau
Member
 
Posts: 112
Joined: Tue Sep 23, 2014 11:37 am

Re: Reasons to build a home

Postby ChimneySwift » Tue Aug 28, 2018 10:01 am

This is a pretty cool idea IMO.

Rochambeau wrote:- players can't place chests, furnaces and beds in the wild but only in a room -> motivation to build a house, or at least dig a cave
- only one chest/bed/furnace per 27 blocks of room (3x3x3) -> motivation to build bigger houses with multiple rooms
- health regenerates quicker at home
- hunger grows slower at home
- eating at home doubles the effect
- farming is only possible within a 15 block radius around a house/barn (hoes only work there)
- ?


The second point I'm not so fond of, it means storage rooms need to be really spaced out, but the others would be really cool to see.

You could use the minetest.register_on_placenode() function to check through a list of nodes (chests, beds, etc), I'm not sure if there is an on_eat callback for farming.

A room could be a contained box with no or limited gaps where there is air, you could increase the complexity by making the room only count if it's well lit too. Maybe consult some of those space mods with oxygenator technic nodes which require being contained within a sealed room to work for ideas on room detection.

I can also see issues for trying to detect really large rooms, which could potentially result in easily freezing up the system if not kept in check.
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 6:46 am
GitHub: ChimneySwift
In-game: ChimneySwift

Re: Reasons to build a home

Postby texmex » Tue Aug 28, 2018 12:36 pm

Any project to make ”survival” in MTG become actual survival is welcome. I’m quite interested in this. I can think of multiple design obstacles regarding what’s considered a home and it would be interesting to see how you solve them. Will follow this.
texmex
Member
 
Posts: 1291
Joined: Mon Jul 11, 2016 9:08 pm
GitHub: tacotexmex
In-game: texmex

Re: Reasons to build a home

Postby Astrobe » Wed Aug 29, 2018 5:29 pm

This is also a question I'm interested in. I think it would be a good question for the game design thread because it touches multiple aspects of the game. I believe it can't be a single mod, but rather a series of modifications in the game mechanics that encourage to build big.

First and foremost part of the motivation has to come from the player. A 5x5x2 shack is one thing, but if your players don't have the ambition to build something that look good they will just build 50x50x20 cobble-boxes if you force them to build big.

One reason in multi-player is just to show off your wealth, talent, etc.

For single-player, one can make the building materials difficult to find. For instance in my game one cannot craft stone-based block and brick nodes, you have to "mine" them from ruins the game generates on the map (or from dungeons, but they offer limited variety). Then building the thing exactly like you wanted can be a challenge if you're ambitious and can be an achievement in itself.

Building big can also be a game objective. For instance, survive as long as possible in a world where the sea level is constantly rising (there's a simple trick to do that easily).

Making the things you typically place inside the buildings big also naturally lead to build bigger. At some point I considered to reduce the capacity of chests so that players would have to have more of them. This is a bit extreme, but conversely don't use modded chests that offer greater capacity. For multi-player in my game I chose a perimeter protection scheme rather than an area protection scheme. I offer some blocks that have a protection radius of one, so you build walls around them. This uses some space if those blocks are not normally blocks that one uses to build walls. Another benefit protecting the largest volume with the minimal number of protecting blocks (which should be a little expensive), all while satisfying your aesthetics criteria is sort of a mini-puzzle game. For single-player, you can still have the players to use protections by making the environment hostile (lightning strikes that make unprotected things explode or burn for instance).

Continuing on the idea of using more space for simple things, I removed the 2-nodes door and replaced with my A22 mod that allow to make "things that have the same function as a door" but require lots more space and are harder to integrate in the building.

Requiring special tools like a circular saw for some crafts helps too. One could also consider splitting the furnace in to a metal furnace and a oven (for food). But if it did not introduce other problems in my game, I would also seriously consider making the furnace a 9x9 multi-node object.

For the room definition idea, checkout the Farlands game, it has something like that for NPCs. The concept is interesting. One could elaborate on it more and make some items only available from NPC merchants. Then your motivation to build more isn't for yourself but to attract the merchants you need.

More simply, there's always the option that you need sheeps, cows or whatever but hostile mobs are attacking them, so players have to build large fences/buildings to protect them.

PS: also, it doesn't have to be one big castle; it can be several medium sized houses. One should consider removing all teleportation capabilities - or make them expensive - in order to encourage players to build multiple homes.

PPS: at least one trick from my game which hopefully should be usable in other games: chests and furnaces have a chance to spawn aggressive rats. Not dangerous, just annoying (in particular when they get inside walls because of a bug in the engine). However, decorative stuff like beds and bookshelves also have a chance to spawn a cat, which are only good at chasing rats (when they feel like it, that is). One neat little side effect of this cat-and-mouse game is that if you build too small, the cat will block you and become an annoyance itself.
Astrobe
Member
 
Posts: 223
Joined: Sun Apr 01, 2018 10:46 am

Re: Reasons to build a home

Postby Hume2 » Sat Sep 08, 2018 5:10 pm

I think, that a detection of being inside/outside the house is not the way. Minetest is (or should be) about inventing new ways. If an action is forbidden, there should be an obvious reason and it shouldn't look only like someone's stupid restriction. Forbidding something just because the designer said that it's too beneficial is not a good idea. In most situations, it is possible to make the action less beneficial by adding new elements.

If you want the players to build houses, you can add rain that harms the players a little. You can also advantage players those sleep in beds regularly.

If you want the players to build bigger houses, add more machines those can be used for crafting. Limiting the storage per block is also a good idea. I'm not sure about this, limiting the crafting grid size and adding workbenches might work as well. It's because you need a workbench in each room or you need to run from one place to another all the time you need to craft. I'm not sceptic about 4×4 and 5×5 workbenches either.

Another way might be adding new items those can be found in rare occasions and can't be crafted. Therefore you can display your trophies in a room.

If you want to disadvantage dirt as building material, you can add worms those spawn near dirt and somehow harm the player. They could for example eat food from player's chests. Or the dirt could crumble down.

The houses are small also because the players usually play alone. You don't have to build a huge castle only for yourself. Maybe living together could be also advantaged. For example each player could have only one job and perform only the recipes for his job. The basic recipes could be performed by any player but the other recipes only by players with that ability. Or there could be also really many things to do, so one couldn't maintain everything.
Hume2
Member
 
Posts: 252
Joined: Tue Jun 19, 2018 8:24 am
GitHub: Hume2
In-game: Hume2

Re: Reasons to build a home

Postby Rochambeau » Tue Jan 15, 2019 7:13 pm

It's been a while, had some other games to play. :-)

A first prototype is coded which introduces workbenches.

Image

Wooden items can only be crafted near a wood workbench.
Stone items can only be crafted near a stone workbench.
You get the idea.
By now we have workbenches for wood, stone, steel, bronze, mese, diamond and dye.

- Workbenches can't be placed in open space, they need at least a 3x3 roof with the workbench in the center (poor mans room detection)
- When the roof is removed afterwards, the workbench will rot/decay to a normal wood block within ten minutes (to prevent the use of a "temporary roof" just to place the workbench)
- All workbenches need at least one node distance to other workbenches (prevents "overpopulation")
- Some workbenches can only be placed nearby subordinate workbenches (you can't just place one diamond workbench in your favourite mine -> build a workshop in your home with all workbenches)
- Some workbenches can only be removed, when there is no superior workbench nearby (prevent temporary workbenches just for placing others)

For the recipes see the readme:
https://gitlab.com/Rochambeau/hardknocklife/

This workshop idea and the dependencies between workbenches is inspired by Valheim, which is a pretty hard, but rewarding game.
Rochambeau
Member
 
Posts: 112
Joined: Tue Sep 23, 2014 11:37 am

Re: Reasons to build a home

Postby Linuxdirk » Tue Jan 15, 2019 8:20 pm

Rochambeau wrote:- only one chest/bed/furnace per 27 blocks of room (3x3x3) -> motivation to build bigger houses with multiple rooms

So you say storage rooms are forbidden? :)

Image
Linuxdirk
Member
 
Posts: 1911
Joined: Wed Sep 17, 2014 11:21 am
In-game: Linuxdirk

Re: Reasons to build a home

Postby Rochambeau » Wed Jan 16, 2019 9:10 am

Nah, seeing your screenshot I wouldn't dare to forbid storage rooms. :-)

There must be other ways to make the player come home from time to time.

The first step was to make him use workbenches instead of crafting new pickaxes on the fly.

Maybe the need for sleep needs a step up. If the player doesn't sleep for 48 hours, his speed decreases or he can't use tools anymore. Something like that. (Inspired by Kingdom Come Deliverance)
Rochambeau
Member
 
Posts: 112
Joined: Tue Sep 23, 2014 11:37 am

Re: Reasons to build a home

Postby Rochambeau » Wed Jan 16, 2019 5:32 pm

Any idea how I can detect if a bed was used?
Rochambeau
Member
 
Posts: 112
Joined: Tue Sep 23, 2014 11:37 am

Re: Reasons to build a home

Postby texmex » Wed Jan 16, 2019 6:53 pm

Beds mod has its own API so I assume that you can use that to log last sleep and from that deduce if a player has been awake for too long.
texmex
Member
 
Posts: 1291
Joined: Mon Jul 11, 2016 9:08 pm
GitHub: tacotexmex
In-game: texmex

Re: Reasons to build a home

Postby Rochambeau » Thu Jan 17, 2019 9:00 am

Hm, I've checked beds api.lua, but didn't find anything usable.

So I went with "minetest.override_item" and added something to the "on_rightclick" function.
Rochambeau
Member
 
Posts: 112
Joined: Tue Sep 23, 2014 11:37 am

Re: Reasons to build a home

Postby Astrobe » Sun Jan 20, 2019 9:27 am

As for beds, the mod is a mess as it puts functions in various files in inconsistent ways. The position is recorded in spawns.lua. That's where you would save a timestamp together with the player's pos. But that's lots of dirty hacks, you'd be better off releasing an updated version (it also uses a file to store the data instead of mod_storage) if you want to go that route.

An alternative idea would be to forbid crafting outside of a certain radius of the player's bed, which would sort of symbolize their home. This is easier to do, as you would only have to read the beds mod's file (good enough for a prototype, later on a cache may be necessary).

But taking one step back, I think that restricting the ability to craft stuff to being near your home is good enough. For instance players who want to go for deep mining will have to prepare a bunch of pickaxes and inventory side is a limiting factor. So they'll eventually run out of pickaxes and have to go back home to make new ones. This could have the side effect that they build warehouses to optimize travel times etc. In other words, it could result in more player buildings rather than bigger homes, which is not bad.
Astrobe
Member
 
Posts: 223
Joined: Sun Apr 01, 2018 10:46 am

Re: Reasons to build a home

Postby Termos » Sun Jan 20, 2019 1:46 pm

I'm not a fan of placing arbitrary restrictions in order to make player do things. I prefer mechanics that encourage rather than enforce.

For example, having mobs that steal stuff.
Termos
Member
 
Posts: 67
Joined: Sun Dec 16, 2018 12:50 pm

Re: Reasons to build a home

Postby Rochambeau » Tue Jan 22, 2019 6:44 pm

I wanted to extend my mod so that beds can only be placed under a roof and worked with "register_on_placenode". Sadly, when placing a bed, my code wasn't executed at all. It worked with other blocks.

Is there something special about beds, that they don't run "register_on_placenode" callbacks?
Rochambeau
Member
 
Posts: 112
Joined: Tue Sep 23, 2014 11:37 am

Re: Reasons to build a home

Postby Brian Gaucher » Wed Jan 23, 2019 3:40 pm

Another idea that should be possible to implement.
Multiple furnace levels.
Level one, can burn simple stuff (sticks), and smelt maybe tin. One output slot
Level two, can burn planks, and coal, and smelt iron. But it must be encased in a cobblestone shell. Two output slot
Level three, can burn wood. Smelts copper. Must be encased in stone blocks. Two output slot, two input
Level four, can burn coal blocks, smelts almost everything, must be encased in stone. Three output slots, two input
Level five, can burn anything (lava bucket), smelts everthing. Must be encased in iron, which is encased by stone. Four output slots, two input. Could also require a metal chest above it, and require a lava node below it.

Unfortunately my requirements level 1-3 can be done in a cave. But maybe each level requires a sub-level nearby, and also require a similar level chest to be placed nearby.
Brian Gaucher
Member
 
Posts: 58
Joined: Wed Jan 10, 2018 1:56 am
GitHub: BrianGaucher
In-game: Camasia

Re: Reasons to build a home

Postby texmex » Thu Jan 24, 2019 1:55 pm

Brian Gaucher wrote:Another idea that should be possible to implement.
Multiple furnace levels.
Level one, can burn simple stuff (sticks), and smelt maybe tin. One output slot
Level two, can burn planks, and coal, and smelt iron. But it must be encased in a cobblestone shell. Two output slot
Level three, can burn wood. Smelts copper. Must be encased in stone blocks. Two output slot, two input
Level four, can burn coal blocks, smelts almost everything, must be encased in stone. Three output slots, two input
Level five, can burn anything (lava bucket), smelts everthing. Must be encased in iron, which is encased by stone. Four output slots, two input. Could also require a metal chest above it, and require a lava node below it.

Unfortunately my requirements level 1-3 can be done in a cave. But maybe each level requires a sub-level nearby, and also require a similar level chest to be placed nearby.


This as a part of a larger coherent game system would be awesome. It should be fairly simply to implement with rubenwardy's crafting mod and raymoo's multiblock mod.
texmex
Member
 
Posts: 1291
Joined: Mon Jul 11, 2016 9:08 pm
GitHub: tacotexmex
In-game: texmex

Re: Reasons to build a home

Postby Astrobe » Thu Jan 24, 2019 6:15 pm

Termos wrote:I'm not a fan of placing arbitrary restrictions in order to make player do things. I prefer mechanics that encourage rather than enforce.

For example, having mobs that steal stuff.


That's a good piece advice, but in this specific case it also creates opportunities. For instance setting up a pick shop in a mine; or at the game mechanics level, player professions (can repair/craft one type of tool anywhere).
Astrobe
Member
 
Posts: 223
Joined: Sun Apr 01, 2018 10:46 am

Re: Reasons to build a home

Postby Brian Gaucher » Fri Jan 25, 2019 3:12 pm

I don't think this idea would work, but it might give someone an idea. What if to craft a steel pick, you must have 5 stone picks in a chest nearby, 5 steel for copper, 5 copper for diamond, etc. I doubt people wll travel with that many picks, forcing them to craft at home, or set up a miniature base.
Brian Gaucher
Member
 
Posts: 58
Joined: Wed Jan 10, 2018 1:56 am
GitHub: BrianGaucher
In-game: Camasia

Re: Reasons to build a home

Postby ThorfinnS » Sat Mar 02, 2019 3:50 am

Termos wrote:I'm not a fan of placing arbitrary restrictions in order to make player do things. I prefer mechanics that encourage rather than enforce.
Very much agree.

What if a wooden pickaxe crafted at a workbench in a house had the statistics of a stone pickaxe built in the field? If you build a bigger/better house, you can upgrade the workbench that lets you craft a stone sword that works as well as an iron sword made away from home? The workbench has a chance (improving by upgrade level) of producing an extra node, or not using a material? Ovens and stoves that let you get more cooked food or metal or glass than you get using a furnace out in the hinterlands? Riffing off an earlier suggestion, don't restrict growing food away from the house; give extra for growing it close to home.

Or you attract useful NPCs who can be assigned to milk your cows or shear your sheep or harvest your crops or bake your bread, but the number of them is dependent on the "quality" of your manor house? And, obviously, you have to provide servant's quarters. The value of their housing (as measured by an arbitrary cost of materials, value of furnishings and size of living space) determines their efficiency.

Some of this sounds easy to implement, some maybe not so much. Shouldn't be much in the way of overhead; you only have to check to see if the house meets the minimums when you place the bench/oven/stove/whatever. I suppose someone could place it, then tear down the house around it, but why? Or if it bothers you, check for minimums when using the bench?

There are all kinds of ways to encourage building housing.
ThorfinnS
Member
 
Posts: 65
Joined: Mon Feb 25, 2019 10:05 pm

Re: Reasons to build a home

Postby Astrobe » Sun Mar 03, 2019 6:27 pm

I'm experimenting with something like that: travelers are attracted (meaning: spawn) by tables, chairs and wood (floor) in a well-lit environment (but not too well, there must be a roof). If you feed them bread, they drop something that cannot be obtained by other means (in my case, Mese) then disappear. The bigger your inn, the larger your income because NPCs spawn on the floor (just aligning chairs and tables won't do, you have to space them out to be maximize your chances).

In multiplayer, it's wise to build full rooms with locked doors and protections otherwise other players can get the reward while you are away. In survival, they also have to be protected from monsters. In singleplayer non-survival, you still have to make sure they don't wander away.

Spawning parameters offer a lot of flexibility: spawning chance and interval determines the inn size/income ratio. One can make the chance (or the type of NPC and therefore what they give) depend on the quality of the furniture (wood/stone/metal).
Astrobe
Member
 
Posts: 223
Joined: Sun Apr 01, 2018 10:46 am

Re: Reasons to build a home

Postby Sokomine » Sun Mar 10, 2019 5:36 pm

Astrobe wrote:I'm experimenting with something like that: travelers are attracted (meaning: spawn) by tables, chairs and wood (floor) in a well-lit environment (but not too well, there must be a roof). If you feed them bread, they drop something that cannot be obtained by other means (in my case, Mese) then disappear. The bigger your inn, the larger your income because NPCs spawn on the floor (just aligning chairs and tables won't do, you have to space them out to be maximize your chances).

Sounds entertaining. "Wild" npc-like mobs that are attracted by player-built structures are a good idea. They can add a lot of life to the game. But...just feeding them bread, get something dropped to the floor and the mobs disappearing, that is a bit...disappointing. They ought to stay and continue to enjoy the player's hospitality. Perhaps not even "drop" something for the first bread given but rather come to appreciate their stay with the player and eventually offering something in return, directly into the player's inventory, with a formspec popping up and showing what the mob gave. Creating rooms with bed, furnace, chest, door and window may invite mobs to "rent" a room. How many you've got attracted to your homes could be displayed in a highscore. Players ought to occasionally check if those homes are of sufficiently good quality (no mass-keeping in cheaply built cobble shacks!)

Astrobe wrote:In multiplayer, it's wise to build full rooms with locked doors and protections otherwise other players can get the reward while you are away.

No...I certainly don't like that aspect of your idea. Multiplayer servers are for players - not for mobs. Locked rooms may be justified in extremly rare occasions, but...it's mostly players that ought to show up and enjoy what you've built. If they're occupied, npc may step in. And: No reward while away. It's not good for gameplay if players cluster cpu-intensive things around spawn just in order to get "wealthy" while they are offline.

Astrobe wrote: In survival, they also have to be protected from monsters. In singleplayer non-survival, you still have to make sure they don't wander away.

Protecting them is a very good way of interaction. The villagers in AdventureTest throw rewards at the player if the player kills a hostile mob while the mob is nearby. Such actions could increase the player's reputation with the mob. Other players ought not to be able to kill the mobs.

Astrobe wrote:depend on the quality of the furniture (wood/stone/metal).

Well...that is difficult to tell. Rarity of material doesn't say much about how well something is built. An algorithm can't really decide that.

To me, the reason to build a house is still "because you can" (a *lot* cheaper than doing it RL!). It's kind of what the entire game is about and good for.

NPC roaming around...well...perhaps something in the direction of my citybuilder mod might also fit in here. The amount of mobs you can keep in one town would depend on the buildings placed there. But those are pre-built structures.
Sokomine
Member
 
Posts: 3750
Joined: Sun Sep 09, 2012 5:31 pm
GitHub: Sokomine

Re: Reasons to build a home

Postby Astrobe » Sat Mar 16, 2019 11:09 am

Yeah, the way it works is a bit simplistic (not even a particle effect when the NPC vanishes), but that's a prototype. I like to start with the simplest thing that can possibly work, see how it fares, and then extend it.

On the specific issue of clustering "inns" around the spawn point: while it is true that, because of the way spawning works (ABM-based), it is best to build where players are, it should be noticed that MobsRedo also let you limit the number of mobs spawned in an area and won't spawn mobs if players are too close. They also eventually despawn if not "tamed" and nobody is nearby. So building giant inns near the spawn point is not an optimal strategy (that said players usually don't have perfect knowledge of how the game works, so they might do it anyway if one doesn't give hints about the better way).

Well...that is difficult to tell. Rarity of material doesn't say much about how well something is built. An algorithm can't really decide that.


True. A good algorithm would not only be difficult to come up with, but also certainly CPU intensive. My current point of view is that it's the other players that should do the rating. However direct rating is too easily abused (nepotism, puppet accounts,...), so my current idea is that players indirectly "vote with their feet": nice buildings should attract players (in addition to shops or other facilities) and player presence increases the spawn chances of the NPCs.

Maybe this system can be improved if the owner of the building (according to protections) takes a cut on trades done with NPCs.
Astrobe
Member
 
Posts: 223
Joined: Sun Apr 01, 2018 10:46 am

Re: Reasons to build a home

Postby Hume2 » Sat Mar 16, 2019 7:33 pm

I've just realised that my nettle mod might be useful here too, so players won't use dirt as building material for houses. What do you think?
Hume2
Member
 
Posts: 252
Joined: Tue Jun 19, 2018 8:24 am
GitHub: Hume2
In-game: Hume2

Re: Reasons to build a home

Postby twoelk » Sun Mar 17, 2019 7:25 pm

around 2011 through to early 2013 I created and very much lived in a minecraft world I really liked. This was the only local map that I never used creative in and therefor a lot of the buildings made use of cheap nodes such as for example dirt for roofs.
Then I switched to the the lush woods and deep forests possible in minetest and stopped adding anything to my old and rather large mc map. It was too large to be easily converted for a long time until about two years ago I had access to a somewhat better computer and managed to convert the map. Sadly it didn't work correctly and so I kept fiddling with the outcome.
Last week I finally managed to fix some of the gamestopping issues and had an accessible and working map at last. I decided to use moretrees to get rid of my last unknown nodes. I had left the spawning of new trees active ... oops

At first I was somewhat annoyed how the trees spawned in places where non had been before and wrecked some of my viewing spots. Have you ever seen pictures of temples overgrown by jungle? In many places my old mc map now looks like some long abandoned place of some forgotten civilization. Trees and other plants growing in, through and over my structures, dwarfing my ambitious buildings and adding a lovely melancholic atmosphere of a lost place.

I guess I won't repair this unintended effect and just enjoy the new sights.

So regarding the weeds mod,
maybe some weeds could venture into colonizing cobble and gravel surfaces or even stone exposed to the sun. The effects might add some atmosphere to abandoned places and old mining scars in the landscape.
twoelk
Member
 
Posts: 1306
Joined: Fri Apr 19, 2013 4:19 pm
GitHub: twoelk
In-game: twoelk



Return to Modding Discussion



Who is online

Users browsing this forum: Bing Bot [Bot] and 0 guests