Page 1 of 2

[Mod] Compass [0.5] [compass]

PostPosted: Fri Nov 16, 2012 19:42
by Echo
Hold a compass in your hand to show you your way home! Yes, the needle moves!
It points to 0/0/0 OR to the static spawnpoint defined in the minetest.conf
If you have sethome-mod installed, it points to the saved position.
If you have installed PilzAdams bed-mod, it point to that bed. You have to build PilzAdams bed, sleep in it to set the spawn-point.

The positions are updated every minute (just in case you move your bed or fall asleep in foreign beds :-))
So the order is: 0/0/0 -> static-spawnpoint -> sethome-position -> bed-position


Build your compass

steel_ingot
steel_ingot mese_crystal_fragment steel_ingot
steel_ingot

License
Code: WTFPL, textures: CC BY-SA

Mod dependencies
PilzAdams Beds mod (optional)
sethome-mod (optional) https://github.com/xyzz/minetest-mods/tree/master/sethome


ToDos
  • check if papyrus-bed-mod can be supported

Download
0.5 compass_0_5.zip
0.4 compass_0_4.zip
0.3 compass_0_3.zip
0.2 compass_0_2.zip
PilzAdams mod of my mod to his mod compass.zip
0.1 compass_0_1.zip

Version-history
  • 0.5 changed recipe
  • 0.4 fixed crash on leaving server, fixed crash when sethome-mod wasn't installed
  • 0.3 added support for sethome-mod
  • 0.2 code cleanup, fixed texture glitches, defaults to 0/0/0 or the static_spawnpoint in minetest.conf, updates the beds position by the minute
  • 0.1 initial release

Image

Edit: added word "license" for sfan5s squealer-script

PostPosted: Fri Nov 16, 2012 20:43
by PilzAdam
This mod is awesome!
I have improved it a bit: http://ompldr.org/vZ2J3NA/compass.zip
If you like my changes it would be nice to give credit but the changes are WTFPL.
EDIT: Oooops, wrong mod

PostPosted: Fri Nov 16, 2012 23:38
by Echo
Hell, I knew it could be done better :-)

My version for everybody to see how it works and understand the code, your version... amazing to see what can be done in LUA.

PostPosted: Sat Nov 17, 2012 02:09
by Josh
Wow! many things can be done in lua. Great job Echo!

PostPosted: Sat Nov 17, 2012 19:21
by leo_rockway
Amazing, thanks!

PostPosted: Sun Nov 18, 2012 05:11
by VanessaE
Suggestion:

Have the compass support as many reasonable targets/mods as possible.

* Have it point to {0,0,0} by default,
* or, point to the game's default spawn point if one has been set in the config file,
* or, point to the player's /home location as set by the Sethome mod,
* or, point to the coordinates set by the bed mod (as you have it now),
* or, point to a player-specified set of coordinates.

The player should be able to tell the compass which one of these it should point to, perhaps via a UI accessible by right-clicking on the compass when it is placed on the ground.

The more of these you can support, the wider the range of useful places this mod can be installed in.

PostPosted: Sun Nov 18, 2012 06:54
by Echo
I will check your wishlist.
The default to 0/0/0 or the spawn-point in the config file will be no problem.
Haven't ever tried the Sethome-mod. If it's not colliding with PilzAdams bed-mod, I will add it.

But I want the compass to be a tool, not a node.

PostPosted: Sun Nov 18, 2012 21:10
by VanessaE
Oh right, didn't think of it like that. Still, to enter a set of coordinates, you'd need either a node (hence why you use a bed), or to add a field to the inventory screen or something.

PostPosted: Sun Nov 18, 2012 21:23
by cHyper
awesome mod ...

PostPosted: Mon Nov 19, 2012 16:17
by PilzAdam
VanessaE wrote:Suggestion:

Have the compass support as many reasonable targets/mods as possible.

