Archive > AoC 0.6 support

AoC Patch 1.05 login information

(1/5) > >>

khayman:
The new loginsystem requires a bit more work than the old one, since you have to talk to 2 diffrent servers to receive the loginseed needed to log in to the chatserver. And an slightly unfortunate sideeffect of this is that you actually log in the bot character for a few minutes. This means that you can not log in with a bot/chat client while you are logged into the game with a normal character from the same account, and after you log in the bot you will probably have to wait 2 minutes before you are able to log in with a normal character.
That beeing said, this change was not (according to my sources in FC) made to break bots and the bot community, it is an unfortunate sideeffect of another problem FC had to solve.

So the actual login process is like this
1. Connect to UniverseManager
2. Once connected send InitializeAuthentication packet
3. Receive Challenge packet
4. Reply with AnswerChallenge (this is almost the same as the old login packet with the username and pwd encrypted)
5. Receive AckAuthenticate with the TerritoryManager address and a login seed
    (If anything went wrong you will Receive a LoginProblem packet
6. Disconnect from this server

7. Connect to the TerritoryManager through the address received earlier
8. Once connected send Authenticate packet
9. Receive AuthenticateAck
10. Send the GetStartupData
11. Receive UpdateClientPlayerData (character list)
12. Select your character and send LoginCharacter
13. If all went well you will receive ChatServerConnectReady with the login seed and address of the chat server you want
     (If anything went wrong you will receive a LoginProblem packet)
14. Disconnect from this server

15. Send the LoginPacket to the chatserver with the login seed

And thats it, not hard at all :p
I will add packet descriptions soon.

Shakor:
Awesome info. Now hopefully one of the bebot devs could create a patch with these and the coming packet description post.
Nice work Khayman

khayman:
The following packets are in FCs RemoteMethod format so they all follow some simple rules.

The base structure of each packet is like this:

--- Code: ---uint32 : packet size (payload + 4 bytes for crc32)
uint32 : crc32 of the data (EID, EID, uint32, data)
EID    : caller EndpointID
EID    : target EndpointID
uint32 : remote method id
data   : The remote method arguments

--- End code ---

Each EndpointID is structured like this:

--- Code: ---string : endpoint name (remember this is uint16 + str data)
uint32 : endpoint instance
uint32 : endpoint token

--- End code ---

Strings are streamed as:

--- Code: ---uint16 : string length
char*  : string data

--- End code ---

Packets:
Universe Manager:
All packets sendt to UM should contain the following EID

--- Code: ---Caller Name     : UniverseInterface
Caller Instance : 1
Caller Token    : 0

Target Name     : UniverseAgent
Target Instance : 0
Target Token    : 0

--- End code ---
All packets received from UM should contain the following EID (though you will never use them for anything, they can be skipped)

--- Code: ---Caller Name     : UniverseAgent
Caller Instance : 1
Caller Token    : 0

Target Name     : UniverseInterface
Target Instance : some number i dont know what is but its not used
Target Token    : 0

--- End code ---

InitializeAuthentication: to UniverseManager

--- Code: ---Remote Method ID: 0
Arguments:
string : dev name (always empty on live universe, stream as uint16 value 0)
string : login name (your user account followed by the universe version ":2". ie. "mylogin:2"
uint32 : unknown, just stream the value 1

--- End code ---

Challenge: from UniverseManager

--- Code: ---Remote Method ID: 0
Arguments:
string : challenge (same as the chatserver used to give, the reply in AnswerChallenge should be encrypted like the old chat protocol)

--- End code ---

AnswerChallenge: to UniverseManager

--- Code: ---Remote Method ID: 1
Arguments:
string : answer (the string produced from the challenge string containing your encrypted username and password)

--- End code ---

AckAuthenticate: from UniverseManager

--- Code: ---Remote Method ID: 1
Arguments:
uint32 : authentication status (not used by conanchat)
uint32 : player id type (10002 not used by anything useful)
uint32 : player id instance (your account id)
string : territory manager address ("somewhere.host.com:7003")
uint32 : cookie (the cake is a lie)
uint32 : loginstatus (not sure if this can produce anything else than loginok without receiving LoginProblem instead)

--- End code ---

LoginProblem: from UniverseManager

--- Code: ---Remote Method ID: 2
Arguments:
uint32 : login problem error code

--- End code ---

khayman:
TerritoryManager:
All packets sendt to TM should contain the following EID

--- Code: ---Caller Name     : PlayerInterface
Caller Instance : account id (received from the UM in AckAuthenticate
Caller Token    : 0

Target Name     : PlayerAgent
Target Instance : 0
Target Token    : 0

--- End code ---
All packets received from TM should contain the following EID (though you will never use them for anything, they can be skipped)

--- Code: ---Caller Name     : PlayerAgent
Caller Instance : 2
Caller Token    : 0

Target Name     : PlayerInterface
Target Instance : Account id
Target Token    : 0

--- End code ---

Authenticate: to TerritoryManager

--- Code: ---Remote Method ID: 0x9CB2CB03 (python hash of the name, could change with any version of python but FC is currently using 2.4)
Arguments:
uint32 : account id (received from UM)
uint32 : cookie (received from UM)

--- End code ---

AuthenticateAck: from TerritoryManager

--- Code: ---Remote Method ID: 0x5dc18991
Arguments:
uint32 : status (not used for anything)

--- End code ---

GetStartupData: to TerritoryManager

--- Code: ---Remote Method ID: 0x6A546D41
Arguments: None

--- End code ---

UpdateClientPlayerData: from TerritoryManager

--- Code: ---Remote Method ID: 0xc414c5ef
Arguments:
uint32 : account id
uint32 : (num characters + 1) * 1009 (ie 1009 = 0, 2018 = 1, 3027 = 2, 4036 = 3 ...) so take the number divide it by 1009 and subtract 1
loop for each character
  uint32 : character id
  uint32 : account id  (got to love the utter redundancy)
  uint32 : character id (and some more redundancy :p)
  string : character name
  uint32 : dimension id
  uint32 : login state
  uint32 : last login date
  uint32 : playtime (possibly how many seconds this character have been logged in)
  uint32 : location name id
  uint32 : level
  uint32 : class
  uint32 : state
  uint64 : last login holder (no idea what this is)
  uint32 : gender
  uint32 : race
  string : client language
  uint32 : blocked status
uint32 : max character slots

--- End code ---

LoginCharacter: to TerritoryManager

--- Code: ---Remote Method ID: 0xef616eb6
Arguments:
uint32 : character id
string : rdbdsn (stream as empty string)
string : language (stream whatever this character had in the UpdateClientPlayerData packet)

--- End code ---

ChatServerConnectReady: from TerritoryManager

--- Code: ---Remote Method ID: 0x23A632FA
Arguments:
uint32 : chatserver IP address
uint16: chatserver port
uint32 : cookie (the one the chatserver will expect)
uint32 : character id type
uint32 : character id

--- End code ---

LoginProblem: from TerritoryManager

--- Code: ---Remote Method ID: 0xD4063CA0
Arguments:
uint32 : login error code

--- End code ---

khayman:

--- Code: ---enum LoginStatus {
  e_Error                                  = -1,
  e_LoginOK                                = 0,
  e_FIDTimeOut                             = 1,
  e_DimensionDown                          = 2,
  e_TooManyChars                           = 3,
  e_InvalidCharSlot                        = 4,
  e_NoGameServers                          = 5,
  e_CharNotAvailable                       = 6,
  e_CharBroken                             = 7,
  e_PlayfieldShuttingDown                  = 8,
  e_PlayfieldFull                          = 9,
  e_ThisDimensionFull                      = 10,
  e_UnableToLogin                          = 11,
  e_SystemError                            = 12,
  e_Banned                                 = 13,
  e_AuthFailure                            = 14,
  e_UnableToFindPlayerObject               = 15,
  e_UnableToFindDimensionObject            = 16,
  e_TooManyCharsInDimension                = 17,
  e_DBFailedCreatingCharacter              = 18,
  e_UnableToLoginHasAnotherOnlineCharacter = 19,
  e_DimensionCantCreateMoreCharacters      = 20,
  e_MissingFIDData                         = 21,
  e_NoAuthenticationData                   = 22,
  e_Frozen                                 = 23, ///< Account is frozen, most likely due to lack of payment
  e_AccountNotVerified                     = 24,
  e_UniverseVersionError                   = 25,
  e_NoReason                               = 26,
  e_LoginCanceled                          = 27,
  e_WrongLoginStepEncounteredPanic         = 28,
  e_UnableToStartAnyPlayfields             = 29,
  e_LoginTimedOut                          = 30,
  e_CharacterMagicallyAppearedOnAPlayfieldForUnknownReason = 31,
  e_CharacterTransferFail                  = 32,
  e_AccessDeniedToSelectedDimension        = 33, ///< The account does not have access to the selected dimension. This shouldn't happen (the client shouldn't see these dimensions), but in case we screw up, there's an error message for it.
  e_NoAllowedLanguageFound                 = 34,
  e_ThisDimensionFullForTrialAccounts      = 35,
};
--- End code ---

Navigation

[0] Message Index

[#] Next page

Go to full version