This script provides a terminal-based interface for launching characters in GemstonIV using Lich and the Profanity Front End. It allows you to select characters from your accounts and handles the login process then launches Profanity. It also displays the online status of characters currently logged in on the same computer.
Before you begin, ensure you have the following installed on your system:
- Python 3.6 or higher
- Ruby interpreter
- Lich 5 (Lich5) installed and configured
- Profanity Frontend installed
- Git (optional, for cloning the repository)
Ensure that the ruby command is available in your system's PATH.
Clone the repository or download the script files into a directory of your choice:
git clone https://github.com/ndoucette/gempy.git
cd gempyThe script uses a YAML configuration file named config.yaml. You'll need to create and customize this file based on your setup.
-
Create the
config.yamlFile:You can create the file manually or copy the sample provided:
cp config_sample.yaml config.yaml
-
Edit the
config.yamlFile:Open
config.yamlin your preferred text editor and configure the following sections:- Paths to Lich and Profanity
- Accounts and Characters
Example
config.yaml:# config.yaml # Paths to the Lich and Profanity binaries paths: lich_bin: '/path/to/your/lich.rbw' profanity_bin: '/path/to/your/profanity.rb' # Character accounts and their characters accounts: AccountName1: - CharacterName1 - CharacterName2 AccountName2: - CharacterName3 - CharacterName4
Install the required Python packages using pip and the provided requirements.txt file:
pip install -r requirements.txtIf you're using Python 3 and pip refers to Python 2, use:
pip3 install -r requirements.txtDependencies:
- PyYAML: For parsing the YAML configuration file.
In the config.yaml file, specify the full paths to your lich.rbw and profanity.rb binaries:
paths:
lich_bin: '/full/path/to/your/lich.rbw'
profanity_bin: '/full/path/to/your/profanity.rb'Notes:
- Ensure that the paths are absolute (full paths), not relative.
- Verify that the files exist at the specified locations.
- The paths should point to the executable Ruby scripts (
.rbwand.rbfiles).
Define your accounts and associated character names under the accounts section:
accounts:
AccountName1:
- CharacterName1
- CharacterName2
AccountName2:
- CharacterName3
- CharacterName4Important:
- Character names are case-sensitive. Ensure they match exactly as required for login.
- You can add as many accounts and characters as you need.
- Account names are used as headers in the terminal interface.
To launch the script, navigate to the directory containing launcher.py and run:
./launcher.pyIf the script is not executable, you can make it executable:
chmod +x launcher.pyAlternatively, run the script using Python:
python launcher.pyOnce the script is running, you'll see a terminal-based interface displaying your accounts and characters.
- Terminal Size: Ensure your terminal window is large enough to display the interface. If it's too small, you'll be prompted to resize.
- Case Sensitivity: Character names in the configuration file are case-sensitive. Enter them exactly as required.
- Dependencies: All required dependencies must be installed. Use the provided
requirements.txtfile. - Environment Variables:
- The script sets
TERMtoscreen-256color. - If
DISPLAYis not set, it defaults to:0.
- The script sets
- "Unsupported Operating System" Error:
- Ensure you're running the script on a supported system (Linux, macOS, or WSL).
- "Configuration File Not Found" Error:
- Verify that
config.yamlexists in the same directory aslauncher.py.
- Verify that
- "LICH_BIN path does not exist" Error:
- Check that the path to
lich.rbwis correct and the file exists.
- Check that the path to
- "PROFANITY_BIN path does not exist" Error:
- Check that the path to
profanity.rbis correct and the file exists.
- Check that the path to
- Terminal Rendering Issues:
- If the interface doesn't display correctly, try running the script in a different terminal emulator.
- Permission Denied Errors:
- Ensure that
launcher.pyis executable. - Verify permissions on the Lich and Profanity binaries.
- Ensure that
- Ruby Not Found:
- Ensure that Ruby is installed and the
rubycommand is available in your PATH.
- Ensure that Ruby is installed and the
This script is provided under the MIT License. You are free to use, modify, and distribute it as per the terms of the license.
Enjoy your gaming experience! If you encounter any issues or have suggestions for improvements, feel free to contribute or open an issue.