News:

Congratulations!
 You've won the News Item Lottery! Your prize? Reading this news item! :)

Tutorial - code review

Started by Andarix, May 15, 2025, 01:22:00 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Andarix

Quote from: Yona-TYT on May 15, 2025, 03:00:20 AMOk, I made the necessary changes to the "code_review" branch, and I also had to add another text file to step 7.

https://github.com/simutrans/tutorial_multipak/commit/5f75194943825323b5a53aba19e4cf5c80d5574c
https://github.com/simutrans/tutorial_multipak/commit/0aba71fec34e234ee67d943a0ec8e4d5a386819a



Additional note: The "cov_sw" flag that indicates whether the number of convoys in circulation is correct or not, seems to not be working in "code_review", as a result, when I delete the vehicle, the info in the scene window is no longer coherent.

        if (!cov_sw){
          text = ttextfile("chapter_02/07_3-4.txt")
          text.tx = ttext("<em>[3/4]</em>")

          local tile = my_tile(city2_halt_1[city2_halt_1.len()-1])
          text.stnam = ""+city2_halt_1.len()+") "+tile.get_halt().get_name()+" ("+coord_to_string(tile)+")"

          text.list = create_halt_list(city2_halt_1)
          text.nr = siz
        }




Are you sure it worked before?

cov_sw is initialized to true in scenario.nut.

It is evaluated once in Chapter 2. It is evaluated four times in Chapter 3.

A search of all files did not yield any further entries.

I haven't actually changed anything about that.

Yona-TYT

I need to review all of that. I'd also like to change the text labels to unowned, only in places where they can be used, of course.

@Andarix, I hope this doesn't hinder or harm your work. If so, please let me know, and I'll postpone this for another time.

@Prissi, I'm wondering if it's possible to use unowned text labels on player-owned roads/rails? If so, then I'll open an extension request.

Andarix

Quote from: Yona-TYT on May 16, 2025, 05:49:16 PM...
@Andarix, I hope this doesn't hinder or harm your work. If so, please let me know, and I'll postpone this for another time.
...

I've completed chapters 1 through 3 regarding the changes to the maps.

My tests with pak64 didn't cause any more errors. However, I only tested for correct functionality.

Yona-TYT

#3
There are several changes regarding moving "Follow Vehicle" to step 7: https://github.com/simutrans/tutorial_multipak/commit/0aba71fec34e234ee67d943a0ec8e4d5a386819a

cov_sw was actually a dead variable; the one that should be used in these cases is called correct_cov.
Fix here: https://github.com/simutrans/tutorial_multipak/commit/d6e0b8f54b3628a8eaae7f6cd6a4e0dab06a5cfe


Prissi did some cleanup on the "Schedule" code, and I've now moved her changes to the "code review" branch. Thanks a lot for your input @Prissi 8)
https://github.com/simutrans/tutorial_multipak/commit/73f960d1a577a2e22028388f2253964273989f7e


Edit.

You need to adjust the info in step 6 so that "text.list = create_schedule_list(city1_halt_2)" is used instead of "st1, st2 ...".

Screenshot 2025-05-21 at 12-02-42 .png

Andarix

chapter 5

I've revised the substations a bit and removed various tile definitions. However, the automatic tile search isn't complete yet.

I think we should be a bit more flexible with the post office extensions. Several sets also include post office stops. Therefore, I would rather allow both the extension with a post office building and the extension with a post stop.

The check has been changed so that the stop accepts mail.

Yona-TYT

Quote from: Andarix on May 27, 2025, 02:46:46 PMI think we should be a bit more flexible with the post office extensions. Several sets also include post office stops. Therefore, I would rather allow both the extension with a post office building and the extension with a post stop.


In fact, in pak192.comic's tutorial, the mechanics are a bit different, as it uses a combination of post buildings and post stops. I like the idea of combining both options . 8)

Andarix

Quote from: Yona-TYT on May 21, 2025, 03:38:59 PM...
Prissi did some cleanup on the "Schedule" code, and I've now moved her changes to the "code review" branch. Thanks a lot for your input @Prissi 8)
https://github.com/simutrans/tutorial_multipak/commit/73f960d1a577a2e22028388f2253964273989f7e
...

I think these changes aren't working correctly.

I can no longer create timetables.

However, it works in the release version of the tutorial.

Yona-TYT

Quote from: Andarix on May 27, 2025, 10:40:39 PMI think these changes aren't working correctly.

I can no longer create timetables.

However, it works in the release version of the tutorial.
I tried the first bus and it seems to work fine, where exactly is it failing?.

Andarix

#8
When I buy a vehicle from the depot, the vehicle isn't displayed at the top.

If I switch to the vehicle at the top, I can't access a new route. The timetable window doesn't open, and the field jumps back.

It's time for others to test the new code. Unpack the zip file to [pakset]/scenario and then select "Load Scenario".

errors

Chapter 2 step 4 texts are not correct because this was not changed on the translation page.
[edit]
chapter 2 step 6 1/2 text error halt list


[edit]
delete attaches files

new files here

Andarix

Quote from: Yona-TYT on May 27, 2025, 10:58:54 PMI tried the first bus and it seems to work fine, where exactly is it failing?.

It's possible that all the testing has caused some confusion.

Andarix

#10
bugfix version


[edit]

reupload files


[EDIT 2]

remove files

new files here

Yona-TYT

It seems that this is a bad character, and there may be translation errors because of this.IMG_20250529_084944_251.jpg

Andarix

Quote from: Yona-TYT on May 29, 2025, 12:51:44 PMIt seems that this is a bad character, and there may be translation errors because of this.
...

Then take a look at Simutrans's es.tab.

Simutrans uses this symbol to mark UTF-8 translation files.

Andarix

Quote from: Andarix on May 28, 2025, 07:02:49 AM...
It's time for others to test the new code. Unpack the zip file to [pakset]/scenario and then select "Load Scenario".
....


no feedback = no bugs

 :)

Yona-TYT

Quote from: Andarix on June 07, 2025, 08:38:15 AMno feedback = no bugs

 :)
I haven't had much time to test, I'm afraid 😞

Isaac Eiland-Hall

Quote from: Andarix on June 07, 2025, 08:38:15 AMno feedback = no bugs

 :)

Soooo, if we shut down the forum, no more bugs! :hunts around for the delete command: ;-)

Yona-TYT

Quote from: Andarix on May 28, 2025, 03:17:47 PMIt's possible that all the testing has caused some confusion.
I guess everything's fine here, right?.



I've started changing the label texts to unowned, so far only "class_basic_chapter.nut" has been modified, let me know if you don't have any pending changes so I can proceed with changing this in the chapters.

https://github.com/simutrans/tutorial_multipak/commit/9fe7e541ade4d1ed1c5a0e10932f4d3337e11c65

Andarix

I have no changes at the moment.


Therefore my call to test, so that errors made by me are found.

Yona-TYT


Andarix

#19
The problem is the rotation of the map.


factory_data determines the coordinates at the start of the scenario and is therefore only valid in this orientation.

The factories are also indicated in this orientation.
/**
 *  set tiles for factory
 *
 *  coord_fac_1 - ch1, ch4
 *
 *
 */
coord_fac_1 <- coord(123,160) // Timber plantation
coord_fac_2 <- coord(93,153)  // Saw mill
coord_fac_3 <- coord(110,190) // Construction Wholesaler
coord_fac_4 <- coord(168,189) // Oil rig
coord_fac_5 <- coord(149,200) // Oil refinery
coord_fac_6 <- coord(112,192) // Gas station
coord_fac_7 <- coord(131,235) // Coal mine
coord_fac_8 <- coord(130,207) // Coal power station

In this case, an entry would have to be made in all 4 map orientations in order to take the appropriate one for the determined orientation of the map.


Otherwise the error lies with Simutrans or the script environment, because the changes to the map rotation are not applied correctly.

prissi

Theoretically, the script engine rotates internal coordinates following the rotation. Thus, the same coordinates should apply to rotated maps. It may be that this is lost when reloading.

