Skip to content

Industry

se5a edited this page May 5, 2017 · 5 revisions

General Industry flow:

Minerals

are defined in the Minerals.json and get mined from a planet entity defined in SystemBodyInfoDB.

An entity that has a component with the MineResorcesAtbDB can mine it's parent planet at a rate defined in the above datablob. The raw minerals will go into the entities CargoStorageDB if it can store that type.

Refined Materails

An entity with the RefineResourcesAtbDB can then process Minerals and refined materails into RefinedMaterails as defined in the RefinedMateralsData.json - typicaly this would normaly be fuel, but other complex resources could be defined here. the raw materails for these resources include mined minerals as well as other already RefinedMaterals. The processed materails will go into the entities CargoStorageDB if it can store that type.

Construction

An entity with the ConstructionAtbDB can turn raw minerals, refined materials, and compoenents into components and other items such as ordnance, fighers and ships. The resulting component/ordnance/fighters/ships will go into the entities CargoStorageDB if it can store that type.

Cargo

cargo is quite flexable modwise. Types are defined in the mod data in CargoTypeData.json these definitions just control what type of container is required to haul the item. more types can easly be defined by the mod author. Other static data items that have a CargoTypeID guid field are automaticaly cargoable, ie minerals and processed materials - see fuel for an example of a refined material that must be stored in a specific storage container.

Carg Datablobs:

CargoStorageAtbDB This defines a components storage amount and type, calues can be defined ingame during component design min/max values defined in the componentData.json as per normal component attributes.

CargoStorageDB This defined an ship or colony entities total storage. (gets calculated when a component with the CargoStorageAtbDB gets added to the entity)

CargoAbleTypeDB This datablob defines the type of cargo an entity is.

Others cargo notes:

CargoTypeSD defines cargo types. other carogable stuff such as minerals, materials etc have a CargoTypeID. Cargo components can add storage of a single type via the CargoStorageAtbDB.

Component and Installations are a tad tricky as far as cargo goes, They are stored in a Dictionary<Guid, Dictionary<Entity,<List>>> first dictionary key being the cargoTypeID second dictionary key being the DesignEntity, the list being the Instances. this is similar to the ComponentInstancesDB.

Where should components/installations go when they get constructed? I'm inclined to think they should go straight into cargo, then have another process to install them. the reason for this is that what happens when a ship type entity which has the ability to construct installations? if installations immediately get installed, a ship would get a new component that might be meant for the colony. this needs thinking about.

Clone this wiki locally