News:

Do you need help?
Simutrans Wiki Manual can help you to play and extend Simutrans. In 9 languages.

Solution for toolbar arrangement?

Started by FLN, July 01, 2024, 12:44:34 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

FLN

Hi everybody  :)

When I start Simutrans, before doing anything else, I always like to setup my most trusty toolbars first.
I also do pin them down, so I don't close them all when hitting 'del' or 'backspace' mistakenly.
As I play on a rather small screen I do arrange them in a very specific way, so to still maximize the visual map-area left.
That's neat and I'm really happy with the pattern i came up with and it too has something comforting, to first get everything up and running before confronting the next 'challenge'  ;D

Now, since I started playing online too, this 'setting up' can sometimes become a bit of a hustle, since now and then, it can be necessary to repeat this quite frequently (due to connection-issues or less often game crashes).

So I wondered if there's an existing solution for this topic?
Does anybody else experience this 'hustle' and what way have you found to minimize the 'work'  ;D ;D  ?
Is there anything I can do, to 'save' my toolbar-pattern?

I to wondered, if i could code maybe a script tool, to arrange the toolbars in this specific manner?
Note: I'm not a programmer but can do some basic coding and would be willing to put the effort into it, to make it work, if this is even possible with squirrel, for instance.

Searching the forum for similar topics I only found one entry, which is not really what I'm trying to achieve.

Thank you already for your ideas and inputs  ^-^


Yona-TYT

What you say is a script tool that opens multiple windows, positions them in a specific location and pins them?, not a bad idea actually.


And I could try something, but unfortunately I'm terrible at coding for simutrans and the developer @dwahs hasn't been active for a long time I'm afraid.

FLN

Well, if that's the way to go (script), then you got it to the point =)

Is there anything I could do?

Yona-TYT

Quote from: FLN on July 01, 2024, 02:21:50 PMWell, if that's the way to go (script), then you got it to the point =)

Is there anything I could do?
There is no such thing implemented in the script api so in that case I would have to create a new function and that requires some c++ code.

Even though I am familiar with the code, I am not very creative programming for simutras, but I will still try to create something to see how far I can go.

prissi

I think only userside tool may not go together with online playing?

Yona-TYT

Quote from: prissi on July 02, 2024, 12:50:56 AMI think only userside tool may not go together with online playing?
I think script tools also work in online games, I remember it took @dwahs some time to get that working.

FLN

Quote from: Yona-TYT on July 02, 2024, 02:06:34 AMI think script tools also work in online games, ...
I regularly play online, together with Andarix, and he uses script tools. So it seams to work, I guess.


Yona-TYT

Simutrans currently remembers open windows and their position, I wonder if this functionality can be leveraged for this.

prissi

They are stored with the savegame. I principle, one could save them separately. But not all windows are possible with all savegames. Like factory or town info windows depends on a map, and certain toolbars are only active in certain years or even paksets specific.

Probably one could have either
1) A savegame with the window positions
2) A savegame without window positions and instead using the last saved positions
3) Only for the above problem: Save only the window positions for a networkgame and restore them when rejoining a server.

Yona-TYT

Quote from: prissi on July 04, 2024, 12:27:59 PMThey are stored with the savegame. I principle, one could save them separately. But not all windows are possible with all savegames. Like factory or town info windows depends on a map, and certain toolbars are only active in certain years or even paksets specific.

Probably one could have either
1) A savegame with the window positions
2) A savegame without window positions and instead using the last saved positions
3) Only for the above problem: Save only the window positions for a networkgame and restore them when rejoining a server.
So, if it is a separate file to store that data, could you open it with a text editor and modify the values or parameters as you want? that would be great. 🙂

prissi

That file contains the dialog data, hence it would be in a simutrans savegame format.

prissi

It was very easy to add saving of the windows for networkgames when closing simutrans. Added in r11331. Will even restore the windows after desync, if given on the command line "-load net:serverurl"

FLN

This are great news!! Thank you all for your tinkering =)