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

Previous topic - Next topic

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


Thank you very much for your comments!. ;D
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!.  8)

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.  8)


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.  ;D

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). :P

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  :lightbulb: on the focus :lightbulb:  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.  8)

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.  8)

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. :P 

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 !.  8)
--> 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 2, step H: Added explanatory text about public stops.
  • Chapter 3, step C: Bridge construction now replaced by tunnel construction.
  • Fix (more) issues when building a tunnel.
  • Add jump_to_link_executed function.
  • Code and text cleaning.
  • Minor improvements and bug fixes.