The International Simutrans Forum

 

Author Topic: A tool to execute squirrel script  (Read 5921 times)

0 Members and 1 Guest are viewing this topic.

Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #70 on: December 21, 2020, 06:39:03 PM »
A lot of information can be processed with the script function.

Unfortunately, their output in the message window is somewhat limited.
On the one hand, no line breaks are possible and the text length is also limited. A separate output window would be better, which also allows the formatting of the help.

Alternatively, line-by-line output directly from the script tool should be enabled.

A direct execution upon selection would still be helpful. At the moment you have to click somewhere on the map.

The attached script shows the profit and total assets of all players in the message window (provided the text is long enough).



A global script tool directory (simutrans/script/tools) would also be nice. Then the scripts did not always have to be copied into each package.
« Last Edit: December 21, 2020, 06:49:43 PM by Andarix »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1584
    • Simutrans-BLOG
  • Languages: ES
Re: A tool to execute squirrel script
« Reply #71 on: December 21, 2020, 06:53:29 PM »
If a wt_road Halt extensions building has a building, then these are not removed.

And the name and messages should be adapted.

I only thought about eliminating bus stops, not extension buildings.

I have to check those messages.


Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #72 on: December 22, 2020, 06:04:58 PM »
Is it possible that the cursor is also displayed in the load script tool dialog?

Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #73 on: December 22, 2020, 08:26:40 PM »
tool to check overrowded passenger stops -> output message window

click on halt, then check connected halts

click out of halt, then check all halts on map



I use halt_x::get_waiting(), which returns all waiting goods. I don't know whether it is possible to query the waiting passengers.

That is why stops with overcrowded goods and mail are also listed.

remove attached files
download latest version
« Last Edit: December 25, 2020, 03:22:53 PM by Andarix »

Offline Dwachs

  • DevTeam, Coder/patcher
  • Administrator
  • *
  • Posts: 4849
  • Languages: EN, DE, AT
Re: A tool to execute squirrel script
« Reply #74 on: December 23, 2020, 10:04:07 AM »
Is it possible that the cursor is also displayed in the load script tool dialog?
What do you mean? Which cursor do you want to have displayed?

Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #75 on: December 23, 2020, 01:39:24 PM »
left via load dialog

right by button in the menu


Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1584
    • Simutrans-BLOG
  • Languages: ES
Re: A tool to execute squirrel script
« Reply #76 on: December 23, 2020, 03:06:29 PM »
Something that I would love is a customizable window that works in conjunction with sccript tools.

My idea is to create lists of objects, coordinates, factories or anything else, Configure each row of the list some button (it can be an action button or a button to go to an X coordinate or a selection button).

As an example of a concept it can be a tool that allows to replace all the bus stops in a city and allow the player to choose the new stop.

It would work as follows: The new window is configured to show a list of available bus stops each row with a unique select button, this will allow the player to choose a bus stop which will be used to replace all stops existing in a city.

Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #77 on: December 23, 2020, 07:11:53 PM »
tool to check overrowded passenger stops -> output message window

click on halt, then check connected halts

click out of halt, then check all halts on map



I use halt_x::get_waiting(), which returns all waiting goods. I don't know whether it is possible to query the waiting passengers.

That is why stops with overcrowded goods and mail are also listed.

update

Stations with no passenger volume are no longer listed.

Stations with passengers and overcrowded goods, on the other hand, are still listed, even if the passengers are not overcrowded.

remove atached files
download latest version
« Last Edit: December 25, 2020, 03:23:28 PM by Andarix »

Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #78 on: December 23, 2020, 10:09:41 PM »
translate tooltip and title

« Last Edit: December 25, 2020, 03:23:55 PM by Andarix »

Offline Andarix

  • *
  • Posts: 248
  • Languages: de
Re: A tool to execute squirrel script
« Reply #79 on: December 25, 2020, 03:25:05 PM »
fixed version from check passenger station overcrowded

download here