Jump to content
Sign in to follow this  
naught

SQF RCON Extension - 1.0.1.3

Recommended Posts

IMPORTANT: THIS THREAD IS DEPRECATED.

Please see the new thread here in the Arma 3 - Servers & Administration forum.

This thread is being kept alive for documentation purposes; all new inquiries should be posted to the above thread.


SQF RCON Extension



Release 1.0.1.3 - v1.0 Alpha b3

By Naught

2604616101-SQF%20Remote%20Console%281%29.png

A remote SQF console addon and extension for Arma 2 & 3.

Bitbucket | Download | Source | Issues


Overview

This projects aims to create a simple method for remotely administering Arma servers in a way which has never been possible before. The game engine itself has been inaccessible to remote administrators, but now it's possible to execute code and retrieve return values via this RCON extension.

Note that this project is currently in its alpha stage, so there's a possibility for crippling bugs or issues. That aside, I test release each time for full functionality, so it's relatively stable.

Remote Console

The remote console was designed for simplicity and extensibility, so it was built completely in web-standard languages such as HTML, CSS, and javascript. This allows it to be completely customizable and accessible on nearly all machines.

4290376379-SQF%20Remote%20Console.png

Since the console is built using the aforementioned web-standard methods, you can host the console on an external web server for global access from many administrators. You may also custom-skin and edit the console to your desire to fit your needs!

Extension

The extension was programmed in C++ to allow direct communication between the game engine and the backend Mongoose webserver. The latter is a super-light high-performance HTTP web server which handles the RESTful RCON requests and sends them to Arma.

The extension was designed to not only accept requests from the standard remote console described above, but from any program which can make HTTP POST requests. This means that any developer can create a program which interacts with Arma externally through the RCON protocol described in the developer documentation below.

Download

You can download the latest version of the SQF RCON addon by visiting the repository's downloads section.

Requirements

SQF RCON requires either Arma 2 OA 1.62 or Arma 3 1.00 or greater, along with any compatible version of CBA.

Installation

  1. Download the latest version of the SQF RCON addon by referencing the above heading.
  2. Copy the "@sqfrcon" folder to your Arma addons directory, which is most likely your Arma installation folder.
  3. Either add the addon to your favorite Arma launcher (such as play.withSix) or to your -mods command-line argument.
  4. Go to the extracted "@sqfrcon\sqfrcon.cfg" file and edit the configuration to your desired need. The file is extensively commented for ease-of-use.
  5. Start the game and load a mission to allow for the remote console to connect.
  6. Open the console by navigating to "@sqfrcon\console" and opening the "index.html" file in your browser of choice.

Developer Documentation

Possible Use Cases

  • Replacement for deprecated Gamespy protocol to retrieve server statistics.
  • Web-based after action battle recorder and playback.
  • In-game player review system with accompanying external database and web application.
  • Remote connection to another game (such as Steel Beasts or Falcon BMS).
  • Interaction with forum/community software or Teamspeak.
  • And so many more...

Edited by Naught

Share this post


Link to post
Share on other sites
Wow Naught .. this looks VERY useful !

Thanks! :)

I'm very interested in what people will do with it outside of the original console I provided. I'm already working within my community to use it as a replacement to the deprecated Gamespy protocol for pulling the player count, assets, time, mission and world name, deaths, and things like that for analysis.

Share this post


Link to post
Share on other sites
Guest

Thanks for sending us the release :cool:

Release frontpaged on the Armaholic homepage.

================================================

We have also "connected" these pages to your account on Armaholic.

This means in the future you will be able to maintain these pages yourself if you wish to do so. Once this new feature is ready we will contact you about it and explain how things work and what options you have.

When you have any questions already feel free to PM or email me!

Share this post


Link to post
Share on other sites

Amazing! I'll definitely do cool things with this, thanks!

Thanks! :)

