[Mod] Beds (complete rewrite) [1.1] [beds]

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

[Mod] Beds (complete rewrite) [1.1] [beds]

by BlockMen » Thu Aug 07, 2014 08:50

Hello everyone,

this mod adds obviously beds to Minetest. It's a complete rewrite from scratch, works on singleplayer and multiplayer.
Screenshot:
Image

When sleeping you can skip the night and set a respawn point there.
To sleep rightclick the bed, if playing in singleplayer mode the night gets skipped immediately. If playing on server you get shown how many other players are currently in bed too. If all players are sleeping the night gets skipped aswell. Also if more than 50% of the players are lying in bed the night-skip can be forced by those.

More features:
- Players are really lying in beds
- overview how many players are lying in bed already (image)
- a majority can force the night skip (>50%)
- no "getting stuck" or "falling though floors"
- simple bed shape supports fully MC textures
- API to add more beds


You can craft two types of beds:

Simple shaped bed:
Image

Fancy shaped bed:
Image

mixing different wood or wool is also possible

Depends:
default
wool


Download:
Version 1.1: Download
Github: beds

all Versions

Notice:
Minetest 0.4.10 or later required

License:
Source code and textures: WTFPL


Please give Feedback and ideas for improvement
Last edited by BlockMen on Fri Aug 22, 2014 11:49, edited 2 times in total.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun
 

gsmanners
Member
 
Posts: 159
Joined: Fri Jan 10, 2014 21:37

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by gsmanners » Thu Aug 07, 2014 21:10

Could you add in an option for check_in_beds to do majority rules, rather than all-or-nothing? That would be super, IMHO.
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by philipbenr » Fri Aug 08, 2014 16:45

Awesome. I will be putting this into my new game later on. Thanks BlockMen!
 

User avatar
lag01
Member
 
Posts: 273
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by lag01 » Fri Aug 08, 2014 21:02

Looks good, even support protection blocks (unlike doors).
but don't work too well with screwdriver :)
i will test it on my server.
Last edited by lag01 on Fri Aug 08, 2014 23:13, edited 2 times in total.
 

User avatar
philipbenr
Member
 
Posts: 1688
Joined: Fri Jun 14, 2013 01:56
Location: United States
GitHub: philipbenr
IRC: philipbenr
In-game: robinspi

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by philipbenr » Fri Aug 08, 2014 22:13

Hmmm... Not really a double post, but anyway, found this:

https://forum.minetest.net/viewtopic.php?f=14&t=2840&start=250#p150445
Image
Just maybe...

Yes, all the nodeboxes would make it sort of laggy, but I think it would be awesome if there were two different versions.
 

User avatar
Inocudom
Member
 
Posts: 3007
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Inocudom » Sat Aug 09, 2014 16:21

Nodeboxes would not be as much of an issue if they followed the same rendering rules as normal nodes do. However, this doesn't seem to be of concern to anyone, so it is very unlikely that things will ever improve in this area. Sorry, but you must face facts.
My whole legacy is an abomination.
 

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

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Casimir » Sat Aug 09, 2014 20:48

Finally a bed mod that works. I like things that work.

Personally I wouldn't show the formspecs when there is only one player. And instead of a "Good morning" message the player could just stay in bed until he right clicks or something.

edit:
Code: Select all
local function update_formspecs(finished)
   local ges = #minetest.get_connected_players()
   if ges == 1 then return end
   if finished then return end
   local form_n = form ..
      "label[2.2,11;"..tostring(player_in_bed).." of "..tostring(ges).." players are in bed]"

   for name,_ in pairs(beds.player) do
      minetest.show_formspec(name, "beds_form", form_n)
   end
end


@ philipbenr & Inocudom
BlockMen has good reasons for the nodebox he choose. First it allows to support MC textures, second it looks good with the laying animation as the player lays on the bed and has no strange intersections with the nodebox. jp's nodebox is nice but it belongs to the homedecor mod where it is now.
Last edited by Casimir on Sat Aug 09, 2014 22:10, edited 1 time in total.
 

