The International Simutrans Forum

 

Author Topic: Pak128 Scenario Tutorial  (Read 40568 times)

0 Members and 1 Guest are viewing this topic.

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #140 on: September 27, 2019, 06:58:23 AM »
chapter 6

Building 4 transformers but only connecting 2 is confusing.


Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #141 on: September 27, 2019, 02:28:52 PM »
Quote
But that was not changed in the mission text. There is a display of 431/90 transported passengers.

This number of buses is unsuitable as a condition. You speak of network. A network consists of several lines. But they only count the buses of a line.
Do you mean that it is better not to limit the number of vehicles? , although automating that is going to take time since I have to do a lot of tests.


Quote
That's wrong. There is no 2nd bus to start.

It's my mistake, there are actually 2 vehicles for step 2.


Quote
chapter 6

Building 4 transformers but only connecting 2 is confusing.
This part is still in development, I cannot solve this since there is no function that allows me to know if a transformer is electrified.

Another problem is that the "get_power ()" energy values do not accumulate correctly, I mean they return to zero "0" before the month ends.

You can see the discussion here: https://forum.simutrans.com/index.php/topic,19254.0.html

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #142 on: September 27, 2019, 11:26:10 PM »
I have slightly revised chapter_03.nut.

unused text files removed


Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #143 on: September 28, 2019, 10:29:51 AM »
I have slightly revised chapter_03.nut. unused text files removed
Wow I'm surprised, thank you very much for your help friend.  ;D

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #144 on: September 28, 2019, 12:21:15 PM »
chapter 05 step 1



EDIT

chapter 5 step 2

can not public the stop

reload then works

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #145 on: September 28, 2019, 06:11:12 PM »
this should solve the problem.
Code: [Select]
function cov_pax(c, wt, good){
        local halt = tile_x(c.x, c.y, c.z).get_halt()
        local cov_nr = 0
        if(halt) {
            local cov_list = halt.get_convoy_list()
            foreach(cov in cov_list) {
                if (cov.get_waytype()!=wt)
                    continue
                local cov_good = cov.get_goods_catg_index()
                for(local j=0;j<cov_good.len();j++){
                    if(cov_good[j]==good)
                        cov_nr += cov.get_transported_goods()[0]
                }
            }
            local lin_list = halt.get_line_list()
            foreach(line in lin_list) {
                local cov_lin = line.get_convoy_list()
                foreach(cov in cov_lin) {
                    if (cov.get_waytype()!=wt)
                        continue

                    local cov_good = cov.get_goods_catg_index()       
                    for(local j=0;j<cov_good.len();j++){
                        if(cov_good[j]==good){
                            cov_nr += cov.get_transported_goods()[0]                   
                        }
                    }
                }
            }
        }
        return cov_nr
    }


Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #146 on: September 30, 2019, 02:16:07 PM »
class_basic_chapter.nut

The following change should be made in the function get_goal_text (pl, path).

Code: [Select]
@@ -489,10 +491,12 @@ class basic_chapter
  for (local i = 1; i <= 15; i++){
  text[this.my_step(i)] = ""
  text[this.ttxst(i)] = "<em>"
+ text[this.ttxst(i)+"e"] = "</em>"
  }
  text_step = this.set_goal_text(text_step)
  text[my_step(this.step)] = text_step.tostring()
- text[ttxst(this.step)] = "<a><st>"
+ text[ttxst(this.step)] = "<st>"
+ text[ttxst(this.step)+"e"] = "</st>"
  if (correct_cov)
  text["scr"] = "<em>--></em> <a href='script:script_text()'>"+ translate("Go to next step")+"</a> <em>>>></em>"
  else

Accordingly, then the step marks must be changed in the files goal.txt.

old
Code: [Select]
{txtst_01}Step A</em> - A Look at the Factories</a><br>
{step_01}

new - remove /a end of line
Code: [Select]
{txtst_01}Step A{txtst_01e} - A Look at the Factories<br/>
{step_01}

This ensures clean tags.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #147 on: October 03, 2019, 04:40:33 PM »
class_basic_chapter.nut

The following change should be made in the function get_goal_text (pl, path).

Code: [Select]
@@ -489,10 +491,12 @@ class basic_chapter
  for (local i = 1; i <= 15; i++){
  text[this.my_step(i)] = ""
  text[this.ttxst(i)] = "<em>"
+ text[this.ttxst(i)+"e"] = "</em>"
  }
  text_step = this.set_goal_text(text_step)
  text[my_step(this.step)] = text_step.tostring()
