When you log into a server, there's a number of keys you have to hit every time. F3 to disable fog, F5 to enable debug info so you can see your coordinates, and F9 to turn on the mimimap. The first of these two can be automated with configuration settings ("enable_fog = false" and "show_debug = true", respectively), but there's no option to turn the mimimap on automatically! This mod just turns the minimap on so you don't have to remember to do it yourself.
Create a directory named "minimap" in your "clientmods" directory. Add an "init.lua" file to it with only this single line:
y.st. wrote:When you log into a server, there's a number of keys you have to hit every time. F3 to disable fog, F5 to enable debug info so you can see your coordinates, and F9 to turn on the mimimap. The first of these two can be automated with configuration settings ("enable_fog = false" and "show_debug = true", respectively), but there's no option to turn the mimimap on automatically! This mod just turns the minimap on so you don't have to remember to do it yourself.
Create a directory named "minimap" in your "clientmods" directory. Add an "init.lua" file to it with only this single line:
IMO it would be better if there would be just a simple on/off setting in the engine.
I don't like the idea of using mods to add missing engine features.
I agree with Wuzzy, but until this option does exist in the engine, I'm all for this mod. This is something I've wanted for a while and have asked about on these forums before.
I'm trying to add this to my subgame. I added a "minimap" directory in the "mods", added "init.lua" to "minimap", then added the one line of lua code to init.lua. However, now when I load a world in my game, I get:
2017-05-24 23:05:50: ERROR[Main]: ModError: Failed to load and run script from /Users/echosa/Library/Application Support/minetest/games/boldly_go/mods/minimap/init.lua:
2017-05-24 23:05:50: ERROR[Main]: ...n Support/minetest/games/boldly_go/mods/minimap/init.lua:1: attempt to index field 'ui' (a nil value)
2017-05-24 23:05:50: ERROR[Main]: stack traceback:
2017-05-24 23:05:50: ERROR[Main]: ...n Support/minetest/games/boldly_go/mods/minimap/init.lua:1: in main chunk
2017-05-24 23:05:50: ERROR[Main]: Check debug.txt for details.
I believe this is a Client-Side Mod (CSM), hence it's useless for all but the individual player using the client. The player need to install CSMs manually themselves currently. IIRC those mods should sit in /clientmods.
Hm. I tried creating a "clientmods" directory next to the "mods" directory in my game and putting minimap/init.lua there. It doesn't crash the game, but it doesn't work. I thought maybe the issue was that I'd put it inside my custom game, so I moved the entire clientmods directory to the root level next to "client", "debug.txt", "games", and "worlds". It still doesn't work. When I open a game, the minimap isn't automatically opened as expected.
echosa wrote:Hm. I tried creating a "clientmods" directory next to the "mods" directory in my game and putting minimap/init.lua there. It doesn't crash the game, but it doesn't work. I thought maybe the issue was that I'd put it inside my custom game, so I moved the entire clientmods directory to the root level next to "client", "debug.txt", "games", and "worlds". It still doesn't work. When I open a game, the minimap isn't automatically opened as expected.
Hmm, note that you also need a very fresh dev build of Minetest for this to work.
Wuzzy wrote:IMO it would be better if there would be just a simple on/off setting in the engine.
I don't like the idea of using mods to add missing engine features.
texmex wrote:Hmm, note that you also need a very fresh dev build of Minetest for this to work.
How fresh is "very fresh"? I had the latest dev build at the time of posting. Seems like that should have been new enough. I'll try building again today and see if I can get it working.
- Created ~/.minetest/clientmods/minimap
- Created init.lua
- minetest.ui.minimap:show()
- Created description.txt
- Automatically shows minimap.
- Created mod.confg
- name = minimap
What happens:
It automatically shows the map, but it is a border with a transparent center. I have to press F9 to make it show up.
[EDIT] Here's the error it throws: Irrlicht: Invalid size of image for OpenGL Texture
Screenshot below.
Spoiler
Is there a way to fix this? What about the ability to set mode (circle, square) and/or view (zoom?) Large image below.
Spoiler
y.st. wrote:When you log into a server, there's a number of keys you have to hit every time. F3 to disable fog, F5 to enable debug info so you can see your coordinates, and F9 to turn on the mimimap. The first of these two can be automated with configuration settings ("enable_fog = false" and "show_debug = true", respectively), but there's no option to turn the mimimap on automatically! This mod just turns the minimap on so you don't have to remember to do it yourself.
Create a directory named "minimap" in your "clientmods" directory. Add an "init.lua" file to it with only this single line:
For those who try this and the minimap fails to load properly (eg some kind of square but the map is broken), I think this is due to the map blocks not being loaded at the time the minimap is loaded.
The solution is to add a small delay before loading the minimap after connecting: