Skip to content

Latest commit

 

History

History
97 lines (95 loc) · 5 KB

File metadata and controls

97 lines (95 loc) · 5 KB

Jagged's i24 Build log - Auth Server Step

These instructions are the steps I took to get a local Auth Server up and running. To use these you should already have a working local server as described in the README.md

Install Steps

  1. Change server.cfg to use AuthServer by changing the lines from
    UseFakeAuth 1
    #AuthServer 127.0.0.1
    
    to
    #UseFakeAuth 1
    AuthServer 127.0.0.1 2104
    
  2. Create a config file for the AuthServer. Confusingly this does not live in the same place as the other configs and follows a different naming convention. Copy the "\bin\etc\config.txt" file from this repo to your server directory i.e. "C:\coh\bin\etc\config.txt
  3. If it doesn't already exist create a log folder for AuthServer i.e."C:\coh\bin\logs\authserver"
  4. Create a server entry in the auth database:
    INSERT INTO cohauth.dbo.server (id, name, ip, inner_ip, ageLimit, pk_flag, server_group_id) VALUES(1, 'Paragon', '127.0.0.1', '127.0.0.1', 0, 0, 1);
    INSERT INTO cohauth.dbo.worldstatus (idx, status) VALUES (1, 1);
    
    I don't believe the server name is used.
  5. Create an account record for yourself. The account password needs to be hashed, but fortunately the work for this has been done for us. See URL: http://cohstuff.dreamhosters.com/makeaccount.php Enter a unique ID number for your user (such as "1") Enter a name and a password. Be sure to make sure your password is the right length as the page does not check. This will generate SQL to load the account into your database. Such as:
    INSERT INTO cohauth.dbo.user_account (account, uid, forum_id, pay_stat) VALUES ('test', 1, 1, 1014);
    INSERT INTO cohauth.dbo.user_auth (account, password, salt, hash_type) VALUES ('test', CONVERT(BINARY(128),'46ffce3efcfe83bfa205b076d7c2084b9dcf04cdb26f9019103cde29779d26a85216b2c0f43ba1a8fb9b7fa22f05a949bf4edc314af27629e8fc23014e77a24d'), 0, 1);
    INSERT INTO cohauth.dbo.user_data (uid, user_data) VALUES (1, 0x0080C2E000D00B0C000000000CB40058);
    INSERT INTO cohauth.dbo.user_server_group (uid, server_group_id) VALUES (1, 1);
    
    If you have been using your server by logging directly into the server, you may have created characters that are assigned to a user id. If you want those characters to be associated with your new account you should:
    1. Open Microsoft SQL Server Management Studio
    2. Navigate to the "cohdb" database.
    3. Expand the tables and select the "Ents" table.
    4. Right click and select the top 1000 entries.
    5. Find a character you want to associate with the new user and find the AuthId from that row.
    6. Enter that AuthId as the unique ID.
    7. Enter name and password and generate the sql.
  6. Open a new query window on the "cohAuth" database, enter and execute the SQL generated by the form above.
  7. Create an ODBC connection to the Auth Database cohauth.
    1. Run "Microsoft ODBC Administrator (32 bit)" and it has to be the 32 bit version.
    2. Click the "File DSN" Tab.
    3. Click "Add".
    4. Select "ODBC Driver 17 for SQL Server" and then click "Next".
    5. Enter "AuthDB" for the connection name.
    6. Something helpful for the description such as "cohauth"
    7. For server enter the server name that matches your server.cfg i.e. "YOURPC\COH"
    8. Choose "With SQL Server authentication" and enter the username and password as in your server.cfg.
    9. Change the default database to cohauth.
    10. Finish and test.
  8. From the "C:\coh\bin" start the AuthServer.exe
    1. The first time you run AuthServer expect and ODBC dialogue to appear.
    2. Enter the sa user and password once and you should be done.
  9. Lauch the other applications as before:
    chatserver.exe -noreserved 
    launcher.exe
    dbserver.exe
    
  10. Launch the City of Heroes application as before but using the following launch parameters:
    C:\coh\bin\Ouroboros.exe -auth 127.0.0.1 -console -project "coh"
    
    You should be able to sign in with your new password.

Account Server

  1. It doesn't make sense to run the AuthServer without the Account Server. So copy the new Account_server.cfg from the repo to "C:\coh\bin\data\server\db\account_server.cfg" Remember to update the config with the address and password for your database instance:
    SqlLogin "DRIVER={SQL Server Native Client 11.0};Server=YOURPC\COH;Uid=sa;Pwd=yoursapassword;"
    
  2. Copy "product_catalog.bin" from "C:\coh\Assets\ConfigFiles\data\server\bin" to "C:\coh\bin\data\server\bin"
  3. Create another account (see step 4 above)
  4. Sone SQL to give the account additional stuff? Or update the default sku?
  5. Lower the default access level in the server.cfg
    DefaultAccessLevel 0
    
  6. Lauch the applications again, this time including the Account Server:
    AuthServer.exe
    AccountServer.exe
    chatserver.exe -noreserved 
    launcher.exe
    dbserver.exe
    
  7. Launch the City of Heroes application as before but using the following launch parameters:
    C:\coh\bin\Ouroboros.exe -auth 127.0.0.1 -console -project "coh"