Transport Fever 2

Transport Fever 2

LineManager
223 kommentarer
CARTOK  [ophavsmand] 20. aug. 2023 kl. 0:31 
Congestion control will take care of that, it will however not fix the problem for you. However, feel free to amend the 'rules.lua' file to add additional parameters and the processing thereof. For instance, see line 30 in 'rules.lua', you can add an optional additional parameter named, say, 'max_vehicles' (check adjacent rules for guidance), and then simply add a check in the 'function rules.moreVehicleConditions(line_data_single)' function under 'if rule == "P" then'. You need to fetch the parameter first, then do a simple 'if line_vehicles > max_vehicles then return false'. Note that you'll have to add two parameters to the line name in this case e.g. [P:0:25] where the first parameter corresponds to the aggressiveness level of adding vehicles (0 is the default), and the second parameter corresponds to the new parameter 'max_vehicles' you just created, in this case maximum 25 vehicles. Let me know how it goes.
Quad Tentacle 16. aug. 2023 kl. 13:23 
Please add abilty to set maximal amount of vehicles on line. If something block movement (ex. traffic) of vehicles, LM will spawn infinite amount of them.
CARTOK  [ophavsmand] 13. aug. 2023 kl. 5:37 
To follow-up: Please check what the console is showing, and send a copy (past it into a comment).
CARTOK  [ophavsmand] 12. aug. 2023 kl. 5:18 
No, no dependency. Create some lines and add at least one vehicle per line. If there is at least some demand, it will work over time. When you say that nothing happens, I have a feeling that you expected it to immediately start adding vehicles - this is not how it works. The mod assesses supply vs demand over time and gradually add/removes vehicles.
mr. faster 11. aug. 2023 kl. 22:59 
Is there any dependecy for the mod to work?
at first i thought it conflicts with another mod - created a new game, only added this mod - still nothing happens.
galaxy055 9. aug. 2023 kl. 11:15 
@CARTOK I use timetables mainly to unbunch traffic on certain lines, as to not have a whole line of vehicles and then a long time nothing.
Anyway I've checked the console (forgot all about that), and saw that I set the rate to high. Above the maximum allowed rate, I didn't even know that there was a max.
I struggle understanding how rates actually work, so I set some very high to provoke more vehicles, which obviously didn't work.
CARTOK  [ophavsmand] 9. aug. 2023 kl. 9:41 
@galaxy055 I don't use the timetable mod, so can't tell. Try removing and running without it. As the timetable mod directly interacts with vehicles, it's not unlikely that unpredictable things can occur - even more so as the vehicle timetabling disturbs/disrupts the vehicle/line load numbers.

Come to think of it, I'm not sure why you would run the mods at the same time, as the timetable mod is more targeted towards 'simulating realistic traffic patterns' (I think?), whereas LineManager strictly only optimizes vehicle numbers. Maybe it will work by using timetables for trains only i.e. disable automatic management of (passenger) trains, and let everything else be managed automatically?

Either way, LineManager should work with most mods due to the design - it's essentially only undertaking the same actions as the user would, albeit with a bit of processing and analysis in the background to determine the right action i.e., add or remove vehicles as required.
galaxy055 9. aug. 2023 kl. 7:40 
@CARTOK Thanks for the info. I was wondering because it seems that lately LM isn't working properly. Could it be because of the timetable mod?
CARTOK  [ophavsmand] 9. aug. 2023 kl. 7:26 
@galaxy055 LineManager will automatically locate any available depot. LineManager will reassess the used depot for every line over time as well, so the depot used can change. In summary: LineManager will use any available depot that will allow a vehicle to join a line. If a previously used depot has been removed, or connectivity has changed, then a new depot (as close as possible) to the existing line will be located. Sometimes, depending on the exact network, a seemingly less than ideal depot may be used temporarily - this will normally correct itself over time.

Having said that, to make things work as good as possible, make sure to place depots so they are indeed accessible to/from all directions - this is extra important for train depots as they need to follow tracks (unlike buses/trucks/ships/aircraft that can route relatively freely).

