## News:

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

## Scenario Tutorial pak64

Started by Yona-TYT, June 19, 2020, 04:47:10 AM

0 Members and 1 Guest are viewing this topic.

#### prissi

The secnario I have is in 3 day time. So there is no way you can set it to 5 days. I think you are running in rounding errors. I am asked to set it to 11h 26m. Beware, the ganularity with the three day time setting is different from the 31 day time setting.

1min with three days is 65536/(3*24*60+1)=15.15 long while with 31 days the minite is 65536/(31*24*60+1)=1.468 ... Hence the destination setting need to check with abs(target_value-set_value)<=7 in 3 day format.

EDIT: Also please drop Mr. prissi. Prissi is an online nick and Mr does really not suit it.

#### Yona-TYT

#36
Yes, that must be the problem, I still don't get much of the simutrans code to change it myself. In my script I made a compensation multiplying by 16, but I was certain that I would fail with someone else: "difftick_to_string (wait * (16))"

You have to modify this:`static plainstring difftick_to_string_intern(sint32 f ){    return difftick_to_string( f, false );}`

Edit.
QuoteHence the destination setting need to check with abs(target_value-set_value)<=7 in 3 day format.
If I make that comparison the result is zero: Target = 10571 - Set = 10571 abs = 0

#### prissi

The waiting time is always 65535 ticks per month, but the month length can change! Calling schedule_entry.get_waiting_ticks() returns the time in the current difftick format. Otherwise it has to be shifted by (ticks_per_month-16) or multiplied by (ticks_per_month/655536).

Still the target wait time precision depends on the day per month date format setting. In the 64 scenario it is by default three days per month. Thus no setting can exactly reproduce the value you want. I strongly suggest replaing line 622 nd 822 in the basic file from  "if (entries[nr].wait!=wait)" to "if (abs(entries[nr].wait-wait)>7)".

I have also some other remarks on the tutorial:
The order of the bus stops make the bus travel uneccssary long way and will loose it a lot of money.
It is not allowed to press start with an open schedule, even if the schedule is correct. This is of course possible in game.
Why do you use the copy backward? This is the most useless for the default settings and causes rather problems and congestions. Best to have two lines forwards and backwards.
When starting three convois, one cannot use the copy convoi tool. Why? This is the easiest way to start three of them. But I get the message (only on start) that there must be a single convoi. The text should at least tell about not using copying ...
Why are the stops made public? This is really advanced and not needed for a normal play.
Before complex tunnel construction, maybe a normal tunnel construction exercise might have been better. Maybe on the planks line to the wholesale.

I could not finish the underground construction in the nightly. That part simply does not work, as the tile to click in not visible in sliced underground mode and the tunnel cannot be extended in Underground mode. Making double slopes that way is a nightmare likely nothing a first time player should attempt.

I will test this scenario with my boys later and get further feedback.

#### Yona-TYT

Quote from: prissi on August 14, 2021, 02:18:53 AMStill the target wait time precision depends on the day per month date format setting. In the 64 scenario it is by default three days per month. Thus no setting can exactly reproduce the value you want. I strongly suggest replaing line 622 nd 822 in the basic file from  "if (entries[nr].wait!=wait)" to "if (abs(entries[nr].wait-wait)>7)".
I'm going to try that!.

Quote from: prissi on August 14, 2021, 02:18:53 AMThe order of the bus stops make the bus travel uneccssary long way and will loose it a lot of money.
The order of the bus stops is easy to change.

