Closed hunator closed 9 years ago
In theory the 9th chevron is used for addresses that are codes tied to specific destinations. I mean in theory it would be interesting if one could assign a 9 chevron address to a certain server. That would likely be too difficult as is. One of my favorite mods qcraft allows you to create inter-server portals but that opens a whole can of worms figuring out the whole server thing and allowing users to assign 9 chevron addresses to different ip addresses. I'm perfectly content with the basic setup as is in regards to different dimensions.
We decided against using a world-level database, because if the database is lost or otherwise damaged, all Stargates in all worlds become immediately inaccessible and cannot be accessed again by players until they visit them.
Our current address system has a range of 54,871 chunks on any X-Z axis, in any direction and in almost any dimension between -1400 and +1400 - which equates to approximately 800,000 blocks in any direction.
In the overworld alone, this system covers more than 12-billion chunks -- and assuming you could legitimately walk that far, you'd have to cross in the higher ordinals of 192-billion blocks from one side to another before you'd be unable to get a Stargate address. (I'm running out of fingers to count with!).
With regards to addresses in low numbers seeming to have repeating sequences of 'AAA', this is because we equate A = 0 in the radix system we use. I can probably change the characters to a wraparound system and shift all characters based on index in the string, but this only offers a purely cosmetic effect.
Yes, you are right about it. But it is same as corrupted save *.dat file. There is such possibility, but if it is text file like .csv user can repair it quite easy and corruption of such file is less probable than binary save file (and we don't see it often).
However you can save current address system like fall-back with lower priority. So if some gate is not in lookup file, its address would be calculated as it is now and will be add into file, so user can change it in future. It doesn't depend on reason why is not here (gate creation, deleted from file or file corruption or file missing).
Gate addresses in file do have several pos.:
I think that it is worth it. If there will be some fall-back to current state, missing file would cause problems only with addresses changed by user from default. If someone doesn't want to use it he/she wouldn't be affected by missing file at all.
Changing radix would be also fine.
We seems to have different opinions on this matter and because your opinion matters here, so I ask you if and how can I change you mind about it? I can see reasons to your approach, and I hope that I showed mine too. If you want to know more about this idea on mine, feel free to ask. Or if you change your mind on that, I can support you with algorithm charts (unfortunately I can't code in java, so I cannot support you with code).
I think it's reasonable for us to do the following:
By default, we'll continue to give each gate a chunk address based on the current dimension and location system. This has worked reliably and constantly since it was replaced.
We will allow server administrators to assign an additional custom chunk address to all gates in a chunk:
so this means we can do what I mentioned recently - change the address to have the correct symbols for earth if we find a chunk that has the correct first symbol? :)
I think you misunderstood what I meant by first-symbol: the first symbol will be locked to a letter no matter what you do with the rest of the address. My estimate is that the first symbol of all custom addresses will be R
.
Now I'll see what I can do about making R map to the correct symbol and Presto! :) http://t1.gstatic.com/images?q=tbn:ANd9GcQTuCZdQHscRX4NFWBAr0kcPBqYow0c_Ggbmy9J09PeCuXs99P4
My only suggestion on this idea (which would certainly work well) would be to hardcode the last two symbols because they serve as dimension codes.
Fast-forward; added in 2.0-rewrite-initial.
How can be seen, when address was changed to 9 chevron, number of same characters has grown. Easy hack would be to change radix to be dependent on place in address string (line 120 in GateAddressHelper file).
But I would rather suggest to change address system completely. I would suggest to make file in save DIR (maybe CSV) with dimension, x, y, z and address. When would stargate be build/loaded it will search file for its coordinates, if there will be a match it will just load its address. If there won't be one it will generate random address one character at time. If char will be occupied it will simply generates new one, so it wouldn't be possible to have address with same char (at least in one dimension).
I would also suggest to generate this way just first six symbols. For the 8 or 9 symbol long address I would suggest dimension number + gate system. So every world dimension would have corresponding 3 symbols (milky way, pegasus and destiny - I know that you are planning others but if you really need them you can add them in corresponding galaxy system like tollan gate in SG1). For less distant dimensions it can use 8 symbol long address, for more distant one 9 (different page), same dimension 7. So gate address would look like: RRRRRRO RRRRRRDO RRRRRRDDO (saved in file) (R-originally random, could be rewritten in file; D-dimension; O-point of origin) For point of origin I would suggest to using special symbol known to be gate specific (in series there are only 3 known - giza A, original earth looks like capital omega, abidos 'A') so randomly choose one of them with probability 1/39 for first two.
It would have few pos.:
Some cons. too:
Please note: I would post patch if I can but I can't (I can't program in java and I'm not minecraft moder). So this idea could be the dummiest / craziest thing in the world. Because I don't simply know how it works (I've just studied part of your source).