-
Notifications
You must be signed in to change notification settings - Fork 0
Fabrik Script
John Hawk edited this page Oct 5, 2017
·
10 revisions
There are 2 kind of factories. Some produces pallets, some not. In the vehicles.xml is no different between both factory types:
This factory has a storage.
<onCreateLoadedObject saveId="FabrikScript_KraftFutterHerstellung">
<Rohstoff Name="Stroh" Lvl="221010.046875"/>
<Rohstoff Name="Silage" Lvl="0"/>
<Rohstoff Name="Gras" Lvl="74999.9921875"/>
<Produkt Name="Mischfutter" Lvl="0" isAutomaticFilling="true"/>
</onCreateLoadedObject>
This factory produces pallets wich is not recognizable if the productname does not contain "palette" or something similar.
<onCreateLoadedObject saveId="FabrikScript_RoggenMehlfabrik">
<Rohstoff Name="Tip_RSrye" Lvl="284166.71842448"/>
<Produkt Name="mehlpalette" Lvl="1041.6666666667"/>
</onCreateLoadedObject>
$mapconfig = array_merge ( $mapconfig, array (
'FabrikScript_KraftFutterHerstellung' => array (
'locationType' => 'FabrikScript',
'ProdPerHour' => 60000,
'position' => '578 0 -208',
'showInProduction' => true,
'input' => array (
'Stroh' => array (
'capacity' => 300000,
'factor' => 0.3,
'fillTypes' => 'straw',
'showInStorage' => false
),
'Silage' => array (
'capacity' => 300000,
'factor' => 0.4,
'fillTypes' => 'silage',
'showInStorage' => false
),
'Gras' => array (
'capacity' => 300000,
'factor' => 0.3,
'fillTypes' => 'grass_windrow dryGrass_windrow',
'showInStorage' => false
)
),
'output' => array (
'Mischfutter' => array (
'capacity' => 300000,
'factor' => 1,
'fillType' => 'forage',
'showInStorage' => true
)
)
),
);
- The array key must be named same like the saveId in the vehicle.xml.
- locationType: Marks this location as FabrikScript.
- ProdPerHour: Value, how much the factory produces. Can be found in map.i3d.
- position: Holds the coordinates of this loaction in format X Y Z. The Y coordinate is not evaluated.
- showInProduction: A factory can also be a storage. Set this to false to hide "factory-script-storages" in production overview.
-
input
- The array key of each trigger must be named same like the Rohstoff Name in vehicle.xml.
- capacity: Is the storage capacity of the trigger
- factor: Consumption factor per hour (ProdPerHour * factor). Can be found in map.i3d.
- fillTypes: Accepted fill types at this trigger
- showInStorage: If a location is a storage, set it to 'true' to also add the input fill level to storage overview.
-
output
- The array key of each trigger must be named same like the Produkt Name in vehicle.xml.
- capacity: Is the storage capacity of the trigger
- factor: Production factor per hour (ProdPerHour * factor). Can be found in map.i3d.
- fillTypes: Produced fill type at this trigger
- showInStorage: Default is 'true' to add the fill level to storage overview.
$mapconfig = array_merge ( $mapconfig, array (
'FabrikScript_RoggenMehlfabrik' => array (
'locationType' => 'FabrikScript',
'ProdPerHour' => 5000,
'position' => '-830 0 -90',
'showInProduction' => true,
'input' => array (
'Tip_RSrye' => array (
'capacity' => 500000,
'factor' => 1,
'fillTypes' => 'rye',
'showInStorage' => false
)
),
'output' => array (
'mehlpalette' => array (
'capacity' => 5000,
'factor' => 0.5,
'fillType' => 'mehl',
'palettArea' => '-853.8 -98.8 -852.2 -82.7',
'palettPlaces' => 8,
'showInStorage' => false
)
)
),
);
Basically the config for pallet producing factories is the same like other factories - except the pallets output trigger is different.
- capacity: Is the capacity of each pallet.
- palettArea: Coordinates of the area where pallets are stored at the factory in format "X1 Z1 X2 Z2"
- palettPlaces: Number of pallets storeable at the factory
- showInStorage: Must set to 'false' otherwise the palett which is currently in production will be counted twice.