The International Simutrans Forum

 

Author Topic: Pak128 Scenario Tutorial  (Read 29262 times)

0 Members and 1 Guest are viewing this topic.

Offline Andarix

  • *
  • Posts: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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: 45
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 ve

  • Devotee
  • *
  • Posts: 1237
    • 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 »