- text[ttxst(this.step)] = "<a><st>"
+ text[ttxst(this.step)] = "<st>"
+ text[ttxst(this.step)+"e"] = "</st>"
  if (correct_cov)
  text["scr"] = "<em>--></em> <a href='script:script_text()'>"+ translate("Go to next step")+"</a> <em>>>></em>"
  else

Accordingly, then the step marks must be changed in the files goal.txt.

old
Code: [Select]
{txtst_01}Step A</em> - A Look at the Factories</a><br>
{step_01}

new - remove /a end of line
Code: [Select]
{txtst_01}Step A{txtst_01e} - A Look at the Factories<br/>
{step_01}

This ensures clean tags.

Place the underline intentionally, it is more attractive to the eye do not you think? .

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #148 on: October 03, 2019, 06:26:14 PM »
Place the underline intentionally, it is more attractive to the eye do not you think? .

a use only because of the underline is misleading. Two-color underlining does not look very nice to me.

Furthermore, it is questionable to have tags in the formatting that have no start tag.

For better readability, format with p instead of just br.

If underlining is considered necessary, it is better to add a u-tag in the code.


Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #149 on: October 05, 2019, 08:37:14 PM »

a use only because of the underline is misleading. Two-color underlining does not look very nice to me. Furthermore, it is questionable to have tags in the formatting that have no start tag. For better readability, format with p instead of just br. If underlining is considered necessary, it is better to add a u-tag in the code.
Maybe it would be a good idea to make a small vote?



I have moved chapter 5 to 6 and vice versa, because the old chapter 5 is a kind of challenge, maybe add more in the future, just wait for more ideas .  8)

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #150 on: October 22, 2019, 01:51:42 PM »
Hello how are you ?. I have taken a small break.

Here I leave a new version, I hope there are no more code errors lol.

To highlight this is the addition of a new chapter.

Scenario: tutorial-v6.9.00.zip




changes:
Code: [Select]
Chapter 2 ==================================

- [add] Full review by @Andarix

Step G:
- Fixed a small error, the text with instructions is now displayed when the vehicle is removed.
- Fixed a bug that prevents setting up the vehicle, after being eliminated by the player.

Chapter 3 ==================================
- [add] Full review by @Andarix
- Deleted obsolete file "schedule.txt"
- Deleted obsolete file "details.txt"

Chapter 5 ==================================


Chapter 6 ==================================
- Resolved some inconsistencies by showing the number of passengers
- New rules for tools, now only the necessary tools are moved.
- Vehicle limitation, now the number of vehicles to be used is limited.
- Some translations (still missing)

General: =====================================
- New function that allows you to recover the selected stops in the "schedule" list when the window is closed and is not complete or the "minimum load / timeout" values ​​are incorrect.

- Translation of names of industries and vehicles directly from the pakset.

- A new chapter (Industrial Efficiency) is added.

- Chapter 5 now becomes chapter 6.

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #151 on: October 26, 2019, 10:02:23 AM »
...
Here I leave a new version, I hope there are no more code errors lol.
...

mmh

chapter 5 - goal.txt

Code: [Select]
...
{txtst_04}End of the Scenario</em></a><br>
{step_04}

...

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #152 on: October 27, 2019, 08:52:59 AM »
mmh chapter 5 - goal.txt
Code: [Select]
... {txtst_04}End of the Scenario
 {step_04} ...
I realized very late, I had already uploaded the file.

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #153 on: October 27, 2019, 01:24:34 PM »
https://simutrans-germany.com/files/upload/Tutorial-v6.9.1.zip

Several bugs in chapter 5 corrected.

Translation completed chapter 5. Object names ( factory, vehicle, goods, player buildings ... ) should be made via the set translation.
Review of translations not yet completed.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #154 on: October 27, 2019, 04:35:50 PM »
Wow, I am very grateful to you! It was necessary to review and organize the translations.  :D :D :D :D

Now I will review and organize the Spanish translations, greetings!.

Edit.
I have reviewed the translations and organized and removed obsolete texts, please check that everything is fine.

https://www.mediafire.com/file/bk8vp5e51drfk1c/Tutorial-v6.9.2.zip/file
« Last Edit: October 27, 2019, 09:22:46 PM by Yona-TYT »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #155 on: March 31, 2020, 12:22:03 AM »
New test version, hopefully the next one will be the final version.

Scenario: tutorial_pak128-v6.9.3-beta.zip
Changes;
Code: [Select]
Chapter 2 ==================================
Step G: -------------------------------
Connecting the road will now be easier.
Intermittent stops are eliminated.

Chapter 3 ==================================
step K: --------------------------------------
Some useless texts have been removed
Improvements when showing (popup window) the number of vehicles needed in the warehouse.


Chapter 4 ==================================
Correction of an error that prevented the springs from being selected.

Chapter 5 ==================================
- A new function is implemented that allows knowing if one transformer is connected to another. thank you very much @Daws
- Mail extension building now asks that the name be correct.


General: =====================================
Revised all texts and text files, some useless files were removed.
I rename the directory to "tutorial_pak128"

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #156 on: May 25, 2020, 08:32:21 PM »
Hello how are you ?.

I have been improving this for a few days, a new step is included that explains how to use the Scenario interface and the chapter on planes is almost ready (for now inaccessible because it is only in Spanish).

The scenario is still in testing, although I haven't had any more failures lately.

Hopefully someday I will be able to include it in pak128 (I've been close hehehe).


Edit. (I have updated the file due to a silly bug in caiputo 3.  :-[ )
Scenario ->    tutorial_pak128-v6.9.05-Test-2.zip [Update] (Must use a Simutrans night)



Changes;
Code: [Select]
Chapter 1 ==================================
Added a new step at startup on the tutorial stage.

Chapter 4 and 5 ==================================
Script text is added to advance / skip steps.

General: =====================================

A message is displayed every time the chapter is advanced, if it is enabled in the message center options.

Advance / Skip steps should now wait for the text in the scenario window to update as well as a warning.

Something cleans and structures the code of some chapters.

Some menus get translations of system tab files (work in progress).

Fixed several bugs with the scripe to Advance / Skip steps.

Work in progress:
The Planes are the last chapter of this tutorial, I have already advanced in this chapter and I include it now, for the moment it will only be accessible for the Spanish language.



I am going to need some help with these English translations: "goal_step_01.txt"
« Last Edit: May 26, 2020, 02:24:38 AM by Yona-TYT »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #157 on: June 03, 2020, 02:47:08 AM »
Here is a new installment of this scenario.

Scenario: tutorial_pak128-v7.0.10.zip

"[Chapter 1 ] To highlight, the statue is now mentioned as a "Monument" and is dedicated to the "legendary isaac"."  8)
The chapter on airports is ready, (very simple compared to the previous ones).

Lots of tweaks to make future porting to pak64 easier.


Code: [Select]
Chapter 1 ==================================
Step C ------------------------
The inspection tool is highlighted.
To highlight, the statue is now mentioned as a "Monument" and is dedicated to the "legendary isaac".
Now you must click on an church and it is mentioned that it is a "tourist attraction".

Chapter 4 ==================================
Improvements in the construction of docks
Fixed a bug that worked in script

Chapter 6 ===================================
Moved to chapter 7 to make room for a new chapter.

General: =====================================
Object marks corrected in the first chapters.
Fixed a bug when starting multiple vehicles (under test).
The "plane" chapter is now clickable.
Lots of tweaks to the code structure, thinking of porting to pak64 in the future.


Pending: ===================================
A function is needed to update the lines using script.
Link to the "Options" window in the message center.
More system translations for tools.
Correct the new translations "Chapter 5 and 6" and some steps in Chapter 1.

Possibly: ================================
Improvements in the detection system of eliminated vehicles (there is a lot of duplicate code).

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #158 on: June 17, 2020, 11:20:17 PM »
New version of tests, I hope it is the last one.
Scenario ->
https://www.mediafire.com/file/1jp0hsj4wm4fauj/tutorial_pak128-test-4.zip/file
I've organized Chapter 3 more, mostly just improvements to the code structure.

In general, I've made improvements to make it easier to port other paksets.

There are 3 details that I hope can be solved one day:
1 - Problem when copying convoys with empty "load" and "timeout" values. https://forum.simutrans.com/index.php/topic,19953.0.html
2 - Tools that are no longer available (can be very misleading). https://forum.simutrans.com/index.php/topic,20048.0.html is done!.
3 - Link to the "Settings" window of "message center". https://forum.simutrans.com/index.php/topic,19930.0.html

Now I am working on the tutorial for pak64, which means that I end this scenario, just need to try and check the translations.
« Last Edit: June 20, 2020, 10:11:26 AM by Yona-TYT »

Offline Andarix

  • *
  • Posts: 188
  • Languages: de
Re: Pak128 Scenario Tutorial
« Reply #159 on: June 28, 2020, 07:52:28 AM »
en/chapter_02
Quote
06_1-3.txt
06_2-3.txt
06_3-3.txt
07_1-3.txt
07_1-4.txt
07_2-3.txt
07_2-4.txt
07_3-3.txt
07_3-4.txt
07_4-4.txt

goal.txt
goal_step_01.txt
goal_step_02.txt
goal_step_03.txt
goal_step_04.txt
goal_step_05.txt
goal_step_08.txt
rule.txt

It would be nice if you could decide what the file names are.

The constant renaming is extremely annoying.
« Last Edit: June 28, 2020, 08:20:19 AM by Andarix »

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #160 on: June 28, 2020, 02:41:09 PM »
I apologize, that was to remove the part that asked to click on the road depot (it was unnecessary), this change I did at the time of porting to pak64 and I forgot to mention it :(

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #161 on: October 24, 2020, 05:17:25 PM »
Announced the first test version based on tutorial-pak64 code.  ;D

The vast majority of changes are inherited from pak64, that's why the version number change.

I should mention that I have practically not modified any text, therefore without being the same pak64 files, so you will notice a lot of inconsistency with the reality of the scenario.

Scenario: http://www.mediafire.com/file/sa9n3jt6vum2gr8/tutorial_pak128-beta-v1.5.00.zip/file

Changes:
Code: [Select]
General ====================================
The code has been ported from the pak64 tutorial, now everything is more ordered at the code level.
Warning message when game is paused (In progress)
In Chapter 5, a solar plant has been changed to a coal one and consequently trucks have been added to move the coal and an oil platform has also been added for the ship to transport passengers there (to maintain consistency with pak64).


Tab texts ==================================
The message is added: "Advance is not allowed with the game paused."


Chapter 3 ==================================
Step H ------------------------------------------------ -----------------------------
A clogging that occurred if the tunnel was built in the reverse direction is corrected.

Chapter 4 ==================================
Step E, F and G -------------------------------------------- ---------------------------------
An error has been corrected when eliminating springs that do not accept the load, unnecessary tools have also been removed to avoid confusion.

Chapter 3 ==================================
Step I ------------------------------------------------ -----------------------------
The logic of the schedule is changed so that the trains make return trips and the unnecessary interceptions are removed (mentioned by @prisi)

Known Issues =========================
Most of the texts are not consistent, this is because nothing has changed there yet.
Chapter 7 has not been portrayed yet.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #162 on: October 27, 2020, 05:51:55 PM »
New test update The highlights of this version are the fixed texts and routable ships with station cover. Only the "En" texts are revised. The rest of the translations still need to be repaired.

Scenario: http://www.mediafire.com/file/zr4u1vu1qew4jie/tutorial_pak128-beta-v1.5.20.zip/file

Changes:
Code: [Select]
New test update


The highlights of this version are the fixed texts and routable ships with station cover.

Only the "En" texts are revised. The rest of the translations still need to be repaired.

Changes:

// ------------------------------------------------ ------------------------------------------
General ====================================
The variables {load} and {wait} are added to the texts.
Ships are now routed by clicking within the station coverage (dock).

Tab and txt texts ==================================
The text "The slope points to the Northeast." has changed to "The slope points to the [% s]."

The following files have been modified (maybe missing): ==================================== ===================================
ch2: ----------------------
"goal_step_03.txt"
"goal_step_04.txt"
"06_1-3.txt"
"06_2-3.txt"
"06_3-3.txt"
"07_1-3.txt"
"07_2-3.txt"
"07_3-3.txt"

ch3: ----------------------
01_1-2.txt
01_2-2.txt
02_1-5.txt
02_2-5.txt
02_3-5.txt
02_4-5.txt
02_5-5.txt
03_1-2.txt
03_2-2.txt
04_1-3.txt
04_2-3.txt
04_3-3.txt
goal_step_05.txt
06_1-5.txt
06_2-5.txt
06_3-5.txt
06_4-5.txt
06_5-5.txt
goal_step_07.txt
08_2-3.txt
11_1-2.txt
11_2-2.txt

ch4: ----------------------
Basically all files

ch5: ----------------------
Basically all files

ch6: ----------------------
goal_step_02.txt
goal_step_03.txt
goal_step_04.txt

Chapter 2 ==================================
Step C and D ---------------------------------------------- -------------------------------
New explanatory text:
 Tip:  Press the  [Ctrl] + ["]  keys to hide the urban buildings.

Step F ------------------------------------------------ -----------------------------
New explanatory text:
<h1> Assignment of lines: <h1>
Existing lines can be assigned to new vehicles, as long as they are vehicles of the same category. In this example we are going to assign the line  "{line}"  to our new vehicles.
</p>

Step G ------------------------------------------------ -----------------------------
Stop list is added.
New explanatory text:
 Tip:  Hold down the  [Ctrl]  key to build straight sections of roads / rails.

Chapter 3 ==================================
Step H ------------------------------------------------ -----------------------------


Chapter 4 ==================================
Step E, F and G -------------------------------------------- ---------------------------------


Chapter 3 ==================================
Step I ------------------------------------------------ -----------------------------


Known Issues =========================



// Pak64 Tutorial

// ------------------------------------------------ ------------------------------------------
General ====================================


Tab and txt texts ==================================


Chapter 3 ==================================
Step H ------------------------------------------------ -----------------------------
one.

Step I ------------------------------------------------ -----------------------------


Chapter 4 ==================================
Step E ------------------------------------------------ -----------------------------

Step F and G ---------------------------------------------- -------------------------------

Errors / Regrelations in texts: =========================================== ======================
/en/chapter_04/goal_step_02.txt text changed: It is required to transport hydrocarbons  ({good1})  from {f1} to {f3} for the production of  {good2} </ em >.

/en/chapter_04/goal_step_03.txt text changed: It is required to transport hydrocarbons  ({good1})  from {f1} to {f3} for the production of  {good2} </ em >.

/en/chapter_04/goal_step_07.txt added text: <st> It advances to the next chapter </st> when the ship starts from the  Shipyard .

/en/chapter_05/goal_step_02.txt variables were not ordered correctly
/en/chapter_05/04_1-3.txt added text: <st> It advances to the next chapter </st> when the ship starts from the  Shipyard .
/en/chapter_05/04_2-3.txt added text: <st> It advances to the next chapter </st> when the ship starts from the  Shipyard .
/en/chapter_05/04_3-3.txt added text: <st> It advances to the next chapter </st> when the ship starts from the  Shipyard .

Offline 0cra_tr0per

  • *
  • Posts: 15
  • Languages: EN
Re: Pak128 Scenario Tutorial
« Reply #163 on: November 09, 2020, 07:06:08 PM »
Is the part where you're building sloped rail tunnels meant to softlock if you attempt to follow the steps? No matter how many different times I attempt to do it, it's refusing to let me build any more after the first sloped tunnel tile has been placed, despite having the cash to do so.

In addition, it won't let me configure waiting amounts and times at specific starts with lines until I finish the other stops. I'm assuming this is unintentional.

Sidenote: The intercity bus line that the tutorial has you set up? It's not actually profitable.

Offline Yona-TYT

  • Devotee
  • *
  • Posts: 1528
    • Simutrans-BLOG
  • Languages: ES
Re: Pak128 Scenario Tutorial
« Reply #164 on: November 13, 2020, 10:22:47 PM »

Is the part where you're building sloped rail tunnels meant to softlock if you attempt to follow the steps? No matter how many different times I attempt to do it, it's refusing to let me build any more after the first sloped tunnel tile has been placed, despite having the cash to do so.

I have not been able to replicate that binding, can you send me a screenshot and savegame of the binding ?.



In addition, it won't let me configure waiting amounts and times at specific starts with lines until I finish the other stops. I'm assuming this is unintentional.


I don't think I understand you very well. The time and load values must be consistent with those indicated in the tutorial, this is planned.



Regarding profitability, I will only say that my main concern is to teach the basics regarding the gameplay and give useful advice about the game.

Offline 0cra_tr0per

  • *
  • Posts: 15
  • Languages: EN
Re: Pak128 Scenario Tutorial
« Reply #165 on: November 15, 2020, 02:23:26 AM »
What I'm saying is that if I follow the instructions in the written order (add stop, configure time + load values, add other stops), it won't let me add another stop for some reason, but if I do it in the non-written order (add stop, add other stops, configure first stop time + load values), it lets me do so.

I didn't bother taking screenshots or saves of those things, however.