eve-fit-engine 0.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +674 -0
- package/NOTICE +31 -0
- package/README.md +95 -0
- package/data/.build +1 -0
- package/data/SDE-LICENSE.md +17 -0
- package/data/manifest.json +1 -0
- package/data/v3e885b627373/attributes.json +1 -0
- package/data/v3e885b627373/categories.json +1 -0
- package/data/v3e885b627373/clone-grades.json +1 -0
- package/data/v3e885b627373/dbuff-collections.json +1 -0
- package/data/v3e885b627373/dynamic-attributes.json +1 -0
- package/data/v3e885b627373/effects.json +1 -0
- package/data/v3e885b627373/groups.json +1 -0
- package/data/v3e885b627373/market-groups.json +1 -0
- package/data/v3e885b627373/meta-groups.json +1 -0
- package/data/v3e885b627373/types/charges.json +1 -0
- package/data/v3e885b627373/types/drones.json +1 -0
- package/data/v3e885b627373/types/fighters.json +1 -0
- package/data/v3e885b627373/types/implants.json +1 -0
- package/data/v3e885b627373/types/modules.json +1 -0
- package/data/v3e885b627373/types/mutaplasmids.json +1 -0
- package/data/v3e885b627373/types/ships.json +1 -0
- package/data/v3e885b627373/types/skills.json +1 -0
- package/data/v3e885b627373/types/structure-modules.json +1 -0
- package/data/v3e885b627373/types/structures.json +1 -0
- package/data/v3e885b627373/types/subsystems.json +1 -0
- package/data/v3e885b627373/types/system-effects.json +1 -0
- package/data/v3e885b627373/units.json +1 -0
- package/dist/index.cjs +5911 -0
- package/dist/index.d.cts +2196 -0
- package/dist/index.d.ts +2196 -0
- package/dist/index.js +5839 -0
- package/dist/node.cjs +6046 -0
- package/dist/node.d.cts +34 -0
- package/dist/node.d.ts +34 -0
- package/dist/node.js +5948 -0
- package/package.json +73 -0
package/NOTICE
ADDED
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
@capsuleers/eve-fit-engine
|
|
2
|
+
Copyright (C) 2026 Capsuleers.app
|
|
3
|
+
|
|
4
|
+
This program is free software: you can redistribute it and/or modify it under
|
|
5
|
+
the terms of the GNU General Public License as published by the Free Software
|
|
6
|
+
Foundation, either version 3 of the License, or (at your option) any later
|
|
7
|
+
version. See the LICENSE file for the full text.
|
|
8
|
+
|
|
9
|
+
-------------------------------------------------------------------------------
|
|
10
|
+
Derivative-work notice
|
|
11
|
+
-------------------------------------------------------------------------------
|
|
12
|
+
This engine is a derivative work of Pyfa (https://github.com/pyfa-org/Pyfa),
|
|
13
|
+
the Python Fitting Assistant, which is licensed under the GNU GPL v3.0. The
|
|
14
|
+
ship-fitting calculation semantics — effect handlers keyed by EVE dogma effect
|
|
15
|
+
IDs, stacking-penalty groups, capacitor simulation, and the late-runtime
|
|
16
|
+
resistance-adaptation pass — mirror Pyfa's `eos` calculation engine. As a
|
|
17
|
+
derivative work, this package is distributed under the same GPL-3.0-or-later
|
|
18
|
+
terms.
|
|
19
|
+
|
|
20
|
+
Pyfa is Copyright (C) its respective authors. See the Pyfa repository for the
|
|
21
|
+
list of contributors.
|
|
22
|
+
|
|
23
|
+
-------------------------------------------------------------------------------
|
|
24
|
+
EVE Online Static Data Export (SDE)
|
|
25
|
+
-------------------------------------------------------------------------------
|
|
26
|
+
This package contains NO EVE Online game data. It operates on a `FittingDataset`
|
|
27
|
+
that the consumer supplies at runtime. EVE Online and the EVE logo are the
|
|
28
|
+
registered trademarks of CCP hf. All EVE-related materials are property of CCP
|
|
29
|
+
hf. SDE data is distributed by CCP under its own licence terms (the EVE Online
|
|
30
|
+
Third-Party Developer License / SDE terms) and is NOT covered by this package's
|
|
31
|
+
GPL licence.
|
package/README.md
ADDED
|
@@ -0,0 +1,95 @@
|
|
|
1
|
+
# eve-fit-engine
|
|
2
|
+
|
|
3
|
+
A **Pyfa-parity** EVE Online ship & Upwell-structure fitting calculation engine,
|
|
4
|
+
extracted from [capsuleers.app](https://capsuleers.app). Given a fit and an SDE
|
|
5
|
+
dataset, it returns the full derived stat block you'd see in a fitting tool:
|
|
6
|
+
offense (DPS / alpha / application), defense (EHP / resists / tank), capacitor
|
|
7
|
+
(stability / sim), navigation, targeting, fitting (CPU / PG / calibration),
|
|
8
|
+
projected effects, and structure fuel/service stats.
|
|
9
|
+
|
|
10
|
+
> **Licence: GPL-3.0-or-later.** This engine is a derivative work of
|
|
11
|
+
> [pyfa-org/Pyfa](https://github.com/pyfa-org/Pyfa) and is distributed under the
|
|
12
|
+
> same terms. See [`NOTICE`](./NOTICE) and [`LICENSE`](./LICENSE). The complete
|
|
13
|
+
> corresponding source is this repository.
|
|
14
|
+
|
|
15
|
+
## Design
|
|
16
|
+
|
|
17
|
+
- **Framework-free core.** The base entry has no `fetch`, no `fs`, no `window`,
|
|
18
|
+
no npm runtime deps. Runs in the browser, in Node, in a worker — anywhere.
|
|
19
|
+
- **Two entries.** Base (`.`): inject your own `FittingDataset`. Node (`./node`):
|
|
20
|
+
batteries-included — bundles a snapshot of the EVE SDE (under CCP's licence, by
|
|
21
|
+
mere aggregation) + an fs loader, so it works out of the box on the server.
|
|
22
|
+
- **Validated against Pyfa.** Stat parity is verified against Pyfa screenshots in
|
|
23
|
+
the upstream capsuleers.app fixture suite (`npm run test:pyfa`, 631 assertions
|
|
24
|
+
at All-V skills, zero tolerance overrides).
|
|
25
|
+
|
|
26
|
+
## Install
|
|
27
|
+
|
|
28
|
+
```bash
|
|
29
|
+
npm install eve-fit-engine
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
## Usage — zero-config (Node, batteries-included)
|
|
33
|
+
|
|
34
|
+
The `/node` entry ships with the EVE SDE bundle (`data/`, ~8 MB) and a built-in
|
|
35
|
+
loader. Give it an EFT string, get full stats — nothing else to set up:
|
|
36
|
+
|
|
37
|
+
```ts
|
|
38
|
+
import { computeFromEft } from 'eve-fit-engine/node'
|
|
39
|
+
|
|
40
|
+
const { fit, warnings, computed } = await computeFromEft(`
|
|
41
|
+
[Rifter, My Fit]
|
|
42
|
+
200mm AutoCannon II, Republic Fleet EMP S
|
|
43
|
+
200mm AutoCannon II, Republic Fleet EMP S
|
|
44
|
+
1MN Afterburner II
|
|
45
|
+
Gyrostabilizer II
|
|
46
|
+
`)
|
|
47
|
+
|
|
48
|
+
console.log(computed.derived.offense.totalDps) // 197.6
|
|
49
|
+
console.log(computed.derived.defense.ehpTotalAgainstProfile)
|
|
50
|
+
console.log(computed.derived.navigation.maxVelocity)
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
Defaults to All-V skills; pass `{ skillProfile, damageProfile, targetProfile, … }`
|
|
54
|
+
as the second arg to override. `loadBundledDataset()` is also exported if you
|
|
55
|
+
want the dataset directly.
|
|
56
|
+
|
|
57
|
+
> The bundled SDE is CCP's, under CCP's EVE Online Developer License (see
|
|
58
|
+
> [`data/SDE-LICENSE.md`](./data/SDE-LICENSE.md)) — included by mere aggregation,
|
|
59
|
+
> NOT under this package's GPL.
|
|
60
|
+
|
|
61
|
+
## Usage — bring-your-own dataset (browser / custom / always-fresh SDE)
|
|
62
|
+
|
|
63
|
+
The base entry is environment-free (no `fs`, no bundled data). Inject a
|
|
64
|
+
`FittingDataset` you build however you like:
|
|
65
|
+
|
|
66
|
+
```ts
|
|
67
|
+
import { computeFit, parseEft, type FittingDataset } from 'eve-fit-engine'
|
|
68
|
+
|
|
69
|
+
const dataset: FittingDataset = await buildYourDataset() // your SDE bundle
|
|
70
|
+
const { fit } = parseEft(eftText, dataset)
|
|
71
|
+
const computed = computeFit(fit, dataset, { skillProfile /* … */ })
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
This is what capsuleers.app uses server-side: it builds its own always-fresh
|
|
75
|
+
bundle and injects it, so it never depends on the (snapshot) bundled data.
|
|
76
|
+
|
|
77
|
+
## What's NOT in this package
|
|
78
|
+
|
|
79
|
+
- 3D ship models, UI components — those live in the consuming application.
|
|
80
|
+
- The bundled SDE is a **snapshot**; for always-fresh data, inject your own via
|
|
81
|
+
the base entry (see above).
|
|
82
|
+
|
|
83
|
+
## Provenance / how parity is maintained
|
|
84
|
+
|
|
85
|
+
The engine mirrors Pyfa's `eos` calculation model: effect handlers keyed by EVE
|
|
86
|
+
dogma effect IDs, separate stacking-penalty pools per operation, a late-runtime
|
|
87
|
+
resistance-adaptation pass, capacitor simulation, and spool-up handling. When CCP
|
|
88
|
+
ships a new SDE, data-driven `modifierInfo` effects work automatically; new
|
|
89
|
+
hardcoded mechanics in Pyfa's `effects.py` are tracked and ported, then re-checked
|
|
90
|
+
against the parity suite before release.
|
|
91
|
+
|
|
92
|
+
## Licence
|
|
93
|
+
|
|
94
|
+
GPL-3.0-or-later. Copyright (C) 2026 Capsuleers.app. This is free software; see
|
|
95
|
+
[`LICENSE`](./LICENSE) for details.
|
package/data/.build
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
3368760
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
# Bundled EVE Online Static Data Export (SDE)
|
|
2
|
+
|
|
3
|
+
The JSON files in this directory are derived from CCP's EVE Online Static Data
|
|
4
|
+
Export. **They are NOT covered by this package's GPL-3.0 licence.**
|
|
5
|
+
|
|
6
|
+
EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights
|
|
7
|
+
reserved worldwide. All EVE-related materials are the property of CCP hf. This
|
|
8
|
+
data is redistributed under CCP's **EVE Online Developer License Agreement**,
|
|
9
|
+
which permits use of EVE Online data in third-party tools.
|
|
10
|
+
|
|
11
|
+
It is included here purely by **mere aggregation** with the engine code (a
|
|
12
|
+
convenience so the package works out of the box); it does not form part of, and
|
|
13
|
+
is not relicensed by, the GPL-covered program.
|
|
14
|
+
|
|
15
|
+
To run the engine against a fresher or custom SDE, build your own
|
|
16
|
+
`FittingDataset` and use `computeFit` from the base entry instead of the bundled
|
|
17
|
+
`eve-fit-engine/node` loader.
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":"3e885b627373","builtAt":"2026-06-01T19:40:47.161Z","totalBytes":8404493,"files":{"attributes.json":{"bytes":248544,"entries":1258},"units.json":{"bytes":3458,"entries":60},"effects.json":{"bytes":1575723,"entries":3380},"meta-groups.json":{"bytes":1108,"entries":13},"categories.json":{"bytes":1192,"entries":33},"groups.json":{"bytes":63750,"entries":958},"market-groups.json":{"bytes":196588,"entries":2095},"clone-grades.json":{"bytes":18709,"entries":4},"dbuff-collections.json":{"bytes":74334,"entries":239},"dynamic-attributes.json":{"bytes":143140,"entries":413},"types/ships.json":{"bytes":899558,"entries":419},"types/modules.json":{"bytes":2559515,"entries":3978},"types/charges.json":{"bytes":599961,"entries":1017},"types/drones.json":{"bytes":191379,"entries":151},"types/fighters.json":{"bytes":132877,"entries":94},"types/implants.json":{"bytes":581650,"entries":1341},"types/subsystems.json":{"bytes":36255,"entries":48},"types/skills.json":{"bytes":202673,"entries":510},"types/system-effects.json":{"bytes":37911,"entries":114},"types/structures.json":{"bytes":31627,"entries":18},"types/structure-modules.json":{"bytes":246957,"entries":356},"types/mutaplasmids.json":{"bytes":557584,"entries":2839}}}
|