Skip to content

About

Web API server for the client

Resources

Stars

1 star

Watchers

5 watching

Forks

Repository files navigation

RIN.WebAPI

Web API server for the client

Setup

  • Download and install Docker.
  • Run docker compose -p rin_webapi up from the docker folder to start the dev stack.
  • Run SDBBrowser and load an sdb file.
  • Click DB and enter the connection string:
    • User ID=tmwadmin;Password=change;Host=localhost;Port=5434;Database=TMW;
  • Click Import and you should see the log importing the data, wait for it to finish.
  • Go to the sql folder and run ImportSchema.bat
  • Open http://localhost:8081/browser in your browser and sign in to the postgres admin with the email tmwlocaldev@tmwlocaldev.net and password tmwlocaldev
    • These are for local development only, CHANGE THEM if you deploy this.
  • In the DB you should see 2 schemas sdb and webapi
    • The public schema can be ignored.
  • To have the game connect to this server open Firefall.ini in your game install and set OperatorHost="https://localhost:5001" under the [Config] section.

Running RIN

  • Compile the latest changes to the RIN.WebAPI solution.
  • Run the project as RIN.WEBAPI or RIN.WebAPI CMD.
    • The difference between these two profiles is CMD will only launch RIN while the other profile will also launch Swagger (https://localhost:5001/swagger/index.html) in your browser for checking endpoints.
    • When prompted about trusting the ASP.NET Core SSL Certificate, select Yes.
      • It is possible you will need to restart RIN/Docker/Firefall after installing the certificate for them to properly recognize it.
  • You will most likely not need to restart Docker unless you make DB Schema changes.

Streaming assets

The client streamed some assets from dl.firefall.com instead of installing them: the finest levels of the virtual texture and the dialogue media banks. RIN serves the RIN.WebAPI/StreamingAssets folder at /dl, with the range requests the client needs. Set WebApiConfig:StreamingAssetsPath to use another folder, or to an empty string to turn it off.

  • Put the virtual texture levels in vtex/static.vtex<N> and the banks in AssetStream/<block>/<id>.bnk, e.g. AssetStream/00180000/00180091.bnk.
  • A partial bank, like the ones recovered from player caches, needs its .bnk_ac next to it. Requests outside the ranges it lists get a 404 instead of the gaps.
  • ingame/ in the same folder stands in for the in-game web host.
  • Point the client at it in Firefall.ini:
[FilePaths]
VTRemotePath = "https://localhost:5001/dl/vtex/static.vtex"
AssetStreamPath = "https://localhost:5001/dl/AssetStream/"

Contributing / Updating

If you have made db changes run sql/ExportSchema.bat and check in the webapi_schema.sql file to make sure the schema changes are shared.

Tech / libs used

About

Web API server for the client

Resources

Stars

1 star

Watchers

5 watching

Forks

Releases

Packages

Used by

Contributors

Languages