Aller au contenu

Photo

ObjectToString


  • Veuillez vous connecter pour répondre
3 réponses à ce sujet

#1
Highv Priest

Highv Priest
  • Members
  • 93 messages
-How- unique is ObjectToString? Are copies of the same creature the same string? If I use CopyObject for instance, the copy = original? Are players given unique ObjectToString's? If player 1 logs in and player 2 logs in after. IF player 1 leaves is player 2 now considered player 1?

#2
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages

Highv Priest wrote...

-How- unique is ObjectToString?...

100% unique, within any given run of the game.


...Are copies of the same creature the same string?...

No. 


... If I use CopyObject for instance, the copy = original?...

Yes. 

...Are players given unique ObjectToString's?...

Yes.

...If player 1 logs in and player 2 logs in after. IF player 1 leaves is player 2 now considered player 1?

Player 2 will be the First Player as far as GetFirstPC() goes.  But he will not have the Object ID that player 1 had.   If Player 1 logs back in he should get his old ID back.  I have no Idea who the first PC would be though.  

Player Information is keept in the Turd allowing them to be one of the few things that can leave the game and come back with the same ID. 

When the Game loads the module gets ID 0.   the First Area gets ID 1 the second area gets ID 2 ect...
After that each object is given the next ID as they are created, If an item is destroyed the ID is invalid and never used again.  

PC's are given ID's at that top of the range of the list.   And are assigned the next lower ID when a new PC logs in.    so if the top of the range was 0x0E0000, the first PC to log in would have ID 0x0E0000.  and the Second PC would have ID 0x0DFFFF

Modifié par Lightfoot8, 01 janvier 2013 - 08:54 .


#3
Shadooow

Shadooow
  • Members
  • 4 471 messages
its unique per server instance

if you copy object, it gets new ID and objectToString simply returns this ID in string

as far players related, their id (might - not sure if always atm) change when relog and there is little discrepancy but I dont recall any details, I do rely on this and no problem

#4
Lightfoot8

Lightfoot8
  • Members
  • 2 535 messages
Hmm, I may have to double check on the PC ID's at some point.