Transport Fever 2

Transport Fever 2

View Stats:
Create or Edit industries
Hello,

I have a question about something the internet doesn't give much answers to, at least not as I search around. I would like to know if there is a way to edit industries. I already know that the options for industries can be found in the con.files and that it says on the bottom of the file what the industry in question can recieve and produce.

What I don't know is how to edit this...Do I have to add some sort of cargo to it, to recieve and produce, how many cargo-types can any given industry recieve and produce, do you have to enter a certain line to make the image of the cargo appear once the industry is placed on the map...

Any information is good...but can please somebody shed some light on this subject.

Thanks in advance ;)
< >
Showing 1-9 of 9 comments
Tsubame ⭐ Feb 17, 2024 @ 3:32pm 
If you want to build your own custom industries, the easiest way would be through the Freestyle Industry mod, you can set any production quantity you desire, whether they absorb or create stuff, whether they need materials to create stuff, the goods to be produced or absorbed, and jobs.

It does not come with buildings - it is just a small plot in the ground - so use it in conjunction with any asset of your choosing.

https://steamcommunity.com/sharedfiles/filedetails/?id=1978047222
Driver Kaldie Feb 17, 2024 @ 4:14pm 
Originally posted by Tsubame ⭐:
If you want to build your own custom industries, the easiest way would be through the Freestyle Industry mod, you can set any production quantity you desire, whether they absorb or create stuff, whether they need materials to create stuff, the goods to be produced or absorbed, and jobs.

It does not come with buildings - it is just a small plot in the ground - so use it in conjunction with any asset of your choosing.

https://steamcommunity.com/sharedfiles/filedetails/?id=1978047222

That's not what I mean...I mean editing the code so I can change what an industry recieves and produces. I already know about freestyle industries, but that is in the game. Not in the code...

Thanks anyway.
numbat Feb 17, 2024 @ 4:25pm 
There are a number of mods which change some of the production chains and add in more of their own. I would look into some of those and checkout the script file that they use. It should be relatively straight forward to modify these as you require.

Cheers,
Chris.
CashonWheels Feb 17, 2024 @ 4:40pm 
I did that that by copying all of of the game industries .con files and putting them in their own dictionary in the mods folder. example my_stuff_1. Active that mod so the game will read the .con files from it instead of in the game's .con files. Now you can toy with it all you want. Here's the cool part you don't need to exit the game for changes to take place, just save it in your file editor. But as for how, you'll need to study multiple examples of .con files. It not too complicated & half of it is just code for pre-game placement. The only thing to keep in mind is upgrades change the recipe. So if you change the same .con file alot your going to need to keep placed factories locked at the same production level.
Driver Kaldie Feb 20, 2024 @ 3:12pm 
Thanks everybody for the comments...

I did it...I have changed the entire "Complete Industry Mod". Took me four days of editing and testing, but now it's done. Wasn't that hard after all, it just takes time, specially with a large mod like that. Of course I can't release it because it's not my mod, but you can see what I have changed in it so far on the release-page. The original mod (by Philipsz) can be found here:

https://www.transportfever.net/filebase/entry/7346-complete-industry-mod-beta/#comment62765
Last edited by Driver Kaldie; Feb 20, 2024 @ 3:14pm
Driver Kaldie Feb 21, 2024 @ 9:17am 
There is one thing I can't get done...The car-factory. It produces cars (obviously) and it requires glass, galvanised steel, textile, tyres and batteries. However, I wanted to edit this so it also needs machines, and produce waste as well. When I do that and try to build the car-factory all I see is a small block and it doesn't want to build.

Is there a max of cargo's that can go in and out of a factory ? I mean I have seen import-factories that can produce a dozen cargo's and nothing goes wrong there, so how does this code work ?

It works with this:

order = 1016,
placementParams = {
buildOrder = 9,
initWeight = 1,
tags = { "INPUT_TYRES", "INPUT_GALVANISED_STEEL", "INPUT_GLASS", "INPUT_TEXTILES"},
distanceWeights = {
INPUT_CARS = 1,
INPUT_GALVANISED_STEEL = -1,
INPUT_TYRES = -1,
INPUT_GLASS = -1,
INPUT_BATTERIES = -1,
INPUT_TEXTILES = -1,
},
},
}

local stockListConfig = {
stocks = { "GALVANISED_STEEL", "TYRES", "GLASS", "BATTERIES", "TEXTILES" },
rule = { input = { { 1,1,1,1,1 } }, output = { CARS = 2 }, capacity = 500 },
}

But not with this:

order = 1016,
placementParams = {
buildOrder = 9,
initWeight = 1,
tags = { "INPUT_TYRES", "INPUT_GALVANISED_STEEL", "INPUT_GLASS", "INPUT_TEXTILES"},
distanceWeights = {
INPUT_CARS = 1,
INPUT_WASTE = 1,
INPUT_GALVANISED_STEEL = -1,
INPUT_TYRES = -1,
INPUT_GLASS = -1,
INPUT_BATTERIES = -1,
INPUT_TEXTILES = -1,
INPUT_MACHINES = -1,
},
},
}

local stockListConfig = {
stocks = { "GALVANISED_STEEL", "TYRES", "GLASS", "BATTERIES", "TEXTILES", "MACHINES" },
rule = { input = { { 1,1,1,1,1,1 } }, output = { CARS = 2, WASTE = 2 }, capacity = 500 },
}

Does anybody knows this ?
doug Feb 21, 2024 @ 9:28am 
There is a hard limit of 5 input items for a given output. That limit is imposed by the industry_util.lua file. If you want to bypass that file, you can probably achieve what you're looking for.
Last edited by doug; Feb 21, 2024 @ 9:34am
Driver Kaldie Feb 21, 2024 @ 9:33am 
Output or input ? But how does that work with those industries that can produce like a dozen cargo's out of nothing ?
RadiKyle Feb 21, 2024 @ 11:07am 
Hi have you tried the Workshop forum, which is for mod making topics like this? You might find some useful info / assistance there.
https://steamcommunity.com/workshop/discussions/18446744073709551615/?appid=1066780
< >
Showing 1-9 of 9 comments
Per page: 1530 50

Date Posted: Feb 17, 2024 @ 3:23pm
Posts: 9