Transport Fever 2

Transport Fever 2

Demand Overhaul Mod
GordonDry 2022 年 5 月 12 日 下午 1:42
Do cargo types in vehicles by script only
I just recognized that you provide
res\models\models.zip
within your mod with vanilla vehicle clones and manually added the cargo types to them.

Do it by script only, as in
res\scripts\vehiclecargo.lua
but for all cargo types.

Overwriting vanilla resources never is a good idea.

And actually no mod vehicle will work with your mod.
最后由 GordonDry 编辑于; 2022 年 5 月 12 日 下午 1:52
< >
正在显示第 1 - 15 条,共 19 条留言
mauporte  [开发者] 2022 年 5 月 12 日 下午 8:59 
yes because it was so complicated that updateFn wouldn't work: the game kept crashing and crashing trying to look for it all; I tried different methods and could never get past 3% in the loading screen, so I changed it to the models. I even have a series of categories that I was going to use for this but I couldn't get it to work.
最后由 mauporte 编辑于; 2022 年 5 月 12 日 下午 9:07
doug 2022 年 5 月 13 日 上午 3:48 
The documentation on resource modifiers is here:
https://www.transportfever2.com/wiki/doku.php?id=modding:modifiersfilters

You can also use this method to modify the initWeight parameter of your industries, based on the climate selected by the user.
最后由 doug 编辑于; 2022 年 5 月 13 日 上午 3:49
phobos2077 2022 年 5 月 14 日 下午 2:57 
I agree. Should use approach of other industry mods otherwise it will be a deal breaker for many players, because a lot of people use vehicle mods.
christian 2022 年 5 月 15 日 上午 2:37 
ne marche pas avec senseless industries u a t il une solution car le mod est interressant
GordonDry 2022 年 5 月 15 日 上午 3:27 
引用自 christian
ne marche pas avec senseless industries u a t il une solution car le mod est interressant
Bien sûr, il ne fonctionne pas avec l'autre mod. Lisez la description et utilisez au moins un quart de votre cerveau.
mauporte  [开发者] 2022 年 5 月 15 日 下午 5:06 
yes I did look into others, but they do simple "if coal is here" add waste and "if goods is here add mail"; that won't work in this case as there's overlaps that shouldn't happen.
Here you can see all the categories I want to implement regarding vehicle cargo: https://www.transportfever.net/index.php?thread/17311-introducing-demand-overhaul-mod/
I also already have all of the vehicles categorized in an excel spreadsheet (like everything else I worked on) but as I said I could never get it to work, the game kept crashing and crashing trying to find the names of each vehicle to apply the modifiers (and I hate how in lua apparently syntax changes easily, it just confuses me).

Now, of course the solution I want is to just have a file because it is more elegant (a script), but even without it other mods would still have to modify their codes to add the categories that represent the cargo groups of this mod; and the idea that right now it would be impossible to add other vehicles is false even if it is not the best solution.

And when it comes to modifiers, I've read that documentation so many times, truth is that it tells me very little, a lot of it is outdated and a lot of other things are missing.
最后由 mauporte 编辑于; 2022 年 5 月 15 日 下午 5:18
mauporte  [开发者] 2022 年 5 月 15 日 下午 5:16 
PS: I will try again, and there are still other things I want to do, but in a couple of weeks as I have 2 new projects that came in last monday and I neglected for a couple of days because I was finishing this. You should also know that if I've learned anything is that i don't like lua at all; it is too weird, redundant and the whole threading thing just makes things frustrating imo.
mauporte  [开发者] 2022 年 5 月 15 日 下午 5:29 
ok, I just thought of a way it could work with known methods:
instead of "if coal is there add this", it would have to be a series of
"if this and this and this and this is here, then: do this"
"elseif this and this and this and this is here, then: do this"
etc.
phobos2077 2022 年 5 月 16 日 上午 1:28 
Hey if you need help with Lua, let me know. I'll try to help if I can.
mauporte  [开发者] 2022 年 5 月 16 日 上午 5:13 
Thanks for offering help Phobos; as I said I won't be able to work on it for at least 1-2 weeks (maybe less if I can get some GIS drafters); but I'll keep you guys updated into more specifics so that maybe you can help me find the errors in my codes (so for example, how am I using modifiers wrong with the climate thing?).
As some of you probably have experienced before: when one is struggling to do something one's brain shuts down in a way and it isn't until you relax a bit that ideas pop back and one even realizes that there was an easier solution one wasn't thinking of, so this might be beneficial.
最后由 mauporte 编辑于; 2022 年 5 月 16 日 上午 5:14
fun.baker 2022 年 5 月 20 日 上午 8:39 
There are collections with vehicles, it is also a possibility to add a compatibility script to them, I guess.
Couch_Lord_Xenos 2023 年 4 月 3 日 下午 9:44 
Any luck on getting this done? I'd like to be able to use this with the Industrial Railways cargo tram mod.
doug 2023 年 12 月 18 日 上午 7:29 
I have now developed a script for this feature, if you're still interested in pursuing it.
mauporte  [开发者] 2023 年 12 月 18 日 上午 7:42 
引用自 doug
I have now developed a script for this feature, if you're still interested in pursuing it.

that sounds great, I have time this week to work on the mod
< >
正在显示第 1 - 15 条,共 19 条留言
每页显示数: 1530 50