Transport Fever 2

Transport Fever 2

Yeol's Senseless Industries
GordonDry Mar 4, 2022 @ 4:53am
Solution inside: Incompatible to "Town tuning" mod
See the comments at https://steamcommunity.com/sharedfiles/filedetails/?id=2265952996 - even when that mod is loaded after Yeol's Senseless Industries it got quirks.
But it should work, as that mod does not overwrite resources but parses the cargo types, demands and stuff by script.
Last edited by GordonDry; Apr 25, 2022 @ 8:44am
< >
Showing 1-6 of 6 comments
Yeol  [developer] Apr 13, 2022 @ 1:36am 
I did not use try mod yet, but I can imagine that selecting town cargo types other then Commercial and Industrial goods would break the purpose and working of Senseless. Also, I'm wondering about Waste and Mail, which are added to town buildings by script.
But again, I did not yet try this mod, so I'm not sure what "quirks" one gets.
icsde2002 Apr 19, 2022 @ 2:30am 
[[[ Found a solution for that!! ]]]
I'm not 100% sure if it works, but for me it does!

I've spent some time looking through the files of Yeol's mod and found an intresting thing.
You can edit the code and change the town demands without losing them after a game rejoin/restart, just open the sensless.lua scrip, you can find it at: SteamLibrary\steamapps\workshop\content\1066780\1951335527\res\config\game_script
Open the file (sensless.lua) and go to code line 37 and delete everything until row 46, I used Visual Studio Code for this.

If you're using a different coding program or don't understand, then try to find this code in the scrip:

local function GetTownGoods()
local commercialGoodsType = nil
local industrialGoodsType = nil
local commercialGoodsIndex = -1
local industrialGoodsIndex = -1

local cargoTypes = game.interface.getCargoTypes ()

--[DELETE EVERYTHING FORM HERE]--

for index=1,#cargoTypes do
local cargoType = game.interface.getCargoType(cargoTypes[index])
if (cargoType.id=="COMMERCIAL_GOODS") then
commercialGoodsIndex= index-1
commercialGoodsType = cargoType
elseif (cargoType.id=="INDUSTRIAL_GOODS") then
industrialGoodsIndex= index-1
industrialGoodsType = cargoType
end
end

--[TO HERE]--

if commercialGoodsType==nil or industrialGoodsType==nil or commercialGoodsIndex==-1 or industrialGoodsIndex==-1 then
print("Senseless ERROR: Failed to find commercial of industrial good types")
return nil
end

return {{index=commercialGoodsIndex,goodsType=commercialGoodsType},{index=industrialGoodsIndex,goodsType=industrialGoodsType}}
end



The only testing that I've done until now (after posting this), its left and rejoined a game save many times and close the game and rejoin the game save. I still had the demand that I've chosen for the town and I assumed that it worked, I'm not aware of any bugs that might happen if this bit of code its deleted, so go at your own risks =P
(Anyway, I don't think anything bad can really happen)

GOOD LUCK!
Last edited by icsde2002; Apr 19, 2022 @ 2:31am
GordonDry Apr 19, 2022 @ 2:38am 
I try it - but by commenting out that code block ;) Thanks.
icsde2002 Apr 19, 2022 @ 2:50am 
glad to hear that it worked
Last edited by icsde2002; Apr 19, 2022 @ 2:51am
Yeol  [developer] Apr 19, 2022 @ 2:53am 
Another way is detecting the presence of this mod, and skipping this part of the code when present.

Thanks for looking for the solution and sharing it. ;)
icsde2002 Apr 19, 2022 @ 2:55am 
Yeol, many thanks to you for making this mod.
Last edited by icsde2002; Apr 19, 2022 @ 2:55am
< >
Showing 1-6 of 6 comments
Per page: 1530 50