Quote from: prissi on August 14, 2021, 02:18:53 AMIt is not allowed to press start with an open schedule, even if the schedule is correct. This is of course possible in game.
Well this seems an internal problem in the api (if it were my script it would show a message from the script), I am going to do some tests to confirm.
Quote from: prissi on August 14, 2021, 02:18:53 AMWhy do you use the copy backward? This is the most useless for the default settings and causes rather problems and congestions. Best to have two lines forwards and backwards.
Well I'm going to remove it, although that forces me to change the texts.
Quote from: prissi on August 14, 2021, 02:18:53 AMWhen starting three convois, one cannot use the copy convoi tool. Why? This is the easiest way to start three of them. But I get the message (only on start) that there must be a single convoi. The text should at least tell about not using copying ...
I will change the rule to allow the 3 buses to start.
Quote from: prissi on August 14, 2021, 02:18:53 AMWhy are the stops made public? This is really advanced and not needed for a normal play.
It occurred to me to use public stops because the train stations are public, the reason is simple, I did not want to make chapter 3 more extensive by adding an extra step where the player builds those stations.

Quote from: prissi on August 14, 2021, 02:18:53 AMBefore complex tunnel construction, maybe a normal tunnel construction exercise might have been better. Maybe on the planks line to the wholesale.
Regarding the tunnels, in the pak128 tutorial if there is a previous construction of a tunnel, I will do the same here.
Quote from: prissi on August 14, 2021, 02:18:53 AMI could not finish the underground construction in the nightly. That part simply does not work, as the tile to click in not visible in sliced underground mode and the tunnel cannot be extended in Underground mode. Making double slopes that way is a nightmare likely nothing a first time player should attempt.
The underground construction is a headache, I could never make it work perfectly, even so it does not prevent me from extending in the underground mode (before height 7), for height 7 if it forces me to use the cut mode. Even so I had the hope that others could complete this parter, I suppose I will have to pass it and pass it automatically.

#### prissi

Keep the return ticket then.

About the public stop: You can keep it in if you say way to make it public and that it is quite expensive.

#### Yona-TYT

The problem with cut slopes started here: https://forum.simutrans.com/index.php/topic,20066.msg188523.html#msg188523

It would be great if this was resolved.

#### Yona-TYT

Quote from: prissi on August 14, 2021, 02:36:34 PMKeep the return ticket then.
I did not understand this hehehehe.

Quote from: prissi on August 14, 2021, 02:36:34 PMAbout the public stop: You can keep it in if you say way to make it public and that it is quite expensive.
Okay, I'll update the text to mention that!.

I am currently trying to solve the underground constructions, I would not want to skip the construction of slopes, so I do my best to improve this part of the tutorial.

#### prissi

The underground construction is improved in r10012 and again works better without artefacts I hope. However, a tile more distance to the tunnel portal will make it easier and allows for portals without these edges on top.

#### Yona-TYT

Quote from: prissi on August 15, 2021, 12:16:22 PM
The underground construction is improved in r10012 and again works better without artefacts I hope. However, a tile more distance to the tunnel portal will make it easier and allows for portals without these edges on top.
Exactly that is what I am planning, and thanks to its modification it  you can move forward  with the cut underground mode without problems (in theory).

#### Yona-TYT

#44

@Prissi, I think I have changed most of the things you have indicated to me.

Edit. I have modified the savegame, it should start the scenario again, I recommend that you use the script link to skip the steps / chapters
In underground constructions I have managed to allow extending the tunnel with sliced view and underground mode, I hope it works for you too.

Look at the attached image with the descriptive texts to make public stops.

I will publish a version when the texts are ready and I finish testing everything: https://github.com/Yona-TYT/tutorial_pak64.git

Ok, I have made the following changes:
`[General] Change the check logic for the timeout as you said (Works fine) [Chapter 2] ============================================= =================== Step 4: Change the order of the schedule list for the bus Step 6 The return trip is eliminated Step 6: Now multiple vehicles are allowed in step 6 (of the 3 buses) Step 8: The text is changed and now mentioned the high cost of making public stops. [Chapter 3] Step 6: The construction of the bridge is changed to that of a tunnel. step 8: I have improved the underground constructions, but I still need to do more tests to be satisfied. [Chapter 5] ============================================= =================== Step 4: Change the order of the schedule list for the mail truck`

@Prissi, to use the "Sliced map view" you must keep [Ctrl] pressed to extend the tunnel from the entrance, this is not foreseen since in a normal game this is not necessary, however something is interfering with the tunneling tool and I can not know what it is, it seems an internal problem in simutrans since this did not happen before.

