[Mod] Compass [compass]

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

[Mod] Compass [compass]

by Sokomine » Post

This mod kind of adds a compass. It is a simple passive node with six diffrent sides. When you see the side labled "N", you will know that you are looking north. It won't work in your inventory. You have to place it somewhere. The node has its coordinates as infotext (helpful if you need them e.g. for node protection) and emits light. That's it. I'd have prefered a compass rose displayed and updated in the main window every time you look around - but that can't be done with a mod.

It is also the only mod I've done that comes with textures. They're not very good. If you can help out with better ones please do so!

Download: https://github.com/Sokomine/compass/zipball/master
Browse code: https://github.com/Sokomine/compass
License: WTFPL
Depends on: nothing

Two compasses, player looking east-north-east:
Image

A compass at night:
Image

Several compasses, illustrating how they work while beeing passive nodes:
Image

How to craft one:
Image
Last edited by Sokomine on Sat Mar 21, 2015 23:36, edited 3 times in total.
A list of my mods can be found here.

User avatar
BrandonReese
Member
Posts: 839
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese
Location: USA

by BrandonReese » Post

My first idea for a mod was a compass, but like you I quickly figured out you can't overlay a compass on the display. Very nice work on this, I just press F5 for the debug info and use the location and yaw info.

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

by Sokomine » Post

Yes, F5 helps to a degree. Unfortionately, debug info shows too much info to take it in really fast. It is sometimes too precise and a break in the way one "parses" the input - text vs. images.
A list of my mods can be found here.

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

by PilzAdam » Post

Suggestions:
  • Remove the x,y,z and only use the other notation.
  • Use the drawtype "raillike" and create some compass looking textures.
This could be a great mod.

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

by PilzAdam » Post

Here is a version with my suggestions: [url]ompldr.org/vZzBuZw/compass.zip[/url]
It has the raillike drawtype and looks like a compass. It also switches N, E and H to S, W, U if the values are negative.

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

by Sokomine » Post

The x,y,z coordinates are intended to be a help to get the coordinates for things like area protection, teleporters etc. This can be done with F5 as well, but might be a bit easier if the coordinates are displayed without decimal points.

The drawtype "raillike" plus less light emitted could not fulfill the main purpose I need the compasses for - namely quick orientation, even from some blocks away. The raillike type can only be viewed if one looks straight down at it. On the other hand my compass isn't something that fits into towns well. Your version is much more unobstrusive and more of a decorative type. Maybe the texture could be changed to a larger size (32x32 or something like that) to make a really decorative compass complete with needle that one might place in/around ones house as a decorative element? Both versions coud be crafted into each other so that the right compass can be used depending on sourrounding.

The switching of N/S and E/W and H/(U? D?) depending on the values is an excellent idea! I'll include that soon. Maybe someone can supply a higher resolution compass image for your raillike/flat type.
A list of my mods can be found here.

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

by PilzAdam » Post

Sokomine wrote:H/(U? D?)
U = underground. But I think H-16 would be possible too.

Dragonop
Member
Posts: 1233
Joined: Tue Oct 23, 2012 12:59
GitHub: Dragonop
IRC: Dragonop
In-game: Dragonop
Location: Argentina

by Dragonop » Post

it needs a best texture and add x.y and z like this :
X: 00,000
Y: 00,000
Z: 00,000
Like a simple text and don't make it so hard to understand

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

by ruskie » Post

A bit too colourful for me. I'd be happy with something like:

Code: Select all

  /\
 /  \
------
Pointing north and 1/4th high block.

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

by Echo » Post

Sun and moon rise east, set west. Guess where north is...

A compass directing to home / spawnpoint (PilzAdams bed-mod) would be helpful.

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

Re: [Mod] Compass (sort of)

by Sokomine » Post

Re-added missing textures.
A list of my mods can be found here.

User avatar
Napiophelios
Member
Posts: 1035
Joined: Mon Jul 07, 2014 01:14
GitHub: Napiophelios
IRC: Nappi
In-game: Nappi

Re: [Mod] Compass (sort of)

by Napiophelios » Post

This is a cool mod,especially if you like to spend your time underground :)

But you need to edit the compass_side_top.png so that it lines up
no matter what view you have of the compass block like so:

Image

flip the image horizontally then flip it again vertically

edit:
okay I am a goon never mind my suggestion

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

Re: [Mod] Compass [compass]

by lag01 » Post

I think, compass on like on Napiophelios image would be more convenient, at least for non-programmers :)
That is - on north side of block write "north".

User avatar
Anonymous_moose
Member
Posts: 39
Joined: Tue Aug 27, 2013 20:25

Re:

by Anonymous_moose » Post

Echo wrote:Sun and moon rise east, set west. Guess where north is...
yep. remember: Never Eat Shredded Wheat

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

Re: [Mod] Compass [compass]

by Astrobe » Post

I made a variation of this compass.

I have replaced the original "flashy" textures with a chest texture on which is painted a simple dot. The node now uses "wood" sounds. The brightness has been reduced to 10.

Finally, the display of the coordinates of the node has been removed. Instead, when removing the node the bearing or azimuth is printed in the player's chat. Together with a HUD waypoint display (not included) it forms polar coordinates (angle+distance). I found it more fun that the usual cartesian coordinates.

I had to make the node "dig immediate" (like torches) to avoid chat spam when removing the node.
Attachments
compass.zip
(2.58 KiB) Downloaded 80 times

Post Reply

Who is online

Users browsing this forum: No registered users and 19 guests