News:

Simutrans Wiki Manual
The official on-line manual for Simutrans. Read and contribute.

Recent posts

#71
Forum / Re: Tutorial Underground railw...
Last post by Isaac Eiland-Hall - August 17, 2026, 11:28:27 PM
oh, I bet I know what it is. I'd had a task to reload apache every hour, but during the last problems I increased that since it was failing. I bet it's still reloading every five minutes and I haven't caught a page load error somehow myself........ maybe this will be solved. Thank you for the report :)
#73
Forum / Re: Tutorial Underground railw...
Last post by Andarix - August 17, 2026, 08:50:49 PM
It simply states rather tersely that the page could not be loaded.

Refreshing the page immediately afterwards loads it successfully.
#74
Patches & Projects / [Script API] Add convoy has_no...
Last post by victor_18993 - August 17, 2026, 06:17:30 PM
Two new Script API methods for convoys have been added to trunk in r12171:

    convoy_x.has_no_route()
    convoy_x.is_stuck()

They expose conditions that Simutrans already tracks internally and already shows in the GUI, but that scenario and AI scripts could not query directly before.

`has_no_route()` returns true only when the convoy is in the engine's NO_ROUTE state.

`is_stuck()` uses the same definition as the GUI and convoy list filter: it returns true only for the two long-wait states that represent a convoy blocked for roughly two months.

This deliberately differs from `is_waiting()`:

- `is_waiting()` can be true for a normal temporary wait, such as waiting at a signal.
- `has_no_route()` identifies a convoy for which route calculation has failed.
- `is_stuck()` identifies a convoy that has remained blocked long enough for the game itself to classify it as stuck.

This allows scenario and AI authors to detect operational convoy problems directly instead of trying to infer them from waiting state, timers or other indirect information.

The implementation is read-only and uses the existing synchronized convoy state. There are no changes to simulation behaviour, savegames or the network protocol.

A permanent regression test also drives a real running convoy into NO_ROUTE by redirecting it to an unreachable road and verifies the new public API.

Integrated in:

    SVN r12171
    ADD: script API predicates for convoy no-route and stuck state

Full regression after integration:

    286 / 286 PASS

Related discussion / original request:
https://forum.simutrans.com/index.php?topic=13473.0
#75
Forum / Re: Tutorial Underground railw...
Last post by Isaac Eiland-Hall - August 17, 2026, 05:38:23 PM
There have been some issues from time to time with performance causing infrequent issues. What would be helpful next time that happens - if you could DM me the error code or error message plus your public IP, I'd be glad to look at anything I can find in the logs on the server. Maybe it's something server-side, and maybe I can fix. Or maybe not. :)
#76
Simutrans Tutorial / Re: Im fixed some minors bugs
Last post by victor_18993 - August 17, 2026, 05:32:07 PM
I investigated the
world.get_cursor_pos() request in more detail, and it turns out that no new API is needed for the bridge tutorial use case.
is_work_allowed_here(pl, tool_id, name, pos, tool) already provides the required interaction data:
tool.start_pos gives the first position of a two-click tool,
pos gives the current/final position being checked, and
tool.is_drag_tool tells whether the second point is pending. I verified this with a real two-click interaction in-game.
Interestingly, this fifth parameter was originally added in r11429/r11430 from your own contribution in 2024. The actual problem was that it was never properly documented: the Script API skeleton still showed four parameters,
scenario_base.nut described only two, and
tool_data_x itself had no useful documentation.
I have now fixed that documentation and integrated it into trunk as r12170. The generated Script API now documents all five parameters and the four fields of
tool_data_x:
start_pos,
is_drag_tool,
is_ctrl and
is_shift. This is documentation-only; no runtime behaviour was changed. 
This also avoids a problem with a generic cursor getter in network games: the mouse pointer is client-local state, while scenario scripts run server-side. The tool interaction data is the safer path because it comes through the normal tool command flow.
So for the tutorial, the intended mapping is now:

start tile -> tool.start_pos

end/current tile -> pos

two-click interaction active -> tool.is_drag_toolThanks again for the original addition — this was really a documentation/discoverability gap rather than missing engine functionality.
#77
Patches & Projects / Re: Modernisation of the Squir...
Last post by victor_18993 - August 17, 2026, 02:55:28 PM
Thank you very much, Yona! 😊

You and Andarix have both been a huge help throughout this migration, and I really appreciate the support and feedback you have given me.

In many ways, though, the hardest and most interesting part starts now. My next goal is to work closely with both of you to identify which engine capabilities script authors actually need, expose them properly through the Script API, and strengthen this whole side of Simutrans.

Without people like you actively creating scenarios, AI and scripted content, it would be impossible to know what the API really needs. So this next stage is something I very much see as a joint effort.
#78
Patches & Projects / Re: Modernisation of the Squir...
Last post by Yona-TYT - August 17, 2026, 02:02:21 PM
Thank you very much, Victor, you are doing an excellent job 🫡
#79
Patches & Projects / Re: Modernisation of the Squir...
Last post by victor_18993 - August 17, 2026, 11:00:52 AM
Thank you, Prissi.
I'm glad the migration is now fully integrated and validated.
I'll keep the follow-up work around the Script API and AI tooling separate, so this migration can remain closed and stable.
#80
Forum / Re: Tutorial Underground railw...
Last post by Andarix - August 17, 2026, 10:45:00 AM
Quote from: wipi35 on August 16, 2026, 09:35:53 AMUnfortunately both URL's don't work :-[

For some time now, the internet seems to be experiencing deliberate interference. Or perhaps the service providers have cut too many corners on hardware. Or, once again, the providers cannot agree on how to handle payment for traffic moving between their networks which becomes a problem when traffic flows more heavily in one direction than the other.

This forum also frequently reports instances where pages fail to load.

It is simply difficult to pinpoint the reason why a particular site is inaccessible.