Yona-TYT

Quote from: prissi on June 23, 2025, 01:00:07 PMThus, the same coordinates should apply to rotated maps. It may be that this is lost when reloading.
That may be because I did rotate the map at the beginning of the tutorial.

Andarix

#22
The problem may lie in the sequence.

The function rename_factory_names() is executed very early and accesses the coords of the factories (coord_fac_1 ....). And these coords are only specified for the start rotation.

This means that the map would have to be rotated to the appropriate rotation when saving and then back to the rotation that was displayed when saving after loading.

Alternatively, the coords of the factories (coord_fac_1 ...) would have to be overwritten and saved.

[EDIT]

I may have a solution.

Yona-TYT

Just like there is a "start_game()" function, maybe a function that is called every time a save is made could help?, although I don't know if this already exists (I don't think so).

prissi

Since the map rotation is saved, and the coordinates in the script are rotated according to this, the only way to mess this up, is when the rotation indicator is manipulated or there is an error in the program.

So how to reproduce the error?

Andarix

Quote from: Yona-TYT on June 25, 2025, 11:25:56 AMJust like there is a "start_game()" function, maybe a function that is called every time a save is made could help?, although I don't know if this already exists (I don't think so).

The question is rather what is saved from the parameters and what is not.

The coordinates are adjusted at runtime. But when loading, the initial coordinates are loaded and then not replaced by the valid ones on the map.

I currently don't know whether it is even possible to query the map orientation via script.

I also noticed now that the 0,0 coordinates of the factories are not in the dialogues but the coordinates of field 0,1. I was of the opinion that field 0,0 was in the dialogues until now.

Quote from: prissi on June 25, 2025, 11:45:43 AM...
So how to reproduce the error?

start the scenario tutorial
rotate map
save
load the save

run to chapter 3

Only the coordinates of the industries seem to be affected.

Yona-TYT

#26
A while ago I made a "rudimentary" function that allows you to know the current rotation, maybe this will help you?.

Note: This is already used in the tutorial


0 = North
1 = West
2 = South
3 = East
  function my_compass()
  {
    local c_max = {x = map_siz.x-1, y = map_siz.y-1}
    local c = coord(0,0)
    local text = c.tostring()

    local res_c = {x = 0, y = 0}
    local ttx = ""
    local siz = text.len()
    for(local j=0;j<siz;j++){
      local tx = format("%c",text[j])
      try {
        tx.tointeger()
      }
      catch(ev) {
        if(tx==","){
          res_c.x = ttx.tointeger()
          ttx = ""
          continue
        }
        continue
      }
      ttx+=tx
      if(j == siz-1){
        res_c.y = ttx.tointeger()
      }
    }
    //gui.add_message("Res: "+ res_c.x +" -- "+res_c.y)
    //gui.add_message("MAX: "+ c_max.x +" -- "+c_max.y)
    if(res_c.x == 0 && res_c.y == 0){
      //gui.add_message("N")
      return 0
    }
    else if(res_c.x == c_max.y && res_c.y == 0){
      //gui.add_message("W")
      return 1
    }
    else if(res_c.x == c_max.x && res_c.y == c_max.y){
      //gui.add_message("S")
      return 2
    }
    else if(res_c.x == 0 && res_c.y == c_max.x){
      //gui.add_message("E")
      return 3
    }
    return null
  }

prissi

There is a property of the map which gets you the current rotation.

But see api_params.cc!!! Dwachs made it that all corrdinate before calls to the simutrans API will be converted to rotated coordinates.

AGAIN: The coordinates in scripts will be rotated before map access. Hence, there should be no need to rotate the parameters, unless you have managed to somehow overwrite the rotations parameter in your savegame. Which should not happen and is an error. (But can be easily restored in a debugger and then saving again.)

Rotating a map should not affect the coordinates at which an object is referred from a script, they should  stay at the same corrdinate. If not, report an error, please.

Andarix



