[Mod] Compass GPS [compassgps]

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

I've reproduced it!
Fascinatingly strange. researching

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

Tril wrote:The first time I left click while holding a compass on my server, I get the below server crash.
After the server restarts, using the compass works (to bring up the dialog box). Deleting compassgps_settings from the server's world directory causes the crash again.
Problem found and corrected. This shouldn't have been able to slip through my previous testing. Sorry about that.
Version 1.7 available on github now. I'll update the mod database as well.

Please let me know if you have any further problems. And If you get this working on a multiplayer server, I would love to know about it.

Thanks again!

pops1345
New member
Posts: 1
Joined: Fri Jul 18, 2014 19:54

Re: [Mod] Compass GPS [compassgps]

by pops1345 » Post

Hi! An other glitch.

With 4.10 and unified_inventory mod the receipe isn't shown.

I changed init.lua from

Code: Select all

minetest.register_craft({
	output = 'compassgps:1',
	recipe = {
		{'', 'default:steel_ingot', ''},
		{'default:steel_ingot', 'default:mese_crystal_fragment', 'default:steel_ingot'},
		{'', 'default:steel_ingot', ''}
	}
})
to

Code: Select all

minetest.register_craft({
	output = 'compassgps:0',
	recipe = {
		{'', 'default:steel_ingot', ''},
		{'default:steel_ingot', 'default:mese_crystal_fragment', 'default:steel_ingot'},
		{'', 'default:steel_ingot', ''}
	}
})
and the receipe is shown and as far as i can see everthing is working fine.

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

hmmm, that shouldn't work. Never tested with unified inventory. I'll download the mod and test.
but, its very late. I'll try to test with this tomorrow night. Well, actually, it's "tonight" now since it's past midnight here.

Again, thanks for the bug report!

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

ok, got up early so I could look at this before I went to work. your change shouldn't cause any problem at all as far as I can see. BUT, I also don't have a clue why unified inventory would care whether the compass you can craft is :1 or :0. Very strange, I'll want to do some testing with that to understand whats going on.
But it looks to me like your fix should, as you determined from your own testing, have no effect on how compassgps operates.

Thank you again, I'll look into it further.

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

new version 1.8 on github. I changed register_craft from compassgps:1 to compassgps:0 which makes more sense anyway and fixes compatibility with unified inventory.

Thanks!

Fredrick01
Member
Posts: 10
Joined: Tue Nov 11, 2014 05:12
IRC: Fredrick
In-game: Fredrick
Location: USA

Re: [Mod] Compass GPS [compassgps]

by Fredrick01 » Post

Kilarin, the mod is AMAZING!! Love the teleport option too! Genius thinking!

User avatar
TeTpaAka
Member
Posts: 141
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Compass GPS [compassgps]

by TeTpaAka » Post

Hi, I get this error on load:

Code: Select all

14:56:05: ERROR[ServerThread]: Assignment to undeclared global "target" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:953.
14:56:05: ERROR[ServerThread]: Assignment to undeclared global "pos" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:954.
14:56:05: ERROR[ServerThread]: Assignment to undeclared global "dir" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:955.
14:56:05: ERROR[ServerThread]: Assignment to undeclared global "angle_dir" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:958.
and this when first using the compass:

Code: Select all

14:56:07: ERROR[ServerThread]: Assignment to undeclared global "default_bookmark" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:885.
14:56:07: ERROR[ServerThread]: Assignment to undeclared global "backwardscompatsave" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:259.
14:56:07: ERROR[ServerThread]: Assignment to undeclared global "bkmrkidx" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:1117.
14:56:07: ERROR[ServerThread]: Assignment to undeclared global "list" inside a function at /home/tetpaaka/minetest/bin/../mods/compassgps/init.lua:1117.
It's probably a missing local...

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

ugh, something new from an update pointing out something wrong I did in the original I guess. I'll get onto it as soon as I can, thank you for pointing it out.

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

TeTpaAka, thank you again for the bug report. I've corrected the global variables and version 1.9 is now available from git: https://github.com/Kilarin/compassgps/a ... master.zip

