Transport Fever 2

Transport Fever 2

Resizable Parameter Window
28 Comments
[3.19]Icemaster 4 Feb, 2023 @ 10:19am 
merci
VacuumTube  [author] 4 Feb, 2023 @ 10:11am 
fixed
[3.19]Icemaster 19 Jan, 2023 @ 10:25pm 
hey. doesnt seem to work with teh new beta
yuriyland 5 May, 2022 @ 2:09pm 
Fantastic, I really miss this now ... where to download? I haven't seen anything like it on Steam
petrus 5 May, 2022 @ 12:35pm 
"COOL! But as? What and where to change???"
My mod will make the default window resizable/bigger hence you'll be able to fit more data on the window without the need of scrolling.
VacuumTube  [author] 5 May, 2022 @ 10:44am 
I would say the rules are not intended to have that high numbers and that many inputs.
It's very difficult to change existing game windows, if possible at all.
And no multiple rules are not possible, as already answered to you at the forum.
yuriyland 4 May, 2022 @ 7:23am 
And one more question is very important for me now. this has me stumped with my mod - is it possible to assign more than one (up to four) fabrication rules to a production? I don't want to churn out buildings for each individual product if the associated resources can be used to make another product. If I do according to the classical system for each unit of production, then I will have about 100 factories ... that's too much.

For example:
local stockListConfig = {
stocks = { "PASSENGERS", "SAWDUST", "DIRTY_PAPER", "CHEMICALS", "COLOR_RED", "COLOR_GREEN" },
rule1 = { input = { {4,2,0,1,0,0},{5,1,3,2,0,0}, }, output = { PAPER = 1, PASSENGERS = 2 }, capacity = 100 },
rule2 = { input = { {5,4,0,2,0,0},{8,6,4,5,0,0}, }, output = { CARTONS = 1, PASSENGERS = 4 }, capacity = 100 },
rule3 = { input = { {5,2,0,2,1,1},{8,1,3,5,1,1}, }, output = { STICKER = 1, PASSENGERS = 4 }, capacity = 100 },

And if so, how to do it correctly.
yuriyland 4 May, 2022 @ 7:23am 
COOL! But as? What and where to change??? And here's another point - in the window of production rules with a large number of resources, this does not fit in any way - is there a way to change this ???

Or - change the graphical representation to numeric (I always follow the sequence)
for example:

rule1 = { input = { { {4,2,0,1,0,0},{5,1,3,2,0,0}, }, output = { PAPER = 1, PASSENGERS = 2 }, capacity = 100 },
do not display 4 cargo icons, just "4"

https://steamuserimages-a.akamaihd.net/ugc/1858308488255416276/AEC5F2B316AF37E60693904271352FD2744124F0/?imw=1024&imh=623&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=true
petrus 3 May, 2022 @ 4:30pm 
I was unfortunately busy 'elsewhere' but now the mod is ready.
Once the spring game update is deployed I will publish the mod. I want to be 1000% sure that this is compatible with the updated game.
Also :) I've just finished testing yuriyland's request and, guess what, it works :)

https://imgur.com/a/YTJc0LU
VacuumTube  [author] 3 May, 2022 @ 1:13pm 
It's possible, but not easy. You can adapt this mod. Ask petrus, he did the same thing for the station window. (Did you release your mod yet?)
yuriyland 2 May, 2022 @ 5:58pm 
Tell me please. If it is impossible (really absolutely impossible) to change the size of the windows of the industry, then you can at least add a few lines where the production rules are specified ???
https://steamuserimages-a.akamaihd.net/ugc/1858308303535187527/933E42EE720F11B96E2DB9B61156CD5A6D3E1D96/?imw=5000&imh=5000&ima=fit&impolicy=Letterbox&imcolor=%23000000&letterbox=false
petrus 4 Dec, 2021 @ 9:27am 
2/2
If you don't at first click on the Station window then the Construction windows are not affected by the mod (they cannot be resized).

I have spent my whole last weekend trying to figure this out but to no avail :(

I would appreciate if you could take a look at the code and provide some tips how to fix this.
Is there a way I could you safely send it?

PS. I have a feeling that I am stopped by this "If clause"
"if api.engine.getComponent(ent,api.type.ComponentType.STATION_GROUP) then"

Thank you very much for your help and useful tips :)
petrus 4 Dec, 2021 @ 9:27am 
1/2
Hello, after a month :)
I was able to find some time to work on my mod and unfortunately stumbled upon a serious issue - Our mods are mutually exclusive irrespective of the loading order.

Maybe it is due the fact that "my" resize mod uses guiHandleEvent and your guiInit?
So after a number of trial and errors I decided to combine our resize mods into one.
Now I can manipulate both windows - the dynamic ones (Station) and the "menu.construction.*" from your mod.
However there is one issue that prevents me from declaring full victory.
This does not prevent the mod from delivering full functionality but is more a nuisance than a regular bug.
Once you load the game the mod will only work if follow these steps:
1. Load the game
2. Click and open the station window
3. Close the station window
Result: You can now manipulate both the Station Windows and the Construction ones
petrus 5 Nov, 2021 @ 12:13pm 
Thanks :)
I am going to have some time this weekend, hopefully I'll put together something this weekend :)
VacuumTube  [author] 3 Nov, 2021 @ 1:11pm 
You're welcome! I'm always glad to assist and share my knowledge if that leads to new modders and mods. Especially if this goes so fast like in this case.
So Congratulations for your first mod.
petrus 2 Nov, 2021 @ 4:54pm 
I maaaaaaade it :)
A big, enormous Thank You for your guidance and for pointing me to the right direction.
Here is the screenshot: https://imgur.com/a/x0VZIbD .

I am going to test it for a while locally and then, if you don't mind, publish it here.
I would also add you as co-author.
VacuumTube  [author] 2 Nov, 2021 @ 12:32pm 
So you got actually pretty far :)
You can now read out the id and then check if this is station. For component type use "StationGroup". If so, you access the window via gui.util.getById. Then you can resize.
I do something similar in my mod Advanced Town Builder. There I access the town window. Have a look.
petrus 1 Nov, 2021 @ 4:53pm 
Thanks for the reply.
The output I got from the inspector is "temp.view.entity" followed by a unique ID for each Station. Unfortunately I wasn't able to make the Station resizeable. Any ideas how to make this window a bigger either via resizing or by hardcoding a larger size (I spent the entire weekend tinkering with game settings and couldn't get it working).
I even thought that maybe it's time to surrender because it's impossible but stumbled upon another mod (ID:2449624955) where this was made possible (The station window is 100% bigger).

Thanks again.
VacuumTube  [author] 1 Nov, 2021 @ 10:40am 
Hm... that window will possibly be created on demand... You can find it out with commonAPI Inspector > Events
petrus 31 Oct, 2021 @ 5:27pm 
Hello
Thank you for this. It is especially useful for me for modded train stations - Thanks again :)
I have got also one question.
Have you considered also making the Station Details window re-sizeable ( this window which list all the lines going through a particular station).
I tried to do it myself but failed after couple hours trying to find the exact "ID" for the Station window to pair it with api.gui.util.getById.

Thank you.
VacuumTube  [author] 19 Sep, 2021 @ 2:47pm 
@Enzojz agreed, but this needs definetly a change in the UG parameter system
Enzojz 19 Sep, 2021 @ 8:45am 
Great mod, I think it would be also a welcomed mod to let players to type the values into in slidebar. :)
level2347 19 Sep, 2021 @ 4:59am 
Hi! What mod is it in your screenshots where you can define lenght, slope, radius etc for track constructions? Thanks!
pete_someguy 18 Sep, 2021 @ 10:22pm 
Excellent work. Could you develop a script mod so that the default position of the "buy vehicles" window is to the left hand side of the screen?
Mickey B 18 Sep, 2021 @ 3:40pm 
Thank god! Nice work
dview 18 Sep, 2021 @ 2:33pm 
Again; Thank you!