WowDevTools / CASCHost

35 stars 57 forks source link

CASCHost

CASCHost is a specially designed web service that both builds and hosts modified a CAS container. This web service is designed to replicate Blizzard's own CDN meaning a client works as seamlessly with custom content as with retail.

The implementation provided is designed for the 99% whom want to add, edit and remove files from a specific build and host the changes all in one simple-ish application. For those wanting to create CAS from scratch, have their own build pipeline or want a MPQEditor style tool, you will need to find another solution.

Included is a rough diagram of how CAS works to attempt to explain what CASCHost does and how CAS works at a very fundamental level. Further information can be found on the WoWDev Wiki.

Requirements:

Settings:

Before using CASCHost the settings found in appsettings.json will need to be adjusted:

Usage:

  1. Put the .build.info file from the client you are targeting into the wwwroot\systemfiles folder
  2. Put your custom files inside the wwwroot\data folder matching the Blizzard folder structure. If you are already using the patched WoW executable you'll have the correct structure already e.g. wwwroot\data\interface\glues\models\ui_mainmenu_legion\ui_mainmenu_legion.m2
  3. The web service will then generate all the new client files and put them in the wwwroot\output folder
  4. All new files will have their information inserted into a a MySQL table named root_entries which includes their fileDataId - this is the Id referenced by the game files and DBs
  5. You will need to patch your exe/app to point the Versions and CDNs URLs to your CASCHost server (ask in Discord if you need information on how to do this)
  6. Whenever you change a file simply use the rebuild command (see notes), wait for it to finish and restart the client

Public Hosting/Distribution:

To publicly host CASCHost you will need to open the port that this service is running on; by default this is port 5100. To change the port you need to edit the hosting.json file and restart CASCHost.

You'll also need to provide a patched WoW executable - see step 5 of Usage, the Trinity connection patcher needs to be applied as usual.

The patched executable doesn't have to be put into an existing WoW installation as the client will download the files it needs. If it is put into an existing installation the .build.info will need to be renamed/deleted to force the client to connect to your CDN opposed to Blizzard's.

Notes:

FAQ:

What versions are supported?

It was working now its all broken - what do?

I keep getting a stream error. What is this?

How can I see the fileDataIds that are generated?

Isn't putting everything in the wwwroot folder unsecure?

Thanks: