[Mod] Compass [0.5] [compass]

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

[Mod] Compass [0.5] [compass]

by Echo » Post

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/t ... er/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
Last edited by Echo on Sat Feb 09, 2013 13:10, edited 1 time in total.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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
Last edited by PilzAdam on Fri Nov 16, 2012 20:44, edited 1 time in total.

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

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.

Josh
Member
Posts: 1146
Joined: Fri Jun 29, 2012 23:11
Location: Victoria, Australia

by Josh » Post

Wow! many things can be done in lua. Great job Echo!

leo_rockway
Member
Posts: 211
Joined: Tue Jul 31, 2012 20:37

by leo_rockway » Post

Amazing, thanks!
Try Skyblock for MineClone 2
Listen to this sound and music pack!

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

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.

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

u34

by u34 » Post

awesome mod ...

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

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.

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

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/t ... er/sethome the right sethome-mod?

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

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.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
ruskie
New member
Posts: 6
Joined: Sat Oct 27, 2012 20:05
Location: Ljubljana.Slovenia.Europe
Contact:

by ruskie » Post

Also add support for the papyrus bed.

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

by Sokomine » Post

Finally! A working compass! Thanks for this mod. It adds something I've been looking for for quite some time.
A list of my mods can be found here.

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

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.

User avatar
qwrwed
Member
Posts: 326
Joined: Sun Jul 22, 2012 20:56
In-game: qwrwed or Nitro

by qwrwed » Post

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.
Last edited by qwrwed on Tue Nov 20, 2012 18:32, edited 1 time in total.

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

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

User avatar
jordan4ibanez
Member
Posts: 1923
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Post

Wow that's actually really nice
hello, am program. do language in rust. make computer do. okay i go now.

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

Update to version 0.4

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

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

Mese behavior has changed:

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

Suggest using Mese Crystal Fragments in place of the old mese object.
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

User avatar
Echo
Member
Posts: 122
Joined: Tue Jul 31, 2012 08:11
Location: Germany

by Echo » Post

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.

User avatar
Zeg9
Member
Posts: 608
Joined: Fri Sep 21, 2012 11:02
Location: France

by Zeg9 » Post

Fine. First mod using mese crystal fragments :) (I think)
EDIT: Why mediafire? ...
EDIT2: forget this ^ I have adblock
Last edited by Zeg9 on Sun Dec 23, 2012 12:36, edited 1 time in total.
I made a few (a lot of?) mods for minetest: here is a list.
See also the MT-Faithful texture pack (work in progress).

User avatar
VanessaE
Moderator
Posts: 4655
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaE
Location: Western NC
Contact:

by VanessaE » Post

Zeg9: actually the first is UFOs :-)
You might like some of my stuff: Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (64-512px)

DarthNihilus
Member
Posts: 14
Joined: Fri Aug 02, 2013 10:45

by DarthNihilus » Post

Zeg9, mediafire is the best upload service - no ad's, no waiting shit, DL at full speed... Thanks!

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

by Evergreen » Post

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.
Back from the dead!

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests