Page 1 of 1

[Mod] Calibrated Compass [ccompass]

PostPosted: Tue Jun 13, 2017 12:26
by bell07
This mod is a fork of Echo's original Compass Mod (https://forum.minetest.net/viewtopic.php?f=11&t=3785), enhanced for a new calibration way using new MT-0.4.16 features. It is a follow up to my started work at https://forum.minetest.net/viewtopic.php?f=11&t=3785&start=25#p262919 that I renamed now to get my fork an own name.

For players:
1. Craft the compass as before using the crafting recipe.
Image
The new compass points to the origin / Zero point and is already usable.

2. Punch the compass to a compatible node (all by default) and enter the target name
Image

3. Now this compass leads you allways to this location. You can give it away to allow other users to find this place.
Image

For server owners:
The mod support the next settings:
  • static_spawnpoint - use this position instead 0,0,0 as initial target
  • ccompass_recalibrate (enabled by default): If disabled each compass can be calibrated one time only
  • ccompass_restrict_target (Disabled by default): If enabled, only specific nodes are allowed for calibration (usable with any type waypoint nodes for example)
  • ccompass_restrict_target_nodes: List of technical node names allowed for compass calibration, separated by ','
  • ccompass_aliasses: If enabled the compas:* items will be aliased to the ccompass:* items for compatibility

For developers:
It is possible to change the settings, pre-calibrate or re-calibrate compass from other mod's. Some hooks exists too. Please have a look to https://github.com/minetest-mods/ccompass#for-developers for more informations.

Obligatory things:

License - as the original mod: Code: MIT, textures: CC BY-SA, sound: CC0.

Dependencies: none

Download / Code: https://github.com/minetest-mods/ccompass

Re: [mod] Calibrated Compass [ccompass]

PostPosted: Tue Jun 13, 2017 18:59
by texmex
Yes! This works very simple and intuitive I got to say. Plus, the range of settings for server owners and developers makes this one tweakable in a lot of ways. Good work.

I feel like the textures could use an overhaul so perhaps I can find time to draw those, to even further increase the value of this mod.

Re: [mod] Calibrated Compass [ccompass]

PostPosted: Tue Jun 13, 2017 19:09
by bell07
Thanks @texmex.
I added addintional dev-info how to create pre-calibrated Compass. Now I am try to hold me back to write a demo-mod that demonstrates the game integration capabilities. I am about "Schnitzeljagt" ;-)

Re: [mod] Calibrated Compass [ccompass]

PostPosted: Tue Jun 13, 2017 20:07
by texmex
bell07 wrote:Thanks @texmex.
I added addintional dev-info how to create pre-calibrated Compass. Now I am try to hold me back to write a demo-mod that demonstrates the game integration capabilities. I am about "Schnitzeljagt" ;-)

Schnitzeljagt sounds excellent, good luck!

Re: [mod] Calibrated Compass [ccompass]

PostPosted: Wed Jun 14, 2017 08:19
by texmex
An idea for ccompass function in relation to Schnitzeljagt: Each compass can optionally be given a lifetime. The lifetime activates on pick up and either looses its bearing or breaks on expiration. The lifetime can be visually represented by wear level and audibly represented by a subtle ticking.

This way, the Schnitzeljagt will be a time pressing task, making it more challenging. The lifetime doesn't have to be static either but can instead be set in relation to distance to the next Schnitzel.

Re: [mod] Calibrated Compass [ccompass]

PostPosted: Wed Jun 14, 2017 11:12
by bell07
Initial version of Schnitzeljagd is done: https://github.com/bell07/minetest-schnitzeljagd

You need to follow 10x compass needle to get a price. The compasses are placed in chests that are hard to find because bellow surface, so shovel is recommended to have along.


To implement wear is possible, but not depending on time but on usage like I did it for "subspacewalker" tool. There are multiple ways what should happen: De-calibration?, compass lost? Should wear be calculated in not calibrated mode? To many ways so I keep the mod KISS and do not implement them but added a hook for this.
Code: Select all
compass_stack = ccompass.usage_hook(compass_stack, player) or compass_stack

This method is called each time a compass is updated so wear could be implemented overriding this hook from other mod.

Re: [mod] Calibrated Compass [ccompass]

PostPosted: Wed Jun 14, 2017 21:20
by bell07
Thanks to texmex! New textures seems really nice! Screenshot in the first post updated. On calibration there is a calibration sound now audible!

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Thu Aug 31, 2017 18:35
by bell07
The ccompass is now a part of the minetest-mods family!!!
The License is changed to MIT
Github links adjusted to https://github.com/minetest-mods/ccompass

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Sat Dec 16, 2017 06:33
by Wolfshippie
What about a teleport option to the coordinates for those who have the teleport priv?

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Sat Dec 16, 2017 06:52
by bell07
Wolfshippie wrote:What about a teleport option to the coordinates for those who have the teleport priv?

That could be an other mod. Maybe something like a teleport-block, if punched by calibrated compass you are teleported to the destination?
Direct integration to ccompass because it is not the idea for compass.

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Wed Feb 14, 2018 19:20
by bell07
Implemented the teleporting functionality, but not merged to master before I get feedback
The version can be found in teleporter branch: https://github.com/minetest-mods/ccompa ... teleporter

If the ccompass is punched against default:mese (block) the player is teleported to the calibrated target.
Two things should be concerned about gameplay:
1. default:mese is to expensive to use it once to teleport home
2. If you teleport away, do not forget the ccompass with home coordinates

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Tue Jul 09, 2019 18:55
by bell07
In Issue 9 more directions then current 12 was requested for ccompass. @tacotexmex did the textures and I adjusted the 3 lines lua. The new version with 16 directions I pushed to 16dirs branch (download: https://github.com/minetest-mods/ccompass/archive/16dirs.zip)

Please vote on the poll at the fist post which version you do more like. I personally like the 12 directions version because each wielded item change triggers hand gesture, so the 12 direction version is less fidgety.

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Tue Jul 09, 2019 20:01
by texmex
Regardless of outcome, the loosing option can still be an opt-in feature, no?

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Tue Jul 09, 2019 20:59
by kestral
Here's what the two versions look like when animated.

Image Image

I wasn't sure whether texmex could make the 16-dir version as smooth as his original, but it certainly looks like he did it. Excellent job!


ccompass12.gif
Original 12-dir textures
(28.88 KiB) Not downloaded yet


ccompass16.gif
New 16-dir textures
(36.58 KiB) Not downloaded yet

Re: [Mod] Calibrated Compass [ccompass]

PostPosted: Thu Jul 11, 2019 17:22
by Merak
bell07 wrote:I personally like the 12 directions version because each wielded item change triggers hand gesture, so the 12 direction version is less fidgety.

That only happens if you make it the wielded item. You do not need to do that when navigating because the compass you watch is in the tool bar.