Skip to content

Commit

Permalink
Update README to reflect config changes
Browse files Browse the repository at this point in the history
  • Loading branch information
ElectricityMachine committed Feb 5, 2024
1 parent db20489 commit e59e096
Showing 1 changed file with 36 additions and 45 deletions.
81 changes: 36 additions & 45 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,62 +1,53 @@
<h1 align="center">SCR: SG+</h1>
# SG+: an SCR signalling macro

## What is it?
SG+ is a Python macro script that speeds up your signalling by allowing you to open the camera view, toggle rollback settings, and change signal aspects with one button and no mouse clicking.

### Description
SG+ is a macro script written in Python that streamlines your signalling experience by allowing you to change a signal aspect, open a camera view, toggle rollback, or announce your signalling presence with just one button press.

### Will this get me demoted?
**You will not be banned or demoted just from using this script.** The responsibility is still on the signaller to signal trains in a safe and proper manner. It is not an exploit and does not automate signalling entirely, rather, it aims to speed up commonly performed actions. If you've encountered trouble with a member of staff while using this script, please [contact me as soon as possible](#contact-information), or open a new issue.
## But won't this get me demoted?
**You will not be banned or demoted just for using this script.** The responsibility is still on the signaller to route trains in a safe and proper manner. It is not an exploit and does not automate signalling entirely; it only speeds up common actions. If you've encountered trouble with a member of staff while using this script, [contact me as soon as possible](#contact-information) or open an issue.

### Usage:
- Hover over a signal and:
- press 1, 2, or 3, corresponding to the desired signal aspect.
- press C to enter camera view. Once in camera view, press C again to exit.
- press R to toggle rollback.
- Press F1 to enable or disable the script. You only need to do this if you are chatting or typing things to prevent false activations.
- Use numpad 1-7 (1 is A, 2 is B, etc.) to copy zone opening messages to your clipboard.

### Features
- Speedily change signal aspects
- Quickly get in and out of a camera view (signals only for now)
- Toggle rollback on or off
- Easily copy zone opening messages to your clipboard with the numpad
- Audible warning if you try to chat or run commands with the macro enabled

### Limitations:
- Windows only
- Primary monitor only

### Controls:

---
|Key|Action|
|---|---|
|F1|Toggle the script off/on|
|1|Change currently hovered signal to Danger|
|2|Change currently hovered signal to Caution|
|3|Change currently hovered signal to Proceed|
|C|Enter camera mode of the currently hovered signal. If you are already in camera mode, it will exit camera mode|
|R|Toggle rollback of the currently hovered signal
|Numpad 1-7|Copy the opening message for each zone (1 for zone A, 2 for zone B, etc.)|
---

### **Installation**
## Installation

#### Binary (.exe file)
### Binary (preferred)
1. Download sgplus.exe from the [latest releases page](https://github.com/ElectricityMachine/SCR-SGPlus/releases/latest)
2. Run **sgplus.exe**.
**Note:** Some antiviruses may detect the program as malware. This is a false-positive, as such you may have to add an exclusion to your antivirus software for the program to run. Any binary attached to a release is the same as the one built automatically [here](https://github.com/ElectricityMachine/SCR-SGPlus/actions/workflows/build.yml)
2. Run **sgplus.exe**. **Some antiviruses may detect the program as malware.** If you receive a SmartScreen popup, click "More Info" then press "Run Anyway." This is a false-positive, you may have to add an exclusion to your antivirus software for the program to run. Any binary attached to a release is the same as the one built automatically [here](https://github.com/ElectricityMachine/SCR-SGPlus/blob/master/.github/workflows/build.yaml)

#### Source (running script directly)
Note: This method is for those who wish to contribute to the project, for those who don't like the idea of running an exe file, or for those who like manual labour.
### From Source
This method is intended for those who want to contribute to the project or modify the script.
1. Download and install the latest Python 3 installer from the [Python Downloads Page](https://www.python.org/downloads/)
- Make sure to check the box during installation which adds Python to PATH. Labeled something like **Add Python 3.X to PATH**
2. Download the latest release in the [Releases section of this repo](https://github.com/ElectricityMachine/SCR-SGPlus/releases/latest). Click on "Source Code (zip)"
- Note: If you want the development release with all the latest changes, press the green "Code" button on the main page of this repo and press "Download ZIP". The following instructions still apply.
3. Extract the folder to your desired location. You can do this natively in Windows by opening the .zip folder and pressing "Extract all" at the top.
- Note: If you are updating from an older version, please delete the old version of the script before extracting the new version. Failure to do so may cause conflicts and bugs.
4. Run ``install.bat`` and answer the prompts.
5. After the installation has completed, run ``start.bat`` to start the script. A console window will appear, a beep will sound, and the macro is now active.

## Usage
- Launch the program by running the .exe or ``start.bat``
- Hover over a signal then:
- press 1, 2, or 3, corresponding to the desired signal aspect.
- press C to enter camera view, press C again to exit.
- press R to toggle rollback.
- Press F1 to enable or disable the script.
- Use numpad 1-7 (1 is A, 2 is B, etc.) to copy zone opening messages to your clipboard.

## Configuration

After your first startup, a ``config.toml`` file will be placed in the directory the script is located in. If you want to change the default keybinds, speed up/slow down the script, or change the zone opening messages, you can edit this file. Although most of it should be self-explanatory, there is a caveat with the keybinds:
- Because of how the script interfaces with the keyboard, setting a key as ``"1"`` will also trigger anything bound to ``Num 1``, and vice versa. To solve this, SG+'s default configuration uses scancodes, identifying the specific key we want to bind to. [Here is a list of all Windows scancodes](https://kippykip.com/b3ddocs/commands/scancodes.htm).
- Example: If I want to change the camera button to F, I would go into ``config.toml`` and edit ``toggle_signal_camera = "C"`` to ``toggle_signal_camera = "F"``, or using scancodes from that webpage, ``toggle_signal_camera = 46``.
- A future release of SG+ will greatly simplify this procedure.

## Roadmap
- [ ] TRTS Audible Warning
- [ ] Visual script status indicator (#36)
- [ ] Automatic terminus station setup
- [ ] Interactive keybind prompts/config (#34)
- [ ] Automatic rollback preferences (#37)
- [ ] Become FPS-independent

See the [open issues](https://github.com/ElectricityMachine/SCR-SGPlus/issues) for a full list of proposed features (and known issues).

### I've found an issue!
Great! Please [open an issue](https://github.com/ElectricityMachine/SCR-SGPlus/issues/new) or contact me below.
Expand Down

0 comments on commit e59e096

Please sign in to comment.