Page 1 of 4

[Mod] Beds [beds]

Posted: Tue Jul 31, 2012 15:08
by PilzAdam
Hello everyone!
I have made a bed mod. The bed allows you to sleep at the night until the next morning.
To use the bed you first have to craft it:

Code: Select all

white wool  wool  wool
  stick          stick
(Theres no "normal" way to get wool so you can use the commands "/giveme wool:color")
The bed will have the color of the two wools that arent white.
If you have crafted it you can place it anywhere. You always place the bottom part of the bed and the top part appears in your view direction.
To go to sleep you have to hit the bed with a rightclick. If its night you sleep until the next morning. When you want to leave the bed hit the bed again with a rightclick.

Special thanks goes to thefamilygrog66 who has done the colored beds.

License:
Everything is WTFPL.

Depends:
  • default
  • wool
GitHub:
https://github.com/PilzAdam/beds

Download:
https://github.com/PilzAdam/beds/zipball/master
0.4.6 version:
http://github.com/PilzAdam/beds/archive ... 1dbe9b.zip

Good night!

Posted: Tue Jul 31, 2012 15:23
by Topywo
The bed mod works!

You did know about this one: http://minetest.net/forum/viewtopic.php?id=1432 ?

Posted: Tue Jul 31, 2012 15:31
by PilzAdam
Topywo wrote:The bed mod works!

You did know about this one: http://minetest.net/forum/viewtopic.php?id=1432 ?
bgsmithjr wrote: Link broken until further notice.
I want to make a bed mod that works.

Posted: Tue Jul 31, 2012 15:37
by Topywo
Ok, sorry, didn't try the link because I downloaded it a while ago.

Well it works and you do a lot of players a pleasure with it, so awesome!

edit:typo :-)

Posted: Tue Jul 31, 2012 15:40
by PilzAdam
Topywo wrote:Ok, sorry, didn't try the link because I downloaded it a while ago.

Well it works and you do a lot of players a pleasure with it, so awesome!

edit:typo :-)
Thanks

Posted: Wed Aug 01, 2012 03:14
by Josh
Hey PilzAdam. Thanks for this great mod i installed it & it's running fine!

Posted: Wed Aug 01, 2012 05:32
by leo_rockway
I was working on a bed too. The difference with mine is that it aims at singleplayer, so it never checks if everybody is sleeping. The player just punches the bed. The extra thing my bed does is set your spawn, so if your character dies you reespawn where your bed is/was.
I took that stuff from some spawn mod (I don't remember who coded it, but it's here in the forum).

Posted: Wed Aug 01, 2012 08:10
by PilzAdam
leo_rockway wrote:I was working on a bed too. The difference with mine is that it aims at singleplayer, so it never checks if everybody is sleeping. The player just punches the bed. The extra thing my bed does is set your spawn, so if your character dies you reespawn where your bed is/was.
I took that stuff from some spawn mod (I don't remember who coded it, but it's here in the forum).
1. It checks wether everybody is in the bed. So it will work on multiplayer, too.
2. The spawn point idea is good. I will add this in a future version.

Posted: Wed Aug 01, 2012 10:34
by srothe
Your recipe conflicts with tonyka's 3D-furniture mod, where it is used to create a table.

Cheers, Stefan

Posted: Wed Aug 01, 2012 19:35
by PilzAdam
srothe wrote:Your recipe conflicts with tonyka's 3D-furniture mod, where it is used to create a table.

Cheers, Stefan
I could replace the wood with wool but theres only the /giveme way to get wool. Some other ideas to craft it with items that you can get without /giveme?

Posted: Wed Aug 01, 2012 19:40
by Topywo
- - - - - - dryshrub dryshrub dryshrub ;-)
wood wood wood or wood wood wood or wood wood wood
wood - wood trunk - trunk stick - stick

edit: make it look better :-p

Posted: Wed Aug 01, 2012 21:32
by Bas080
You also put effort into the textures. very nice :)

Posted: Wed Aug 01, 2012 22:38
by leo_rockway
PilzAdam wrote:1. It checks wether everybody is in the bed. So it will work on multiplayer, too.
2. The spawn point idea is good. I will add this in a future version.
1. That's great. I didn't care much about that when coding mine because I usually play single player.
2. I can upload my code (it's not really mine, I took it from the other mod and adapted it a bit) if you want to see it. Or I could look for the other mod.

Also, I have a springs-like sound in my version, so when you walk on the bed it makes that sound. I also wanted to check if there was a way to make the bed make you bounce a bit, but I have no idea if that's possible with the current API.

Regarding the recipe: I wanted to use wool as well, but since there isn't a way to generate it I added a flowers dependency and made the recipe like this:

cotton, cotton, cotton
wood, wood, wood
stick, , stick

EDIT: Here's the code for spawn: http://minetest.net/forum/viewtopic.php?id=1203

Posted: Thu Aug 02, 2012 09:09
by PilzAdam
leo_rockway wrote:
PilzAdam wrote:1. It checks wether everybody is in the bed. So it will work on multiplayer, too.
2. The spawn point idea is good. I will add this in a future version.
1. That's great. I didn't care much about that when coding mine because I usually play single player.
2. I can upload my code (it's not really mine, I took it from the other mod and adapted it a bit) if you want to see it. Or I could look for the other mod.

Also, I have a springs-like sound in my version, so when you walk on the bed it makes that sound. I also wanted to check if there was a way to make the bed make you bounce a bit, but I have no idea if that's possible with the current API.

Regarding the recipe: I wanted to use wool as well, but since there isn't a way to generate it I added a flowers dependency and made the recipe like this:

cotton, cotton, cotton
wood, wood, wood
stick, , stick

EDIT: Here's the code for spawn: http://minetest.net/forum/viewtopic.php?id=1203
Thanks for the tips!

Posted: Thu Aug 02, 2012 13:03
by srothe
still the old recipe in your Version 2 ;-)

Posted: Thu Aug 02, 2012 13:04
by PilzAdam
srothe wrote:still the old recipe in your Version 2 ;-)
Thanks

Posted: Thu Aug 02, 2012 13:05
by PilzAdam
I made a mistake with the download for version 2. I replaced the link.
Sorry

Posted: Thu Aug 02, 2012 13:13
by srothe
Works now :-) Awesome!

Posted: Wed Sep 26, 2012 17:50
by shadowcelebi999
What actually is the crafting recipe for this because it isn't working.

Posted: Wed Sep 26, 2012 18:18
by PilzAdam
shadowcelebi999 wrote:What actually is the crafting recipe for this because it isn't working.
In the GitHub version its:

Code: Select all

wool wool wool
stick          stick
with only white wool.

Posted: Wed Sep 26, 2012 22:23
by Gage
pillz can u make it set spawn it would help me im always geting lost whene i die

Posted: Thu Sep 27, 2012 16:25
by PilzAdam
Gage wrote:pillz can u make it set spawn it would help me im always geting lost whene i die
1st: call me PilzAdam
2nd: call me Adam if PilzAdam is too long; dont call me Pilz
3rd: I will add it to my todo list
4th: You always spawn near the origin (x=0; y=0, z=0) of the map. If you memorize the way you go after your first spawn in the map, its not that hard to find the way back.

Posted: Sun Sep 30, 2012 12:30
by Echo
idea for realizing the spawning: it's stupid to set the spawning position in the minetest.conf with "static_spawnpoint" -> one spawn point for all worlds.
save the position with the world name in an external file. register_on_respawnplayer loads and sets that position for the player. of cause preferred included in this mod by you PilzAdam :-)

Posted: Sun Sep 30, 2012 12:33
by PilzAdam
Echo wrote:idea for realizing the spawning: it's stupid to set the spawning position in the minetest.conf with "static_spawnpoint" -> one spawn point for all worlds.
save the position with the world name in an external file. register_on_respawnplayer loads and sets that position for the player. of cause preferred included in this mod by you PilzAdam :-)
I know how to realize it. I coded something like this for jordan4ibanez. But im too lazy to implement it in this mod...

Posted: Mon Oct 01, 2012 04:59
by Napzilla
Thanks for this mod, it's a great idea. The machine I'm using at the moment doesn't have the juice to do mobs, but I find building and other stuff a night a pain because of the lighting. I'm having a slight problem implementing the mod, though. I apologize if this is the result of a stupid mistake, as I'm fairly new to minetest. I installed the mod properly, but when I attempt to run the game, I get the following error:

Code: Select all

ModError:mod"PilzAdam-beds-18430f3" has unsatisfied dependencies: "wool"
I know there's wool mods out there, but I wasn't sure which one minetest was looking for here. Anyway, if I click "Procede", I just go back to the start screen. Any ideas on what I did wrong?

Thanks!