> For the complete documentation index, see [llms.txt](https://wiki.stmod.net/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://wiki.stmod.net/how-stmod-works.md).

# How STMod works (overview)

This page gives a high-level picture of how the pieces fit together — enough to understand what you're running and why certain settings exist, without getting into internal implementation details.

## Starting a client

STMod is not a standalone bot — it runs *inside* your Metin2 game client. The launcher starts the game client for you and attaches STMod's engine to it, which is why STMod's tabs (General, Farming, Fishbot, ...) appear as a panel inside the game window itself rather than as a separate program.

```mermaid
flowchart LR
    A[STMod Launcher] -->|starts| B[Metin2 game client]
    A -->|attaches STMod engine to| B
    B --> C[STMod panel appears inside the game window]
    C --> D[You configure Farming / Fishbot / Chatting / etc.]
```

## Setting up a server

Before you can start anything, STMod needs a **server profile**: the server's name, the game client to start, and whether it's a private or an Official server. You create one the first time you log in, and you can keep as many as you like and switch between them.

{% content-ref url="/pages/sKK5iIqCFpUclg7whVmJ" %}
[Server profiles](/launcher/server-profiles.md)
{% endcontent-ref %}

## Running multiple clients

The STMod Launcher is where you manage every client you want to run. Each character/account you want to bot at the same time gets its own **client slot**, with its own login, its own restart behavior, and its own STMod settings once it's running.

<figure><img src="https://1662484209-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FSrVu0j9CYXbvJXRYgHnk%2Fuploads%2Fgit-blob-4391ae4a10e924a2c9ecaa7027afd790097acb41%2Fstmod-launcher.png?alt=media" alt="STMod Launcher window"><figcaption><p>STMod Launcher — each row is one client slot</p></figcaption></figure>

* **Clients: X/99** (with **+**/**−**) — Add or remove client slots, up to 99.
* Per slot: **Autologin**, **Restart client** (auto-restarts that slot if the client crashes — STMod also watches for Runtime errors and restarts even if the window hasn't fully crashed), **User**/**Pass**, **Pin**, **Click #1**/**Click #2** (for servers whose login needs a specific screen click — use **Set x,y** to record the position), **Enter**, **Char number**, **CH**, **Server**.
* The green **▶** button starts that slot's client; **Hide**/**Show** toggles whether its game window is visible.
* **Stop all metin2 clients** — Stops every running slot at once.

### Launcher-wide options

The checkboxes under **Stop all metin2 clients** apply to the whole profile, not to one slot, and are saved with it:

* **Execute self script** — Auto-loads your own Python script into every client you start. STMod creates `Data\Python\self_script.py` for you the first time you tick this; put your code in that file.
* **Manual mode** — STMod doesn't load its panel for you. Instead it tells you to focus the game window and press `Insert`, `TAB` or `CapsLock` to load it yourself. This is forced on for Official servers.
* **Attack as ninja** — Makes your character play the assassin's faster dual-blade attack animations whatever weapon it's actually holding. This is a local animation change only — bow and fishing animations are left alone.
* **Auto minimize when start new client** — Minimises each client to the system tray as it starts.
* **Keep windows on focus** — Keeps bringing the game windows to the front.
* **OCR Groq captcha solver** — Solves server-side captchas using the Groq API. It needs your own (free) Groq API key — see [Plugins → Groq API key](/launcher/launcher-menus.md#groq-api-key). Not available on Official servers.
* **Use proxy (Proxifier based)** — Routes clients through proxies using Proxifier. STMod offers to open the Proxifier download page if it isn't installed.
* **If no clients running for more than X minutes, shutdown PC** — Shuts the machine down once nothing has been running for that long.

{% hint style="info" %}
These are premium features. **Execute self script**, **Attack as ninja** and **Auto minimize** are greyed out on a free account, and the shutdown timer is switched off; **Keep windows on focus** and the **OCR Groq captcha solver** can be ticked but do nothing without an active subscription.
{% endhint %}

```mermaid
flowchart TB
    L[STMod Launcher] --> S1[Slot 1: own login + settings]
    L --> S2[Slot 2: own login + settings]
    L --> S3[Slot 3: own login + settings]
    S1 --> R1[Auto restart on crash / Runtime error]
    S2 --> R2[Auto restart on crash / Runtime error]
    S3 --> R3[Auto restart on crash / Runtime error]
```

{% hint style="warning" %}
Your User/Pass here are used only to automate the game's own login window on your machine. Never share your STMod license key, your stmod.net login, your `groq_api_key.txt` (used by the [AI auto-reply](/private-servers/chatting.md) feature), or your game password with anyone claiming to be STMod support.
{% endhint %}

## Activating your license

Your STMod license is tied to your account on [stmod.net](https://stmod.net), not entered directly into the launcher. To activate it:

1. Log into your account on the **stmod.net** dashboard.
2. Go to the **Redeem License Key** section.
3. Enter your key there to redeem it onto your account.

```mermaid
sequenceDiagram
    participant You
    participant Dashboard as stmod.net dashboard
    participant Launcher as STMod Launcher

    You->>Dashboard: Log in
    You->>Dashboard: Redeem License Key
    Dashboard-->>You: Key redeemed, subscription active on your account
    You->>Launcher: Log in / start a client
    Launcher->>Dashboard: Check account status
    alt Subscription active
        Dashboard-->>Launcher: OK
        Launcher-->>You: Client starts
    else No active subscription
        Dashboard-->>Launcher: Rejected
        Launcher-->>You: Shows error, blocks start
    end
```

{% hint style="warning" %}
Only redeem your key on the official stmod.net dashboard — never paste it into a site/Discord bot claiming to "verify" or "unlock" it, that's a common scam.
{% endhint %}

## The rest of the launcher

Everything that isn't a per-client setting lives in the launcher's menu bar — profile switching, the language and theme pickers, and the plugin windows.

{% content-ref url="/pages/q5G2J50TZyMT7elxJ5gx" %}
[Launcher menus](/launcher/launcher-menus.md)
{% endcontent-ref %}

{% content-ref url="/pages/zTXnS1DusUXLGzo8NjmM" %}
[Theme editor](/launcher/theme-editor.md)
{% endcontent-ref %}

We keep this page intentionally high-level — the anti-cheat/anti-tamper measures and the exact license-validation protocol aren't documented here on purpose.
