# pes-modding/sider3 architecture

> Architecture diagram of the GitHub repository pes-modding/sider3, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-28). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/pes-modding/sider3
- Repository: https://github.com/pes-modding/sider3

## Overview

Sider 3 is a Windows companion/modding program for PES 2017. Its principal workflow is to start a small control window, install hooks, and let the game’s intercepted resource access use replacement content and Lua-driven behavior. The tree also identifies gameplay, graphics, image, and audio subsystems. The README only states the product’s purpose; sampled source confirms startup, hook installation, file lookup, and Lua-related code, but not the detailed wiring of the other feature modules.

Main entry points: [`sider.cpp`](https://github.com/pes-modding/sider3/blob/master/sider.cpp) (Hook and core), [`main.cpp`](https://github.com/pes-modding/sider3/blob/master/main.cpp) (Control window), [`audio.cpp`](https://github.com/pes-modding/sider3/blob/master/audio.cpp) (Audio mods), [`gfx.cpp`](https://github.com/pes-modding/sider3/blob/master/gfx.cpp) (Graphics mods)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Startup and hooks"]
  node_launcher["Control window<br/>[main.cpp]"]
  node_hookcore["Hook and core<br/>[sider.cpp]"]
end

subgraph group_mods["Mod content"]
  node_lua["Lua scripts<br/>[sider.cpp]"]
  node_resource["Resource overrides<br/>[sider.cpp]"]
end

subgraph group_features["Game features"]
  node_gameplay["Gameplay mods<br/>[gameplay.cpp]"]
  node_graphics["Graphics mods<br/>[gfx.cpp]"]
  node_audio["Audio mods<br/>[audio.cpp]"]
  node_imageutil["Image utilities<br/>[imageutil.cpp]"]
end

subgraph group_runtime["Embedded runtime"]
  node_luajit["LuaJIT runtime<br/>[lj_parse.c]"]
  node_audioengine["Audio decoding<br/>[miniaudio.h]"]
end

node_user(("Sider user"))
node_game["PES 2017"]
node_filesystem[("Mod files")]

node_user -->|"starts"| node_launcher
node_launcher -->|"installs hooks"| node_hookcore
node_game -->|"requests resources"| node_hookcore
node_hookcore -->|"looks up files"| node_filesystem
node_hookcore -->|"resolves overrides"| node_resource
node_resource -->|"reads content"| node_filesystem
node_hookcore -->|"loads modules"| node_lua
node_hookcore -->|"dispatches hooks"| node_gameplay
node_hookcore -->|"dispatches hooks"| node_graphics
node_hookcore -->|"dispatches hooks"| node_audio
node_hookcore -->|"runs scripts"| node_luajit
node_audio -.->|"uses audio support"| node_audioengine
node_imageutil -.->|"supports images"| node_graphics

click node_launcher "https://github.com/pes-modding/sider3/blob/master/main.cpp"
click node_hookcore "https://github.com/pes-modding/sider3/blob/master/sider.cpp"
click node_lua "https://github.com/pes-modding/sider3/blob/master/sider.cpp"
click node_resource "https://github.com/pes-modding/sider3/blob/master/sider.cpp"
click node_gameplay "https://github.com/pes-modding/sider3/blob/master/gameplay.cpp"
click node_graphics "https://github.com/pes-modding/sider3/blob/master/gfx.cpp"
click node_audio "https://github.com/pes-modding/sider3/blob/master/audio.cpp"
click node_imageutil "https://github.com/pes-modding/sider3/blob/master/imageutil.cpp"
click node_luajit "https://github.com/pes-modding/sider3/blob/master/soft/LuaJIT-2.0.4/src/lj_parse.c"
click node_audioengine "https://github.com/pes-modding/sider3/blob/master/soft/miniaudio/miniaudio.h"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_launcher,node_hookcore,node_user toneBlue
class node_lua,node_resource,node_filesystem toneAmber
class node_gameplay,node_graphics,node_audio,node_imageutil toneMint
class node_luajit,node_audioengine toneRose
class node_game toneIndigo
```

## Components

### Startup and hooks

- [Control window](https://github.com/pes-modding/sider3/blob/master/main.cpp): `main.cpp`
- [Hook and core](https://github.com/pes-modding/sider3/blob/master/sider.cpp): `sider.cpp`

### Mod content

- [Lua scripts](https://github.com/pes-modding/sider3/blob/master/sider.cpp): `sider.cpp`
- [Resource overrides](https://github.com/pes-modding/sider3/blob/master/sider.cpp): `sider.cpp`

### Game features

- [Gameplay mods](https://github.com/pes-modding/sider3/blob/master/gameplay.cpp): `gameplay.cpp`
- [Graphics mods](https://github.com/pes-modding/sider3/blob/master/gfx.cpp): `gfx.cpp`
- [Audio mods](https://github.com/pes-modding/sider3/blob/master/audio.cpp): `audio.cpp`
- [Image utilities](https://github.com/pes-modding/sider3/blob/master/imageutil.cpp): `imageutil.cpp`

### Embedded runtime

- [LuaJIT runtime](https://github.com/pes-modding/sider3/blob/master/soft/LuaJIT-2.0.4/src/lj_parse.c): `soft/LuaJIT-2.0.4/src/lj_parse.c`
- [Audio decoding](https://github.com/pes-modding/sider3/blob/master/soft/miniaudio/miniaudio.h): `soft/miniaudio/miniaudio.h`

### Other components

- **Sider user**
- **PES 2017**
- **Mod files**

## Connections

- Sider user → Control window: starts
- Control window → Hook and core: installs hooks
- PES 2017 → Hook and core: requests resources
- Hook and core → Mod files: looks up files
- Hook and core → Resource overrides: resolves overrides
- Resource overrides → Mod files: reads content
- Hook and core → Lua scripts: loads modules
- Hook and core → Gameplay mods: dispatches hooks
- Hook and core → Graphics mods: dispatches hooks
- Hook and core → Audio mods: dispatches hooks
- Hook and core → LuaJIT runtime: runs scripts
- Audio mods → Audio decoding: uses audio support
- Image utilities → Graphics mods: supports images