#### Yona-TYT

Quote from: prissi on August 14, 2021, 02:18:53 AMIt is not allowed to press start with an open schedule, even if the schedule is correct. This is of course possible in game.
@Prissi, With script or without script the vehicles are not starting if the vehicle / schedule window is open, unless you switch to another tab.

Before if they did.

#### prissi

Could you elaborate? I could start a tram and a bus with the schedule window open.

#### Yona-TYT

Quote from: prissi on August 16, 2021, 01:55:48 PMCould you elaborate? I could start a tram and a bus with the schedule window open.

#### prissi

This happens only with the scenario. In a normal game I have no problems doing so.

#### Yona-TYT

#49
It's not working for me in normal games for some reason.

Edit. Using SDL2 in Linux.

Maybe you should try just the saveme: https://github.com/Yona-TYT/tutorial_pak64/raw/main/tutorial64.sve

#### Roboron

There seems to be some strings that are not properly translated when calling translate(). See attached image 1.

On chapter_03/01_2-2.txt there are some hardcoded values (production per month), that may or may not be true (they were true for pak128, not for pak64).

Wrong text. Asking me to build a tunnel but the text says bridge. Attached image 2.
At this point I would advice against building a second depot, if possible, and joining the tracks instead. Since every depot increases maintenance costs that's not the best practice...

I got stuck when building the tunnel: At some point I couldn't raise the terrain nor build or destroy tracks: That was game over. The script can't even advance to the next step, lol. Unfortunately I forgot to save the game, but you can look at the screenshots (3 & 4).

I restarted an the second time I was able to continue. But I got stuck at chapter 4, when I couldn't add a new stop for the ferry... This time I have a savefile, if you want. I didn't continue further the tutorial, I'm sleepy by now.

I've updated some texts, both translations and corrections. For example I added missing variables on chapter_03/01_2-2.txt

Quote from: prissi on August 13, 2021, 02:45:17 PMEDIT: Also please drop Mr. prissi. Prissi is an online nick and Mr does really not suit it.

And he is technically a Doctor, so the correct way we should call him is Dr. Prissi!

#### Yona-TYT

#51
Quote from: Roboron on August 21, 2021, 12:03:00 AMThere seems to be some strings that are not properly translated when calling translate(). See attached image 1.
I never knew how to solve that I fear.  :(

Please send me the savegame of your stuck in chapter 4, I'll try to solve the chapter 3.
I have been able to advance without many problems, but you should know that it is recommended to use the "Es: Modo subterraneo por capas", since in the other way it is very tedious at times.

Edit
Well, I went  on the focus   so I found the problem in chapter 3 and resolved it, I have already sent the update, please verify that it works well now.
https://github.com/Yona-TYT/tutorial_pak64/commit/7fbc2ac5eb765984fcb84d955f529aa4cf977dd4

With respect to the Depot, that forced to change the text files, I would like to avoid that as much as possible.

#### Yona-TYT

Quote from: Yona-TYT on August 21, 2021, 12:32:09 AMCita de: prissi en Agosto 13, 2021, 10:45:17 am

EDIT: Also please drop Mr. prissi. Prissi is an online nick and Mr does really not suit it.

And he is technically a Doctor, so the correct way we should call him is Dr. Prissi!

Maybe he prefers Dr. Markus.

#### Roboron

#53
Quote from: Yona-TYT on August 21, 2021, 12:32:09 AMI never knew how to solve that I fear.  :(

Through my magical skills that Saint Prissi gave me when I became a Code/Patcher, I have determined the solution:

==> https://github.com/Yona-TYT/tutorial_pak64/commit/3feebcb21a1f8c6708e467bb32edf846aaa686e4

Quote from: Yona-TYT on August 21, 2021, 12:32:09 AMI found the problem in chapter 3 and resolved it

This time, upon a similar situation, I didn't get stuck. So let's say you may also have such powers for now...

Quote from: Yona-TYT on August 21, 2021, 12:32:09 AMPlease send me the savegame of your stuck in chapter 4, I'll try to solve the chapter 3.

Actually, I was just being a newbie. I was trying to set the stop for the ferry to be the dock tile (151,198), when it should be the tile in front of the dock (152,198). Please don't judge me, I've not yet finished this game's tutorial! :-P (But that may be worth mentioning, or even better if you can highlight the tile)

Another cognitive dissonance: The chapter 3B is called "Building a Tunnel" but I'm being asked to build a bridge instead. You may want to change the name of the chapter.

Quote from: Yona-TYT on August 21, 2021, 01:41:14 AMMaybe he prefers Dr. Markus.

I don't think so, it is also disrespectful, that's like mocking him! Doctor title is to be used with Last Name. It's like when we say "Señor", we say "Señor Pristovsek", not "Señor Markus", for that you use "Don Markus". That  is, unless you use his Full Name, in such a case you can write "Dr. Markus Pristovsek" and he will not be mad at you. But that is much more work...

#### Yona-TYT

#54
Quote from: Roboron on August 21, 2021, 07:21:40 AMThrough my magical skills that Saint Prissi gave me when I became a Code/Patcher, I have determined the solution: ==> https://github.com/Yona-TYT/tutorial_pak64/commit/3feebcb21a1f8c6708e467bb32edf846aaa686e4
Hmmm, I see you have to initialize from the text function as such, well if I find others (There still must be) I will correct them, thank you very much !.

Quote from: Roboron on August 21, 2021, 07:21:40 AMAnother cognitive dissonance: The chapter 3B is called "Building a Tunnel" but I'm being asked to build a bridge instead. You may want to change the name of the chapter.
Fix.

#### Yona-TYT

#55
Quote from: Roboron on August 21, 2021, 12:03:00 AMOn chapter_03/01_2-2.txt there are some hardcoded values (production per month), that may or may not be true (they were true for pak128, not for pak64).
The truth is that this was someone else's idea, but it was only intended for the pak128.

Quote from: Roboron on August 21, 2021, 12:03:00 AMThere seems to be some strings that are not properly translated when calling translate(). See attached image 1.
I have already fixed All text strings.

#### prissi

Sorry, I think I found a new way to break the tutorial. When I am asked to build the bridge, doing it the old way (first a stretch of way using the already selected tool, and then clicking on the bridge tool) hangs the script.

#### Yona-TYT

It was a silly mistake, the start and end variables of the bridge were reversed, so I was checking if the bridge existed but on the opposite slope.

You just have to update your local branch and stay where I am, Thank you very much for finding this, greetings !.
--> https://github.com/Yona-TYT/tutorial_pak64

#### Yona-TYT

@prissi, I can't publish files right now, you can still get the latest version from GitHub.
https://github.com/Yona-TYT/tutorial_pak64
I hope it works well and that you do not forget to include it in the pak64, greetings !.

#### Roboron

Here a proper release was made https://github.com/Yona-TYT/tutorial_pak64/releases/tag/v1.6.20

Scenario Tutorial Pak64 v1.6.20

• Chapter 2, step F: You can now start more than one vehicle at the same time.
• Chapter 2, step F: Removed backward travel.
• Chapter 3, step C: Bridge construction now replaced by tunnel construction.
• Fix (more) issues when building a tunnel.
• Code and text cleaning.
• Minor improvements and bug fixes.

#### Yona-TYT

#60
I share a new version ready for testing.... tutorial-pak64-v1.6.40 beta

Not a valid attachment ID.

Any help with testing welcome!.

At first glance it doesn't seem to have changed much since the last version, but the truth is that I've been working on this for more than a month.

Earring:
- Failed click counter is broken, waiting for: https://forum.simutrans.com/index.php/topic,21981.msg202264/topicseen.html#msg202264
- Some new and obsolete translations are not yet reviewed.

List of changes:

- Reworked underground buildings (should be easier to build now).
- Underground constructions now warn if the underground view is active or the correct level of the layer.
- Fixed many bugs with auto build code.
- Improvements in the logic of checking rails/roads when they are built (the flashing marks that appear and disappear).
- Add coord list to differentiate between the track under construction and the existing ones.
- Improvements in the simutrans/paksets versions analyzer
- Improvements in the failed click counter (But it's still broken).
- Various bug fixes between chapters 2, 3, 4, 5 and 6.

#### prissi

Unclude in the svn, thanks.

#### Yona-TYT

Quote from: prissi on November 20, 2022, 04:49:54 AMUnclude in the svn, thanks.

Or no, wait a moment, there are still things pending, this is just a preview to make tests.

As soon as we solve this I will publish a final version.

#### Mishasama

Quote from: Yona-TYT on November 19, 2022, 02:14:25 AMI share a new version ready for testing.... tutorial-pak64-v1.6.40 beta

Not a valid attachment ID.

Any help with testing welcome!.

At first glance it doesn't seem to have changed much since the last version, but the truth is that I've been working on this for more than a month.

Earring:
- Failed click counter is broken, waiting for: https://forum.simutrans.com/index.php/topic,21981.msg202264/topicseen.html#msg202264
- Some new and obsolete translations are not yet reviewed.

List of changes:

- Reworked underground buildings (should be easier to build now).
- Underground constructions now warn if the underground view is active or the correct level of the layer.
- Fixed many bugs with auto build code.
- Improvements in the logic of checking rails/roads when they are built (the flashing marks that appear and disappear).
- Add coord list to differentiate between the track under construction and the existing ones.
- Improvements in the simutrans/paksets versions analyzer
- Improvements in the failed click counter (But it's still broken).
- Various bug fixes between chapters 2, 3, 4, 5 and 6.
Because of some reason. I am looking for volunteers who can help me update the Pak64.Nightly.

I'm helping to build the Chinese community for now.

#### Yona-TYT

Quote from: Mishasama on November 23, 2022, 04:04:07 AM
I can not replicate this, are you using the last night of simutrans?.

#### Andarix

Steam version ist not the last nightly

#### Yona-TYT

#66
Quote from: Mishasama on November 23, 2022, 04:04:07 AM

Well actually it was a bug, since from sumutrans-v1.123x the compatibility information chapter should be shown, but because a recently added function was wrongly called before and that's why it failed.

Thank you very much for your report, please try again with this   : Not a valid attachment ID.

#### Yona-TYT

Quote from: Andarix on November 23, 2022, 12:09:31 PMSteam version ist not the last nightly
thanks for the clue .

#### Yona-TYT

I share a new version ready for testing.... tutorial-pak64-v1.6.42 beta

Scenario:  tutorialpak64-v1.6.42.zip

Any help with testing welcome!.

A small update to cover the latest changes.

Earring:
- Failed click counter is broken, waiting for: https://forum.simutrans.com/index.php/topic,21981.msg202264/topicseen.html#msg202264
- Some new and obsolete translations are not yet reviewed.

List of changes:

- Reworked underground buildings (should be easier to build now).
- Underground constructions now warn if the underground view is active or the correct level of the layer.
- Fixed many bugs with auto build code.
- Improvements in the logic of checking rails/roads when they are built (the flashing marks that appear and disappear).
- Add coord list to differentiate between the track under construction and the existing ones.
- Improvements in the simutrans/paksets versions analyzer
- Improvements in the failed click counter (But it's still broken).
- Various bug fixes between chapters 2, 3, 4, 5 and 6.
- Fix error when using an old version of simutrans
- Disable debug tab

#### Mishasama

Quote from: Yona-TYT on November 23, 2022, 06:52:21 PM
The same problem says it needs 123.0.2.

If you do nothing after loading the tutorial, you will be prompted for bankruptcy after a while.
I think the tutorial should enable Freeplay mode to avoid this problem.

Because of some reason. I am looking for volunteers who can help me update the Pak64.Nightly.

I'm helping to build the Chinese community for now.