Sokomine
Member
 
Posts: 3460
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Sokomine » Sat Aug 09, 2014 21:46

Casimir wrote:BlockMen has good reasons for the nodebox he choose. First it allows to support MC textures, second it looks good with the laying animation as the player lays on the bed and has no strange intersections with the nodebox.

I don't like the model and texture these beds use. The other beds (derived from coloredbeds by thefamilygrog66) look by far better. In some situations, beeing able to use textures from MC is fine; but in this case, I don't see a point. The texture this bed here comes with looks broken. It looks as if the bed has legs - but the nodebox doesn't. The upper part of the bed is ok, and the nodebox could be made working with another texture.

The bed's functionality - setting a sleeping animation for the player - and the turn-it-day-function are fine. Why not include these in other bed mods? So that, as far as beds are concerned, actual decorative model and functionality become seperate?
A list of my mods can be found here.
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by BlockMen » Sat Aug 09, 2014 22:18

Sokomine wrote:
Casimir wrote:BlockMen has good reasons for the nodebox he choose. First it allows to support MC textures, second it looks good with the laying animation as the player lays on the bed and has no strange intersections with the nodebox.

I don't like the model and texture these beds use. The other beds (derived from coloredbeds by thefamilygrog66) look by far better. In some situations, beeing able to use textures from MC is fine; but in this case, I don't see a point. The texture this bed here comes with looks broken. It looks as if the bed has legs - but the nodebox doesn't. The upper part of the bed is ok, and the nodebox could be made working with another texture.

The bed's functionality - setting a sleeping animation for the player - and the turn-it-day-function are fine. Why not include these in other bed mods? So that, as far as beds are concerned, actual decorative model and functionality become seperate?


And I don't like the beds model of PilzAdam's beds, but there is no accounting for taste, everyone can use the mod he/she prefers more. ;)
Furthermore, what is wrong about having a compatibility with MC textures? Many ppl profit from the compatibility of the character skin, here transfered Texture Packs (and its users) can profit.

Concering the linked model above: jp already proposed to use his beds model and I haven't decided yet, but I guess if so then a more simplified model only, not with that much details.

@Casimir, i agree that the formspec is not necessary in singleplayer, will remove it in next version. In multiplayer there should still be a notification for players that night is over. I might make the automatic kick out optional.

@gsmanners, yes, i will add a way to skip the night even if not all players are in bed (in fact its nearly unreachable on public servers)
 

Sokomine
Member
 
Posts: 3460
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Sokomine » Sun Aug 10, 2014 01:26

BlockMen wrote:Furthermore, what is wrong about having a compatibility with MC textures? Many ppl profit from the compatibility of the character skin, here transfered Texture Packs (and its users) can profit.

There's nothing wrong with compatibility as such. It's just that texture and nodebox do not fit together. The nodebox is of a rather simple design (a box - the bed touches the floor at every point) - whereas the texture indicates a bed with four legs. That does not work together. It looks ugly. Minetest can do better.

BlockMen wrote:Concering the linked model above: jp already proposed to use his beds model and I haven't decided yet, but I guess if so then a more simplified model only, not with that much details.

There are several diffrent beds out there by now. Please change the behaviour of your mod and do not let it override the *design* of the more decorative beds in PilzAdams mod - but *do* override the behaviour of beds found. Apart from PilzAdams mod, there is also the coloredbeds mod (which existed until the models where incorporated into PilzAdams mod), the extremly nice papyrus_bed, the bed in my cottages mod, and of course the new one jp created for homedecor. Changing their on_rightclick-function to that of your mod while keeping the design of the other beds would be very desirable.
A list of my mods can be found here.
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by BlockMen » Sun Aug 10, 2014 08:59

Sokomine wrote: That does not work together. It looks ugly. Minetest can do better.


