LordAshes-RemoteControlPlugin icon

RemoteControlPlugin

Allows players to move and rotate minis, adjust camera, and more in Talespire without using Talespire.

Last updated 4 months ago
Total downloads 6195
Total rating 0 
Categories Tweaks Networked Tools Integration Assets Minis Props
Dependency string LordAshes-RemoteControlPlugin-3.1.1
Dependants 1 other package depends on this package

This mod requires the following mods to function

bbepisTaleSpire-BepInExPack-5.4.10 icon
bbepisTaleSpire-BepInExPack

Unified BepInEx all-in-one modding pack - plugin framework, detour library

Preferred version: 5.4.10
brcoding-SetInjectionFlagPlugin-2.3.0 icon
brcoding-SetInjectionFlagPlugin

Allows players to flag mods are installed

Preferred version: 2.3.0
LordAshes-FileAccessPlugin-1.7.1 icon
LordAshes-FileAccessPlugin

Provides standardized methods for accessing both local file and url resources. Automatically handles searching local folders for assets.

Preferred version: 1.7.1
LordAshes-AssetDataPlugin-3.5.0 icon
LordAshes-AssetDataPlugin

Dependency plugin for subscription/notification based data storage and message exchange.

Preferred version: 3.5.0

README

Remote Control Plugin

This unofficial TaleSpire allows players to move their minis in a Talespire game without having Talespire.

Video For Plugin Base Function: https://youtu.be/aLRPOsEqA0s Video For Plugin Improvements: https://youtu.be/So_b4iVo8Ks Video For Plugin Web Interface: https://youtu.be/uBVkXWYuJoQ

Thanks to Victor Hurtado for the web interface update. Thanks to Benny Scetbun for adding the move in camera direction functionality. (https://github.com/bennyscetbun)

This plugin, like all others, is free but if you want to donate, use: http://198.91.243.185/TalespireDonate/Donate.php

Change Log

3.1.1: Fix for compatibility with BR Seats update
3.0.0: Option to move according to camera view (instead of compass direction)
3.0.0: Bug fix for using different movement when facing in the direction of moving
2.9.0: Added HTTP POST request support
2.8.0: Updated for compatibility with BR Slab Browser update
2.7.0: Bug fix for different OS cultures
2.6.1: Fix for compatibility with BR update
2.6.0: Added generic (Asset Data Plugin) request functionality
2.5.3: Fix bug with delay bettween animating multiple assets with the same name
2.5.2: Documentation fix. No plugin update.
2.5.1: Added support for animate requests (carried out by CALPIE)
2.4.2: Fix bug with movement replication to other instances. Fix breaks Up/Down. 
2.4.1: Replaced web based remote code with improved version provided by Victor Hurtado. No plugin change.
2.4.0: Added optional move animation run mode
2.4.0: Added move animation queue
2.3.2: Added optional roll result name
2.3.1: Added some remote result validation
2.3.1: Removed move style from being added to regular chat messages
2.3.0: Added remote roll result posting
2.2.0: Added movement style functionality to Plugin and App
2.1.1: Replaced web based remote code with improved version provided by Victor Hurtado. No plugin change.
2.1.0: Added support for Talespire Dice rolls (use Auto Roll plugin to auto roll the dice).
2.1.0: Added support for zoom in, zoom out and zoom set.
2.0.0: Fix after BR HF Integration Update.
2.0.0: Added Web Remote. 
1.3.0: Added diagnostic setting for adding additional entries into the logs.
1.3.0: Added TCPSend tool which can be used be external apps to communicate to the plugin.
1.2.0: Added chat feature speaking as the indicated character or GM (if character name is GM).
       This function allows use of chat services such as Chat Roll if installed.
1.1.0: Updated Remote Control App and plugin to support rotation and camera operations.
1.0.0: Initial release

Install

Use R2ModMan or similar installer to install this plugin.

Use R2ModMan to configure optional settings (port) for the plugin.

Usage

This plugin does not provide any way for the players to see the Talespire environment. Typically to get around this the GM would stream a Talespire view for the players. Check out the Stream Views Plugin for the ability to stream different views for the players while still maintaining the GM account view as secret.

The players can launch the Remote Control App. Currently this is a simple Win Forms app.

The player enters the IP address of the GM's machine (that the GM provides to the players) and the port. The default port is 11000 but can be changed using the R2ModMan configuration for the Remote Control Plugin (i.e. the Talespire component run by the GM).

The player then enters the mini name that they wish to control. Typically this would be the name of their own mini.

After that the player can press the directional buttons on the Remote Control App in order to move his/her mini, rotate his/her mini, move the camera, and/or rotate the camwera.

Settings on the remote are provided to determine how much each button press moves, how much each button press rotates, and if the mini is to change facing whem moving.

The RemoteControlApp.exe can be found in the plugins install directory.

Web Control

Within the pack there is also a folder called Remote which contains two files: Remote.html and Request.php These allow the DM to host a web page to allow the use of a web page (as opposed to the Remote Control application) to control minis in the talespire game.

The solution does not provide hosting for the solution. The DM must run a PHP enabled web server in order to host these files and ensure that his/her firewall allows external access to the web server. Windows system typically have IIS installed although in some cases it needs to be turned on. By default IIS does not include a PHP implementation but a free PHP implementation can be added. However, any other PHP enabled web server can be used.

The web page is used similar to the remote control application: user connect to the web page, enter the name of the mini to be controlled and use the arrow keys to control the character or camera.

Custom Interface

The remote control plugin can be triggered from any application that can send either an HTTP POST request or a simple TCP/IP plain text message. For HTTP POST requests the body of the POST request should be the message to be sent. Unlike usual POST request which use key=value pairs, the expected POST body, by this plugin, is just the message to be send. This can be achieved with Javascript using code such as:

var xmlHttp = new XMLHttpRequest();
xmlHttp.open( "POST", "http://127.0.0.1:10000", false );
xmlHttp.setRequestHeader('Content-Type', 'text/plain');
xmlHttp.send( "Freya,Chat,Hello" );

The support for HTTP POST means a HTML/Javascript page can now make requests to the Remote Control Plugin without needing a server backend to convert the request to a plain text TCP/IP message.

Remote Command Options

GM,CHAT,message
GM,CHAT,/rr rollrequest
GM,DICE,formula
assets,ANIMATE,animName,duration,animIdle
assets,REQUEST,key,value,legacy
asset,DELETE
asset,UP
asset,DOWN
asset,FORWARD
asset,FORWARDANDFACE
asset,BACKWARD
asset,BACKWARDANDFACE
asset,LEFT
asset,LEFTANDFACE
asset,RIGHT
asset,RIGHTANDFACE
asset,ROTATE,LEFT
asset,ROTATE,RIGHT
asset,ROTATE,FORWARD
asset,ROTATE,BACKWARD
asset,ROTATE,CLOCKWISE
asset,ROTATE,COUNTERCLOCKWISE
CAMERA,UP
CAMERA,DOWN
CAMERA,FORWARD
CAMERA,BACKWARD
CAMERA,LEFT
CAMERA,RIGHT
CAMERA,FORWARDCAMERABASED
CAMERA,FORWARDCAMERABASEDANDFACE
CAMERA,BACKWARDCAMERABASED
CAMERA,BACKWARDCAMERABASEDANDFACE
CAMERA,RIGHTCAMERABASED
CAMERA,RIGHTCAMERABASEDANDFACE
CAMERA,LEFTCAMERABASED
CAMERA,LEFTCAMERABASEDANDFACE
CAMERA,ZOOMIN
CAMERA,ZOOMOUT
CAMERA,ZOOMSET,value
CAMERA,ROTATE,FORWARD
CAMERA,ROTATE,BACKWARD
CAMERA,ROTATE,LEFT
CAMERA,ROTATE,RIGHT
CAMERA,ROTATE,CLOCKWISE
CAMERA,ROTATE,COUNTERCLOCKWISE

The REQUEST option is a very powerful option that allows triggering of many plugin functions. Many plugins that distribute some functionality between all the players, use Asset Data to distribute the request. The REQUEST option allows sending similar messages to Asset Data Plugin which can be used to then trigger such compatible plugins. The key is the unique key that the plugin uses to communicate (typically you can get this information from the logs) and value is the value that is to be written to the key (typically the request). The legacy parameter indicates if the request should be executed as a Asset Data request or use the legacy Stat Messaging functionality. You can check the dependencies for the desired plugin. If the plugin depends on Asset Data then use false but if the plugin depends on Stat Messaging the use true.

Chat Function

When using the Chat function, by default, the content will be spoken by the character whose name is in the Remote Control and the results are also written to the log. If the character name is changed to GM on the Remote Control, the message will be sent as the local player (GM or not) and will show up in the chat.

If any Chat Service plugins are installed (such as Chat Roll), the chat content will be processed through these Chat Service plugin. For example, if the Chat Roll plugin is installed, the Remote Control Chat function can be used to make Chat Roll requests.

TCPSend Utility

The TCPSend utility just takes a ip, port and message and sends a corresponding TCP/IP message using those specifications. If generating a TCP/IP message is difficult within an external application but executing command line utilities is not then this unility can be used to make requests to the plugin. The message content is automatically suffixed with a carriage return and new line (required by the plugin). So to send a message, one would do something like:

TCPSend 127.0.0.1 11000 Jon,CHAT,Hello!

Custom Movement Styles

Movement styles can easily be added to the plugin by creating a JSON files with a RMV (remote move) extension. The files should have a format similar to:

{
  "name": "Drunk",
  "steps":
  [
    { "path": 0.1, "tangent": 0.0, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.2, "tangent": 0.2, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.3, "tangent": 0.4, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.4, "tangent": 0.2, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.5, "tangent": 0.0, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.6, "tangent": -0.0, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.7, "tangent": -0.2, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.8, "tangent": -0.4, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 0.9, "tangent": -0.2, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
    { "path": 1.0, "tangent": 0.0, "elevation": 0.0, "rotations": {"axisX": 0, "axisY": 0, "axisZ": 0}, "delay": 0.1},
  ]
}

name is the string used to identify the movement style. It is used to select the style and must be unique. steps is a list of animation steps. path indicates the amount that the mini is to be placed from the starting position to the ending position. A value of 0 indicates the starting position and a value of 1 indictates the end position. Ideally path should start at 0 and end at a value 1. tangent is the direction perpendicular to the path. This allows animations that require movement to the minis left and right. Unlike the path whose length depends on the amount moved, tangent is always a unit vector. So a value of 1.0 would move about 1 tile in the perpendicular direction. elevation is like tangent but for the up and down direction. Positve values will cause the mini to go up while negative values would cause the mini to go into the ground. Similar to tangent, this is a unit vector meaning a value of 1.0 will raise the mini about a tile in height. rotatations indicates the amount that the mini is rotated around each axis from its starting orientation. delay indicates the number of seconds (usually a fractional value) that the step is displayed before moving to the next step.

All values are absolute values and thus are replaced by the next step. The previous steps do not add. This means that typically the values between steps should not be too different, otherwise the animation will be rough.

New movement files (or modifications to movement files) are read on startup and thus you need to restart Talespire for them to take effect if they were changed while Talespire was running.

Remote Roll Posting

When sending a chat messages, if the message starts with /rr (remote result) then it will be interpreted as a roll result. Roll result requests are used to post rolls made outside of Talespire to Talespire. The format of the roll result can include multiple dice types but must be in the format #D#+# or #D#-#. When using multiple dice the dice sets should be added. For example, #D#+#+#D#+# or #D#-#+#D#+# or #D#+#+#D#-#. Note that the modifier is always required even if zero. Thus, #D# is not a valid roll. If the roll has a 0 modifier it needs to be written as #D#+0.

The roll supports an optional name. There is one name for the entire roll even if the roll has multiple dice parts. When using the roll name, the roll name appears directly after the /rr separated by a space and ends with a colon (:) character.

Examples,

/rr 1D20+5 [15] (Valid) /rr 1D20+0 [12] (Valid) /rr 1D20 [17] (Invalid: No modifier) /rr 1D8+3+1D6+1 [7,2] (Valid) /rr 1D8+3+1D6-1 [6,3] (Valid) /rr 1D8-1+1D6+3 [8,1] (Valid) /rr 1D8+1-1D6+1 [5,3] (Invalid: Roll separator must be plus) /rr Perception: 1D20+3 [12] (Valid) /rr Sword Attack: 1D20+5 [3] (Valid) /rr Sword Attack 1D20+3 [7] (Invalid: Missing colon between name and formula)

Run Mode

There is a setting on in the plugin configuration which determines if you want to use run mode or not. If the configruation setting "Run Duration Multiplier" is 1.0 then run mode if off. If the value is less than 1.0 then if multiple move requests are queued (an additional move request or move requests were made while a move requested animation was in progress) then the speed duration will be multiplied by this setting. For example, a value of 0.5 would mean the mini would move twice as fast if multiple move requests where made.

Limitations

  1. The Remote Control App has no permission checking. You can use it to control any mini that you know the name of.
  2. The control over the camera is shared between all remotes, thus two or more players can be fighting for control.