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
- Change server.cfg to use AuthServer by changing the lines from
to
UseFakeAuth 1 #AuthServer 127.0.0.1#UseFakeAuth 1 AuthServer 127.0.0.1 2104 - 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
- If it doesn't already exist create a log folder for AuthServer i.e."C:\coh\bin\logs\authserver"
- Create a server entry in the auth database:
I don't believe the server name is used.
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); - 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:
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:
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);- Open Microsoft SQL Server Management Studio
- Navigate to the "cohdb" database.
- Expand the tables and select the "Ents" table.
- Right click and select the top 1000 entries.
- Find a character you want to associate with the new user and find the AuthId from that row.
- Enter that AuthId as the unique ID.
- Enter name and password and generate the sql.
- Open a new query window on the "cohAuth" database, enter and execute the SQL generated by the form above.
- Create an ODBC connection to the Auth Database cohauth.
- Run "Microsoft ODBC Administrator (32 bit)" and it has to be the 32 bit version.
- Click the "File DSN" Tab.
- Click "Add".
- Select "ODBC Driver 17 for SQL Server" and then click "Next".
- Enter "AuthDB" for the connection name.
- Something helpful for the description such as "cohauth"
- For server enter the server name that matches your server.cfg i.e. "YOURPC\COH"
- Choose "With SQL Server authentication" and enter the username and password as in your server.cfg.
- Change the default database to cohauth.
- Finish and test.
- From the "C:\coh\bin" start the AuthServer.exe
- The first time you run AuthServer expect and ODBC dialogue to appear.
- Enter the sa user and password once and you should be done.
- Lauch the other applications as before:
chatserver.exe -noreserved launcher.exe dbserver.exe - Launch the City of Heroes application as before but using the following launch parameters:
You should be able to sign in with your new password.
C:\coh\bin\Ouroboros.exe -auth 127.0.0.1 -console -project "coh"
- 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;" - Copy "product_catalog.bin" from "C:\coh\Assets\ConfigFiles\data\server\bin" to "C:\coh\bin\data\server\bin"
- Create another account (see step 4 above)
- Sone SQL to give the account additional stuff? Or update the default sku?
- Lower the default access level in the server.cfg
DefaultAccessLevel 0 - Lauch the applications again, this time including the Account Server:
AuthServer.exe AccountServer.exe chatserver.exe -noreserved launcher.exe dbserver.exe - 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"