Jump to content

Beginner's Guide to CASCHost

By Смердокрыл
in Serverside

Recommended Posts

2018-11-19_16-21-24.png.44985418dae813ac418c07f78dde04d7.pngIntroduction

Originating from Heroes of the Storm (CASC '1.0'), the Content Addressable Storage Container is a new file system for WoW, introduced in Warlords of Draenor as a replacement for MPQ archives (CASC '2.0'). As such, it needs to be worked with in order to use custom game files in WoD, Legion, and BfA. CASCHost is a tool for just that.

 

 

 

 

Tools and resources

  • CASCHost itself
  • Patched WoW.exe
    • If you are running your server and client on the same machine, you can download a suitable WoW.exe here.
    • Alternatively, keep reading for an instruction on how to patch the exe yourself.
      • This will require 010 Editor and the TrinityCore Connection Patcher.

As of TC Master 8.0.1, the TC patcher is no longer operational. Chances are, you will be using the Arctium Launcher instead. If you follow my instructions on patching WoW.exe, the Launcher will not work, as it also overwrites the versions url. Read on for an instruction on how to patch the Launcher instead! (the exe should be left unedited).

  • .build.info
    • This file might be in your WoW folder - if it is, use that file for CASCHost as will be described below, and temporarily remove it from your client. While this file is in the same folder as WoW.exe, the latter will ignore your custom CASC and only download files from Blizzard servers.
    • Alternatively, you can always get one here. Make sure to choose the correct version.

The Technique

Installation

  1. Download CASCHost from the link above (either the pre-built version, or clone it from GitHub and build yourself).
    • If you build the program yourself, you will need to manually create some of the folders I talk about below.
  2. Place your .build.info in CASCHost folder/wwwroot/SystemFiles/.
  3. Place your custom files in CASCHost folder/wwwroot/Data/ with the correct structure (e.g. wwwroot/Data/Character/Human/...).
  4. Open the file CASCHost folder/appsettings.json to edit:
    • RebuildPassword - use this field if you would like CASCHost to require a password when issuing rebuild commands from a browser.
    • HostDomain - your server domain in the form domain:port. IP addresses are not supported, apparently.
      • Leave as "localhost:5100" to use the pre-patched WoW.exe.
      • SqlConnection - the IP address of your SQL server, the username and password (typically, trinity/trinity), and the name for the database CASCHost should use. Sometimes you might need to create the database yourself instead of letting CASCHost do it.
    • Locale - the localisation of your server and client(s), e.g. enUS, deDE, enGB, ruRU, etc.
  5. (Optional) To publicly host your custom files for other players to download, open the file CASCHost folder/hosting.json, and add your domain:port to the urls list.

Patching WoW.exe

Spoiler
  1. Apply the TrinityCore Connection Patcher to your WoW.exe.
  2. Open this WoW.exe in 010 Editor.
  3. Search (Ctrl+F) for 'trinity'. The first occurence should look like this:
    2018-11-19_15-31-54.png.cb972b26b583e3d20da07a59cc224673.png
  4. Place your cursor before 'trinity' in the column on the right, as shown on the screenshot, and type your domain, a semicolon, and port (same as the HostDomain in CASCHost settings). Add to that '/versions'. The result should look like:
    2018-11-19_15-37-14.png.6e5e7e86c5b3f12205ac290e3996bd69.png
  5. The colouring conveniently indicates where the string you just typed ends. Now go to the respective location in the left column (in the case of this screenshot, it is right before 2F). Then just type 0s until you get to the already present 00s like this:
    2018-11-19_15-41-30.png.f830b1ae5c07ff31290d55ff0d5d185c.png
  6. Move to the string below and perform the same algorithm to type up 'yourdomain:port/cdns' and remove the extra characters:
    2018-11-19_15-43-34.png.019da88bc0dec046f75db9f9f98da727.png
  7. Save the executable and close 010 Editor.

Patching Arctium WoW Launcher.exe

Spoiler
  1. Open your Arctium WoW Client Launcher.exe in 010 Editor.
  2. Search (Ctrl+F) for 'trinity'. The first occurence should look like this:
    image.png.154a2d24a364757beb968ca519f831fb.png
  3. Place your cursor before 'trinity' in the column on the right, as shown on the screenshot, and type your domain, a semicolon, and port (same as the HostDomain in CASCHost settings). Add to that '/versions'. The result should look like:
    image.png.c7b1fe6c6061e56bff47f5590a230c11.png
  4. The colouring conveniently indicates where the string you just typed ends. Now go to the respective location in the left column (in the case of this screenshot, it is right before 2F). Then just type 0s until you get to the end of the line like this:
    image.png.b3959823d90186ad084132028dcfccea.png
  5. Go back to Patching WoW.exe and perform only the step where you edit the /cdns url, not /versions.
  6. Save the executable and close 010 Editor.

You can now run Start.bat from your CASCHost folder and, once that loads, start WoW.exe/Arctium Launcher. The client should begin downloading the files you placed in CASCHost folder/wwwroot/Data/ (don't worry, it will download whatever it needs from Blizzard servers as well, but your files have priority). 

Managing CASCHost

  • While CASCHost is running, you may add/edit/remove files in the Data folder. In order for the changes to take effect, you must open your browser and go to http://yourdomain:port/rebuild
    • In the default case, it will be http://localhost:5100/rebuild
    • If you have set up a rebuild password in CASCHost settings, you will need to go to http://yourdomain:port/rebuild_yourpassword
  • To stop CASCHost, press Ctrl+C in the window, and choose Y.

Troubleshooting

For all of your CASCHost troubles (a file not appearing/updating/being removed, etc.), there is a simple algorithm: try the first step, move to 2 if it doesn't help. It might sometimes be helpful to clear the client cache between steps.

  1. Rebuild.
  2. Stop CASCHost and run it again.
  3. Stop CASCHost, delete the Output folder (in wwwroot/), and run it again. This might take some time if there are a lot of files.
  4. Stop CASCHost, delete the Output folder, open the CASCHost database with your SQL editor of choice and delete the root_entries table (Warning: this will lead to all of your custom FileDataIDs being jumbled up!), run it again.
  5. Complain on Discord.
  6. Create an issue on GitHub.

Conclusion

I am hoping this guide will answer most questions and resolve most problems people have when introducing themselves to CASCHost. As a semi-experienced user myself, I might have made some mistakes while writing it, and so will welcome any constructive criticism. 

Regardless, I would like to credit and thank the developers of CASCHost: @barncastle, Maku, @luzifix, and tspearman for, well, developing it, and writing an informative readme. 2018-11-19_16-21-24.png.44985418dae813ac418c07f78dde04d7.png

or not


 skarnnoggitlogpost.thumb.jpg.d752b4e8541

Link to comment
Share on other sites

×
×
  • Create New...