News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Recent posts

#61
Simutrans Tutorial / Re: Tutorial - mail extension
Last post by Andarix - January 19, 2026, 09:29:43 PM
The conversion is mostly complete, including errors.

If there are free tile, a post office building is required.

If there are no free tile, a post office stop is required.

The waiting area for postal vehicles is being moved to a post office stop.

The selection of the post office building and post office stop is automatic when using automatic progression.

Since I changed the halt fields, saved tutorials no longer work.

chapter_05/04_1-3.txt
#62
Bug Reports / squirrel script - building_des...
Last post by Andarix - January 19, 2026, 03:45:00 PM
Simutrans r11871

Despite specifying Waytype 0, objects with other waytypes are also returned.

list = building_desc_x.get_available_stations(building_desc_x.station_extension, 0, good_desc_x(good))
good is "Post"

pak64
Screenshot 2026-01-19 163650.png

pak64.german
Screenshot 2026-01-19 163112.png
#63
Simutrans Tutorial / Re: Tutorial - mail extension
Last post by Andarix - January 19, 2026, 09:17:08 AM
first beta pak64

- text not changed
- auto step not work - chapter 5 step D

Simutrans r11871

not compatible to older save games (halt coord changed)

[EDIT]
delete file
#64
Bug Reports / Re: squirrel script - bug sele...
Last post by prissi - January 18, 2026, 11:40:35 AM
This is the intended format:
name => object
number => waytype
Only in the later building stages, the object is know, not at the time when the tool is called, since the last waytape is cached with the tool.
#65
Patches & Projects / Re: tool_wayremover_t can be u...
Last post by prissi - January 18, 2026, 11:37:28 AM
Before, there had been actually ways with waytype tram_wt. But I am ok with removing this old code, as now track get converted anyway on pak set loading time.

Using the same driver for removal and adding wayobj sounds sensible to me. But the scenario checker must not be removed.

I added this in r11872
#66
Extension Requests / Re: edit credit per MW of powe...
Last post by prissi - January 18, 2026, 11:09:48 AM
This is a good idea. I would take a patch for it.
#67
Extension Requests / edit credit per MW of powerlin...
Last post by poppo - January 17, 2026, 05:23:06 PM
today, the credit per electric(MW) is fixed as 2 in leitung2.h.
I want to edit it for my paksets.

I suggest that credit per MW can be set and editted in settings.
#68
Patches & Projects / Re: tool_wayremover_t can be u...
Last post by poppo - January 17, 2026, 03:14:52 PM
diff --git a/src/simutrans/tool/simtool.cc b/src/simutrans/tool/simtool.cc
index fdcfd8e5d..41e870b93 100644
--- a/src/simutrans/tool/simtool.cc
+++ b/src/simutrans/tool/simtool.cc
@@ -3826,24 +3826,13 @@ bool tool_build_wayobj_t::init( player_t *player )
 
 bool tool_build_wayobj_t::calc_route( route_t &verbindung, player_t *player, const koord3d& start, const koord3d& to )
 {
- waytype_t waytype = wt;
+ waytype_t waytype = wt==tram_wt? track_wt: wt;
  if(  waytype == decoration_wt  ) {
  waytype = welt->lookup(start)->get_weg(wt)->get_waytype();
  }
- // special treatment for deports, since track electrication cannot "drive" into tram depot
- if(  waytype == track_wt  ) {
- if(  depot_t  *dp = welt->lookup(start)->get_depot()  ) {
- waytype = dp->get_waytype();
- }
- else if(  depot_t  *dp = welt->lookup(to)->get_depot()  ) {
- waytype = dp->get_waytype();
- }
- }
+
  // get a default vehicle
- vehicle_desc_t remover_desc( waytype, 500, vehicle_desc_t::diesel );
- vehicle_t* test_vehicle = vehicle_builder_t::build(start, player, NULL, &remover_desc);
- test_vehicle->set_flag( obj_t::not_on_map );
- test_driver_t* test_driver = scenario_checker_t::apply(test_vehicle, player, this);
+ test_driver_t *test_driver = new way_checker_t(waytype);
 
  bool can_built;
  if( start != to ) {
@@ -5664,10 +5653,8 @@ built_sign:
 bool tool_build_roadsign_t::calc_route(route_t &route, player_t *player, const koord3d &from, const koord3d &to)
 {
  // get a default vehicle
- vehicle_desc_t rs_desc( desc->get_wtyp(), 500, vehicle_desc_t::diesel);
- vehicle_t *test_vehicle = vehicle_builder_t::build(from, player, NULL, &rs_desc);
- test_vehicle->set_flag(obj_t::not_on_map);
- test_driver_t *test_driver = scenario_checker_t::apply(test_vehicle, player, this);
+ waytype_t waytype = desc->get_waytype()==tram_wt? track_wt: desc->get_waytype();
+ test_driver_t *test_driver = new way_checker_t(waytype);
 
  bool can_build = false;
I write and debug it. When we use way_checker_t for build_wayobj, we do not need to care about the depot waytype(tram/track).
#69
Patches & Projects / Re: tool_wayremover_t can be u...
Last post by poppo - January 17, 2026, 01:59:27 PM
I understand what run in 124.3.1.

In 124.3.1, wayremover_t also run on 0km/h way, because it use way_checker_t.
However, we cannot build wayobj on 0km/h way, because it use usual vehicle_t called in vehicle_builder_t::build().
So, I want to use way_checke_t in tool_build_wayobj_t.
#70
Bug Reports / squirrel script - bug select t...
Last post by Andarix - January 16, 2026, 03:55:52 PM
Quote from: Andarix on January 12, 2026, 04:06:29 PMThe idea is correct, but the value is wrong.

The `tool_id` is correct. Only the object name is passed differently.

The name is passed via the button.
The value 1 is passed via the key "s".

Screenshot 2026-01-12 165907.png


Docu function
is_work_allowed_here()

The description doesn't seem to be entirely correct either. There, "name" is defined as "coord3d".

I think this is a simutrans bug, not a tutorial bug.