Developer notes (Chinese): workspace and cleanup · AI training · frozen training inputs
EVE_PYFSim is a fan-made fleet combat simulator for EVE Online, built around the refine fitting engine (native Rust adapter, official CCP SDE) and a continuous 2D tactical battlefield. It is designed for FC practice, fleet composition testing, tactical debriefing, and fast what-if analysis before committing real in-game assets.
EVE_PYFSim is not an official CCP product, not a private server, and not an EVE client automation tool. It is an offline simulator for education, tactics, and experimentation.
https://github.com/pyfa-org/Pyfa
https://github.com/DarkFenX/refine
Large fleet decisions in EVE are expensive to test directly. EVE_PYFSim provides a low-cost sandbox for answering questions such as:
- Can this doctrine catch, hold, and kill the opposing composition?
- How much does positioning, focus fire, or pre-focus sequencing change the result?
- Which fleet wins under different starting ranges, map layouts, or command decisions?
- How do EWAR, remote repair, drones, fighters, bombs, bubbles, and warp behavior affect the fight?
The simulator focuses on the FC-level decision loop: fleet setup, squad command, target calling, movement, ammunition choices, and post-fight review.
- Continuous 2D space combat with movement, inertia, acceleration, approach/orbit behavior, formation following, and range control.
- Deterministic tick-based simulation loop suitable for repeatable practice and debugging.
- Ship fitting data resolved through the refine native engine and the official CCP static data export (SDE JSONL).
- Target locking, lock timers, max targeting range, sensor attributes, ECM restrictions, capacitor usage, and module cycle handling.
- Turret, missile, projectile, bomb, smartbomb, remote repair, command burst, and EWAR simulation.
- Shield, armor, and structure damage layers with resistance-based damage application.
- Warp, gate travel, gate cloak, warp disruption, interdiction bubbles, and bubble interaction logic.
- EFT-style fit import from in-game or pyfa exports.
- Fleet library for saving and reusing fleet compositions.
- Squad-based command model for FC-style control.
- Focus fire and pre-focus target queues.
- Fleet-wide ammunition switching with reload behavior.
- Ship assignment between squads.
- Quality presets for different pilot discipline levels.
- Drone bay parsing, bandwidth limits, active drone limits, launch/recall/attack control, and basic drone EWAR support.
- Fighter bay parsing, fighter tube and slot limits, fighter squadron launch/recall, target assignment, and manual fighter ability activation.
- Bombs, missiles, generic projectiles, smartbomb interception, and bubble/projectile damage interactions.
- PySide6 tactical UI with pan/zoom battlefield view.
- Sortable and filterable overview tables.
- Ship status dialogs with module, timer, lock, capacitor, HP, drone, and fighter details.
- Local solo mode for practice and debugging.
- LAN host/client mode for two-player FC-vs-FC battles.
- Replay recording (keyframes + per-tick delta frames + event stream), orbit-locked full-battle playback, and battle report infrastructure for post-fight review.
- Simplified Chinese UI translation support.
The simulator is a layered Python application with one native island:
main.py / eve_sim.gui GUI layer: PySide6, tactical canvas, dialogs
│ tick timer → command queue (GUI thread)
▼
eve_sim.application Match/session/command bus (engine-step thread)
▼
eve_sim.persistent Process-isolated system runtime: byte-mirror
│ world sync, input frames, two-phase commit
▼
eve_sim.systems Combat / movement / perception / locking /
│ logistics / deployables, per-system workers
▼
eve_sim.fitting.refine Fitting backend: native Rust adapter
│ (native/refine_adapter) + SDE catalog
▼
data/sde_jsonl → data/sde_catalog.db Official CCP static data export
Combat runs on a dedicated engine thread; the fitting backend keeps a thread-local resident native session. One tick's complete pipeline (every stage, finest granularity) is documented in docs/tick_pipeline_map.md - that document is the entry point for performance work and for any future port of the hot path to C or Cython/pyd (the per-module decision loop and target selection are the measured hot spots at fleet scale).
The fitting backend is refine only (legacy pyfa/eos data paths were
removed). Deployment is gated by refine.lock.json (validated status);
development builds fall back to the EVE_REFINE_ALLOW_CANDIDATE=1
escape hatch. See docs/refine_migration.zh-CN.md.
The project aims to be mechanically close enough for tactical practice, while staying explicit about what is still approximated.
| Area | Current approach |
|---|---|
| Fitting | refine (native Rust) fitting engine plus simulator-side runtime projections. |
| Tick model | Local deterministic tick loop, not a real Tranquility server implementation. |
| Space | Continuous 2D battlefield with simplified grid/system abstractions. |
| Turrets and missiles | Formula-based simulation with projectile flight and damage application, but not a complete server clone. |
| Drones and fighters | Functional tactical model with launch, recall, targeting, abilities, and limits; some original-game edge cases are still under development. |
| Warp and bubbles | Practical simulation of warp commands, gate travel, disruption, and bubbles; exact EVE server edge cases are not guaranteed. |
| Dogma | Attribute calculation delegated to the refine engine; projected modifiers use native cross-fit projections with per-tick distance bucketing. |
Known missing or incomplete areas include full Dogma modifier coverage, implants, boosters, heat damage, Crimewatch, CONCORD behavior, markets, industry, sovereignty, Upwell structure timers, exact drone/fighter edge cases, and complete PvE NPC behavior.
Measured on the development machine (846-ship battle from a real recorded engagement):
- Steady-state tick: ~0.4-1.0s depending on engagement phase (approach / brawl / endgame attrition).
- Fitting resolution is fully cached (signature-keyed, distance-bucketed projection keys); pool builds amortize to a handful per tick.
- Profiling is built in:
logs/sim_hotspot.logrecords per-tick combat segment timings and module-decision counters, andscripts/replay_full_profile.pyreplays a recorded battle tick by tick (orbit-locked) with a full per-tick CSV profile.
- Windows is the primary tested platform.
- Python 3.13.
- PySide6 and numpy.
- The official EVE JSONL static data export unpacked at
data/sde_jsonl(download: https://developers.eveonline.com/static-data,eve-online-static-data-latest-jsonl.zip). The SDE catalog (data/sde_catalog.db) is built automatically on first use.
Linux and macOS may work for the non-platform-specific parts, but they are not the primary release target yet.
git clone https://github.com/BHBNSN/EVE_PYFSim.git
cd EVE_PYFSimpython -m venv .venv
.venv\Scripts\activatepip install -r requirements.txtDownload the official JSONL static data export
(eve-online-static-data-latest-jsonl.zip from
https://developers.eveonline.com/static-data) and unpack it into
data/sde_jsonl. The SDE catalog and the refine deployment are prepared
automatically on first launch.
Run the launcher:
python main.pyThen choose one of the battle modes:
| Mode | Description |
|---|---|
| Local | Solo practice and local simulation. |
| Host LAN | Host a LAN match as the blue-side commander. |
| Join LAN | Join a LAN match as the red-side commander. |
Basic workflow:
- Select a battle mode.
- Configure blue and red fleet setups.
- Import or edit EFT-style ship fits.
- Validate the fleets.
- Start the battle and command squads from the tactical map.
- Review ship states, overview data, replay, and battle reports.
| Action | Effect |
|---|---|
| Left click | Select friendly squad or enemy target. |
| Double-click empty space | Move the selected squad. |
| Double-click enemy ship | Approach or pursue the target. |
| Right click | Open the context command menu. |
| Right-click ship | Show ship-specific commands such as focus, pre-focus, or warp. |
| Right-click beacon/gate/system object | Show available travel or warp commands. |
| Middle drag | Pan the tactical map. |
| Mouse wheel | Zoom in or out. |
| Command | Function |
|---|---|
| Squad selector | Change the active squad. |
| Leader speed limit | Limit squad leader speed for coordinated movement. |
| Propulsion toggle | Enable or disable propulsion modules for tactical positioning. |
| Clear focus | Remove current focus-fire orders. |
| Weapon/ammo selection | Switch ammunition for eligible ships. |
| Assign ships | Move selected ships between squads. |
| Warp command | Warp the selected squad to a valid ship, beacon, gate, or map object. |
| Fighter ability buttons | Manually activate available fighter squadron abilities. |
eve_sim/
├── application/ # Match application, session, command bus
├── persistent/ # Process-isolated runtime, coordinator, workers
├── systems/ # Combat, movement, perception, locking, EWAR,
│ # logistics, deployables; per-tick orchestration
├── fitting/ # refine fitting backend integration
├── fleet_setup/ # EFT parsing, fleet construction, resolve engine
├── gui/ # PySide6 UI, tactical canvas, dialogs, tables
├── maps/ # Map/system definitions and loading
├── replay/ # Recording, keyframes, delta frames, playback
├── scenario/ # Scenario models, loader, validators
├── battle_report/ # Battle report models and service
├── serialization/ # Snapshots and world serialization
├── agents.py # Commander and ship-level decision agents
├── fit_runtime.py # Runtime module and fit state
├── config.py # Engine and UI configuration
├── simulation_engine.py # Main simulation loop
└── world.py # WorldState and entity containers
native/refine_adapter/ # Rust fitting adapter (cargo project)
data/sde_jsonl/ # Official CCP static data export (JSONL)
data/sde_catalog.db # Built SDE catalog
scripts/ # Benchmarks, replay tooling, diagnostics
docs/ # Pipeline map, refine migration, dev notes
For a Windows desktop distribution with application modules compiled to .pyd, run build_desktop.cmd. It builds, freezes, and verifies dist/EVE_SIM/EVE_SIM.exe. See the Windows packaging guide for prerequisites and options.
Before submitting a pull request, at minimum run:
python -m compileall eve_sim
python -m unittest tests.test_combat_optimizations
python -m unittest discover -s tests -p 'test_refine*.py'
python scripts/parity_projection_ops.py # snapshot regression guardWhen reporting bugs, please include:
- OS and Python version.
- EVE_PYFSim commit or release version.
- The fit text or fleet setup that reproduces the issue.
- Steps to reproduce.
- Screenshots,
logs/sim_hotspot.log, or replay/battle report files when available.
Short-term priorities:
- Add more replay and battle report analysis tools.
Long-term goals:
- Broader Dogma modifier coverage.
- Porting the per-module decision hot path to C or Cython/pyd (see docs/tick_pipeline_map.md for the measured hot-spot map).
- More scenario authoring tools.
- Smarter tactical AI for training and doctrine stress testing.
Issues, pull requests, test cases, doctrine examples, and mechanic corrections are welcome.
Good contributions usually fall into one of these categories:
- Reproducible bug reports.
- Verified EVE Online mechanic corrections.
- EVE SDE catalog and refine engine compatibility fixes.
- UI and usability improvements.
- Performance profiling and optimization.
- Replay, battle report, or scenario tooling.
This project is licensed under the GPL-3.0 License. See the LICENSE file for details.
- CCP Games, for creating EVE Online and publishing the official static data export.
- The refine fitting engine authors, for the native dogma/fitting core.
- The pyfa team, for the fitting-tool ecosystem and EFT export format.
- CACX testers and contributors.
StabberORVexor / N0rth5ea
- EVE Online:
StabberORVexor - GitHub: BHBNSN
- Discord:
BHBNSN
GitHub Issues are preferred for bug reports and feature requests.
EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts, or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. EVE Online and the EVE logo are registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners.
CCP is in no way responsible for the content or functioning of this program, nor can CCP be liable for any damage arising from the use of this program.
