Skip to content

Engine initialization

Anton Vorobyov edited this page Feb 23, 2015 · 9 revisions

You need three things to initialize engine: data handler, instance name, path to the folder where operational data can be stored + optional flag which controls if this instance of engine will be marked as default or not.

data_handler = JsonDataHandler('data_folder/phobos/')
engine = Eos(data_handler, name='eos', storage_path='data_folder/', make_default=True)

Data handler

It will provide access to the data Eos needs. There're 2 built-in data handlers:

Of course, you can write your own handler as needed. Interface is defined in abstract base class.

Data-wise, Eos needs access to following tables and fields:

  • invtypes
    • typeID
    • groupID
    • radius
    • mass
    • volume
    • capacity
  • invgroups
    • groupID
    • categoryID
  • dgmattribs
    • attributeID
    • maxAttributeID
    • defaultValue
    • highIsGood
    • stackable
  • dgmtypeattribs
    • typeID
    • attributeID
    • value
  • dgmeffects
    • effectID
    • effectCategory
    • isOffensive
    • isAssistance
    • durationAttributeID
    • dischargeAttributeID
    • rangeAttributeID
    • falloffAttributeID
    • trackingSpeedAttributeID
    • fittingUsageChanceAttributeID
    • preExpression
    • postExpression
    • modifierInfo
  • dgmtypeeffects
    • typeID
    • effectID
    • isDefault
  • dgmexpressions
    • expressionID
    • operandID
    • arg1
    • arg2
    • expressionValue
    • expressionTypeID
    • expressionGroupID
    • expressionAttributeID
  • phbmetadata (just client build data is needed)
    • field_name
    • field_value

Instance name

Eos allows you to have multiple instances within single python instances, this might be useful to be able to work with Tranquility and Singularity fits at the same time. To make sure Eos' auxiliary facilities operate correctly, give each instance unique name.

Storage folder

It is place where logs and cache will be stored. Can be shared across multiple Eos instances, cache/log names will contain Eos instance name to avoid being overwritten.

Default instance flag

If true, all fits created within current python interpreter will be attached to this Eos instance by default; otherwise, you will have to pass Eos instance each time you instantiate a fit.

Advanced options

You can override default logger and cache handler if needed. Refer to [eos.py] (https://github.com/DarkFenX/Eos/blob/master/eos.py) for more info.

Clone this wiki locally