sharing explored maps (all clients)

Forum for alternative clients, mods & discussions on the same.

Re: sharing explored maps (all clients)

Postby Ardennesss » Fri Dec 27, 2019 12:36 am

MagicManICT wrote:I'm a bit of an idiot when it comes to client modding here, but I have noticed that if you need to reinstall the standard client for any reason, you lose all your map markers and data. I haven't played on the default client since the change from JWS to standard Java, though, so might have changed. Seems like I asked about it at the time I had to do the reinstall.
Shouldn't be that way anymore, at least I don't see a reason it would be. Unless for some reason the default client install nukes the cache folder for some reason.
ImageImage
ImageImageImageImage
User avatar
Ardennesss
 
Posts: 1127
Joined: Sun Oct 06, 2013 4:22 pm

Re: sharing explored maps (all clients)

Postby MagicManICT » Fri Dec 27, 2019 3:19 am

Ardennesss wrote: Unless for some reason the default client install nukes the cache folder for some reason.

That I couldn't tell you as I haven't really felt the urge to investigate.
Opinions expressed in this statement are the authors alone and in no way reflect on the game development values of the actual developers.
User avatar
MagicManICT
 
Posts: 18437
Joined: Tue Aug 17, 2010 1:47 am

Re: sharing explored maps (all clients)

Postby mvgulik » Fri Dec 27, 2019 5:07 am

Confirming Amber and Ender displaying same map data when using identical -U path's. (Thanks Romovs)

* Used http instead of https. (on both client)
* Included shared map markers. (of course)
* All characters (on same account at least (currently only use one active account)).

(Found Default client to not supporting -U option) :|
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am

Re: sharing explored maps (all clients)

Postby Granger » Fri Dec 27, 2019 7:30 pm

romovs wrote:Map data is saved based on the url it was fetched from. This is cross client. So for example, Amber uses "https://game.havenandhearth.com/hres/" (see run.bat/sh). So all the map tiles will be available from another client only if it uses https. If the client uses http then you will see diffident tiles.

I haven't looked at this in a while, so there might be some other nuances, but as long as the clients use the same "httpS" or "http" they should see the same map.

Bottom line, Amber, currently uses "https". Not sure whether the default or Ender use "http" or "https"

The one who coded it that way mixed protocol and data. Meh.
⁎ Mon Mar 22, 2010 ✝ Thu Jan 23, 2020
User avatar
Granger
 
Posts: 9263
Joined: Mon Mar 22, 2010 2:00 pm

Re: sharing explored maps (all clients)

Postby mvgulik » Sat Dec 28, 2019 9:15 am

Interesting.

The Default client is sharing markers between characters on the same account. (different accounts: unknown - could not test that)
And although its not showing a merged map of all explored maps by the different characters. One can switch to the explored map of an other character by activating a marker created by that character.

The main difference here between the Default client and Ender/Amber clients seems to be that the Ender/Amber system just ditched some, I think, inclusion of character data (name/id/...) when it comes to generating the used ID's in the cached map-data files.

(not sure if the fixed cache-file filename for the map-index file plays a role. Probably not.
The different (compared to Default client) fixed cache-filename for Ender/Amber clients seems more a side effect or a convenience matter on the Ender/Amber clients side.
)

... Mmm. Forgot to check for changes when using different -U path strings.
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am

Re: sharing explored maps (all clients)

Postby boshaw » Sat Dec 28, 2019 6:36 pm

mvgulik wrote:The Default client is sharing markers between characters on the same account. (different accounts: unknown - could not test that)
And although its not showing a merged map of all explored maps by the different characters. One can switch to the explored map of an other character by activating a marker created by that character.

That's due to them being stored in the solo `index` file [1] which is usually independent of character or account. As all cache files, including map files, are from the HashDirCache which unique only based on the location and ID. The ID is just made up of the haven-res location (which is why http/https makes a difference) since the filenames themselves are hashed with the ID included.

Default should also merge and show you shared maps between characters/accounts as well since the files also aren't connected to a character in any manner. The main factor here is the grid ID which is static and if you've seen it before on any other character it should merge the segments to stitch the shared maps. You should be able to log in at the same spot on different characters and see the same shared map.

There's really only one exception to this and it's if this function is actually generating anything extra, which is based on character, but at least in my case i've never seen it return anything and thus keep everything independent of character/account. If you do want to see if the cached files are being saved by anything character related just open a cache file in a hex editor and check the header. You should see something like this:
Code: Select all
|- 1                                     | - Base filename
| |- HashDirCache ID                     |   |- MapFile specific name (grid-XXX, gi-XXX, index, etc)
v v                                      v   v
..$http://game.havenandhearth.com/hres/..map/grid-988cd5f709364f18.

In my case my filenames are independent of anything since they are just `map/....` but if you see something like `map/{BLAH BLAH}/....` then it's picking up something from that function related to your character and that would apply to everything (markers, grids, segments, etc).
User avatar
boshaw
 
Posts: 1538
Joined: Tue Jun 01, 2010 10:22 pm

Re: sharing explored maps (all clients)

Postby mvgulik » Sun Dec 29, 2019 5:45 am

Cool, more stuff to explore and digest. (hope I don't get lost in the jave-code part ;) )

Thanks for additional info and code links Boshaw. :)
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am

Re: sharing explored maps (all clients)

Postby mvgulik » Mon Mar 02, 2020 9:18 am

Slowly creeping towards ... something, or nothing.

Code: Select all
## Py3

lmax = 0x8000000000000000-1
lmin = -0x8000000000000000

def java_longint_wraparound(i):
   if i > lmax or i < lmin:
      b = i.to_bytes(32, byteorder='little', signed=True)
      i = int.from_bytes(b[:8], byteorder='little', signed=True)
   return i

Using Java long-int over-/under-flow as feature. inventive, lol.
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am

Re: sharing explored maps (all clients)

Postby borka » Mon Mar 02, 2020 7:08 pm

Apx ends your pain ;)

viewtopic.php?f=49&t=67266
Avatar by SacreDoom
Java 8 - manually downloads - good to check for actual versions url here:
viewtopic.php?f=42&t=40331
Remember what the dormouse said: Feed your head Feed your head
User avatar
borka
 
Posts: 9965
Joined: Thu Feb 03, 2011 7:47 pm
Location: World of Sprucecap

Re: sharing explored maps (all clients)

Postby mvgulik » Mon Mar 02, 2020 10:09 pm

lol. The ultimate world mapper. ;)
mvgulik
 
Posts: 3742
Joined: Fri May 21, 2010 2:29 am

PreviousNext

Return to The Wizards' Tower

Who is online

Users browsing this forum: Naylok and 8 guests