You should have read my post before better, but i will quote something again and highlight the important for you:
BlockMen wrote:And I don't like the beds model of PilzAdam's beds, but there is no accounting for taste, everyone can use the mod he/she prefers more. ;)


Sokomine wrote:Please change the behaviour of your mod and do not let it override the *design* of the more decorative beds in PilzAdams mod - but *do* override the behaviour of beds found. [...] Changing their on_rightclick-function to that of your mod while keeping the design of the other beds would be very desirable.


My mod is a complete rewrite from scratch and i won't start to tinker with those complete different mods.
Either use this mod or not, your decision.
 

User avatar
balthazariv
Member
 
Posts: 214
Joined: Mon Apr 07, 2014 15:48

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by balthazariv » Mon Aug 11, 2014 21:51

Hello,

Great, I like it ...
" Players are really lying in beds" How do we see his character?
I press "F7" but it does not work. I just "Leave bed" button to wake up. Why can not your not sleep during the day? (Lol) It would be nice to add a clock in it "Mods"

Thanks
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by BlockMen » Thu Aug 14, 2014 12:38

Well, I can't decide which model I prefer more, so now it's your turn to choose.

Image
http://strawpoll.me/2339367

Only the votes within the next week are count.

EDIT: the right one is a simplified model of jp's bed model
 

User avatar
Jordach
Member
 
Posts: 4484
Joined: Mon Oct 03, 2011 17:58
Location: Blender Scene
GitHub: Jordach
IRC: Jordach
In-game: Jordach

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Jordach » Thu Aug 14, 2014 12:42

And more colours for the beds would be nice, to completely remove dependancies of PA's beds.
viewtopic.php?f=10&t=19056 Solar Plains Dev Server
 

sawik
Member
 
Posts: 16
Joined: Sun Jan 12, 2014 18:11
Location: Poland

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by sawik » Thu Aug 14, 2014 13:58

I my opinion You could add both models and add an option in config file for choosing bed model... In case when there is no proper texture in texturepack, the defald one would be used, I'm right?
 

User avatar
lag01
Member
 
Posts: 273
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by lag01 » Thu Aug 14, 2014 18:34

bed from the left looks more modern and is also "stackable" to double bed.
 

User avatar
Minetestforfun
Member
 
Posts: 936
Joined: Tue Aug 05, 2014 14:09
Location: On earth
GitHub: Darcidride
IRC: Darcidride + MinetestForFun
In-game: Darcidride + MinetestForFun

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Minetestforfun » Thu Aug 14, 2014 20:29

BlockMen wrote:Well, I can't decide which model I prefer more, so now it's your turn to choose.

Image
http://strawpoll.me/2339367

Only the votes within the next week are count.

EDIT: the right one is a simplified model of jp's bed model


Please both ! :D
If i can choose between a simple bed and, a more detailed bed, it's the better way ! :)
(im very keen on the "stackable" of the simple bed, but the detailed bed can be useful for an individual bed in a small house)
 

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

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Casimir » Thu Aug 14, 2014 21:01

This is why i like the simple beds better.
You can not combine the fancy ones that way.
Image
 

Sokomine
Member
 
Posts: 3460
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Sokomine » Thu Aug 14, 2014 21:13

BlockMen wrote:My mod is a complete rewrite from scratch and i won't start to tinker with those complete different mods.


Code: Select all
-- aliases for PA's beds mod
minetest.register_alias("beds:bed_bottom_red", "beds:bed_bottom")

(and so on) This turned the beds on Krocks server from the models done by thefamilygrog (which are used in PilzAdams beds mod) to the more simple model you use. Krock eventually added the old bed models back, but they're now all the same color :-( I had invested some effort into giving beds in diffrent rooms diffrent, fitting colors, and even opened a shop selling them. Looks pretty stupid now, with diffrent shops selling all the same product.

