Complete Industry Mod
Beschreibung
COMPLETE INDUSTRY MOD VERSION 3.0
NOTE
Due to the file size limitations (200 MB) at http://www.transportfever.net, I have had to split the mod in to two zip files. Inside each zip file is another zip file. Unzip both to unzip the mod.
Alternatively, subscribe to the Complete Industry Mod on Steam.
ABOUT THIS MOD
The primary goal of this mod is to bring together as many industries as possible in one place. A secondary aim is to replace generic "crated" cargo with more visually accurate representations. Achieving this has been challenging due to game limitations and the small scale of many cargo types.
All vanilla industries from the base game remain available, and every new industry has been designed to stay as close to the original game's style as possible. Many of the new additions are adaptations of existing assets, such as the farm or iron ore mine, to ensure a cohesive experience.
This mod has also been inspired by some of the fantastic industry mods already available, and I hope it adds even more variety and depth to your gameplay.
RECOMMENDATIONS
Use a large map to explore all industries and cargo types. Industries and cargo demands from towns and cities, should be created automatically as with all vanilla industries and cargo demands.
Alternatively, use the Town Tuning Mod by Lollus, which enables cargo deliveries to towns.
While the Complete Industry mod is compatible with other industry mods, it may result in numerous duplicate industries.
LANGUAGES
Available in all default languages, though I cannot guarantee the accuracy of the translations.
German translations with help from EMP and DH-106, Vielen Dank!
Italian translations with help from Luca, Grazie molto!
Spanish translations with help from asturleones, Muchas gracias!
NOTE ON THE TYRE INDUSTRY
The Tyre Factory cargo is based on the tire cargo from the Senseless Industries mod by Yeol, though graphics have been changed. Hope this does not infringe on any copyright.
AUTO TRANSPORTER
A modified version of the DDm 915 Auto Transporter by jay_ has been added to the mod to allow the transportation of cars from the Car Factory. The colour of the wagons can be changed in the game. Hope this does not infringe on any copyright.
VEGETATION
I have added Sugar Cane to the mod in 2D, this can be found under Grass allowing you to create Sugar Cane Fields.
With kind permission from Ingo 1111, the mod now has Cotton, Rice, Tobacco along with Ingos great brushes. Thanks Ingo 1111.
Kommentare 91
Neu erstellte Kommentare unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.
Neu erstellte Kommentare unterliegen der Moderation und werden erst sichtbar, wenn sie durch einen Moderator geprüft und freigeschaltet wurden.
riemke
Hi,
one thing that do not work for me, is clay. It is only used for dynamite? I think most of clay was used for bricks, but a brickyard is missing, or do I oversee something?
It could be part of the classic Construction Factory.....
Thanks again vor a great Mod
Jan
wncol2004
Just downloaded the 2.0 version. Tinkering with it for now. You put in a lot of effort to set this up. Quite extensive. I'm impressed.
You may already be considering these ideas. Not all my ideas are good ones.
Suggestion to simplify final products to cities.
because cities can only accept 6 items at a time, so users don't have to tweak a city to accept any of these new products... Might be an idea to convert certain final products to simplified already accepted final products with the use of additional advanced factories.
An advanced goods factory. Takes any goods like appliances, gold goods and silver goods, etc and converts them to just goods. Maybe a Basic Goods Factory and a Luxury Goods Factory so the input list doesn't get too large.
Advanced food factory, have it process all human consumable products into food. If the input list is to long for the game to deal with, Create multiple advanced Food factories for each category of human consumable products. Drinks to food, Solid consumable to food, Luxury foods factory to food, etc...
Maybe a new line.
Bottle Factory. Input: Glass or Plastic. Output: Bottles for drinks of any kind including milk. Add bottles as an input for any factories that product drinks of any kind, soft or hard.
Bottling Plant. Input: Bottles and any liquid human consumable product. Output: Bottled Beverages. Soft drinks, Juices, Alcoholic beverages including whisky, rum, etc...
The Gas Works and Gas Liquification plant for now, just feed each other infinite loop. Make an advanced Fuel Refinery to accept oil or liquified natural gas and outputs fuel.
May be easier to just Change the gas works to advanced fuel refinery that has an input of liquified natural gas and outputs fuel.
This may easily complete some lines that currently just terminate with no easy destination for consumption as well as eliminate the need for the city tweak mod for those that just don't want to use it or just want to use the default products to send to the cities.
Might make it easier for users if there was some sort of product flow charts documentation. What plant/factory/mill output product is needed by another plant/factory/mill.
Zinc. Change zinc mine output to zinc ore.
Zinc plant. Input: Zinc Ore from the zinc mine and Acid from the acid plant. Output: Zinc
Hope to see updates with your ideas as soon as you find time to work on it.
Philipsz
Thanks for the feedback, will lokk in to your suggestions.
Alt_Donnerschweer
Hello Philipsz,
I love your mod so much, it's really brilliant! I already had version 1.0 installed, but you've outdone yourself again with the update. I love this micromanagement. Thank you for your work.
Suggestion for expansion: A cooperage/barrel factory for the various liquids.
Variant 1 wooden barrels (requires 2x boards and 1x iron): for rum, whiskey and normal distillery, brewery, tequila distillery
Variant 2 steel barrels (requires 2x galvanized steel) for oil well, oil refinery, fuel refinery, coconut oil refinery, separation plant, lubricant refinery, glycerine refinery, acid factory, palm oil refinery, gas field, waterworks
Maybe not for all of the goods mentioned, crude oil, oil and fuel, for example, are always a good option with the tank wagon.
I don't think coconut and palm oil, lubricants and glycerine belong in a tank wagon. 
A bottle factory (requires 2x glass and 1x paper (for the label
)) for champagne presses, red and white wine cellars would also be extremely cool.
------------------------------------------------
Hallo Philipsz,
ich feier deinen Mod so sehr, echt genial! Hatte auch schon die Version 1.0 installiert, aber mit dem Update hast du dich nochmal selber übertroffen. Ich liebe dieses Mikromanagement. Danke für deine Arbeit.
Vorschlag zur Erweiterung: Eine Fassküferei/Fassfabrik für die diversen Flüssigkeiten.
Variante 1 Holzfässer (benötigt 2x Bretter und 1x Eisen) : für Rum-, Whiskey- und normale Brennerei, Brauerei, Tequila-Destillerie
Variante 2 Stahlfässer (benötigt 2x verzinkten Stahl) für Ölquelle, Ölraffinerie, Treibstoffraffinerie, Kokosnussölraffinerie, Trennanlage, Schmiermittelraffinerie, Glyzerinraffinerie, Säurefabrik, Palmölraffinerie, Gasfeld, Wasserwerk
Vielleicht ja auch nicht für alle genannten Waren , Rohöl, Öl und Treibstoff z.B. bieten sich ja auch immer mit dem Kesselwagen an.
Kokosnuss- und Palmöl bzw. Schmiermittel sowie Glyzerin gehören aber denke ich nicht in einen Kesselwagen. 
Eine Flaschenfabrik (benötigt 2x Glas und 1x Papier (für das Etikett
)) für Champgner-Kelterei, Rot- und Weißweinkellerei wäre auch extrem cool.
Philipsz
Thanks for the feedback, I will look in to your suggestions.
NE81
Gas und Säure wird aber typischerweise auch in Kesselwagen transportiert. Also industrielle Mengen. Fäßer sind dann eher für kleinere Abnehmer.
cetrix787
Hi,
the mod is crashing the game while loading.
Error: "class Model * __ptr64 Id not found: industry/cargo/rice_small.mdl"
Looks like some files are missing in the transportfever download. I also downloaded the Crops Mod, but there are no cargo materials.
In your your steam file, the cargo_rice.mtl is included.
Philipsz
Hi cetrix787, the error should now be fixed, thanks for the feedback.
jimbob1977uk
Philipsz
Will be going through all your posts soon and try and correct any errors in the mod.
Computerhocker
Seems to be a hard work by all those missing resources.
Actually I stumbled upon the next thing, trying to find a referenced file "models/vehicle/waggon/cargo_oil_sand_albedo.dds" which does not exist. Neither in the mod nor in the vanilla resources.
TukangSayur
lua error
files:
mods/Complete_Industry_Mod_1/res/construction/industry/silver_foundry.con:1: module 'industryutil' not found:
no field package.preload['industryutil']
no file 'mods/Complete_Industry_Mod_1/res/scripts/industryutil.lua'
how to fix it?
Bahnecke
Water is bugged, i think. I have a chain with whiskey etc. however the water still doesn't get exported from its spawner.
Philipsz
Will look in to this problem f or t h e next update.
NE81
Superb mod, thank you so much, exactly whati was looking for
Could you add a feature that you can deactivate some production chains? Because especially on not-huge maps it can get super convoluted very fast with so many different cargo types that need to be transportet.
jimbob1977uk
Loving this mod, has revolutionised my game
Philipsz
Many thanks, hoping to add more in future updates. Currently working on tires for the tire factory.
Thamos
Hi,
The mod sometimes causes this crash:
Assertion `(int)construction.stocks.size() == (int)r.size()' failed."
This is because the stockListConfig for car_factory.con is not correct. It should be like this:
local stockListConfig = {
stocks = { "GALVANISED_STEEL", "TYRES", "GLASS", "BATTERIES", "TEXTILES" },
rule = { input = { { 1,1,1,1,1 } }, output = { CARS = 2 }, capacity = 600 },
}
It had one ",1" too many in the input list
Btw, great mod
Cheers
Thomas
Philipsz
Thanks Thomas, I have corrected this and it will be in my next update.
mortalaza
HI .. orange cargo miss the image of the product.
Philipsz
Thanks for the feedback. I will take a look.
Regards
André
Philipsz
This problem has now been fixed, please download the mod again.
vencaok
This error is usually caused by modding. Some game resources contain incorrect data.
Details:
Error message: [string "D:/Program Files (x86)/Steam/userdata/485258129/1066780/local/mods/Complete_Industry_Mod_1/res/construction/industry/silver_products_factory.con"]:1870: '}' expected (to close '{' at line 1865) near 'industryutil'
File name: D:/Program Files (x86)/Steam/userdata/485258129/1066780/local/mods/Complete_Industry_Mod_1/res/construction/industry/silver_products_factory.con
Minidump: D:/Program Files (x86)/Steam/userdata/485258129/1066780/local/crash_dump/8236a1e4-f618-4ad7-87b5-6a748c76bc4c.dmp
Mod: "Complete Industry Mod Beta Version 1.0" (!Complete_Industry_Mod, 1) (consider removing this mod and contacting the mod author)
Philipsz
This error has now been fixed.
HXD1D_0211
Hello Philipsz,
During the game, I found that the accuracy of the Chinese translation of this mod was not very good. Here is some corrections have been made to the Chinese translation of the module. You can refer to it.
In addition, I have some suggestions regarding industry mod.
Appliances Factory
Requires: Plastic, Silicon and Steel.
Produces: Appliances.
Electronics Factory
Requires: Copper, Plastic, Silicon and Steel.
Produces: Electronics.
Sugar Farm
Requires: Sugarcane.
Produces: Sugar.
War Material Factory
Requires: Only Galvanised Steel or Steel and Copper.
Regards and keep up the good work.
A railfan from China Mainland.
lyf67175817
Duplicate cargo type name: Silver ore
urban_games/train_fever/src/Game/transport/CargoTypeRep.cpp:74: __cdecl transport::CargoTypeRep::CargoTypeRep(const class FileSystem *,const class lua::Loader *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >): Assertion `AreIdsUnique(legacyLoad)' failed.
Exception during init
GC Called
Destroying failback ui done
End of redirect Buffer to StdOutBuffer
Restoring as we are still responsible for stdout
End of redirect Buffer to StdOutBuffer: done
Exception type: Fatal error
Details:
Assertion Failure: Assertion `AreIdsUnique(legacyLoad)' failed.
In file: urban_games/train_fever/src/Game/transport/CargoTypeRep.cpp:74
In function: __cdecl transport::CargoTypeRep::CargoTypeRep(const class FileSystem *,const class lua::Loader *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)
__CRASHDB_CRASH__ struct AssertException: urban_games/train_fever/src/Game/transport/CargoTypeRep.cpp:74: __cdecl transport::CargoTypeRep::CargoTypeRep(const class FileSystem *,const class lua::Loader *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >): Assertion `AreIdsUnique(legacyLoad)' failed.
Exception type: Fatal error
Details:
Assertion Failure: Assertion `AreIdsUnique(legacyLoad)' failed.
In file: urban_games/train_fever/src/Game/transport/CargoTypeRep.cpp:74
In function: __cdecl transport::CargoTypeRep::CargoTypeRep(const class FileSystem *,const class lua::Loader *,class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> >)
Goodbye.
========================================
Shutdown at Sun Feb 25 15:17:42 2024
========================================
not playable at Campaign C1S4 Mexican scenario mission.
update: tried other mod , they all crashed.
EmperorDarthSidious (NL)
Hello Philipsz,
First of all, thanks for this great looking mod. Since it's still beta, I thought I could comment on something...Since it's such a large mod, I was wondering if you could put a few industries together. I'm talking about the alcoholic drinks factory. Would it be better to deliver the alcohol to the Red Winery, the Rum Distillery and the Champagne Winery and then deliver the red wine, the champagne and the rum to the alcoholic drinks factory, perhaps together with some glas (so it can be bottled) and then deliver the complete product (the alcoholic drinks) to a city ? Maybe it will save a few spots in the line...
Alcohol Factory
Requires Water, Sugar and/or Sugarcane.
Produces: Alcohol.
Red Winery
Requires: Red Grapes and alcohol.
Produces: Red Wine
Rum Distillery
Requires: Alcohol, Grain, Sugarcane and Water.
Produces: Rum
Champagne Winery
Requires: Green Grapes and alcohol.
Produces: Champagne
Alcoholic Drinks Factory
Requires: Red Wine or Champagne or Rum and glas (for the bottles)
Produces: Alcoholic Drinks.
It's just a thought, but I think it makes things somewhat simpler.
Regards and keep up the good work.
Erik from the Netherlands.
Philipsz
I see your point, will take a look. thanks for the feedback.
EmperorDarthSidious (NL)
Thanks for the response Philipsz.
)
By now I have changed the entire mod (of course I don't release it, because it's your work and I respect that). I did it for myself so I could play around with it in my own way. I show you what I have changed and maybe it will help you or perhaps you will find it usefull. By the way, I made the different Food-Factories and Goods-Factories so I don't have to distribute that many cargo-types to the cities. I rather work with food- and goods-deliveries. It's impossible for me to create a map with so many towns that all need so much different cargo-types, that it was easier for me to make those extra factories. I also wanted to do something with the waste water.
If you would like to have the changed version to take a look, or perhaps work with it, give me a PM and I'll send it to you.
This is what I have done so far, and everything works (took me a couple of days to change and test every single industry
Acid Plant:
Requires: Sulphur and Water.
Produces: Acid and Waste Water.
Advanced Construction Factory:
Requires: Stone or Sandstone or Concrete or Cement or Marble.
Produces: Construction Materials.
Advanced Tools Factory:
Requires:
Steel and Plastic or
Aluminium and Plastic or
Daimonds, Steel, Aluminium and Plastic.
Produces: Tools.
Advanced Machine Factory:
Requires: Galvanised Steel, Oil, Electronics and Plastic.
Produces: Machines and Waste.
Advanced Steel Factory:
Requires: Coal, Coke, Iron Ore and Zinc.
Produces: Galvanised Steel, Steel and Slag.
Alcohol Factory:
Requires Grain, Sugar and Water.
Produces: Alcohol and Waste Water.
Alcoholic Drinks Factory:
Requires: Champagne or Beer or Red Wine or White Wine or Rum.
Produces: Alcoholic Drinks.
Aluminium Smelting Plant:
Requires: Bauxite.
Produces: Aluminium and Slag.
Appliances Factory:
Requires:
Electronics, Steel and Plastic or
Electronics, Galvanised Steel and Plastic.
Produces: Appliances and Waste.
Bakery
Requires: Grain and Salt.
Produces: Bread.
Battery Factory
Requires: Acid, Water, Copper and Plastic.
Produces: Batteries and Waste Water.
Brewery:
Requires: Grain, Hops, Alcohol, Sugar and Water.
Produces: Beer.
Cannery:
Requires:
Fish, Salt and Aluminium or
Meat, Salt and Aluminium
Produces: Canned Food and Waste.
Cardboard and Paper Factory:
Requires: Pulp and Water.
Produces: Paper, Cardboard and Waste Water.
Champagne Factory:
Requires: Green Grapes, Alcohol and Acid.
Produces: Champagne.
Cheese Factory:
Requires: Milk and Salt.
Produces: Cheese.
Chocolate Factory:
Requires:
Cacao Beans, Milk, Salt and Sugar or
Cacao Beans, Coconuts (Bounty
), Milk,
Salt and Sugar.
Produces: Chocolate.
Cigar Factory:
Requires: Tobacco and Cartons (packed).
Produces: Cigars.
Cigarette Factory:
Requires:
Tobacco, Paper, Plastic (filter
) and
Cartons (packed) or
Tabacco, Paper (non-filter
) and Cartons
(packed).
Produces: Cigarettes.
Clothes Factory:
Requires: Textiles or Wool or Cotton.
Produces: Clothes.
Concrete Factory:
Requires: Cement, Sand, Stone and Water.
Produces: Concrete and Waste Water.
Copper Foundry:
Requires: Copper Ore
Produces: Copper and Slag.
Electronics Factory:
Requires: Copper, Plastic, Gold and Steel.
Produces: Electronics and Waste.
Food Factory 1:
Requires:
Grain or Salt or Sugar or
Fish and Salt or
Meat and Salt.
Produces: Food.
Food Factory 2:
Requires: Cheese or Bread or Fruit or Chocolate or Canned Food.
Produces: Food.
Food Factory 3:
Requires: Milk or Coffee or Soft Drinks or Alcoholic Drinks or Fruit Juice.
Produces: Food.
Fruit Juice Factory:
Requires:
Cartons, Fruit and Water or
Cartons, Bananas and Water or
Cartons, Pineapples and Water.
Produces: Fruit Juice and Waste Water.
Goods-Factory 1:
Requires:
Cigarettes and Cardboard or
Cigars and Cardboard or
Clothes and Cardboard or
Batteries and Cardboard.
Produces: Goods
Goods-Factory 2:
Requires:
Appliances and Cardboard or
Electronics and Cardboard or
Gold Products and Cardboard or
Silver Products and Cardboard.
Produces: Goods
Livestock Farm:
Requires: Grain
Produces: Livestock and Milk
Planks and Pulp Mill:
Requires: Logs and Water
Produces: Planks, Pulp and Waste Water.
Recycling Plant:
Requires: Waste.
Produces: Glass, Paper, Plastic, Pulp and Steel.
Red Winery:
Requires: Red Grapes and Alcohol.
Produces: Red Wine
Rum Distillery (Doesn't need grain in real-life
)
Requires: Alcohol, Sugarcane and Water.
Produces: Rum.
Separation Plant:
Requires: Oil Sand and Waste Water.
Produces: Oil, Sand and Water.
Soft Drinks Factory:
Requires:
Acid, Sugar, Water and Aluminium (for cans) or
Acid, Sugar, Water and Glass (for bottles).
Produces: Soft Drinks.
Sugar Factory:
Requires: Sugarcanes.
Produces: Sugar
Tropical Food Factory:
Requires: Bananas or Coconuts or Pineapples or Fruit or Sugarcane.
Produces: Food.
White Winery:
Requires: White Grapes and Alcohol
Produces: White Wine.
Regards and thanks you for your great work !
Erik
Philipsz
Cool, I may use some of this in a future update. The mod is still in Beta, as I am currently testing industries in a large map and making changes if needed.
Also working on adding 3D crops in a seperate mod, learning 3D moddeling!
EmperorDarthSidious (NL)
Could I send it to you somehow ? I can upload it at my google drive and give you the link in a pm ? I'm working on a large megalomaniac map called Flat Islands, it's on the workshop here : https://steamcommunity.com/sha…iledetails/?id=2452960037
There are a few screenshots of the map as I'm working on it on my profile page on Steam. So if I can send it tou perhaps you can send me a pm, and then I give you a link.
Regards,
Erik
Philipsz
Yes please send a link. Thanks for the tip about the Rum Distillery, I have now updated this industry.
vencaok
I WOULD SEND A PICTURE BUT I DON'T KNOW HOW
vencaok
script/complete industry.lua

vencaok
COMPLETE INDUSTRY COMPATIBILITY FILE
local completeIndustry =
{
industrialList = {"CONSTRUCTION_MATERIALS", "FUEL", "MACHINES"},
commercialList = {"FOOD", "GOODS", "TOOLS"},
residentialList = {"MAIL"},
-- example: residentialList = {"MAIL","MILK"},
industrialOutput = {"WASTE"},
industrialOutput = {"DDRABFALL"},
commercialOutput = {"UNSORTED_MAIL"},
commercialOutput = {"WASTE"},
residentialOutput = {"UNSORTED_MAIL"},
residentialOutput = {"DDRABFALL"},
residentialOutput = {"WASTE"},
-- example: residentialOutput = {"MAIL","WASTE"},
-- Output is only produced when there is an input
residentialRandom = true,
-- set residentialRandom = true to enable single items randomly selected for residential buildings
-- set residentialRandom = false to include all residential demands per building
residentialInputRatio = 0, -- percentage chance of buildings spawning with demands
residentialOutputRatio = 0, -- percentage chance of a building with a demand, also producing an output (so 20% of a 20% chance)
industrialOutputRatio = 0,
commercialOutputRatio = 0,
}
vencaok
mod.lua
vencaok
local function constructionCallback(fileName, data)
local updateFn = data.updateFn
if data.type == "TOWN_BUILDING" then
if data.updateFn ~= nil then
data.updateFn = function(params)
local parcelSize = 8
local borderSize = 2
local mailChance = 0.33
local wasteChance = 0.33
local DDRABFALLChance = 0.33
if ( data.townBuildingParams.landUseType == "RESIDENTIAL" )then
if ( math.random() < mailChance ) then
params.cargoTypes = { "MAIL" }
end
end
local result = updateFn(params)
local ruleCapacity = math.ceil(params.capacity / 4)
if (ruleCapacity > 0 and params.cargoTypes and #params.cargoTypes > 0) then
if params.cargoTypes then
result.stocks = { }
local inputs = {}
for i=1, #params.cargoTypes do
local t = {}
for j=1, #params.cargoTypes do
t[j] = 0
end
t[i] = 1
inputs[#inputs + 1] = t
result.stocks[i] = {
cargoType = params.cargoTypes[i],
type = "RECEIVING",
edges = { },
moreCapacity = ruleCapacity * 100
}
end
local outStock = {}
if (data.townBuildingParams.landUseType == "COMMERCIAL" or data.townBuildingParams.landUseType == "RESIDENTIAL") and ( math.random() < mailChance ) then
outStock = { UNSORTED_MAIL,WASTE = 5 }
elseif (data.townBuildingParams.landUseType == "RESIDENTIAL") and ( math.random() < mailChance ) then
outStock = { UNSORTED_MAIL = 5 }
elseif (data.townBuildingParams.landUseType == "COMERCIAL") and ( math.random() < mailChance ) then
outStock = { UNSORTED_MAIL = 5 }
elseif (data.townBuildingParams.landUseType == "COMERCIAL") and ( math.random() < wasteChance ) then
outStock = { WASTE = 5 }
elseif (data.townBuildingParams.landUseType == "INDUSTRIAL") and ( math.random() < wasteChance ) then
outStock = { WASTE = 5 }
elseif (data.townBuildingParams.landUseType == "INDUSTRIAL") and ( math.random() <wasteChance ) then
outStock = { DDRABFALL = 5 }
end
result.rule = {
input = inputs,
output = outStock,
capacity = ruleCapacity,
consumptionFactor = 1.2,
}
end
end
return result
end
end
elseif data.type == "INDUSTRY" then
data.updateFn = function(params)
local result = updateFn(params)
if result ~= nil then
if result.rule ~= nil then
local currentLevel = (params.productionLevel or 0) + 1
local numLevels = 1 -- not sure how to get levels
local inpEnabled = (params.inputEnabled or 1) == 1
local inputRule = (params.input or (inpEnabled and data.stockListConfig and data.stockListConfig.rule.input)) or { {} }
params.industrialCapacity = 5+3*currentLevel;
if params.commercialCapacity then
result.personCapacity = {
type = "COMMERCIAL",
capacity = params.commercialCapacity,
}
elseif params.industrialCapacity then
result.personCapacity = {
type = "INDUSTRIAL",
capacity = params.industrialCapacity,
}
end
result.cost = 2518745 * numLevels * (1+result.rule.capacity/200) -- cost depends on capacity and potential
if not inputRule[1][1] then result.cost = 4 * result.cost end -- raw industries are more expensive
--result.bulldozeCost = 1000000 -- bulldozing industries does not work
--print(table.toString(inputRule))
end
return result
end
end
end
return data
end
runFn = function (settings)
game.config.industryButton = true
addModifier("loadConstruction", constructionCallback)
addModifier("loadModel", function (fileName, data)
if (string.find(fileName, "vehicle") == nil) then
return data
end
if (data.metadata) then
if (data.metadata.transportVehicle) then
if (data.metadata.transportVehicle.carrier) then
if(data.metadata.transportVehicle.compartments) then
for i=1,#data.metadata.transportVehicle.compartments do
local foundGoodsCapacity = 0
local foundGoodsCargobay = null
local foundCoalCapacity = 0
local foundCoalCargobay = null
for j=1,#data.metadata.transportVehicle.compartments[i] do
for k=1,#data.metadata.transportVehicle.compartments[i][j] do
if (string.upper(data.metadata.transportVehicle.compartments[i][j][k].type) == "GOODS") then
foundGoodsCapacity = data.metadata.transportVehicle.compartments[i][j][k].capacity
foundGoodsCargobay = data.metadata.transportVehicle.compartments[i][j][k].cargoBay
elseif (string.upper(data.metadata.transportVehicle.compartments[i][j][k].type) == "COAL") then
foundCoalCapacity = data.metadata.transportVehicle.compartments[i][j][k].capacity
foundCoalCargobay = data.metadata.transportVehicle.compartments[i][j][k].cargoBay
end
end
end
if(foundGoodsCapacity>0) then
print("mod \"Industry Expanded\" modifying vehicle to carry Mail: " .. fileName)
table.insert(data.metadata.transportVehicle.compartments[i], { { type = "MAIL", capacity = foundGoodsCapacity, cargoBay = foundGoodsCargobay } })
table.insert(data.metadata.transportVehicle.compartments[i], { { type = "UNSORTED_MAIL", capacity = foundGoodsCapacity, cargoBay = foundGoodsCargobay } })
end
if(foundCoalCapacity>0) then
print("mod \"Industry Expanded\" modifying vehicle to carry Waste: " .. fileName)
table.insert(data.metadata.transportVehicle.compartments[i], { { type = "WASTE", capacity = foundCoalCapacity, cargoBay = foundCoalCargobay } })
end
end
elseif(data.metadata.transportVehicle.compartmentsList) then
for h=1,#data.metadata.transportVehicle.compartmentsList do
if ( data.metadata.transportVehicle.compartmentsList[h].loadConfigs ) then
for i=1,#data.metadata.transportVehicle.compartmentsList[h].loadConfigs do
local foundGoodsCapacity = 0
local foundGoodsCargobay = null
local foundCoalCapacity = 0
local foundCoalCargobay = null
-- Specific check/fix added for the mod: "modwerkstatt_speedlimits_1"
if ( data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries ) then
for j=1,#data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries do
if (string.upper(data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries[j].type) == "GOODS") then
foundGoodsCapacity = data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries[j].capacity
foundGoodsCargobay = data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries[j].cargoBay
elseif (string.upper(data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries[j].type) == "COAL") then
foundCoalCapacity = data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries[j].capacity
foundCoalCargobay = data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i].cargoEntries[j].cargoBay
end
end
if(foundGoodsCapacity>0) then
print("mod \"Industry Expanded\" modifying vehicle to carry Mail: " .. fileName)
table.insert(data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {cargoEntries = { { type = "MAIL", capacity = foundGoodsCapacity, cargoBay = foundGoodsCargobay }}})
table.insert(data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {cargoEntries = { { type = "UNSORTED_MAIL", capacity = foundGoodsCapacity, cargoBay = foundGoodsCargobay }}})
end
if(foundCoalCapacity>0) then
print("mod \"Industry Expanded\" modifying vehicle to carry Waste: " .. fileName)
table.insert(data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {cargoEntries = { { type = "WASTE", capacity = foundCoalCapacity, cargoBay = foundCoalCargobay }}})
end
end
end
end
end
end
end
end
end
return data
end)
end
function data()
return {
info = {
minorVersion = 1,
severityAdd = "NONE",
severityRemove = "WARNING",
name = _("Complete Industry Mod Beta Version 1.0"),
description = _(
"This is the Beta version of the Complete Industry Mod. Please note that this release is for evaluation purposes and your feedback is much appreciated. It is not the final Mod, so some parts may be updated and more industries added.This version is available in all languages supported in Transport Fever 2. Please send feedback to help improve the non English translations. If anyone would like to translate in your language, please get in touch."),
tags = {"Industry", "Cargo", "Script Mod"},
authors = {{
name = "ALP",
role = "CREATOR"
}}
},
runFn = function(settings)
addModifier("loadConstruction", constructionCallback)
addModifier("loadModel", function(fileName, data)
if (string.find(fileName, "vehicle") == nil) then
return data
end
if (data.metadata) then
if (data.metadata.transportVehicle) then
if (data.metadata.transportVehicle.carrier) then
if (data.metadata.transportVehicle.compartments) then
for i = 1, #data.metadata.transportVehicle.compartments do
local foundFoodCapacity = 0
local foundFoodCargobay = null
local foundGoodsCapacity = 0
local foundGoodsCargobay = null
local foundConstructionCapacity = 0
local foundConstructionCargobay = null
local foundIronOreCapacity = 0
local foundIronOreCargobay = null
local foundOilCapacity = 0
local foundOilCargobay = null
for j = 1, #data.metadata.transportVehicle.compartments[i] do
for k = 1, #data.metadata.transportVehicle.compartments[i][j] do
if (string.upper(data.metadata.transportVehicle.compartments[i][j][k].type) ==
"FOOD") then
foundFoodCapacity =
data.metadata.transportVehicle.compartments[i][j][k].capacity
foundFoodCargobay =
data.metadata.transportVehicle.compartments[i][j][k].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartments[i][j][k].type) == "GOODS") then
foundGoodsCapacity =
data.metadata.transportVehicle.compartments[i][j][k].capacity
foundGoodsCargobay =
data.metadata.transportVehicle.compartments[i][j][k].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartments[i][j][k].type) ==
"CONSTRUCTION_MATERIALS") then
foundConstructionCapacity =
data.metadata.transportVehicle.compartments[i][j][k].capacity
foundConstructionCargobay =
data.metadata.transportVehicle.compartments[i][j][k].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartments[i][j][k].type) == "IRON_ORE") then
foundIronOreCapacity =
data.metadata.transportVehicle.compartments[i][j][k].capacity
foundIronOreCargobay =
data.metadata.transportVehicle.compartments[i][j][k].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartments[i][j][k].type) == "OIL") then
foundOilCapacity =
data.metadata.transportVehicle.compartments[i][j][k].capacity
foundOilCargobay =
data.metadata.transportVehicle.compartments[i][j][k].cargoBay
end
end
end
if (foundFoodCapacity > 0) then
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ALCOHOL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ALCOHOLIC_DRINKS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "APPLIANCES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BANANAS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BATTERIES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BEER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BREAD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CANNED_FOOD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CARDBOARD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CARTONS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CEMENT",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CIGARS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CHAMPAGNE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CHEESE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CHOCOLATE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CIGARETTES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CLOTHES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COCOABEANS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COCONUTS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COFFEE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COFFEE_BERRIES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COPPER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COTTON",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "DIAMONDS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ELECTRONICS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "EMERALDS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "FISH",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "FRUIT",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "FRUIT_JUICE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GLASS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GOLD",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GOLD_PRODUCTS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GREEN_GRAPES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "LIVESTOCK",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "MAIL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "MEAT",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "PAPER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "PINEAPPLES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "PULP",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RED_GRAPES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RED_WINE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RUBBER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RUBIES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RUM",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SAPPHIRES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SILVER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SILVER_PRODUCTS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SOFT_DRINKS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SYNTHETIC_RUBBER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "TEXTILES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "TOBACCO",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "TYRES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "UNSORTED_MAIL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WAR_MATERIAL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WASTE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WOOL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WHITE_WINE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}})
end
if (foundConstructionCapacity > 0) then
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ALCOHOL",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ALUMINIUM",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "APPLIANCES",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BEER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CARDBOARD",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CARS",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CEMENT",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CONCRETE",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GALVANISED_STEEL",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GLASS",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "MARBLE",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "PAPER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "PULP",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RUBBER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RUM",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SILICON",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SYNTHETIC_RUBBER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "TEXTILES",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}})
end
if (foundIronOreCapacity > 0) then
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ASPHALT",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BASALT",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "BAUXITE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CHALK",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "CLAY",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COKE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "COPPER_ORE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "DIAMONDS",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "EMERALDS",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "GOLD_ORE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "HOPS",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "LIMESTONE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "OIL_SAND",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "POTASH",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "QUARTZITE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "RUBIES",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SALT",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SAND",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SANDSTONE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SAPPHIRES",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SILVER_ORE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SLAG",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SUGAR",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SUGARCANE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "SULPHUR",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WASTE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ZINC",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}})
end
if (foundOilCapacity > 0) then
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "ACID",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "LUBRICANTS",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "MILK",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WASTE_WATER",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}})
table.insert(data.metadata.transportVehicle.compartments[i], {{
type = "WATER",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}})
end
end
elseif (data.metadata.transportVehicle.compartmentsList) then
for h = 1, #data.metadata.transportVehicle.compartmentsList do
if (data.metadata.transportVehicle.compartmentsList[h].loadConfigs) then
for i = 1, #data.metadata.transportVehicle.compartmentsList[h].loadConfigs do
local foundFoodCapacity = 0
local foundFoodCargobay = null
local foundGoodsCapacity = 0
local foundGoodsCargobay = null
local foundConstructionCapacity = 0
local foundConstructionCargobay = null
local foundIronOreCapacity = 0
local foundIronOreCargobay = null
local foundOilCapacity = 0
local foundOilCargobay = null
for j = 1, #data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries do
if (string.upper(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].type) == "FOOD") then
foundFoodCapacity =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].capacity
foundFoodCargobay =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].type) == "GOODS") then
foundGoodsCapacity =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].capacity
foundGoodsCargobay =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].type) == "CONSTRUCTION_MATERIALS") then
foundConstructionCapacity =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].capacity
foundConstructionCargobay =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].type) == "IRON_ORE") then
foundIronOreCapacity =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].capacity
foundIronOreCargobay =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].cargoBay
elseif (string.upper(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].type) == "OIL") then
foundOilCapacity =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].capacity
foundOilCargobay =
data.metadata.transportVehicle.compartmentsList[h].loadConfigs[i]
.cargoEntries[j].cargoBay
end
end
if (foundFoodCapacity > 0) then
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ALCOHOL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ALCOHOLIC_DRINKS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "APPLIANCES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BANANAS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BATTERIES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BEER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BREAD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CANNED_FOOD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CARDBOARD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CARTONS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CEMENT",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CHEESE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CHOCOLATE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CIGARS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CIGARETTES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CLOTHES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COCOABEANS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COCONUTS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COFFEE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COFFEE_BERRIES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COPPER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COTTON",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "DIAMONDS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ELECTRONICS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "EMERALDS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "FISH",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "FRUIT",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "FRUIT_JUICE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GLASS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GOLD",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GOLD_PRODUCTS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GREEN_GRAPES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "LIVESTOCK",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "MAIL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "MEAT",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PAPER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PINEAPPLES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PULP",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RED_GRAPES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RED_WINE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUBBER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUBIES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUM",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SAPHIRES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SILVER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SILVER_PRODUCTS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SOFT_DRINKS",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SYNTHETIC_RUBBER",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TEXTILES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TOBACCO",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TYRES",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "UNSORTED_MAIL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WAR_MATERIAL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WASTE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WOOL",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WHITE_WINE",
capacity = foundFoodCapacity,
cargoBay = foundFoodCargobay
}}
})
end
if (foundGoodsCapacity > 0) then
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ALCOHOL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ALCOHOLIC_DRINKS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "APPLIANCES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BANANAS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BATTERIES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BEER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BREAD",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CANNED_FOOD",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CARDBOARD",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CARTONS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CEMENT",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CHAMPAGNE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CHEESE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CIGARS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CIGARETTES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CLOTHES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COCOABEANS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COCONUTS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COFFEE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COFFEE_BERRIES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COPPER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COTTON",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "DIAMONDS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ELECTRONICS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "EMERALDS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "FISH",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "FRUIT",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "FRUIT_JUICE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GLASS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GOLD",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GOLD_PRODUCTS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GREEN_GRAPES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "LIVESTOCK",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "MAIL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "MEAT",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PAPER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PINEAPPLES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PULP",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RED_GRAPES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUBBER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUBIES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUM",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SAPHIRES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SILVER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SILVER_PRODUCTS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SOFT_DRINKS",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SYNTHETIC_RUBBER",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TEXTILES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TOBACCO",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TYRES",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "UNSORTED_MAIL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WAR_MATERIAL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WASTE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WOOL",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WHITE_WINE",
capacity = foundGoodsCapacity,
cargoBay = foundGoodsCargobay
}}
})
end
if (foundConstructionCapacity > 0) then
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ALCOHOL",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ALUMINIUM",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "APPLIANCES",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BEER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CARDBOARD",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CARS",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CEMENT",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CONCRETE",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GALVANISED_STEEL",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GLASS",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "MARBLE",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PAPER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "PULP",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUBBER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUM",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SILICON",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SYNTHETIC_RUBBER",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "TEXTILES",
capacity = foundConstructionCapacity,
cargoBay = foundConstructionCargobay
}}
})
end
if (foundIronOreCapacity > 0) then
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ASPHALT",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BASALT",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "BAUXITE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CHALK",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "CLAY",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COKE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "COPPER_ORE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "DIAMONDS",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "EMERALDS",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "GOLD_ORE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "HOPS",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "LIMESTONE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "OIL_SAND",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "POTASH",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "QUARTZITE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "RUBIES",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SALT",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SAND",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SANDSTONE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SAPPHIRES",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SILVER_ORE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SLAG",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SUGAR",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SUGARCANE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "SULPHUR",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WASTE",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ZINC",
capacity = foundIronOreCapacity,
cargoBay = foundIronOreCargobay
}}
})
end
if (foundOilCapacity > 0) then
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "ACID",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "LUBRICANTS",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "MILK",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WASTE_WATER",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}}
})
table.insert(
data.metadata.transportVehicle.compartmentsList[h].loadConfigs, {
cargoEntries = {{
type = "WATER",
capacity = foundOilCapacity,
cargoBay = foundOilCargobay
}}
})
end
end
end
end
end
end
end
end
return data
end)
end
}
end
vencaok
COMPLETE INDUSTRY COMPATIBILITY FILE
local completeIndustry =
{
industrialList = {"CONSTRUCTION_MATERIALS", "FUEL", "MACHINES"},
commercialList = {"FOOD", "GOODS", "TOOLS"},
residentialList = {"MAIL"},
-- example: residentialList = {"MAIL","MILK"},
industrialOutput = {"WASTE"},
industrialOutput = {"DDRABFALL"},
commercialOutput = {"UNSORTED_MAIL"},
commercialOutput = {"WASTE"},
residentialOutput = {"UNSORTED_MAIL"},
residentialOutput = {"DDRABFALL"},
residentialOutput = {"WASTE"},
-- example: residentialOutput = {"MAIL","WASTE"},
-- Output is only produced when there is an input
residentialRandom = true,
-- set residentialRandom = true to enable single items randomly selected for residential buildings
-- set residentialRandom = false to include all residential demands per building
residentialInputRatio = 0, -- percentage chance of buildings spawning with demands
residentialOutputRatio = 0, -- percentage chance of a building with a demand, also producing an output (so 20% of a 20% chance)
industrialOutputRatio = 0,
commercialOutputRatio = 0,
}




vencaok
this is mod.lua
vencaok
local function constructionCallback(fileName, data)
local updateFn = data.updateFn
if data.type == "TOWN_BUILDING" then
if data.updateFn ~= nil then
data.updateFn = function(params)
local parcelSize = 8
local borderSize = 2
local mailChance = 0.33
local wasteChance = 0.33
local DDRABFALLChance = 0.33
if ( data.townBuildingParams.landUseType == "RESIDENTIAL" )then
if ( math.random() < mailChance ) then
params.cargoTypes = { "MAIL" }
end
end
local result = updateFn(params)
local ruleCapacity = math.ceil(params.capacity / 4)
if (ruleCapacity > 0 and params.cargoTypes and #params.cargoTypes > 0) then
if params.cargoTypes then
result.stocks = { }
local inputs = {}
for i=1, #params.cargoTypes do
local t = {}
for j=1, #params.cargoTypes do
t[j] = 0
end
t[i] = 1
inputs[#inputs + 1] = t
result.stocks[i] = {
cargoType = params.cargoTypes[i],
type = "RECEIVING",
edges = { },
moreCapacity = ruleCapacity * 100
}
end
local outStock = {}
if (data.townBuildingParams.landUseType == "COMMERCIAL" or data.townBuildingParams.landUseType == "RESIDENTIAL") and ( math.random() < mailChance ) then
outStock = { UNSORTED_MAIL,WASTE = 1 }
elseif (data.townBuildingParams.landUseType == "RESIDENTIAL") and ( math.random() < mailChance ) then
outStock = { UNSORTED_MAIL = 1 }
elseif (data.townBuildingParams.landUseType == "COMERCIAL") and ( math.random() < mailChance ) then
outStock = { UNSORTED_MAIL = 1 }
elseif (data.townBuildingParams.landUseType == "COMERCIAL") and ( math.random() < wasteChance ) then
outStock = { WASTE = 1 }
elseif (data.townBuildingParams.landUseType == "INDUSTRIAL") and ( math.random() < wasteChance ) then
outStock = { WASTE = 1 }
elseif (data.townBuildingParams.landUseType == "INDUSTRIAL") and ( math.random() <wasteChance ) then
outStock = { DDRABFALL = 1 }
end
result.rule = {
input = inputs,
output = outStock,
capacity = ruleCapacity,
consumptionFactor = 1.2,
}
Philipsz
Does it work?
vencaok
yes
vencaok
btw still trying to put the ddrabfall in there


vencaok
HOW TO SWITCH FROM ENGLISH TO POLISH PLEASE?
Philipsz
This should happen automatically when you change the game to Polish.
vencaok
I just wanted to see if your mod would also create the abfall if that was possible
já jsem jen chěl jestli by ten tvůj mod taky vytvářel i ten abfall jestli by to bylo možné
and if she couldn't do Czech Czech
Philipsz
It is on my list of things to do. Currently I am fixing small errors before adding anything new, along with working on a crops mod for the new farms etc.
Philipsz
Hi Vencaok, didi you make a script for Abfall? I am looking in to ways of integrating this in to the mod. I like the idea of refuse collection in towns.
riemke
Hi,
I've tested your mod know for a while. Thank you for the ongoing debugging. Still it would be great to integrate a Coke line in the game (Coal -> Coke -> Coke + Ore + Limestone -> Steel + Slag). I realize this with a second industry mod.
In real the galvanized steel is produced in separate plants. It looks a bit unrealistic to get it directly from a furnace.
Since I use your mode, also a real big map looks quit small. The Industries-buildings are just to big. Sure some of them need real big places (like mines, farms and furnace). But their are also real small ones. Would it be possible to shrink some of then? It would be even grate if the Truck stops would be integrated.
Thank you very much for your ongoing motivation
Jan
Philipsz
I am planing on doing this in a future update, I think it is a good idea.
All buildings are from the game, not created by me. I would love to have massive maps, even Meglomaniac maps are too small.
vencaok
I just wanted to see if your mod would also create the abfall if that was possible
já jsem jen chěl jestli by ten tvůj mod taky vytvářel i ten abfall jestli by to bylo možné