News:

Simutrans.com Portal
Our Simutrans site. You can find everything about Simutrans from here.

Recent posts

#81
Scenarios and Challenges / Re: New York City - pak128
Last post by prissi - June 23, 2025, 08:52:55 AM
Raising and lowering would not be a waytool, maybe that is the problem. But then, set_slope should also be allowed. Hmm ...

And about the map, I am not sure what double heights would change. (Or what you implied that you have changed).
#82
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by Andarix - June 23, 2025, 06:56:29 AM
The problem is the rotation of the map.


factory_data determines the coordinates at the start of the scenario and is therefore only valid in this orientation.

The factories are also indicated in this orientation.
/**
 *  set tiles for factory
 *
 *  coord_fac_1 - ch1, ch4
 *
 *
 */
coord_fac_1 <- coord(123,160) // Timber plantation
coord_fac_2 <- coord(93,153)  // Saw mill
coord_fac_3 <- coord(110,190) // Construction Wholesaler
coord_fac_4 <- coord(168,189) // Oil rig
coord_fac_5 <- coord(149,200) // Oil refinery
coord_fac_6 <- coord(112,192) // Gas station
coord_fac_7 <- coord(131,235) // Coal mine
coord_fac_8 <- coord(130,207) // Coal power station

In this case, an entry would have to be made in all 4 map orientations in order to take the appropriate one for the determined orientation of the map.


Otherwise the error lies with Simutrans or the script environment, because the changes to the map rotation are not applied correctly.
#83
Scenarios and Challenges / Re: New York City - pak128
Last post by Mastermax - June 23, 2025, 05:26:26 AM
I can change some details in the map itself (double heights for Streets, railroad tracks).

My question: what I have to do to generate a valid .sve file without changing start date and that it is working with the script?

And maybe, can we find out the PW for public authority in the map? Don't know if I need for the changes
#84
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by Yona-TYT - June 22, 2025, 11:12:05 PM
#85
Scenarios and Challenges / Re: New York City - pak128
Last post by Yona-TYT - June 22, 2025, 09:39:49 PM
Quote from: prissi on June 22, 2025, 03:14:21 PMThank you. Needs some more entries in compat.teb and some updates to the forbidden_tool functions and then it should work again.

I have added the new parameters: https://github.com/simutrans/pak128/commit/149ff73a22c1eb295ff33852d1952155ca0de919


In the tests I performed, the restriction on "hudson_river" isn't being met for "tool_raise_land", but it is met for "tool_setslope".

Captura desde 2025-06-22 17-29-56.png

Captura desde 2025-06-22 17-30-23.png

      hudson_river = {
             modus = "rect",
             waytyp= wt_all,
             tools = [tool_build_bridge, tool_build_tunnel, tool_raise_land, tool_setslope],
             error = ["No new bridge allowed across Hudson River.",
                      "No new tunnel allowed under Hudson River.",
                      "No terraforming allowed on Hudson River. It would destroy the legendary view.",
                      "No terraforming allowed across Hudson River. The mayor does not like to view ledgers from his office."
                     ],
             list  = [ [ {x = 320, y =   0}, {x = 327, y = 200} ],
                       [ {x = 328, y = 190}, {x = 350, y = 260} ],
                       [ {x = 340, y = 261}, {x = 350, y = 490} ],
                       [ {x = 351, y = 480}, {x = 360, y = 520} ],
                       [ {x = 361, y = 510}, {x = 375, y = 560} ],
                       [ {x = 376, y = 550}, {x = 390, y = 622} ],
                       [ {x = 384, y = 623}, {x = 410, y = 730} ]
                     ]
                     }
function forbid_tools(pl, list)
{
        foreach(j in list) {
            if (j.modus == "rect") {
                for (local i=0; i < j.tools.len(); i++) {
                     for (local e=0; e < j.list.len(); e++) {
                         rules.forbid_way_tool_rect(pl, j.tools[i], j.waytyp, "", j.list[e][0], j.list[e][1], ttext(j.error[i]) )
                         }
                     }
               }
            else {
                for (local i=0; i < j.tools.len(); i++) {
                     for (local e=0; e < j.list.len(); e++) {
                         rules.forbid_way_tool_cube(pl, j.tools[i], j.waytyp, "", j.list[e][0], j.list[e][1], ttext(j.error[i]) )
                         }
                     }
               }
           }
}


This could be a problem with the rules logic, so we'll need to investigate further.
#86
Scenarios and Challenges / Re: Scenario compatibility for...
Last post by Yona-TYT - June 22, 2025, 09:26:12 PM
Quote from: Mastermax on June 22, 2025, 07:27:50 PMUpdate / repair of "big" new york scenario (pak128). current files are here:

https://simutrans.cloud/index.php/s/AkT24MZYxMprqsL

thx to all for the support so far! Nice to see that some are digging through their archives and the community is working :)

Is Fix : https://github.com/simutrans/pak128/commit/149ff73a22c1eb295ff33852d1952155ca0de919
#87
Game Servers / Re: New Simutrans Public Serve...
Last post by Roboron - June 22, 2025, 09:09:02 PM
I have rebooted it and it is now back online.
#88
Bug Reports / Re: [Linux Wayland] Window bor...
Last post by Roboron - June 22, 2025, 08:16:23 PM
Could you check if this happens with other SDL apps? (OpenTTD maybe?).
#89
Scripting Scenarios and AI / Re: Tutorial - code review
Last post by Andarix - June 22, 2025, 08:12:15 PM
I have no changes at the moment.


Therefore my call to test, so that errors made by me are found.
#90
Scenarios and Challenges / Re: Scenario compatibility for...
Last post by Mastermax - June 22, 2025, 07:27:50 PM
Update / repair of "big" new york scenario (pak128). current files are here:

https://simutrans.cloud/index.php/s/AkT24MZYxMprqsL

thx to all for the support so far! Nice to see that some are digging through their archives and the community is working :)