Expand description
Calculates the dogma attributes of an EVE Online ship fit: the ship, its items and the character.
Describe the fit with Fit and pass it to calculate(), together
with the static data from esf-data.
use esf_data::{InfoSde, Sde};
use esf_dogma_engine::{Fit, Options, calculate};
let bytes = std::fs::read("sde.dat").unwrap();
let sde = Sde::new(&bytes).unwrap();
let fit: Fit = serde_json::from_str(
r#"{
"ship": {"type_id": 587},
"items": [{"type_id": 2873, "slot": {"type": "high", "index": 0}, "state": "active"}]
}"#,
)
.unwrap();
let calculation = calculate(&InfoSde::new(&sde), &fit, &Options::default());Structs§
- Attribute
Value - One attribute, before and after the effects on it.
- Calculation
- The result of
calculate(). - Character
- The character flying the ship.
- Charge
- A charge loaded in a module.
- Damage
Profile - How incoming damage is split over the four damage types. Only the ratio matters; the calculation scales the four to add up to one.
- Environment
- Where the ship is.
- Fit
- A ship, what is fitted to it, and the character flying it.
- FitItem
- A module, drone, fighter squadron, implant, booster or item in cargo.
- Item
Result - The calculated attributes of the ship, its mode, the character, or one item.
- Mutation
- How a module or drone was mutated.
- Options
- What
calculate()reports on top of the values. - Projected
Buff - A projected buff (like command bursts).
- Projected
Effect - A projected dogma effect.
- Projection
- The external buffs and effects that can be applied to another ship.
- Ship
- The ship of a fit.
- Source
- One modifier on an attribute, and where it came from.
- Violation
- One rule the fit breaks, and what breaks it.
Enums§
- Effect
Operator - How a modifier changes an attribute. They are applied in this order.
- Group
Limit - Which state a group limit counts.
- Reactive
Armor - What a Reactive Armor Hardener shifts its resistances towards.
- Resource
- A resource the ship only has so much of.
- Rule
- A rule of EVE’s, and the values that failed it.
- Security
- The security of a solar system.
- Slot
- Where an item is. The number is the position in its rack, starting at 0; for implants and boosters, the slot as EVE numbers it, starting at 1.
- Slot
Kind - A rack of slots, or a hardpoint a weapon needs.
- Source
Ref ItemandChargeindex intoFit::items,ProjectedintoFit::incoming.effects. A skill and a buff are not in the result, so they carry their own id.- Spool
- How far a module has spooled.
- State
- The state of an item, lowest first.
- Target
- What a
Violationis about.ItemandChargeindex intoFit::items.