OpenWF Bootstrapper Manual

While the main feature of the Bootstrapper (wtsapi32.dll, dwmapi.dll, or version.dll) is to use a custom server with the game, it has other features as well.

Client Config.json

The Bootstrapper's configuration is in OpenWF/Client Config.json relative to your game folder. It has the following fields:

HTTP Interface

While the game is running, you can visit http://localhost:6155/ to modify some of the above options, access additional features like teleportation, and use scripts.

This web interface uses the game's language or ?lang= query parameter to check for translations. The builtin translations are mirrored from https://onlyg.it/OpenWF/Translations. You can provide a OpenWF/dict.cat.txt file to provide a custom work-in-progress translation.

Developers can also use the HTTP interface to interact with the Bootstrapper. In addition to commands (documented below), the following routes are available: /ping, /save_all_metadata, /write_all_metadata_reads_to_console, /write_all_metadata_reads_to_ee_log, /write_patched_metadata_reads_to_console, /write_patched_metadata_reads_to_ee_log, /pause_always_stops_time, /server_host, /status, /toggle_console, /scripts, /start_script, /start_script_inline, /autostart_scripts, /add_autostart_script, /remove_autostart_script, /apply_hotfix, /version, /game_version, /check_label_replacements, /memory, /get_effective_metadata

Command Line Arguments

The Bootstrapper adds the owfServerHost command line argument, which can be used to override the server_host in the config.

Tunables

When connecting to a server, the Bootstrapper requests /custom/tunables.json. The resulting JSON object may provide the following fields:

To aid in troubleshooting, the Bootstrapper assumes that a compatible server responds to this request with status code 200 and a valid JSON object, otherwise showing a warning popup.

Traffic Deviations

Metadata Patches

Metadata Patches are loaded from .txt files in the OpenWF/Metadata Patches/ folder.

They are parsed line by line. If a line starts with /, a new patch for the given absolute path is started.

It is possible to have a single patch affect multiple paths by using ampersands. The start of a patch can also take up multiple lines if the ampersand is at the end of the line or the beginning of the next line.

For the remaining processing, leading and trailing spaces and tabs are ignored:

If multiple patches affect the same absolute path, they are combined.

Content Management

The Bootstrapper handles the client's content requests by consulting the OpenWF/Content/ folder, forwarding the request to the configured server in case a file is not found.

At minimum, the client will request /0/H.Cache.bin!D_---------------------w. The Bootstrapper has 3 modes for managing this file:

WebSocket Connection to Server

After login, the Bootstrapper will attempt to establish a WebSocket connection with ws://server_host:http_port/custom/ws. If the WebSocket upgrade succeeds, the Bootstrapper sends {"auth_game":{"accountId":...,"nonce":...}}. With this connection in place, the server can send {"sync_inventory":true} to cause the client to resync from inventory.php or {"tunables":{...}} to send updated tunables.

Command API

The command API is a versatile way for developers to interact with the Bootstrapper. Commands are available via HTTP, WebSocket, and the scripting API. For example, to enable skip_mission_start_timer, one can use HTTP with /skip_mission_start_timer?true, WebSocket with send("skip_mission_start_timer?true") or scripting with owf_command("skip_mission_start_timer?true").

The following commands are available: logout, save_config, reload_hotkeys, reload_label_replacements, reload_metadata_patches, available_scripts, running_scripts, autostart_scripts, script_log, clear_script_log, stop_script, high_damage_numbers_patch, skip_mission_start_timer, simulacrum_blacklisted, simulacrum_whitelisted, alternative_loading, ee_log_in_console, dont_resolve_labels, fov_override, freecam, lockcam, gamecam, teleport, enable_pause_always_stops_time, disable_pause_always_stops_time, request_bgscript_broadcasts, download_latest_hotfix, check_for_updates

Feedback

I hope this document was useful. If you have any feature requests or bug reports regarding the Bootstrapper, feel free to submit them at https://onlyg.it/OpenWF/Bootstrapper/issues.