MovableChessboard
Library/Mod to move chessboard around. Provides useful hooks for mods depending on position of the chessboard.
About this mod Author’s original text
MovableChessboard
MovableChessboard is a simple mod that allows players and mods alike to move the chessboard around the airport.
Provides hooks to _BoardMovement™_ events to allow mods depending on this one to get instant updates on the new
position, rotation and scale of the board!
As stated before, players can move chessboard using controls as defined per config file.
For more information, see Configuration section.
Usage
As a dependency
To get updates on chessboard movement, your mod has to first call BoardManager.Init(), preferably in your plugin's Start() method.
After that, you can start hooking up your own event handlers. Here's an example:
private void Start()
{
// Initialize board manager
BoardManager.Init();
// Hook up to all interested events with your handlers
BoardManager.OnBoardLoaded += MyOnBoardLoaded;
BoardManager.OnBoardChangedPosition += MyOnBoardMoved;
BoardManager.OnBoardChangedRotation += MyOnBoardRotated;
BoardManager.OnBoardChangedScale += MyOnBoardScaled;
}
private void MyOnBoardLoaded()
{
Plugin.Log.LogDebug("Chessboard just got loaded into BoardManager!");
}
private void MyOnBoardMoved(Vector3 newPosition)
{
Plugin.Log.LogDebug($"Chessboard just got moved! New position: {newPosition}");
}
private void MyOnBoardRotated(Quaternion newRotation)
{
Plugin.Log.LogDebug($"Chessboard just got rotated! New rotation: {newRotation}");
}
private void MyOnBoardScaled(Vector3 newScale)
{
Plugin.Log.LogDebug($"Chessboard just got scaled! New scale: {newScale}");
}
To move, rotate or scale the chessboard from within your mod, you will have to call MoveChessboard(Vector3 newPosition),
RotateChessboard(Quaternion newRotation) and ScaleChessboard(Vector3 newScale) respectively.
For example usages of these methods, see src/MovableChessboard/Plugin.cs.
As a standalone mod
When you create a lobby and get assigned as a host, you have an ability to move, rotate and scale the chessboard using controls
as defined by Configuration file.
Note
Chessboard means _only_ chessboard. Pieces will stay at the same position unless moved by other mods, see BetterChess.
Also, as of right now, only you (the host) able to percieve the change in chessboard position.
(I plan to add more RPC calls to make it possible to also change position when host changes as well as percieving the chessboard movement as client with a mod)
Configuration
Configuration file can be found in your $PEAK_FOLDER/BepInEx/config/com.github.Kirshoo.MovableChessboard.cfg
Issues and Suggestions
If you running into any issues or have suggestions, you can contact me on discord in modding community server here or open an issue on github repository for this project.
Install & use Install: BepInEx plugin
- The archive from playbuff is the mod itself — usually a BepInEx plugin (a .dll or a plugin folder once unzipped).
- Recommended: use a community mod manager (such as r2modman) — pick this game, import the mod, and the manager sets up BepInEx and its dependencies for you.
- Manual route: install the BepInEx loader in the game folder, then drop the unzipped .dll or plugin folder into BepInEx/plugins/.
- Launch the game — the BepInEx console logs every plugin it loads; seeing this mod in the log means it is installed.
Mods with listed dependencies need those installed too, or they will not load. Options are usually changed in-game or in the plugin's config file.
Install these first, or the mod will not work: