Multi Instance Macro Handler for Minecraft on Linux.
Project description
MultiInstanceLinux
Multi Instance Macro Handler for Minecraft on Linux.
Features
- 1.16.1 RSG support.
- Wall support.
- OBS integration for Wall Resetting.
- Full keyboard support.
- Distributed through pip for easy installation.
- Multi Threading for better script performance.
- An "almost" drop-in repleacement on Linux for Specnr's macro designed for Windows
Dependencies
Installation
Dependencies
- Debian/Debian-based distros
sudo apt update
sudo apt install wmctrl xdotool
- Arch/Arch-based distros
sudo pacman -Sy
sudo pacman -S wmctrl xdotool
- RHEL/RHEL-based distros
sudo dnf upgrade
sudo dnf install wmctrl xdotool
OBS websocket plugin
- Download this if and only if you plan on using wall.
- No need to download this if you are using OBS Studio > 28.0.0
- Binaries for OBS Studio < 28.0.0 on Debian/Debian-based distros are available in the releases tab of the websocket repository.
- flatpak
flatpak install com.obsproject.Studio.Plugin.WebSocket
- Arch/Arch-based distros - Using yay
yay -Sy
yay -S obs-websocket
- Note: The script was tested on 'obs-studio-tytan652' available on the AUR (Arch User Repositories).
- Any bugs on other versions can be posted in the Issues tab.
Install the package from pip
- Install the package distributed through pip.
- Use sudo to install the package as pip by default installs packages in
.local/
directory which is usually not in PATH for many distros. - By using sudo, it installs the package in
/usr/
which is in PATH by default.
sudo pip install MultiInstanceLinux
- If you want to support the project by testing new code pushed to the repository, then execute this command.
sudo pip install MultiInstanceLinux==<The version of testing released>
- The latest version of testing released can be found in the releases tab.
- For example: If the version code is
v1.3.0-testing
then execute
sudo pip install MultiInstanceLinux==1.3.0
Usage
- This command must be executed in a terminal each time you want to use the macro. You could set it up so that the script runs each time you start up all the instances of Minecraft.
- It must be executed with sudo because the keyboard module requires elevated privileges to run on Linux.
sudo multiinstancelinux
Some important instructions
- This macro also assumes that you are using Atum and FastReset mods for Minecraft 1.16.1. It is hardcoded assuming so.
- Use all your instances in 'windowed' mode as using it in fullscreen minimizes the Minecraft window as you switch to OBS while using wall.
- If you do not want to use wall resetting, make sure to set the same keybinds as the macro to switch instances and to switch scenes. For example, in the default config, one would have to set
Ctrl+1
to switch to the instance named "Instance 1" in OBS. - Log files are located in the 'log' directory in the project script's main folder. So, issues must be submitted with the relevant log files attached to them.
- The 'testing' branch is meant only for testing purposes and releases from that branch are created with the '-testing' tag at the end of them.
- The launch order of the instances is very important. Make sure you launch the instances in ascending order of instance number.
Contribution
- Code contributions can be made to the testing branch. Pull requests must be made with proper comments and documentation.
- The code must follow all PEP8 conventions and must be in python3.x ONLY.
Default Keybinds
Ctrl+R
- Reset all instances (RSG)Shift+R
- Reset the current instance (RSG)Ctrl+S
- Suspend all instances other than the active one.Alt+S
- Unsuspend all instances.Ctrl+o
- Switch to the wall scene on OBS (Only while using wall).Ctrl+1
- Switch to Instance 1Ctrl+2
- Switch to Instance 2Ctrl+3
- Switch to Instance 3Ctrl+4
- Switch to Instance 4Ctrl+5
- Switch to Instance 5Ctrl+6
- Switch to Instance 6Ctrl+7
- Switch to Instance 7Ctrl+8
- Switch to Instance 8Ctrl+9
- Switch to Instance 9Shift+1
- Switch to Instance 1 and reset all others.Shift+2
- Switch to Instance 2 and reset all others.Shift+3
- Switch to Instance 3 and reset all others.Shift+4
- Switch to Instance 4 and reset all others.Shift+5
- Switch to Instance 5 and reset all others.Shift+6
- Switch to Instance 6 and reset all others.Shift+7
- Switch to Instance 7 and reset all others.Shift+8
- Switch to Instance 8 and reset all others.Shift+9
- Switch to Instance 9 and reset all others.
Configuration
- All configurations can be done in config.py which is located in the
.config/MultiInstanceLinux/
directory of your home folder. - A default config is provided and the script will rollback to it if it doesn't find the file in the working directory.
- A new config.py will be created from the default config if a config.py doesn't exist already.
Variable Descriptions
- USING_WALL - Option to use Wall for multi instancing.
- USING_PROJECTOR - Option to use OBS Projector while using wall.
- WEBSOCKET_HOST - The hostname of the websocket server.
- WEBSOCKET_PORT - The port on the host where the server is hosted.
- WEBSOCKET_PASSWORD - The password that is set to connect to the websocket server.
- WALL_SCENE_NAME - The name of the wall scene on OBS.
- SWITCH_TO_WALL - The list of keybinds to switch to the wall scene on OBS.
- INSTANCE_SCENE_NAMES - The list of scene names (in order of instance number) on OBS.
- SWITCH_INSTANCES - The list of keybinds (in order of instance number) to switch to that respective instance.
- SWITCH_AND_RESET_INSTANCES - The list of keybinds (in order of instance number) to reset all other instances and switch to an instance.
- RESET_ALL_INSTANCES - The list of keybinds to reset all instances.
- RESET_CURRENT_INSTANCE - The list of keybinds to reset the current instance.
- SUSPEND_ALL_INSTANCES - The list of keybinds for suspending instances other than the active instance.
- UNSUSPEND_ALL_INSTANCES - The list of keybinds for un-suspending all instances.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
MultiInstanceLinux-1.3.0.tar.gz
(13.1 kB
view details)
Built Distribution
File details
Details for the file MultiInstanceLinux-1.3.0.tar.gz
.
File metadata
- Download URL: MultiInstanceLinux-1.3.0.tar.gz
- Upload date:
- Size: 13.1 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d2ec7de3c534b21d36c5ac5e4ee1815c56e83b4aec7e2022a94f2b1722cf93b3 |
|
MD5 | 24e201dfe16fd537d766bee40622213a |
|
BLAKE2b-256 | 5a0aa6f92bb60ae4b9d176871805be02412420ce86823c301587cf1e5c26767c |
File details
Details for the file MultiInstanceLinux-1.3.0-py3-none-any.whl
.
File metadata
- Download URL: MultiInstanceLinux-1.3.0-py3-none-any.whl
- Upload date:
- Size: 14.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.10.5
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 14a235051a9038a7e5a23e0b9915079347bfc30748ac821f802cf695541ef330 |
|
MD5 | 3e8ce1ed3df40a91f23fc5540b33fdc5 |
|
BLAKE2b-256 | 7f89856391a7cd8aa49639cc0da0b6b74bb9b97a303a6325702c4d1d651352e3 |