* Have it point to {0,0,0} by default,
* or, point to the game's default spawn point if one has been set in the config file,
* or, point to the player's /home location as set by the Sethome mod,
* or, point to the coordinates set by the bed mod (as you have it now),
* or, point to a player-specified set of coordinates.

The player should be able to tell the compass which one of these it should point to, perhaps via a UI accessible by right-clicking on the compass when it is placed on the ground.

The more of these you can support, the wider the range of useful places this mod can be installed in.

In my version it points to 0,0,0 if there is no bed for the player.

PostPosted: Mon Nov 19, 2012 18:32
by Echo
since the update to 0.2 it points to 0/0/0 or the static spawnpoint defined in the minetest.conf.

@VanessaE
I will add support for "sethome", but PilzAdams bed-mod will be preferred. Oh btw. is this: https://github.com/xyzz/minetest-mods/tree/master/sethome the right sethome-mod?

PostPosted: Tue Nov 20, 2012 06:12
by VanessaE
Echo: I think that's the right one, but I'm accustomed to using it from someone else's server (e.g. redcrab's) so I can't be 100% sure. It looks right, however.

PostPosted: Tue Nov 20, 2012 12:52
by ruskie
Also add support for the papyrus bed.

PostPosted: Tue Nov 20, 2012 16:39
by Sokomine
Finally! A working compass! Thanks for this mod. It adds something I've been looking for for quite some time.

PostPosted: Tue Nov 20, 2012 18:25
by Echo
ruskie wrote:Also add support for the papyrus bed.

Sorry, no spawn-point is set for the player in the papyrus bed-mod when going to sleep.

PostPosted: Tue Nov 20, 2012 18:32
by qwrwed
Then maybe you could upload a version of papyrus bed with set spawnpoint? I would like to see that and I'm sure I'm not the only one.

PostPosted: Tue Nov 20, 2012 19:14
by Echo
VanessaE wrote:Echo: I think that's the right one, but I'm accustomed to using it from someone else's server (e.g. redcrab's) so I can't be 100% sure. It looks right, however.


Added support for sethome-mod. The order is now:
0/0/0 -> static spawnpoint from minetest.conf -> sethome-mod position -> PilzAdams bed-mod position

PostPosted: Fri Nov 30, 2012 18:14
by jordan4ibanez
Wow that's actually really nice

PostPosted: Thu Dec 06, 2012 20:44
by Echo
Update to version 0.4

Fixed crash when a player left server-game.
Fixed crash when sethome-mod wasn't installed.

PostPosted: Fri Dec 21, 2012 02:56
by VanessaE
Mese behavior has changed:

http://minetest.net/forum/viewtopic.php?id=4154

Suggest using Mese Crystal Fragments in place of the old mese object.

PostPosted: Sun Dec 23, 2012 11:25
by Echo
VanessaE wrote:Mese behavior has changed:

http://minetest.net/forum/viewtopic.php?id=4154

Suggest using Mese Crystal Fragments in place of the old mese object.


I like the new behaviour of mese. Changed the recipe.

PostPosted: Sun Dec 23, 2012 12:34
by Zeg9
Fine. First mod using mese crystal fragments :) (I think)
EDIT: Why mediafire? ...
EDIT2: forget this ^ I have adblock

PostPosted: Sun Dec 23, 2012 16:40
by VanessaE
Zeg9: actually the first is UFOs :-)

PostPosted: Wed Aug 07, 2013 05:49
by DarthNihilus
Zeg9, mediafire is the best upload service - no ad's, no waiting shit, DL at full speed... Thanks!

PostPosted: Wed Aug 07, 2013 11:37
by Evergreen
DarthNihilus wrote:Zeg9, mediafire is the best upload service - no ad's, no waiting shit, DL at full speed... Thanks!
Ehm, no. I think github suits him fine + it is not just an upload site. It keeps track of all the changes to the project, it is great for colaberating, so no. And I don't think you want to switch just because of a 1 second difference in the download time.