There is another problem I need to work on. When the original compass mod was created, you could update the compass image on the fly and it looked GOOD. When the CompassGPS fork was first released, that still worked. But in minetest 4.11 we now have a new problem. Every time the image is updated to point the compass at a new direction, the hand jogs like it was loading a new weapon. looks BAD. got to figure a way to suppress that.

Any ideas anyone?

User avatar
TeTpaAka
Member
Posts: 141
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Compass GPS [compassgps]

by TeTpaAka » Post

Maybe you could add the compass to the HUD and disable the constant replacement of the compass in the inventory. As long as there is no way to change the texture on the fly this could work as a workaround.

User avatar
TeTpaAka
Member
Posts: 141
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Compass GPS [compassgps]

by TeTpaAka » Post

I made a pull request for an addition to the mod.
I thought it could be a usefull addition for RPG like worlds to be able to read bookmarks from books so you can find special places.

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

TeTpaAka wrote:Maybe you could add the compass to the HUD and disable the constant replacement of the compass in the inventory.
That would probably be best, because the way it jumps around currently is ugly and distracting.
TeTpaAka wrote:I thought it could be a usefull addition for RPG like worlds to be able to read bookmarks from books so you can find special places.
Oh wow! What an AWESOME idea! Treasure maps, books with clues, this is a WONDERFUL idea. Even in non rpg settings wouldn't it be great to be able to pass bookmarks on to others?

Let me play with it for a little bit, then I'll have this pulled in. Because this looks like a MAJOR improvement to me.

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

I can create a bookmark in a book. But then when I try to read from the bookmark, it asks me to type in a name, I typed in a name, and got the below then crashed.

Code: Select all

19:15:21: ACTION[ServerThread]: singleplayer uses compassgps:book, pointing at [nothing]
19:15:30: ERROR[main]: ServerError: /home/d/.minetest/mods/compassgps/books.lua:80: attempt to perform arithmetic on field 'x' (a string value)
19:15:30: ERROR[main]: stack traceback:
19:15:30: ERROR[main]: 	/home/d/.minetest/mods/compassgps/books.lua:80: in function </home/d/.minetest/mods/compassgps/books.lua:43>
19:15:30: ERROR[main]: 	/usr/share/minetest/builtin/game/register.lua:348: in function </usr/share/minetest/builtin/game/register.lua:336>
compassgps writing settings
19:15:30: ACTION[ServerThread]: singleplayer leaves game. List of players:

User avatar
TeTpaAka
Member
Posts: 141
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Compass GPS [compassgps]

by TeTpaAka » Post

The write function didn't work correctly. I think the string modification functions (string.split) works now diffrent than a few days ago.

It should work now.

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

Finally got it to working. TeTpaAka that string.split function works STRANGE now. splits on things it shouldn't. So I threw out the split all together and globalized the bookmark array in compassgps so that we could get to the actual variable with all of the fields already split. And THAT works!

So, before I release this, I've got some questions.

1st: Right now it's a "Book with bookmark" What I was thinking is that perhaps instead of a "book" this should be a map?

2nd: If people agree that a map would be a good fit, then I was thinking about something like one of these for the icon:
Image
Image

But when I tried to scale them down to 16x16 and 32x32, well, they didn't come out real well. Art is not my specialty. Anyone want to volunteer a good map image?

And again, I want to repeat, I think this is an absolutely BRILLIANT idea that will really add to the compassgps functionality and the credit goes to TeTpaAka.

User avatar
TeTpaAka
Member
Posts: 141
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Compass GPS [compassgps]

by TeTpaAka » Post

How about this?

Image 16x16

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

That is lovely! Thank you TeTpaAka! What is the license?

User avatar
TeTpaAka
Member
Posts: 141
Joined: Sat Dec 28, 2013 21:54

Re: [Mod] Compass GPS [compassgps]

by TeTpaAka » Post

I don't care much. What about CC BY-SA?

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

Sorry for the long delay, I got distracted with other things. working on this again. I've got this working as maps, looks really nice with the image TeTpaAka provided. I'm making a few enhancements and doing some testing. Should have an update soon.

pepprim
Member
Posts: 27
Joined: Sun Nov 02, 2014 11:47
In-game: pepprim

Re: [Mod] Compass GPS [compassgps]

by pepprim » Post

Hey Kilarin, lovely mod!

I would like so much can use it in Xanadu... Maybe you already have proposed it to TenPlus1? ;-)

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

Thanks to a great idea and initial code from TeTpaAka CompassGPS now includes MAPS!
Maps allow you to store a bookmark that you can then give to another player and they can use the map to put that bookmark into their own list. They also enhance role playing/story possibilities since you can hide maps for players to find that will give them bookmarks they need to find their next goal.

Craft a blank map by putting 5 papers in an X pattern:

Code: Select all

paper,     ,paper
     ,paper,
paper,     ,paper
Image

To place a bookmark into a map, just right click while wielding the map, select any bookmark from your list, and click the "write to cgpsmap" button
The map icon now changes to have a red X on it, so you can tell it is a marked map. This map can be given to another player. To transfer the bookmark to their own compassgps, they right click while wielding the marked map and a formspec like this pops up:
Image
You can change the name of the bookmark to whatever you wish, click the "copy bookmark to your compassgps" button and the new bookmark is now available in your compassgps list.

To turn a marked map back into a blank map, just put it into the crafting grid.

I would appreciate anyone who could help test this new code, and if you run into any bugs, please report back here!

If you like the new map additions, please leave a postive comment for TeTpaAka, because this is another great idea of his, and is mostly his code.

You can download the new version of compassGPS with the maps included here:

https://github.com/Kilarin/compassgps/a ... master.zip

User avatar
Kilarin
Member
Posts: 779
Joined: Mon Mar 10, 2014 00:36

Re: [Mod] Compass GPS [compassgps]

by Kilarin » Post

peprim wrote:I would like so much can use it in Xanadu... Maybe you already have proposed it to TenPlus1? ;-)
Glad you like the mod pepprim. If you want it in Xanadu, talk to TenPlus1 about it. BUT, he has worked VERY hard to optimize Xanadu for very little lag, and I am not at all certain what kind of load compassgps adds to a server.

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

Re: [Mod] Compass GPS [compassgps]

by Napiophelios » Post

What a perfect crafting recipe.
"X" marks the spot...I love it.

User avatar
cHyper
Member
Posts: 904
Joined: Fri May 06, 2011 08:49
GitHub: cHyper-0815OL
IRC: cHyper cHyper_de
In-game: cHyper cHyper_0815
Location: Austria
Contact:

Re: [Mod] Compass GPS [compassgps]

by cHyper » Post

Code: Select all

ACTION[ServerThread]: singleplayer uses compassgps:cgpsmap, pointing at [node under=49,2,25 above=49,3,25]
13:48:26: WARNING: Undeclared global variable "start_i" accessed at ...\..\games\cHyper\mods\craftingpack\crafting/creative.lua:296
13:48:29: ACTION[ServerThread]: singleplayer uses compassgps:cgpsmap_marked, pointing at [node under=49,2,25 above=49,3,25]
13:48:29: ERROR[main]: ServerError: ... (32bit)\bin\..\games\cHyper\mods\compassgps/cgpsmap.lua:29: attempt to index local 'meta' (a nil value)
13:48:29: ERROR[main]: stack traceback:
13:48:29: ERROR[main]: 	... (32bit)\bin\..\games\cHyper\mods\compassgps/cgpsmap.lua:29: in function 'read_from_cgpsmap'
13:48:29: ERROR[main]: 	... (32bit)\bin\..\games\cHyper\mods\compassgps/cgpsmap.lua:75: in function <... (32bit)\bin\..\games\cHyper\mods\compassgps/cgpsmap.lua:73>

Post Reply

Who is online

Users browsing this forum: No registered users and 6 guests