You will get repeated warning messages in the console if LineManager is unable to locate a depot for new vehicles.
galaxy055 9. aug. 2023 kl. 6:58 
@CARTOK
Does a depot have to be in direct connection to a line or can I place it anywhere? For example does the line manager use one road depot in a city or do I need to place one where a line passes?
CARTOK  [ophavsmand] 2. juli 2023 kl. 3:15 
At face value; Check whether your lines are appropriate, seems like you have partial overload on one segment, should the line be divided into two separate lines? (I.e. one line that manages a section with much higher demand, and another line that handles a section with less demand).

Beyond that, you can try to manually set rule "[P:1]" for the line (this is a bit of an experimental feature that puts more emphasis on the number of waiting people on any given station rather than the overall usage of the line).

Or, you can set the desired rate along with a tolerable maximum station overload, like this: "[R:100:200]" - This set the line to achieve a rate of 100, and if the load at any station exceeds 200% of the average passenger capacity of the vehicles on the line, additional vehicles will be added. You could try different values for the base rate as you deem appropriate, depending on the demand.
Tapotupotu 2. juli 2023 kl. 0:43 
I need help please. If I use this mod buses and trams are bought and sold. But at some stations are waiting more passengers as the capacity of a vehicle is. I use the standard rules. What should I change therefore the waiting passengers on a station are maximal the capacity of a vehicle on the line.
CARTOK  [ophavsmand] 27. maj 2023 kl. 3:28 
You need to enable the in-game console to see output from the game itself as well as any mods. Check here: https://www.transportfever2.com/wiki/doku.php?id=modding:ingametools#console
080james 25. maj 2023 kl. 20:54 
Also, I don't understand why, I can't see clear words under "Show Debugging Information", I can see partial words only, Can you show me the whole screenshot of the setting window ?
My Win10 Setting for screen is 1920X1680
080james 25. maj 2023 kl. 2:49 
Yes, followed, but in my point of view , it is still not easy for me to fully understand, maybe more photos will help.

I already enable it and running, but I don't know where to see the second screenshot in workshop, https://gtm.steamproxy.vip/workshop/filedetails/?id=2581894757
CARTOK  [ophavsmand] 24. maj 2023 kl. 9:41 
There's a link to the manual and instructions in the description, not sure what else to say.
080james 23. maj 2023 kl. 19:42 
I feel it is not easy to understand how things are going, I installed this mod, and start my saved game, all I know is there is a "LM" in my bar. then ? where to set a specific line not auto ?
CARTOK  [ophavsmand] 1. maj 2023 kl. 11:18 
v1.38 is live, with improved vehicle addition (and depot finding logic) that should hopefully help and make things work better in "Insufficient cash" situations. Note: Depot finding process itself is unchanged, and depends on in-game functionality to send a vehicle to a depot (unfortunately also emptying the vehicle - albeit the number of times this occurs should be greatly reduce in specific scenarios with this update). I'm still looking for guidance on how to find a depot without having to send an existing vehicle to a depot...
CARTOK  [ophavsmand] 30. apr. 2023 kl. 10:39 
I can imagine... :-) Good to know that x1/4 seems to work alright, thanks!
Damgam 30. apr. 2023 kl. 9:39 
It works more than fine on low capacity scenarios like buses or trucks, so i'll assume that x1/4 is working allright.
Damgam 30. apr. 2023 kl. 9:38 
Yeah i turned all automatic management off and then specify it on lines where i want it...
Which is why everything went a bit chaotic when it got all enabled again. :D
CARTOK  [ophavsmand] 30. apr. 2023 kl. 9:10 
For sure, that's a typical scenario where automatic line management may not be suitable - the optimal balance might be somewhere between current capacity and what the addition/removal of another vehicle will provide (and this can be a significant difference in case of large trains).

In those instances there are some options to consider: either manage manually (disable automatic TRAIN management or assign [M] to the specific line), make use of rate-rule [R:xxx] instead as it will likely be a bit more consistent, or use smaller trains (if a feasible option) that are easier to optimize/balance against the demand automatically.

It seems you are well aware of this, and opted to manage manually.

Let me know if you notice any specific issues related to using x1/4 date speed. It is not specifically tested. It could work fine, but I'm not sure.
Damgam 30. apr. 2023 kl. 1:13 
So far it feels like it's overcrowding my rail lines. But i'm playing on x1/4 date. I find your mod to work really well with bus and truck lines, but trains, transporting a lot with one train, make a huge difference when you add or remove one. And also i don't like my trains to randomly disappear, So i'd rather control them manually.
CARTOK  [ophavsmand] 29. apr. 2023 kl. 20:53 
No worries. Unless you had a very specific line/vehicle setup (timetables or similar), I'd be curious to hear how line vehicles were optimized? I've loaded up my own pre-LineManager games at times, and the optimization can be quite intriguing to follow.
Damgam 29. apr. 2023 kl. 10:18 
I don't remember it popping up as it did the first time after installing the mod (or starting new map), but sure, maybe i did miss it on autopilot. :)
CARTOK  [ophavsmand] 29. apr. 2023 kl. 9:53 
@Damgam: You must have missed this part in the information window that came up advising you that the data format has been updated; "The game has been paused to allow you time to review settings and changes. Un-pause the game when you are ready to continue."
CARTOK  [ophavsmand] 29. apr. 2023 kl. 9:46 
@tavin44 Check the console window.
Damgam 29. apr. 2023 kl. 2:28 
The update just re-enabled all management without telling me it did so. All my rail lines are now messed up in terms of number of trains... nice.
tavin44 28. apr. 2023 kl. 14:05 
Im trying this mod out and in 3 games..i set up a 2 track rail for industry..example Logs to Planks to Tools..i start out at logs ..it grabs logs and halfway to planks it turns around dumps the logs and restarts run..it does this everytime it works fine on trucks and boats.
CARTOK  [ophavsmand] 26. apr. 2023 kl. 10:31 
v1.37 just promulgated, adding congestion control.
CARTOK  [ophavsmand] 22. apr. 2023 kl. 11:27 
Small update: I've made good progress on a "congestion control" system that will inhibit vehicle addition when congestion is detected. And even remove vehicles in case of extreme congestion. This seems to work quite well in testing. It will be "Congestion control" setting that is enabled by default. For most situations, you wouldn't notice it. As always, the console will give you a good idea what's going on and it's always a good idea to keep an eye there every now and then.
CARTOK  [ophavsmand] 16. apr. 2023 kl. 22:52 
Thanks, I guess that could be possible. The downside is the possible addition of a parameter that would no be backwards compatible if a future solution to the gridlock issue is developed. Let me give it some thought. Appreciate your constructive input!
Loric76 16. apr. 2023 kl. 16:58 
Thanks Cartok, I'm doing exactly that.

Not sure if this would be possible, but something to consider at least for a future version: Could we configure per line vehicle limits, via the square bracket commands in the line names? That would help address this issue.
CARTOK  [ophavsmand] 16. apr. 2023 kl. 8:56 
That is very possible to happen, in particular if the traffic flow isn't sufficient. There's no getting around fixing traffic flow to ensure it meets demand. For instance, if you've asked for a specific rate to be met, it'll add vehicles (albeit slowly, as a mitigation) to meet the rate. If however the vehicle travel time is exaggerated due to traffic congestion, more vehicles are needed to achieve the requested rate - and so, you got yourself a spiral. I assume you could (relatively) easily remedy this by fixing traffic flows, re-organizing lines, or logistics network?
Loric76 16. apr. 2023 kl. 8:47 
Anyone else running into a situation where Line Manager starts to spin out of control?

As demand increases it adds vehicles accordingly, that works great. Eventually it hits capacity of the source/factory, or the infrastructure (road/rail network, stations), and doesn't stop adding vehicles since it hasn't hit it's target rate yet, and eventually creates gridlock.
TNM_Gaming_UK 24. mar. 2023 kl. 12:34 
Ah right well at least i know what the issue is now, thanks for getting back to me!
CARTOK  [ophavsmand] 24. mar. 2023 kl. 10:20 
[LineManager][11:35:31][WARN] Unable to add vehicle to line 'Bricks to Bodmin' - Either no available depot, or not possible to find a depot on this update.
CARTOK  [ophavsmand] 24. mar. 2023 kl. 10:19 
Ok, thanks for that. It seems that the trains turning around is due to the mod unable to find a depot. Check that you actually have a readily accessible depot on the line, add extra if you have to. The same would be true for ships - check that you actually have active depots available. The reversing is due to an attempt to find a depot using the native depot-finding function within Transport Fever 2, but it seems to fail for some reason. I'm not seeing any issue with this functionality of any of my different games (from small to large), so maybe it's a specific set up that you have. Is a depot perhaps behind a one-way traffic signal, or an odd railroad layout, and thus inaccessible?
TNM_Gaming_UK 24. mar. 2023 kl. 4:37 
TNM_Gaming_UK 24. mar. 2023 kl. 4:27 
tbh it does it with cargo ships as well i've noticed so its probably a conflict with another mod, i have got over 700 of them installed after all! Just found it strange that its never been an issue before until the latest game update!
CARTOK  [ophavsmand] 24. mar. 2023 kl. 2:04 
Need a log for this. Specifically, if a trained is reversed by LineManager, it will be indicated in the log. Also, check what other mods you have installed.
TNM_Gaming_UK 23. mar. 2023 kl. 7:08 
Been using this mod for a long long time now and it's fantastic, only issue I have in the recent game update it seems the rail manager is broke, gets a short distance down the track and reverses back to station even with reverse disabled in the menu
CARTOK  [ophavsmand] 12. mar. 2023 kl. 3:03 
Ok, then remove all mods and run with LineManager alone. I'm going to hazard guess you're having a problem with a different mod.
Ziktofel 12. mar. 2023 kl. 1:41 
I've started a new game, I'm using a lot of vehicle and station mods with Senseless Industries
CARTOK  [ophavsmand] 11. mar. 2023 kl. 22:45 
Is this an old or new game? Latest updated? What other mods are you using?
Ziktofel 11. mar. 2023 kl. 9:54 
I've got this (after clicking the Line Manager menu):

[LineManager][11:56:32][INFO] ============ Sampling ============
[LineManager][11:56:33][INFO] ============ Updating ============
[LineManager][11:56:33][WARN] Unable to add vehicle to line '[C] Logs Fort Wayne <-> Newport' - Insufficient cash?
[LineManager][11:56:33][WARN] Unable to add vehicle to line '[C] Logs Charlotte <-> Fort Wayne' - Insufficient cash?
[LineManager][11:56:33][INFO] ==> SUMMARY: 3 lines and 3 vehicles managed (0 lines not managed)
../../train_fever/src/Lib/UI/Component.cpp:1680: void UI::CComponent::HandleVisibilityChange(int, UI::Visibility, UI::Visibility, bool): Assertion `!m_childMutex' failed.
PANIC: unprotected error in call to Lua API (stack index 1, expected string, received boolean)
iProfessore 8. mar. 2023 kl. 4:13 
Kept causing my game to crash and freeze, removed it
CARTOK  [ophavsmand] 28. feb. 2023 kl. 9:02 
Please include the console output (or at least applicable extracts) for any queries. Impossible to help without that. A copy of the <savegame name>.sav.lua file will also help.
Damgam 27. feb. 2023 kl. 0:07 
While for cars/trams this mod seems to do the job, i just went ultra bankrupt when i enabled it for trains on my current save, xD
Cool mod though, i'll definitely keep using it for cars.
Stay on target, Porkins! 26. feb. 2023 kl. 17:53 
Not to sound like a dumb mofo, but now the line manager window works I can't seem to get it to take any effect. It says it's enabled for all transport types. All my lines are fine with a depot connected to them and even after the monthly stutter or pause I see no vehicles being added or taken away from the lines.