Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Key to unique integer?

Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
10-23-2005 16:41
I'm looking for a way to take an agent's key and turn it into an integer somewhat unique to that agent.

Is there a way to do this at all? It sounds like a tall order, but if possible, the opportunities it opened would be tremendous.

Come to think of it, any process that would consistently produce an integer unique to an agent would work as well.
Judah Jimador
Registered User
Join date: 13 Mar 2005
Posts: 230
10-23-2005 17:03
Hi, Luc,

Please see here.

It might be that you could encode, say, an avie's rez date along with the first n characters of the avie key, but somebody with more knowledge in the way keys are generated would have to comment on whether that provides a fairly safe bet for uniqueness or not.

-- jj
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-23-2005 17:37
http://secondlife.com/badgeo/wakka.php?wakka=ExampleKey2Channel
http://secondlife.com/badgeo/wakka.php?wakka=LibraryPseudoRandomGenerator
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
10-23-2005 17:38
Thanks JJ.

Unfortunately, the forum post doesn't address the issue, other than to say it's difficult to to encode a key into an integer.

The birth date is an interesting idea; I can cast about for other sources of numerical info that can be stuck together to make a unique integer.

If there were a way to convert letters into integers, I could convert the name into an integer, or strip the characters out of the key. Unfortunately, I've not found such a way.

I'm trying to create a chat channel unique to an agent, to avoid passing random chat channels around. I'm trying to find a way that each object can compute, reliably, and produce the same chat channel for private conversations.

I'll look into the rez date thing, though. Any other suggestions, anyone?
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
10-23-2005 17:39
see my above post
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Luc Aubret
Oreo-eater
Join date: 14 Sep 2005
Posts: 86
10-23-2005 17:45


Just saw that. Thanks, Strife; that looks just about perfect for my use.