The International Simutrans Forum

Development => Scripting Scenarios and AI => Topic started by: Matthew on April 02, 2024, 07:19:57 PM

Title: Tutorial scenario reports script errors
Post by: Matthew on April 02, 2024, 07:19:57 PM
Steps to reproduce

1. Install Simutrans with pak128.
2. Load the tutorial scenario.
3. Note that all the tabs of the scenario briefing only contain the word "(null)"
4. Click on a building.

Expected result

The building's Info Window opens.

Actual result

The building's Info Window opens and so does an error window reporting "An error occurred within a script!"

Animated example

(https://i.imgur.com/R5RhDSZ.gif)

Setup
Simutrans 123.0.1 r10421
Steam
Kubuntu 22.04

Notes

I was alerted to this problem by this Reddit post (https://www.reddit.com/r/simutrans/comments/1bttzk9/humble_questions_from_a_beginner/) from a new player.

I suspect that the tutorial is supposed to start with some kind of instruction, but it's so long since I've opened it that I'm not certain.

I don't know whether this bug is specific to the Steam version or not; I just happened to have the Steam version installed.

P.S. Nightly not affected?

I tried to reproduce this using the Nightly version provided via Steam, r11101. I could not, but I got a message saying "This Scenario is not compatible with your pakset or version of simutrans."
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on April 03, 2024, 01:17:46 AM
I'm afraid you are using a very old simutras revision, according to the title bar it is using "r10421".

Screenshot_2024-04-02-21-14-33-690_com.android.chrome-edit.jpg
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on April 03, 2024, 01:26:57 AM
QuoteI tried to reproduce this using the Nightly version provided via Steam, r11101. I could not, but I got a message saying "This Scenario is not compatible with your pakset or version of simutrans."


I have a concern with the version comparator, it is possible that it may crash on steam or future versions.


I don't know how to test since I would only know when trying a new version of simutrans.
Title: Re: Tutorial scenario reports script errors
Post by: Matthew on April 03, 2024, 11:02:23 PM
Quote from: Yona-TYT on April 03, 2024, 01:17:46 AMI'm afraid you are using a very old simutras revision, according to the title bar it is using "r10421".

Screenshot_2024-04-02-21-14-33-690_com.android.chrome-edit.jpg

This is 123.0.1, which is the latest official release (https://www.simutrans.com/en/).

According to the scenario.nut file, Steam is distributing tutorial version 1.6.20.

Since they are both older versions, they should work together, shouldn't they?
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on April 05, 2024, 02:45:04 AM
Quote from: Matthew on April 03, 2024, 11:02:23 PMThis is 123.0.1, which is the latest official release (https://www.simutrans.com/en/).

According to the scenario.nut file, Steam is distributing tutorial version 1.6.20.

Since they are both older versions, they should work together, shouldn't they?
Yes they should, but if the version comparison says that it is not compatible, it may be that in that version there was case sensitivity in the version names and pak128 changed to Pak128.
Title: Re: Tutorial scenario reports script errors
Post by: Matthew on May 05, 2024, 09:44:05 PM
I tried to play the tutorial on the new Simutrans 124 r11164 via Steam, running pak128 with tutorial version 1.6.51 beta, but I was unsuccessful:

(https://i.imgur.com/X5LoMUT.png)

This is on Linux.
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on May 05, 2024, 10:04:01 PM
You can change the version in pak128/scenario/tutorial/scenario.nut line 116.

The tutorial in pak64 also contains version 123.0.1 instead of 124.0.

pak192.comic -> 122.0.1
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on May 05, 2024, 10:48:41 PM
Is it really necessary to prevent the tutorial from loading if the game version is more recent?
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 06, 2024, 12:04:38 AM
The expected behavior should be that all versions higher than that are loaded, for some reason this is not fulfilled

I'm going to check, this was really what I was afraid of. :-[

Edit

Unfortunately there was a problem in the text analyzer that determines if the version is correct or not, this is a basic function present in the other tutorials so I had to update all of them.

I feel very sorry for this, since until they update the script in the paksets the tutorial will not work. :-[

https://github.com/simutrans/tutorial_pak64/commit/04859d2b59d8cfed7d3583f91b48633ddecccc6c
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on May 06, 2024, 08:30:54 AM
In many cases, users can also replace one file. Make the file available and indicate where it needs to be saved.

If this file is replaced in the zips of the package sets as soon as possible, that would be an advantage. The package sets do not have to be recreated for this.

Then a reinstallation is enough to fix it.
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on May 06, 2024, 09:59:51 AM
I have updated the tutorial scenarios on Steam.

But this is probably worth a small bugfix release for those paksets.

Nevertheless, players getting paksets through the installer will still install the version released with Simutrans :-(

It would be cool if the installer actually fetched a remote pakset list, so you always install the latest version of a pakset without the need for us to update Simutrans as well. But that's a development for another day.
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on May 06, 2024, 12:08:38 PM
A bug was reported on the steam forums https://steamcommunity.com/app/434520/discussions/0/4357872562129203939/
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 06, 2024, 12:37:41 PM
Quote from: Roboron on May 06, 2024, 12:08:38 PMA bug was reported on the steam forums https://steamcommunity.com/app/434520/discussions/0/4357872562129203939/
It would be great if a savegame was provided to replicate the problem easily.
Title: Re: Tutorial scenario reports script errors
Post by: Matthew on May 06, 2024, 04:41:41 PM
Roboron, thank you for fixing this so quickly.

I have never seen the tutorial before. It's really great to see how cleverly it detects the learner's successes and failures. I have played games from big studios where the tutorial could not do that. Thank you to Dwachs (for the scripting system), Yona (for the tutorial), and anyone else responsible. I think it is a great help to new players, especially on Steam.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 06, 2024, 07:59:47 PM
Quote from: Roboron on May 06, 2024, 12:08:38 PMA bug was reported on the steam forums https://steamcommunity.com/app/434520/discussions/0/4357872562129203939/
I have analyzed the situation and from what it says it seems that the [5/5] section was not displayed. I've already fixed it, I didn't find anything else out of the ordinary.

https://github.com/simutrans/pak128/commit/fcaa31b0434ff870aec0f28479b5ede48ff5eeb9

So far there have only been minor details with the texts, I thank the commands with which I do something similar to automated tests hehehe. :D
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on May 06, 2024, 09:16:26 PM
Fantastic, I've updated the tutorial on Steam once again to include the recent fixes (for pak128 only).
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 06, 2024, 10:36:14 PM
In underground constructions, when the tunnel entrance is placed, it should show:

translate("Press [Ctrl] to build a tunnel entrance here")+" ("+start_tunn.tostring()+".)"
However this stopped working due to some changes in the simutrans code and the way the tunnels are built.


In order to get this working again I'm going to need a new function that lets me know if the [Ctrl] key is pressed.
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on May 08, 2024, 06:20:02 AM
pak64 - 124.0

The class_chapter_07.nut file is different between pak64 SVN and Release Zip file.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 09, 2024, 12:54:18 AM
Quote from: Andarix on May 08, 2024, 06:20:02 AMpak64 - 124.0

The class_chapter_07.nut file is different between pak64 SVN and Release Zip file.
This is strange, but I'm sure Prissi is now using the version directly from github, so there should be no problems next time.
Title: Re: Tutorial scenario reports script errors
Post by: prissi on May 09, 2024, 01:47:57 PM
The language update script now also updates the tutorial of pak64.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 11, 2024, 08:20:15 PM
Quote from: Roboron on May 06, 2024, 09:59:51 AMI have updated the tutorial scenarios on Steam.

But this is probably worth a small bugfix release for those paksets.

Nevertheless, players getting paksets through the installer will still install the version released with Simutrans :-(

It would be cool if the installer actually fetched a remote pakset list, so you always install the latest version of a pakset without the need for us to update Simutrans as well. But that's a development for another day.
I completely agree with that idea, in fact supertux already does it like that! (maybe it's a good idea to look at their code for inspiration), let's hope that's the way forward for simutrans too.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 11, 2024, 11:00:33 PM
Quote from: Andarix on May 05, 2024, 10:04:01 PMYou can change the version in pak128/scenario/tutorial/scenario.nut line 116.

The tutorial in pak64 also contains version 123.0.1 instead of 124.0.

pak192.comic -> 122.0.1

Today I just sent a significant improvement in the function that analyzes simutrans versions, it is much more robust and I hope it will remain functional for many years (unless the version numbering style in simutrans changes).

I have carried out various tests playing with version numbers and simulating all possible cases, but if anyone wants to help with more tests, welcome.

pak64: https://github.com/simutrans/tutorial_pak64/commit/250781ec803cf751419a51b69a197bf2fe734839
pak128: https://github.com/simutrans/pak128/commit/45fba552488b43f72d8ec21ce0672a0ac0db796d
pak192.comic: https://github.com/simutrans/tutorial_pak192.comic/commit/7cd172c5cc92f3b126a3a06a268f9472a543184f
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on May 13, 2024, 07:55:41 PM
Another error (and general feedback) https://steamcommunity.com/app/434520/discussions/0/4358999171570733692/?tscn=1715609064
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 13, 2024, 09:48:58 PM
Quote from: Roboron on May 13, 2024, 07:55:41 PMAnother error (and general feedback) https://steamcommunity.com/app/434520/discussions/0/4358999171570733692/?tscn=1715609064
It seems that there are problems with the coordinates, I thought I had solved them all but it seems that at some point some change in the API broke something, I'm going to investigate.


I think it mentions more problems, but I'll start by fixing this one.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 13, 2024, 10:09:35 PM
There is an error in the text variables in the pak128 tutorial: "chapter_03/08_3-3.txt"

{tx} Set the layer to <em>{lev}</em>, and connect the <em>tunnel</em> {t4} with the other entrance in {t5}.
To:
{tx} Set the layer to <em>{lev}</em>, and connect the <em>tunnel</em> {t1} with the other entrance in {t2}.
Edit.

I have fixed some problems with the list that shows the coordinates and layer levels, the mechanics worked wonderfully but the problem was only the visual part (the displayed texts).


Captura desde 2024-05-13 19-52-48.png


Edit 2.

Chapter 6

"/scenario/tutorial/en/chapter_06/goal.txt"
"/scenario/tutorial/es/chapter_06/goal.txt"

Command Script Link is not in its place.
<p>
{scr}
</p>

Edit 3.

He also discovered one of the strangest bugs that was in the tutorial, this has to do with the coordinates obtained from the city limits.

It seems that the coordinates obtained when the map is rotated are incorrect, to solve this I have had to implement a function to know in which direction the rotation of the current map is located.

https://github.com/simutrans/pak128/commit/9a355ac764d288c363ac9854dbfc70f40a6d5725
https://github.com/simutrans/pak128/commit/41de627c410eda58fb162e4809cf1ac692358692

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
}
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on May 22, 2024, 11:06:26 PM
Completed v1.6.60 testing for all tutorials.

Change Log:

ADD Following Convoys in Chapter 2 Step D
Minor fixes in Chapter 3
Fix Chapter 7
Fix error when get coord form city limits (Chapter 7)
Update simutrans Version and fix string_analyzer()
(Using in Pak192.comic only) New functions to get build and way names

Tutorial-V1.6.60.png

On github you can find the most recent one.

https://github.com/simutrans/pak128/tree/master/pak128.prototype/scenario/tutorial
https://github.com/simutrans/tutorial_pak192.comic
https://github.com/simutrans/tutorial_pak64


Title: Re: Tutorial scenario reports script errors
Post by: prissi on May 27, 2024, 06:26:29 AM
SHould you mess with the toolbar on pak128: The numbers of all toolbars will change shortly, same for pak64 as part of menu restructuring.
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on June 03, 2024, 03:53:02 PM
This is happening again with latest pak128 (nightly, not release)

tmp.png
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 03, 2024, 06:28:05 PM
Is that the Steam version? I tried it last night on Android and the version checker doesn't fail.
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on June 03, 2024, 06:29:45 PM
Yes, it is.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 03, 2024, 07:37:15 PM
Quote from: Roboron on June 03, 2024, 06:29:45 PMYes, it is.
Can you test if it works in the normal version of simutrans? Now I can't use the PC since there is no electricity.

I can only speculate that the version nomenclature is different on simutrans steam.
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on June 03, 2024, 08:18:55 PM
Yes, it also happens with the "normal" version.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 03, 2024, 09:29:29 PM
The stupid "0" in the version was not being recognized as integral, this seems to solve the problem.

https://github.com/simutrans/pak128/commit/48afddd11995b9edd3329bfcf1211a8abeffb417

Please check if this really solves the problem as I can't do it myself right now.
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on June 03, 2024, 09:38:19 PM
tmp.png
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 03, 2024, 09:53:18 PM
Quote from: Roboron on June 03, 2024, 09:38:19 PMtmp.png
I can't see this picture 


404 File Not Found  :-[
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 03, 2024, 10:07:31 PM
I had forgotten to add elsewhere, there should no longer be non-integral values in the arrays.

https://github.com/simutrans/pak128/commit/9fe7195674f5e47898b09be6ce69be1405e6848c


I'm making minor modifications from my phone so I can't test well.

Edit.
I had to fix the logic.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 04, 2024, 12:42:43 AM
Well, actually something curious was happening, the logic I had worked with the official versions and not with the nightly versions, but never with both at the same time.  :o

Now I have improved that logic.  ;)

https://github.com/simutrans/pak128/commit/dbbe6567ec942597df3de6ded56de1ea5ed95f01


Thanks for your help with the tests. ;D

Please try again and verify with official release and night
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on June 04, 2024, 12:50:28 PM
It works now with both version :-)

But will it work when the version is increased again?
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 04, 2024, 02:15:43 PM
Quote from: Roboron on June 04, 2024, 12:50:28 PMIt works now with both version :-)

But will it work when the version is increased again?
Yes, in fact it already worked before, but I made a modification so that it worked with the nightly versions but clumsily that messed up the verification for official versions.


I had a really bad time fixing this, 😞 but I think it should work fine now.


Edit.
Quote from: Roboron on June 04, 2024, 12:50:28 PMBut will it work when the version is increased again?
Maybe an experiment with making compilations with modified versions can clarify those doubts
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 05, 2024, 07:44:59 PM
Again, the values ��were being passed as String and that caused problems when the values ��were conditioned.

Fixed: https://github.com/simutrans/pak128/commit/bd8cbabff983059f93ae603e9343103a82dbf1aa


Edit.

Fixed in pak64 y pak192.comic
https://github.com/simutrans/tutorial_pak64/commit/531f3b2277de2812f55610cafc1160b98a4dbf9a

https://github.com/simutrans/tutorial_pak192.comic/commit/5c469794c26d07ab4dcc32ea50b744f3aba4c953

Title: Re: Tutorial scenario reports script errors
Post by: prissi on June 23, 2024, 09:07:55 AM
The pak64 tutorial is working less than ever. Now, after clicking "this is a >>link" (just ">>link" would work much better in most languages) I am asked to build a railway for wood. But I should click on "{pos2}"

Please give a zip of a working tutorial, as the one on your github does not work. (I downloaded https://github.com/Yona-TYT/tutorial_pak64/archive/refs/heads/main.zip)
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 24, 2024, 01:21:23 PM
Quote from: prissi on June 23, 2024, 09:07:55 AMI am asked to build a railway for wood. But I should click on "{pos2}"
The wood train is working well, I have had no problems getting to this point.

Could it be that you are using an old version of the tutorial?.

try here: tutorial_pak64.zip

Captura desde 2024-06-24 08-54-42.png



Quote from: prissi on June 23, 2024, 09:07:55 AM(just ">>link" would work much better in most languages)

Good idea, I think this can be changed from the translator.  8)
Title: Re: Tutorial scenario reports script errors
Post by: prissi on June 25, 2024, 12:40:37 AM
Then please state where to find the most recent version of the tutorial.  https://github.com/Yona-TYT/tutorial_pak64 main does not work. Have I to use a branch?
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 25, 2024, 12:50:26 AM
I use the repo from the simutrans organization on Github, I don't know why the main one doesn't work, I don't know what I should do, I would like to leave only the repo from the simutrans organization on Github.
Title: Re: Tutorial scenario reports script errors
Post by: prissi on June 25, 2024, 07:03:25 AM
OK, somehow some files were missing from the copy. pak64 should work now.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 25, 2024, 12:29:03 PM
Quote from: prissi on June 25, 2024, 07:03:25 AMOK, somehow some files were missing from the copy. pak64 should work now.
It's a relief to read that. :)
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on June 30, 2024, 11:12:07 PM
This is a proof of concept or a rough draft of how the menus in chapter 2 of the tutorial would look using the new hide menus feature.

Please let me know what you think about it.

tutorial_pak64-test2.zip
Captura desde 2024-06-30 19-09-00.png
Title: Re: Tutorial scenario reports script errors
Post by: Roboron on September 25, 2024, 10:12:13 AM
Another bug of the scenario was reported on Steam https://steamcommunity.com/app/434520/discussions/0/4843148117772753026/
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 07, 2024, 12:03:34 PM
Quote from: Roboron on September 25, 2024, 10:12:13 AMAnother bug of the scenario was reported on Steam https://steamcommunity.com/app/434520/discussions/0/4843148117772753026/
It's not a code error, it's just that in the Steam version the texts are not updated. Remember that there is a new action which is "Follow the Vehicle".
Edit:

Captura de pantalla -2024-10-07 08-45-00.png
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 10, 2024, 04:21:14 PM
Tutorial for pak128 has also been updated to show disabled tools, following @prissi's recommendations to not remove tools from menus.

tutorial_pak128-v1.6.70.zip

Captura de pantalla -2024-10-10 12-20-08.png
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 12, 2024, 08:20:53 PM
chapter_02/goal_step_01.txt

The km/h specifications no longer match those in pak64 124.2.2.

At the time of the tutorial there is no 50 km/h road.

The marking of the streets before the construction of the depot also does not seem to be working correctly.
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 14, 2024, 10:51:10 PM
class_chapter_03.nut

line 66
  c_way3 = {a = coord3d(106,158,-1), b = coord3d(96,151,1), dir = 6}  //Inicio, Fin de la via y direccion(fullway)

The field at a should be 102,158,0.

106,158,-1 is the starting square for the construction of the bridge.

line 58
  c_brge1 = {b = coord(106,158), a = coord(103,158)}
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 14, 2024, 11:44:51 PM
Quote from: Andarix on October 14, 2024, 10:51:10 PMclass_chapter_03.nut

line 66
  c_way3 = {a = coord3d(106,158,-1), b = coord3d(96,151,1), dir = 6}  //Inicio, Fin de la via y direccion(fullway)

The field at a should be 102,158,0.

106,158,-1 is the starting square for the construction of the bridge.

line 58
  c_brge1 = {b = coord(106,158), a = coord(103,158)}

Yes, that was because I had a lot of problems with that bridge, even @Prissi broke the script right there, there was always the possibility that the rails would not connect to the bridge.

However, that is in the past and I think changing the coordinates should not cause problems:
https://github.com/simutrans/tutorial_pak64/commit/dca6f09c3f928a40510f49f6d8a9e80145deffc6
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 14, 2024, 11:53:38 PM
Quote from: Andarix on October 12, 2024, 08:20:53 PMchapter_02/goal_step_01.txt

The km/h specifications no longer match those in pak64 124.2.2.

At the time of the tutorial there is no 50 km/h road.

Is "25 km/h to 130 km/h" ok? I could also get the values dynamically but I'm too lazy  ;D .



Quote from: Andarix on October 12, 2024, 08:20:53 PMThe marking of the streets before the construction of the depot also does not seem to be working correctly.
Are you referring to the orange markings? I think it has to do with the flashing delay. Is there a way to create delays in milliseconds?, That would be great 8) .
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 15, 2024, 06:27:40 AM
Quote from: Yona-TYT on October 14, 2024, 11:53:38 PM...
Are you referring to the orange markings? I think it has to do with the flashing delay. Is there a way to create delays in milliseconds?, That would be great 8) .

The sidewalk covers the marking at the edge of the field.



Quote from: Yona-TYT on October 14, 2024, 11:53:38 PMIs "25 km/h to 130 km/h" ok? I could also get the values dynamically but I'm too lazy  ;D .
...

I would generally avoid such fixed information, especially given that the paksets different.

the following should be sufficient
QuoteThere are different roads with different maximum speeds.
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 15, 2024, 10:03:56 PM
chapter_03/08_4-5.txt

The change of level in the tunnel directly at the portal is somewhat unfavorable.

map 180° rotate
Screenshot 2024-10-15 235726.jpg
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 15, 2024, 10:57:29 PM
Quote from: Andarix on October 15, 2024, 10:03:56 PMchapter_03/08_4-5.txt

The change of level in the tunnel directly at the portal is somewhat unfavorable.

map 180° rotate
Screenshot 2024-10-15 235726.jpg
The solution was simple, just decrement 1 value in each coord x of the list, try again :) :

https://github.com/simutrans/tutorial_pak64/commit/defbb7a31c30c183b72c380b0e5e24b99998685b

Edi.

Quote from: Andarix on October 15, 2024, 06:27:40 AMI would generally avoid such fixed information, especially given that the paksets different.

Also updated the text about roads/tracks:

https://github.com/simutrans/tutorial_pak64/commit/6e30f1eb4e2ae8ab2690dda3ae523043dde4c27f
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 16, 2024, 09:11:01 AM
124.2.2 r11400 and 124.2.3 r11422 - pak64 tutorial from Git repo

Screenshot 2024-10-16 110955.jpg
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 16, 2024, 01:01:07 PM
Quote from: Andarix on October 16, 2024, 09:11:01 AM124.2.2 r11400 and 124.2.3 r11422 - pak64 tutorial from Git repo

Screenshot 2024-10-16 110955.jpg
How clumsy of me, I forgot to update scenario.nut as well, please update and try again:
https://github.com/simutrans/tutorial_pak64/commit/232d72f8d0484858e5ce98d080a0f67b269a9210#diff-3568f64b9cd2f0a269e9320c00f268f721bf2dc5f7ba8c8514b3060c6b1f2df7R93
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 16, 2024, 01:43:27 PM
chapter_03/08_4-5.txt

When raising the track to level 7 the text changes incorrectly. It is possible that this is a consequence of yesterday's field change.

Screenshot 2024-10-16 153551.jpg



chapter_03/08_5-5.txt

mmh, you're supposed to connect the tunnel entrance to yourself?

Screenshot 2024-10-16 154837.jpg
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 16, 2024, 02:56:25 PM
Quote from: Andarix on October 16, 2024, 01:43:27 PMchapter_03/08_4-5.txt

When raising the track to level 7 the text changes incorrectly. It is possible that this is a consequence of yesterday's field change.

Screenshot 2024-10-16 153551.jpg



chapter_03/08_5-5.txt

mmh, you're supposed to connect the tunnel entrance to yourself?

Screenshot 2024-10-16 154837.jpg

Is fix here:
https://github.com/simutrans/tutorial_pak64/commit/392a1bfffcbabf313230697931696473b1bb2b3d
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 17, 2024, 02:08:51 PM
chapter_03/goal_step_11.txt

The specified stopping fields (same fields there and back) are not suitable for efficient train operation, since the trains will make a full circuit through the signals for each stop.

Screenshot 2024-10-17 160405.jpg



Another mistake is clicking on copy. It only needs to be done twice to get 3 moves and not 3 times as stated.

I assumed that the Spanish texts were the most current. However, this does not seem to be the case as the English texts differ.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 17, 2024, 04:37:04 PM
Quote from: Andarix on October 17, 2024, 02:08:51 PMchapter_03/goal_step_11.txt

The specified stopping fields (same fields there and back) are not suitable for efficient train operation, since the trains will make a full circuit through the signals for each stop.

Screenshot 2024-10-17 160405.jpg
You say I should remove stations 6, 7 and 8 from the schedule?.

Quote from: Andarix on October 17, 2024, 02:08:51 PMAnother mistake is clicking on copy. It only needs to be done twice to get 3 moves and not 3 times as stated.

Screenshot 2024-10-17 at 12-32-48 SimuTranslator - Editar traducción del objeto.png
https://github.com/simutrans/tutorial_pak64/commit/8729b22edec750e3aacf4fa35c4bac25c03181cb

Quote from: Andarix on October 17, 2024, 02:08:51 PMI assumed that the Spanish texts were the most current. However, this does not seem to be the case as the English texts differ.
Unfortunately the texts in pak64 tutorial have not been reviewed too much, I think you are one of the first to do a thorough review.  ;)


Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 17, 2024, 04:49:05 PM
Quote from: Yona-TYT on October 17, 2024, 04:37:04 PMYou say I should remove stations 6, 7 and 8 from the schedule?.
...

No.

You enter coordinates in the list. If you click on these, a message appears on the way back saying that it should be a different field.

I would find it less confusing if the list contained the coordinates for the stopping fields.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 17, 2024, 05:23:19 PM
Quote from: Andarix on October 17, 2024, 04:49:05 PMNo.

You enter coordinates in the list. If you click on these, a message appears on the way back saying that it should be a different field.

I would find it less confusing if the list contained the coordinates for the stopping fields.
It is fix here:
https://github.com/simutrans/tutorial_pak64/commit/daa21789ee5d781106ec54935aa08c988482ccd0
https://github.com/simutrans/tutorial_pak64/commit/0685ad1c311c42b6f3e7381f643dbf55ae0f5bf8
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 19, 2024, 05:49:56 AM
tool_alias not translated in pak64 tutorial

pak64 scenario.nut line 87
// placeholder for tools names in simutrans
tool_alias  <- {inspe = "Abfrage", road= "ROADTOOLS", rail = "RAILTOOLS", ship = "SHIPTOOLS", land = "SLOPETOOLS", spec = "SPECIALTOOLS"}


pak128 scenario.nut line 120
// placeholder for tools names in simutrans
tool_alias  <- {inspe = translate("Abfrage"), road= translate("ROADTOOLS"), rail = translate("RAILTOOLS"), ship = translate("SHIPTOOLS"), land = translate("SLOPETOOLS"), spec = translate("SPECIALTOOLS")}

translate remove here
https://github.com/simutrans/tutorial_pak64/commit/e78f814ab481b249f21648c416b7645be1b8ab40#diff-3568f64b9cd2f0a269e9320c00f268f721bf2dc5f7ba8c8514b3060c6b1f2df7 (https://github.com/simutrans/tutorial_pak64/commit/e78f814ab481b249f21648c416b7645be1b8ab40#diff-3568f64b9cd2f0a269e9320c00f268f721bf2dc5f7ba8c8514b3060c6b1f2df7)
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 19, 2024, 06:15:34 AM
Quote from: Andarix on October 19, 2024, 05:49:56 AMtool_alias not translated in pak64 tutorial

pak64 scenario.nut line 87
// placeholder for tools names in simutrans
tool_alias  <- {inspe = "Abfrage", road= "ROADTOOLS", rail = "RAILTOOLS", ship = "SHIPTOOLS", land = "SLOPETOOLS", spec = "SPECIALTOOLS"}


pak128 scenario.nut line 120
// placeholder for tools names in simutrans
tool_alias  <- {inspe = translate("Abfrage"), road= translate("ROADTOOLS"), rail = translate("RAILTOOLS"), ship = translate("SHIPTOOLS"), land = translate("SLOPETOOLS"), spec = translate("SPECIALTOOLS")}

translate remove here
https://github.com/simutrans/tutorial_pak64/commit/e78f814ab481b249f21648c416b7645be1b8ab40#diff-3568f64b9cd2f0a269e9320c00f268f721bf2dc5f7ba8c8514b3060c6b1f2df7 (https://github.com/simutrans/tutorial_pak64/commit/e78f814ab481b249f21648c416b7645be1b8ab40#diff-3568f64b9cd2f0a269e9320c00f268f721bf2dc5f7ba8c8514b3060c6b1f2df7)
There is a problem with the translations of those names that I could not solve, for some reason when changing the language the text is not translated.

Curiously, the table for the names of load types is being translated correctly.

I must investigate this problem further.

Edit.
Well it seems that I only have to translate them when the text is processed.
text.tool1 = translate(tool_alias.inspe)
text.tool2 = translate(tool_alias.road)
text.tool3 = translate(tool_alias.spec)
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 19, 2024, 06:27:41 AM
Quote from: Yona-TYT on October 19, 2024, 06:15:34 AMThere is a problem with the translations of those names that I could not solve, for some reason when changing the language the text is not translated.
...

This is probably because this file is only read at startup.

I assume that the language will rarely be changed during the tutorial.
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 19, 2024, 06:31:43 AM
Quote from: Andarix on October 19, 2024, 06:27:41 AMThis is probably because this file is only read at startup.

I assume that the language will rarely be changed during the tutorial.
https://github.com/simutrans/tutorial_pak64/commit/e1b82510bca0a66201c92c50fd56182f7ff69ea9
Title: Re: Tutorial scenario reports script errors
Post by: Andarix on October 19, 2024, 10:48:14 AM
chapter_03/02_1-3.txt

I think the field position should be 102,168,2 and not 107,158.

Screenshot 2024-10-19 124435.jpg

[edit]

Sorry, this is a text change by me.

<p>
Bauen Sie das Bahngleis von {cbor} nach {w2}.
</p>
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 19, 2024, 01:26:20 PM
Quote from: Andarix on October 19, 2024, 10:48:14 AMchapter_03/02_1-3.txt

I think the field position should be 102,168,2 and not 107,158.


Due to a bug with 3d coordinates, I was not confident using coord3d for links before.

Now I can do this without problems  8) :
                local c1 = c_way1.a.href("("+c_way1.a.tostring()+")")
                local c2 = c_way1.b.href("("+c_way1.b.tostring()+")")
                local c3 = c_way3.a.href("("+c_way3.a.tostring()+")")
                local c4 = c_way3.b.href("("+c_way3.b.tostring()+")")

Edit.

It is fix here:
https://github.com/simutrans/tutorial_pak64/commit/7fbed4e23863a56bda671cbb7dc2540d1ba9db77
Title: Re: Tutorial scenario reports script errors
Post by: Yona-TYT on October 19, 2024, 02:01:01 PM
Quote from: Andarix on October 19, 2024, 10:48:14 AMSorry, this is a text change by me.

Code Select Expand
<p>
Bauen Sie das Bahngleis von {cbor} nach {w2}.
</p>
Well, the person translating has the freedom to choose which variables to use there. ;)