The function rename_factory_names() assembles the array factory_data by going through the factory list of the map and comparing the coordinates with the stored ones (coord_fac_1 - coord_fac_7).

If the map is saved rotated, the coordinates do not match at this point and the factory_data array remains empty. If, on the other hand, the map is rotated 4 times (i.e. back to the original orientation), there are no problems.


What I don't know, however, is whether the current orientation of the map is the same as when it was created.


So there is a error, but I can't localise it.

prissi

In api_factory.cc, the factory constructor will rotate the coordinates
koord pos(x,y);
coordinate_transform_t::koord_sq2w(pos);
fabrik_t *fab =  fabrik_t::get_fab(pos);
if (!fab) {
So even after rotation, the factory coordinates would be the same. The easiest way to fix, would to load the map into simutrans running in a debugger, change the rotation field in the settings to match the coordinates and save it again. I can do that, if you tell me exactly which map needs to be rotated match what.

Andarix

Quote from: prissi on June 26, 2025, 01:06:55 PM...
So even after rotation, the factory coordinates would be the same. The easiest way to fix, would to load the map into simutrans running in a debugger, change the rotation field in the settings to match the coordinates and save it again. I can do that, if you tell me exactly which map needs to be rotated match what.

That won't help.

This is a logic error in the script, i.e. on my part.

The coordinates are adjusted when the map is rotated. However, they do not refer to field 0.0, but move from one corner to the next.

As a result, field 0.0 becomes field 2.0. And then field 2.2 and field 0.2 as you continue to rotate.

However, as the coordinates are always compared with field 0.0, it must go wrong after rotating the map.


Yona-TYT

st4_list and st3_list , they are no longer defined.
Captura desde 2025-06-26 19-41-28.png

Yona-TYT


Andarix

Quote from: Yona-TYT on June 26, 2025, 11:43:01 PMst4_list and st3_list , they are no longer defined.
...

fixed

Yona-TYT

#35
Quote from: Andarix on June 06, 2025, 11:13:22 PMadd in 11720

The graphic is a bit deep and a bit smaller.

Screenshot 2025-06-07 005722.png

I was thinking of extending this to show tool icons as well, although this would require some work on the text.




search_tile_in_tiles() is not defined for class_basic_data.nut, this should fix it and hopefully won't break anything else.

https://github.com/simutrans/tutorial_multipak/commit/e0e8b59b3e2852fab4de327c0948912c4eed5744

Yona-TYT

#36

Andarix


Yona-TYT

#38
https://github.com/simutrans/tutorial_multipak/commit/7d5eca682ecffc83be32058d2f409d081a722c80

Fix inconsistent layer values.




In pak128 the text label indicating where to build the tunnel has incorrect coordinates.

It should be (96,172), but it's set to (95,172).

Line 883 "class_chapter_03.nut"

          if ((!tile.find_object(mo_tunnel))){
            label_x.create(way2_fac2_fac3[2], pl_unown, translate("Place a Tunnel here!."))
            r_way.c =  coord3d(tile.x, tile.y, tile.z)
          }

simscr06.png

Andarix

I changed the coordinates. But now the track can no longer be built on the slope.

Yona-TYT

Quote from: Andarix on July 24, 2025, 03:24:12 PMI changed the coordinates. But now the track can no longer be built on the slope.
We've had that problem before, due to how slopes are handled in pak128 vs pak64.

prissi

The tutorial fails in chapter 7, line 113. "Index href does not exist"

Since I am planning to release somthing working, I would be happy for any hints to solve this.

Andarix

#42
Could you please describe it in more detail (chapter and language)?

I'm not getting any error messages.

[EDIT]

Check that you are using the latest sve file. There must be a bus station next to the train station.

[EDIT 2]

pak64, pak64.german or pak128?

Andarix

#43
for testing

  • extract to [pakset]/scenario/
  • start simutrans (latest revision, better latest nightly)
  • open load scenario
  • select scenario tutorial_multipak

Please not click button Tutorial.


translate page
Important: Do not change the text within { } or these brackets.

[EDIT]

new version https://forum.simutrans.com/index.php/topic,23513.msg211829/topicseen.html#msg211829

Yona-TYT

#44
Code_review should be the main branch in GitHub, don't you think?.

My tests (pak64):

  //Step 11 =====================================================================================
  loc3_name_obj = get_veh_ch3(3)
  loc3_tile = calc_station_lenght(get_veh_ch3(3), get_veh_ch3(6), set_train_lenght(3))
  loc3_load = set_loading_capacity(4)
  loc3_wait = set_waiting_time(4)
There are problems getting the maximum locomotive size, the value of loc3_tile = 1, but it should be 4.

Edit: I've noticed that when you load the save game, the problem disappears, and the train does leave the depot this time, which is strange.  :o
tutorial_multipak_2026-CH3_ST_K.sve


Artifacts in Spanish text; I thought I had fixed this in the translations, but it seems to keep coming back.
simscr01.png

Andarix

#45
Quote from: Yona-TYT on January 03, 2026, 06:04:11 AM...
Artifacts in Spanish text; I thought I had fixed this in the translations, but it seems to keep coming back.
...

This may be due to the chosen font in Simutrans.

Or you may have corrected it in the repository but not on the translation page. The texts are taken from the translation website.

Quote from: Yona-TYT on January 03, 2026, 06:04:11 AM....
There are problems getting the maximum locomotive size, the value of loc3_tile = 1, but it should be 4.

Edit: I've noticed that when you load the save game, the problem disappears, and the train does leave the depot this time, which is strange.  :o
...

The function for calculating or returning the result then seems to malfunction.

The question here is, how did you proceed? Did you use the automatic link function or did you complete it manually as a player?

I've noticed that if the automatic link is clicked too quickly in succession, the script malfunctions.

Quote from: Yona-TYT on January 03, 2026, 06:04:11 AMCode_review should be the main branch in GitHub, don't you think?.

...

Either switch branches or merge them into the main branch.

I would recommend merging, as the review isn't complete yet. The `get_fullway` function is too rigidly tied to the direction of railway construction. This currently prevents industries from utilizing each other in different orientations. And the requirement to always build on the designated field is, in my opinion, not a good design choice.

Yona-TYT

QuoteThe question here is, how did you proceed? Did you use the automatic link function or did you complete it manually as a player?
I built almost everything manually; in the case of vehicles, I use the automated script to create and route the train.

Andarix

Automatic and manual processes use different code. Therefore, it is important to specify the procedure used when encountering errors.

I'm working on ensuring the automatic process only moves to the next step once the current step is complete. This isn't currently the case, which is why errors occur when the process jumps too quickly.


Andarix

#49
chapter 6 step B

I can not start the Airplane. Error by create schedule.

[EDIT]

The extension building cannot be selected.

[EDIT 2]

start Airplane fixed
https://github.com/simutrans/tutorial_multipak/commit/584133381838a4eb7fcb8220659e65d6681784c2

Andarix

#50
chapter 2 step F

Bug create schedule

I don't know why, but in the text, the steps are shown as clicked even though the step hasn't started yet.

Please also test the manual process and not just the automatic one.

[EDIT]

fixed https://github.com/simutrans/tutorial_multipak/commit/34e076f23535c25e5064bf2e51b7d87bf1e8ccb3

Andarix

#51
chapter 5 step D

Bug create ship schedule

Error message: Only road schedules allowed

[EDIT]

fixed https://github.com/simutrans/tutorial_multipak/commit/c9c54dbe52ccd947b011b1dad94da3dd294226cf

Andarix

#52
Except for the construction of the airport extension building, all bugs should be fixed. This can be skipped using the automatic step.

I haven't yet fully tested with pak64.german and pak128.

Furthermore, errors can occur if actions are executed incorrectly. These errors can then lead to further problems.



  • extract to simutrans/pak/scenario/
  • start simutrans (latest revision, better latest nightly)
  • open load scenario
  • select scenario tutorial_multipak

Please not click button Tutorial.


translate page
Important: Do not change the text within { } or these brackets.




new version


Yona-TYT

Simutrans 124.3.1 r11671 did not have this problem, so I suspect that something has broken in the Simutrans code recently.
simscr07.png

prissi

Bridges now require two clicks or dragging. I will investigate. But without setting the flag it works most of the time.

prissi

Which branch is the code to test?


Andarix

Quote from: Yona-TYT on January 06, 2026, 03:01:07 AMSimutrans 124.3.1 r11671 did not have this problem, so I suspect that something has broken in the Simutrans code recently.
simscr07.png

The error occurs when automatic progress is clicked too quickly.

I haven't encountered it while playing normally as a player.

Andarix

#59
Quote from: Yona-TYT on January 06, 2026, 03:01:07 AMSimutrans 124.3.1 r11671 did not have this problem, so I suspect that something has broken in the Simutrans code recently.
simscr07.png

I believe the error occurs because the bridge construction is being carried out again, even though the bridge has already been built.

Screenshot 2026-01-06 095411.png




[EDIT]

I hope this fix the error
https://github.com/simutrans/tutorial_multipak/commit/99fac8b54c2e9bf694b1b6c58a819ea1cc66953b

Yona-TYT

Quote from: Andarix on January 06, 2026, 08:04:10 AMThe error occurs when automatic progress is clicked too quickly.

I haven't encountered it while playing normally as a player.
Certainly, but I'm sure this didn't happen in previous versions of Simutrans; I'll have to investigate to find out which revision was the cause.

Andarix

#61
Earlier versions of the tutorial ran much more sluggishly.

Ultimately, my fix should resolve that.

More importantly, the bug with airport construction needs to be fixed. The construction of extensions buildings worked in earlier versions. I have no idea when that stopped working.


[EDIT]
fix the tool error
https://github.com/simutrans/tutorial_multipak/commit/00610fbc6c4a1c089d10a4de08e063272ee2c96a

I have no idea why extensions have waytype 0.
Unfortunately, the fix also activates the extension buildings in the Special menu.


That's the problem with a lot of testing. You don't play manually; instead, you're tempted to only use the automatic functions.

Yona-TYT

#62
Quote from: Andarix on January 06, 2026, 09:50:20 PMThat's the problem with a lot of testing. You don't play manually; instead, you're tempted to only use the automatic functions.
I didn't get to chapter 6 doing the manual tests, right at that moment a situation arose here and I left the tests at chapter 5 I think.


Edit.
Line 672 , class_chapter_05.nut
                result = translate("Build the transformer here!")+" ("+way5_power[j].tostring()+")."
way5 power is a tile_x, therefore the coordinates are not being processed, you have to convert to coord3d, using "coord3d_to_string(way5_power[j])"

Andarix

#63
new test version

I changed chapter 4 step F passenger ship schedule. Add the Oil rigg.

Defining the number of convoys for the connections is now possible in the class_basic_coords_xxx.


For pak64.german and pak128 change the data in set_data.nut.



  • extract to simutrans/pak/scenario/
  • start simutrans (latest revision, better latest nightly)
  • open load scenario
  • select scenario tutorial_multipak

Please not click button Tutorial.


translate page
Important: Do not change the text within { } or these brackets.

[EDIT]

new version in a more recent post

Andarix

It's strange.

The current code from the repo (tutorial_multipak-code_review.zip) works. If I modify chapter 2 (class_chapter_02.nut), then chapter 2 works correctly. But in chapter 3, the first train (step E) is broken.

As a player, I can't start it.
The train isn't even created using automatic steps.

Andarix

#65
Chapter 3 has a bug with the timetables.

If the passenger train timetable is changed, it is then saved for the first timber train.

[EDIT]

I think fixed


Andarix

chapter 2 step D

chapter_02/goal_step_04.txt


The text about following the convoy is incorrect at this point.

Following vehicles is described again in Chapter 2, Step G 4/4.

chapter_02/07_4-4.txt

Andarix

#68
new test version

I add img icons to the text files (chapter 1 and 2). Please check this.



  • extract to simutrans/pak/scenario/
  • start simutrans (latest revision, better latest nightly)
  • open load scenario
  • select scenario tutorial_multipak

For pak64.german and pak128 change the data in set_data.nut.


Please not click button Tutorial.


translate page
Important: Do not change the text within { } or these brackets.



Yona-TYT

Quote from: Andarix on January 11, 2026, 12:38:57 PMnew test version

I add img icons to the text files (chapter 1 and 2). Please check this.



  • extract to simutrans/pak/scenario/
  • start simutrans (latest revision, better latest nightly)
  • open load scenario
  • select scenario tutorial_multipak

For pak64.german and pak128 change the data in set_data.nut.


Please not click button Tutorial.


translate page
Important: Do not change the text within { } or these brackets.



simscr08.png

Andarix

https://github.com/simutrans/tutorial_multipak/commit/b338cc55bdfe861957a99e6b3e35a6e850b9c89b

reupload

I had actually corrected it and re-uploaded it. Apparently, however, the file wasn't updated in the archive.

Yona-TYT

Excellent work! The tool and menu icons look great; implementing this was a good idea.  8)
 simscr00.png

prissi

Some testing (in English):
1) before building depot: When building a road (by pressing 's' in pak64), I cannot proceed as I cannot build anything. Only by selecting from the toolbar I can proceed. (Contrary to the text, any road seems to work, even the 40 km/h gavel road.)
2) The line step does not mention (in English) that one can copy the convoi. Also it is unclear in which window the new line is to be created.
3) Heap buffer overflow (with address sanitizer) when selecting the last stop in the schedule for the connenction. Error originat from a call from is too allowed 4108 with param = "D\td\x1\x1\x4セセ@Kr\x5\b\x5セセ\x2\x3" I guess so output is generated from this function which is forbidden. Same if jumoping to this step and click on the bus and then on its schedule.

Yona-TYT

Quote2) The line step does not mention (in English) that one can copy the convoi. Also it is unclear in which window the new line is to be created.


For simple vehicles like buses (without trailers, wagons, etc.), I didn't see it as a priority to suggest the copy button at this stage of the tutorial. I thought it was more convenient to use it in Chapter 3, where you have to assemble a passenger train, where this action considerably increases its complexity and using the copy button becomes more indispensable.

Andarix

#74
Quote from: prissi on Yesterday at 02:31:06 AMSome testing (in English):
1) before building depot: When building a road (by pressing 's' in pak64), I cannot proceed as I cannot build anything. Only by selecting from the toolbar I can proceed. (Contrary to the text, any road seems to work, even the 40 km/h gavel road.)
...

Any road has always worked because there's no test for it. The same applies to railway tracks.

If I remember correctly, I already suggested years ago that such information be omitted from the text. That's why there are no speed specifications in the German text.

Include speeds in the text because the tutorial would have to be updated every time the package set was changed. Especially since the text no longer applies to a single package set, it should be as independent of the package set as possible.

I haven't changed the English text because my language skills aren't sufficient.

[EDIT]

The tool ID of the button is checked. If the command is issued via keyboard, the tool ID will differ.


Quote from: prissi on Yesterday at 02:31:06 AM...
3) Heap buffer overflow (with address sanitizer) when selecting the last stop in the schedule for the connenction. Error originat from a call from is too allowed 4108 with param = "D\td\x1\x1\x4セセ@Kr\x5\b\x5セセ\x2\x3" I guess so output is generated from this function which is forbidden. Same if jumoping to this step and click on the bus and then on its schedule.

Could you please post a screenshot of the error message?

The text is unreadable here.

Andarix

#75
Quote from: Andarix on Yesterday at 02:50:25 PM...
[EDIT]

The tool ID of the button is checked. If the command is issued via keyboard, the tool ID will differ.

...

The 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 s a simutrans bug, not a tutprial bug.

Yona-TYT

#76
Quote from: Andarix on Yesterday at 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".

There is certainly a strange discrepancy here with the id_name, even though the road is exactly the same.


This bug on the bridge leaves the tutorial stuck.
simscr00.png