BlockMen wrote:Either use this mod or not, your decision.

That's only true for singleplayer worlds. On servers, the server owner decides. And there are many who are reluctant to use the old beds mod due to fear for bugs. Your mod is highly welcomed there.

Why not seperate functionality and design? It might be possible for your mod to override the on_rightclick function of beds from other mods such as the aforementioned beds mod, homedecor, cottages or whatever else might show up. The list of beds for which functionality could be provided might be a list/table that's initially empty, with a sample list with all beds which might work that way.

BlockMen wrote:And I don't like the beds model of PilzAdam's beds, but there is no accounting for taste, everyone can use the mod he/she prefers more. ;)

Fine :-) That's right. So...can I please use the bed models I like? On servers? With the functionality from your mod, but the design/nodebox from other mods? :-) I know that's uncommon. I want your mod to be more of a library (perhaps with some sample beds) than the single bed model that'll be found from now onward on servers.

Or perhaps we ought to change our beds ourshelves and make them call your lie-down-and-sleep-till-morning function when this mod is installed. Still, that'd require code in each mod.
A list of my mods can be found here.
 

User avatar
Evergreen
Member
 
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
Location: A forest in the midwest
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by Evergreen » Thu Aug 14, 2014 22:34

I agree. The simple one is better for this type of mod, the fancy one would be more suited to homedecor.
 

User avatar
lightonflux
Member
 
Posts: 384
Joined: Mon Nov 11, 2013 07:22
Location: Germany
In-game: lof

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by lightonflux » Fri Aug 15, 2014 16:47

I really really like this mod. Integrates seamlessly with existing worlds (same node name) and the code is extremely reliable. Tried beds on slabs, floating beds and tried everything to spawn in blocks when i wake up.

NOTHING weird happened, everything worked great. Thanks a lot, BlockMen.

Imagine we would have a carts rewrite that worked so reliable. *hint* *hint*
 

User avatar
TheEpicJames
Member
 
Posts: 634
Joined: Sun Dec 29, 2013 23:05
Location: Some grassy area next to a forest, a river and a desert.
IRC: TheEpicJames
In-game: Block_Guy

Re: [Mod] Beds (complete rewrite) [1.0.1 beta] [beds]

by TheEpicJames » Fri Aug 15, 2014 21:02

hey, i got an idea, lets make the models toggle-able!
so you can like toggle the more detailed one
 

User avatar
BlockMen
Developer
 
Posts: 768
Joined: Fri Mar 01, 2013 17:24
Location: Germany
GitHub: BlockMen

Version 1.1

by BlockMen » Fri Aug 22, 2014 11:57

Update! Version 1.1 released

Here are the results of the poll:
fancy bed: 12 votes (60%)
both models: 5 votes (25%)
simpel bed: 3 votes (15%)

So it is a clear majority that wants a fancy shaped bed. But since 25% wanted both and the discussion here showed benefits of a simple shaped model I decided to include both, so this mod has now the fancy shaped bed and the simple shaped. (See first post for crafting recipes). Also I added an API to add easily more beds, so everyone who thinks that those 2 beds are not enough can easily extend it.

I hope everyone like the changes, a complete changelog is below.

Changelog:
- Add fancy bed model (based on jp's model)
- Add API to register beds
- Allow players always to detach from bed (by donat-b)
- If more than 50% of players want sleep they can skip the night
- Don't show sleep dialog in singleplayer
 

Sokomine
Member
 
Posts: 3460
Joined: Sun Sep 09, 2012 17:31

Re: [Mod] Beds (complete rewrite) [1.1] [beds]

by Sokomine » Fri Aug 22, 2014 14:58

BlockMen wrote:Also I added an API to add easily more beds, so everyone who thinks that those 2 beds are not enough can easily extend it.

Thank you! That does help a lot. That way, even the papyrus bed might be used - to a degree.
A list of my mods can be found here.
 

Next

Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 11 guests