Reasons to build a home

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Reasons to build a home

by Rochambeau » Post

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?

User avatar
ChimneySwift
Member
Posts: 320
Joined: Fri Sep 22, 2017 06:46
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift
Location: 127.0.0.1

Re: Reasons to build a home

by ChimneySwift » Post

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.
A spoon is basically a tiny bowl with a stick on it

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Reasons to build a home

by texmex » Post

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.
Last edited by texmex on Wed Aug 29, 2018 19:16, edited 1 time in total.

Astrobe
Member
Posts: 570
Joined: Sun Apr 01, 2018 10:46

Re: Reasons to build a home

by Astrobe » Post

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.

User avatar
Hume2
Member
Posts: 709
Joined: Tue Jun 19, 2018 08:24
GitHub: Hume2
In-game: Hume2
Location: Czech Republic

Re: Reasons to build a home

by Hume2 » Post

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.
If you lack the reality, go on a trip or find a job.

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: Reasons to build a home

by Rochambeau » Post

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.
Attachments
screenshot.png
screenshot.png (294.98 KiB) Viewed 1562 times

User avatar
Linuxdirk
Member
Posts: 3217
Joined: Wed Sep 17, 2014 11:21
In-game: Linuxdirk
Location: Germany
Contact:

Re: Reasons to build a home

by Linuxdirk » Post

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

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: Reasons to build a home

by Rochambeau » Post

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: 119
Joined: Tue Sep 23, 2014 11:37

Re: Reasons to build a home

by Rochambeau » Post

Any idea how I can detect if a bed was used?

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Reasons to build a home

by texmex » Post

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.

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: Reasons to build a home

by Rochambeau » Post

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.

Astrobe
Member
Posts: 570
Joined: Sun Apr 01, 2018 10:46

Re: Reasons to build a home

by Astrobe » Post

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.

Termos
Member
Posts: 417
Joined: Sun Dec 16, 2018 12:50

Re: Reasons to build a home

by Termos » Post

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.

Rochambeau
Member
Posts: 119
Joined: Tue Sep 23, 2014 11:37

Re: Reasons to build a home

by Rochambeau » Post

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?

Brian Gaucher
Member
Posts: 77
Joined: Wed Jan 10, 2018 01:56
GitHub: BrianGaucher
In-game: Camasia

Re: Reasons to build a home

by Brian Gaucher » Post

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.
Current projects: Making a CTF map, Learning C++, Learning Programmer's Dvorak

User avatar
texmex
Member
Posts: 1753
Joined: Mon Jul 11, 2016 21:08
GitHub: tacotexmex
In-game: tacotexmex

Re: Reasons to build a home

by texmex » Post

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.

Astrobe
Member
Posts: 570
Joined: Sun Apr 01, 2018 10:46

Re: Reasons to build a home

by Astrobe » Post

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).

Brian Gaucher
Member
Posts: 77
Joined: Wed Jan 10, 2018 01:56
GitHub: BrianGaucher
In-game: Camasia

Re: Reasons to build a home

by Brian Gaucher » Post

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.
Current projects: Making a CTF map, Learning C++, Learning Programmer's Dvorak

ThorfinnS
Member
Posts: 311
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: Reasons to build a home

by ThorfinnS » Post

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.

Astrobe
Member
Posts: 570
Joined: Sun Apr 01, 2018 10:46

Re: Reasons to build a home

by Astrobe » Post

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).

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

Re: Reasons to build a home

by Sokomine » Post

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.
A list of my mods can be found here.

untiltoday
Member
Posts: 20
Joined: Wed Aug 07, 2019 22:50
In-game: ParalyzeEntertain

Re: Reasons to build a home

by untiltoday » Post

  • It can be warmer inside a house.
  • It's silly to limit the number of beds if they fit — unless you make automatic police that fines you for violating these arbitrary rules, but while that's an entertaining thought, I am not sure I'd want to play such a game — but a high number of people or furnaces with closed windows, while it increases warmth, gradually pollutes the air (see the discussion of the Smoke mod).

User avatar
Yvanhoe
Member
Posts: 140
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: Reasons to build a home

by Yvanhoe » Post

I like that idea! However I think many mechanics are still missing in the default game to make it really work. Here are a few ideas from different games (mostly One Hour One Life and Dwarf Fortress)

- Define a home as a closed volume, with windows and doors considered like walls if they are closed (allow the possibility for indoors doors)
- Closed walls, a floor, a carpet over a floor, a roof, all add heat to the house. While in a warm place, hunger is much slower.
- Some objects add comfort. In DF, they have a mood mechanics, it could be translated as hunger or speed of healing. That made sense to have sculptures and masterwork furniture in dwarves appartments.
- Objects left outside end up rotting. Food gets bad. Especially if caught in the rain.
- Objects can be stolen by mobs if not in a safe place.

Also, I am of the opinion that the default inventory is really too easy on the player, but forcing a player to do trips back home all the time is annoying so I would enjoy a mechanics where you can extend your inventory functions by building some things in your home (maybe with a limited range effect?).

E.g:
- You only start with one inventory row but every chest in your home adds a row in your inventory.
- You can only have access to the armor page if you have a armor stand at home (in real life, armors require regular maintenance)
- Crafting grid is 2x2 by default but become 2x3 or 3x3 by building some kind of workbenches.
- You heal only if you have some medical supplies at home.
- You may automatically consume some food in your home (maybe something in a special container) when you get hungry.
- A repairshop in your home would allow tools to be more durable or to slowly regenerate over time.

bystroad
New member
Posts: 1
Joined: Tue Nov 10, 2020 17:06

Re: Reasons to build a home

by bystroad » Post

Another idea: a comfort level which increases in presence of particular items (and combinations of those items) and decreases when the items are not seen for a long time. And when the comfort level is low for a long time then the health starts dropping/the player becomes slow/another penalty is applied.

For example, a player standing open in the forest under the clear sky has a comfort level –100; a player inside a small dirt box has a comfort level –50; a player in a stone room with a bed, a chest and a torch on the wall gets a comfort of 10 and a player in an apartment made of gold blocks with windows having fancy curtains on them and lots of items from "homedecor" mod placed around gets a comfort level of 9000. But if the items in the latter apartment are placed not according to Feng Shui then the player gets a little penalty and the resultant level becomes 8890.

And for example if the player survives for 3 nights but keeps his stuff in a 3x3 dirt box then digging becomes significantly slower, and if he continues to live in that box then his health starts dropping.

You may see something similar in "Dwarf Fortress": the dwarves get happy thoughts when they see some fancy stuff and get sad thoughts when they see blood or gore, and the latter may make them drive them crazy and make them all-destroying berserks.

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

Re: Reasons to build a home

by Sokomine » Post

bystroad wrote: and a player in an apartment made of gold blocks
Irks! A player standing in such an apartment ought to have a comfot level of -1000. Gold blocks are usually rather ugly.
bystroad wrote: You may see something similar in "Dwarf Fortress": the dwarves get happy thoughts when they see some fancy stuff and get sad thoughts when they see blood or gore, and the latter may make them drive them crazy and make them all-destroying berserks.
I think that might be the better idea: Mobs want to have some things around them and feel more happy if those things are present (beds, doors, furnaces, chests, ..). Even animals might have some preferences: water, food, sleeping place. The player could then try to build nice, comftable houses for his/her mobs.
A list of my mods can be found here.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests