How javieracost/flarelyzer works
Project type and purpose
• Flarelyzer is a desktop, open-source, real-time monitoring tool for the MMORPG Tibia.
• It passively reads the Tibia client’s process memory and server log messages to detect rare‐drop events, then issues desktop notifications.
File structure
• Top‐level scripts:
• Flarelyzer.py – main orchestrator
• memscan.py – low‐level memory‐scanning routines
• agent.py – “interesting items” configuration and detection logic
• constants.py – memory offsets, config constants
• Data directory:
• Database/
– database.db (SQLite store for stats/logs)
– pluralMap.csv (mapping item names/plurals)
• Other:
• LICENSE, README.md, .gitignore
Key insights from the README
• Written in Python (runs on PyPy for performance).
• Uses libnotify-bin to send desktop notifications.
• Currently CLI‐driven, future UI planned (Qt).
• Configurable “interesting” items in agent.py.
Main components & interactions
a. External System
– Tibia Client Process
b. Core Flarelyzer Process (PyPy interpreter) with subcomponents:
1. Memory Scanner (memscan.py / constants.py)
• Attaches to Tibia process, reads memory to extract server log buffers & chat text
2. Log Parser & Event Detector (part of Flarelyzer.py + agent.py)
• Parses raw text lines, applies “interesting” item rules from agent.py
3. Data Store (Database/database.db + pluralMap.csv)
• Records events, helps normalize item names via pluralMap.csv
4. Notifier (libnotify-bin calls)
• Sends desktop popups on rare‐drop detection
c. External dependencies
– PyPy runtime
– libnotify-bin (OS notification service)
Relationships & data flows
1. Flarelyzer → attaches → Tibia Client Memory
2. Memory Scanner → extracts → raw log text
3. Parser/Agent → processes → raw text → detection events
4. Parser/Agent ↔ reads/writes ↔ Database files
5. Notifier ← receives events ← Parser/Agent
6. User sees desktop notification
Architectural patterns & design principles
• Modular separation: scanning, parsing/detection, storage, notification
• Single process with clear internal layers
• File‐based configuration & data persistence
• Passive instrumentation (no client modification)