Transport Fever 2

Transport Fever 2

Resizable Parameter Window
28 条留言
[3.19]Icemaster 2023 年 2 月 4 日 上午 10:19 
merci
VacuumTube  [作者] 2023 年 2 月 4 日 上午 10:11 
fixed
[3.19]Icemaster 2023 年 1 月 19 日 下午 10:25 
hey. doesnt seem to work with teh new beta
yuriyland 2022 年 5 月 5 日 下午 2:09 
Fantastic, I really miss this now ... where to download? I haven't seen anything like it on Steam
petrus 2022 年 5 月 5 日 下午 12:35 
"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  [作者] 2022 年 5 月 5 日 上午 10:44 
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 2022 年 5 月 4 日 上午 7:23 
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 2022 年 5 月 4 日 上午 7:23 
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 2022 年 5 月 3 日 下午 4:30 
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  [作者] 2022 年 5 月 3 日 下午 1:13 
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 2022 年 5 月 2 日 下午 5:58 
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 2021 年 12 月 4 日 上午 9:27 
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 2021 年 12 月 4 日 上午 9:27 
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 2021 年 11 月 5 日 下午 12:13 
Thanks :)
I am going to have some time this weekend, hopefully I'll put together something this weekend :)
VacuumTube  [作者] 2021 年 11 月 3 日 下午 1:11 
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 2021 年 11 月 2 日 下午 4:54 
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  [作者] 2021 年 11 月 2 日 下午 12:32 
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 2021 年 11 月 1 日 下午 4:53 
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  [作者] 2021 年 11 月 1 日 上午 10:40 
Hm... that window will possibly be created on demand... You can find it out with commonAPI Inspector > Events
petrus 2021 年 10 月 31 日 下午 5:27 
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  [作者] 2021 年 9 月 19 日 下午 2:47 
@Enzojz agreed, but this needs definetly a change in the UG parameter system
VacuumTube  [作者] 2021 年 9 月 19 日 下午 2:45 
Enzojz 2021 年 9 月 19 日 上午 8:45 
Great mod, I think it would be also a welcomed mod to let players to type the values into in slidebar. :)
level2347 2021 年 9 月 19 日 上午 4:59 
Hi! What mod is it in your screenshots where you can define lenght, slope, radius etc for track constructions? Thanks!
pete_someguy 2021 年 9 月 18 日 下午 10:22 
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 2021 年 9 月 18 日 下午 3:40 
Thank god! Nice work
dview 2021 年 9 月 18 日 下午 2:33 
Again; Thank you!