I'm very interested in what people will do with it outside of the original console I provided. I'm already working within my community to use it as a replacement to the deprecated Gamespy protocol for pulling the player count, assets, time, mission and world name, deaths, and things like that for analysis.

I already wrote something that does that and puts it in a json format for public viewing (soon server RPTs too for mission developers), but this things opens up a whole lot more options, at least in an easier way.

Share this post


Link to post
Share on other sites

Community Base Addons is not required to run your mod.

class Extended_PreInit_EventHandlers {
sqfrcon = "[] execFSM '\x\naught\addons\sqfrcon\server_handler.fsm'";
};

Can be replaced with something along the lines of

class CfgFunctions
{
class SQF_RCON
{
	class SQF_RCON_MAIN
	{
		file = "sqfrcon\";
		class sqfrcon_server_handler
		{
			preInit = 1; // 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]
			postInit = 0; // 1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit"]
			recompile = 0; // 1 to recompile the function upon mission start
			ext = ".fsm"; // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf".
		};
	};
};
};

This would execute a file named "fn_sqfrcon_server_handler.fsm" in your PBO file.

Sources:

Myself: https://github.com/jacob88/BASIX

BIS: https://community.bistudio.com/wiki/Functions_Library_%28Arma_3%29

Share this post


Link to post
Share on other sites
Community Base Addons is not required to run your mod.

class Extended_PreInit_EventHandlers {
sqfrcon = "[] execFSM '\x\naught\addons\sqfrcon\server_handler.fsm'";
};

Can be replaced with something along the lines of

class CfgFunctions
{
class SQF_RCON
{
	class SQF_RCON_MAIN
	{
		file = "sqfrcon\";
		class sqfrcon_server_handler
		{
			preInit = 1; // 1 to call the function upon mission start, before objects are initialized. Passed arguments are ["preInit"]
			postInit = 0; // 1 to call the function upon mission start, after objects are initialized. Passed arguments are ["postInit"]
			recompile = 0; // 1 to recompile the function upon mission start
			ext = ".fsm"; // Set file type, can be ".sqf" or ".fsm" (meaning scripted FSM). Default is ".sqf".
		};
	};
};
};

This would execute a file named "fn_sqfrcon_server_handler.fsm" in your PBO file.

Sources:

Myself: https://github.com/jacob88/BASIX

BIS: https://community.bistudio.com/wiki/Functions_Library_%28Arma_3%29

Although this would be much easier and remove the CBA dependency, in order to keep the addon backwards compatible with Arma 2 (currently necessary), I have to use CBA's XEH system for script execution due to the lack of CfgFunction automatic execution in Arma 2.

I may consider the idea of creating two addons, one for Arma 2 with CBA required, and another for Arma 3 with no dependencies using the above method.

Share this post


Link to post
Share on other sites
Although this would be much easier and remove the CBA dependency, in order to keep the addon backwards compatible with Arma 2 (currently necessary), I have to use CBA's XEH system for script execution due to the lack of CfgFunction automatic execution in Arma 2.

I may consider the idea of creating two addons, one for Arma 2 with CBA required, and another for Arma 3 with no dependencies using the above method.

ArmA 2 has the same function with a slightly different setup

https://community.bistudio.com/wiki/Functions_Library

Share this post


Link to post
Share on other sites
ArmA 2 has the same function with a slightly different setup

https://community.bistudio.com/wiki/Functions_Library

I've looked over this, and although you can store functions with this method, you cannot execute them, which is the functionality this addon needs.

Maybe at one point they'll update Arma 2 OA with some of the features that came with Arma 3 such as initialization of function libraries, but I don't see it happening.

Share this post


Link to post
Share on other sites

Can you please release a version of this which doesn't require CBA if it's possible? This looks really awesome! I'm surprised it doesn't have more responses or downloads.

Edit: I've been experimenting with this and trial running it on my server and after an hour or so it would start to give the following status code even while the mission is running: HTTP 503: Service Unavailable

Edited by JamesJ505

Share this post


Link to post
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
Sign in to follow this  

×