Console API and Web Application

Starfield Mods |

Console API and Web Application

Script Extender plugin exposing a very lightweight and simple API allowing to control the game via a web console or any HTTP client. Configuration allows console output to be redirected to file (as with my other mod) but also allows to create an API that can be called using any HTTP client, or alternatively you can use the web console provided.

This mod is a Script Extender plugin containing two main features:
– Write all untruncated console output to file
– Expose a HTTP POST API endpoint “/console” allowing to run commands

REQUIREMENTS
You must have Starfield Script Extender installed and working before you can use this mod.

FEATURES
Dynamic reloading of the plugin’s configuration is possible using a custom plugin specific console command:

sfse_plugin_console_api.reload_config

You can also view the currently active plugin configuration using this custom command:

sfse_plugin_console_api.dump_config

NOTE: You can update the plugin configuration file while the game is running and use the command above to reload the plugin configuration for the changes to take effect immediately.

FILES
The plugin library file, the configuration INI and the plugin log file for troubleshooting issues:

\Data\SFSE\plugins\sfse_plugin_console_api.dll
\Data\SFSE\plugins\sfse_plugin_console_api.ini
%USERPROFILE%\Documents\My Games\Starfield\SFSE\Logs\sfse_plugin_console_api.log

If you enable console text output to file (this is configurable – see configuration lower below):

%USERPROFILE%\Documents\My Games\Starfield\SFSE\Logs\sfse_plugin_console_output.log

If you installed the web application and you want to serve static files (this is configurable – see configuration lower below):

\Data\SFSE\plugins\sfse_plugin_console_web\*

API ENDPOINT
The plugin includes a very lightweight HTTP server with a single POST /console endpoint that the web app is using, or alternatively you can use any HTTP client or even the console with curl:

C:\>curl -X POST -d “GetSFSEVersion” http://127.0.0.1:55555/console
GetSFSEVersion
Command: GetSFSEVersion
SFSE version: 0.1.3, release idx 4, runtime 01070210

CONFIGURATION FILE CONTENT
[Plugin]
bEnableFileOutput=false
bEnableWebConsole=true

[FileOutput]
bOverwrite=true
sPath=%USERPROFILE%\Documents\My Games\Starfield\SFSE\Logs\sfse_plugin_console_output.log

[WebConsole]
sHost=localhost
iPort=55555
bDisableCORS=false
bDisableStaticFiles=false
sStaticFilesPath=Data\SFSE\plugins\sfse_plugin_console_web\

CONFIGURATION DETAILS
[Plugin] section:
– bEnableFileOutput: enable/disable the output of all untruncated console text to file
– bEnableWebConsole: enable/disable the API endpoint

[FileOutput] section:
– bOverwrite: true to overwrite the output file everytime time the game is started, false to keep the output file content
– sPath: the file path where to save the console text output to (you can use environment variables)

[WebConsole] section:
– sHost: the hostname or IP address to bind to for the API endpoint (localhost or 127.0.0.1 is recommended)
– iPort: the port to use for serving the API endpoint (make sure the port you specify is unused)
– bDisableCORS: enable/disable Cross-Origin Resource Sharing (CORS) – essentially for developers so a separately hosted web app can be used
– bDisableStaticFiles: enable/disable serving of static files (i.e. the web application files) – disabling this will turn off the web application while keeping the API endpoint untouched
– sStaticFilesPath: thhe path where the web application files are located (i.e. the static files)


Author: stonegdi
1 Star2 Stars3 Stars4 Stars5 Stars (3 votes, average: 5.00 out of 5)
Loading...

This content was uploaded by website visitors. If you notice any mistake, please let us know.


Still wondering what makes Starfield Mods so exceptional? You've come to the right place, as we'll clarify everything you're likely curious about. Let's dive in: Starfield Mods are supplementary files that broaden your options and unlock new possibilities. Each mod is specifically designed to address certain issues and enhance your chances of overcoming obstacles. If you find yourself stuck and feel like you've tried everything, Starfield Mods may introduce unseen features that help you conquer any challenge. This is why free Starfield Mod files are celebrated worldwide - they aid players in resolving problems. If you're in a seemingly inescapable situation, browse our recommended files and select the necessary upgrade. The Starfield Console API and Web Application Mod download process is straightforward and swift, ensuring a hassle-free experience. If this sounds appealing, don't hesitate any longer - seize this perfect opportunity to gain a significant edge over your competitors.



Useful Information: How to install Starfield Mods | Starfield System Requirements | Starfield Cheats | Starfield Tips | Starfield News

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *