Jump to content

Train Stops Near Barrier Area Even Though I Removed The Barriers..


ArmanCan

Recommended Posts

Hello guys

 

I've removed the barriers from main.scm but the trains automatically stops moving in front of barrier area where are Richman<>Flint County and Palomino Creek<>Rockshore East (Frederick Bridge) area.

 

I've checked the tracks.dat files and even changed some of them but no hope. Acording to my research the barriers are hardcoded stuff and think my solution will be kinda difficult. Is there any memory adress or some other approaches for preventing this stop? My answer seems switching the integer star 181 at the first place but obviously i can't.. 🙁

 

I'm posting some screenshots to explain my situation better.. don't mind the train colours.. i've changed them for spicing up the game.. 🙂

 

Spoiler

spacer.png

spacer.png

spacer.png

spacer.png

 

 

Thanks in advance and have a nice weekend 😎

Edited by ArmanCan
Link to comment
Share on other sites

vladimirdog2021
1 minute ago, ArmanCan said:

Hello guys

 

I've removed the barriers from main.scm but the trains automatically stops moving in front of barrier area where are Richman<>Flint County and Palomino Creek<>Rockshore East (Frederick Bridge) area.

 

I've checked the tracks.dat files and even changed some of them but no hope. Acording to my research the barriers are hardcoded stuff and think my solution will be kinda difficult. Is there any memory adress or some other approaches for preventing this stop? My answer seems switching the integer star 181 at the first place but obviously i can't.. 🙁

 

Thanks in advance and have a nice weekend 😎

Maybe try this again.

Link to comment
Share on other sites

53 minutes ago, ArmanCan said:

the trains automatically stops moving

 

How did your train move? With you as driver?

 

I can spawn a train at LS Jefferson, put CJ as driver and drive to LV. Tested with totally stripped main.

 

The hardcoded train by using tracks.dat doesn`t drive from LS Jefferson to LV, but only to the opposite direction

The appropriate track coords can you find in tracks4.dat

start coords near Palomino Creek = 2790.59 -207.146 25.0779 0

then down to Los Santos

 

Spoiler
656
2790.59 -207.146 25.0779 0
2789.08 -210.197 24.756 0
2780.8 -225.101 23.144 0
2772.9 -239.906 21.3726 0
2766.48 -252.543 19.876 0
2762.47 -259.647 19.0317 0
2758.79 -265.658 18.3616 0
2753.18 -272.353 17.6545 0
2746.63 -277.954 17.0776 0
2741.3 -280.823 16.7126 0
2730.92 -284.443 16.0923 0
2721.78 -287.584 15.5679 0
2709.02 -290.951 15.0161 0
2696.09 -294.192 14.4634 0
2684.56 -296.329 13.9714 0
2672.79 -297.693 13.4683 0
2661.26 -298.924 13.1233 0
2649.08 -299.422 12.7559 0
2636.84 -299.098 12.6406 0
2624.87 -298.676 12.5281 0
2612.23 -297.668 12.7485 0
2601.06 -296.661 12.9663 0
2592.0 -295.654 13.2192 0
2583.21 -294.555 13.4956 0
2574.55 -293.012 13.8086 0
2566.1 -291.578 14.1143 0
2557.88 -290.296 14.3708 0
2549.52 -288.976 14.6318 0
2540.84 -287.693 14.9214 0
2532.39 -286.562 15.2031 0
2524.77 -285.581 15.4238 0
2510.72 -283.911 15.8301 0
2488.79 -281.298 16.4106 0
2467.28 -278.943 16.9216 0
2452.57 -277.886 17.1628 0
2436.35 -276.755 17.4275 0
2422.33 -275.993 17.5166 0
2406.9 -275.943 17.6138 0
2394.15 -276.962 18.2847 0
2380.04 -279.693 18.9692 0
2375.21 -281.428 19.656 0
2370.49 -283.201 20.3293 0
2367.59 -284.311 20.7444 0
2364.14 -285.832 21.2129 0
2354.89 -289.694 22.4609 0
2350.16 -292.268 23.3757 0
2343.25 -296.013 24.7078 0
2331.49 -303.21 27.0266 0
2320.2 -310.933 29.3433 0
2308.15 -319.241 32.0071 0
2297.03 -326.613 34.1091 0
2284.74 -334.453 36.3042 0
2273.74 -340.948 37.5618 0
2260.67 -347.229 39.0527 0
2249.38 -351.793 40.1174 0
2236.57 -355.771 41.2783 0
2226.15 -358.229 42.7383 0
2222.41 -358.814 43.2148 0
2214.27 -360.393 44.2417 0
2208.01 -360.745 45.2102 0
2197.54 -361.681 46.8696 0
2191.4 -361.856 47.8516 0
2181.68 -361.798 49.4392 0
2173.61 -361.739 50.769 0
2165.18 -361.447 52.0386 0
2156.41 -360.979 53.335 0
2149.39 -360.686 54.2673 0
2141.84 -360.569 55.0869 0
2132.54 -360.452 56.0911 0
2124.5 -360.676 56.865 0
2113.91 -361.244 57.8687 0
2109.09 -361.557 58.3486 0
2099.82 -362.622 59.3538 0
2095.75 -363.561 59.8184 0
2087.84 -365.308 60.7266 0
2076.48 -368.409 62.0027 0
2064.67 -372.856 63.4463 0
2053.72 -378.239 64.6218 0
2043.17 -384.586 65.8872 0
2033.65 -392.943 66.7969 0
2024.56 -401.573 67.697 0
2018.75 -410.464 67.999 0
2016.19 -414.984 68.1414 0
2010.84 -424.553 68.4421 0
2008.81 -430.204 68.5496 0
2005.72 -437.889 68.6917 0
2001.88 -451.3 68.9382 0
1999.47 -462.752 69.3799 0
1997.66 -474.958 69.8474 0
1997.43 -478.123 69.9707 0
1997.21 -489.047 70.4119 0
1997.88 -494.924 70.6453 0
1998.49 -502.082 70.9265 0
1999.32 -505.698 71.0112 0
2002.1 -516.021 71.2429 0
2005.87 -527.096 71.4729 0
2008.73 -532.37 71.2942 0
2012.88 -539.829 71.0266 0
2015.29 -543.446 70.9639 0
2021.09 -552.261 70.8223 0
2025.16 -557.158 70.5969 0
2033.15 -566.35 70.1023 0
2042.49 -575.392 69.4053 0
2046.48 -579.084 69.0291 0
2055.37 -586.769 67.9832 0
2062.91 -593.55 67.0825 0
2072.1 -601.611 65.9968 0
2078.88 -607.036 64.9458 0
2088.07 -615.098 63.4648 0
2098.47 -623.536 61.8433 0
2103.82 -627.906 60.8623 0
2111.28 -633.934 59.5005 0
2116.93 -638.455 58.4746 0
2124.76 -644.558 57.0649 0
2128.91 -648.023 56.2695 0
2138.7 -655.407 54.4619 0
2147.67 -662.339 52.791 0
2152.87 -666.257 51.8452 0
2161.53 -672.661 50.3569 0
2170.42 -679.367 48.8203 0
2181.04 -687.428 46.9795 0
2184.81 -690.367 46.4172 0
2192.91 -696.473 45.2241 0
2197.39 -699.709 44.573 0
2205.53 -705.586 43.3914 0
2212.76 -711.388 42.1978 0
2219.24 -716.587 41.2988 0
2224.74 -721.333 40.4207 0
2228.59 -724.799 39.9404 0
2234.24 -729.847 39.2317 0
2238.31 -733.991 38.6982 0
2243.35 -739.039 38.0503 0
2248.7 -746.046 37.2178 0
2254.35 -753.581 36.3269 0
2259.03 -760.738 35.5063 0
2263.77 -768.423 34.6394 0
2267.16 -775.506 33.98 0
2271.08 -783.341 33.2456 0
2273.87 -791.253 32.5408 0
2276.81 -799.39 31.8132 0
2279.25 -807.944 31.1531 0
2281.21 -816.007 30.5454 0
2282.82 -824.548 29.9277 0
2284.08 -832.669 29.3528 0
2285.27 -840.301 28.8569 0
2286.21 -848.496 28.3276 0
2286.91 -855.707 27.8711 0
2287.27 -860.548 27.5662 0
2287.57 -868.08 27.1033 0
2287.9 -874.863 26.6995 0
2288.23 -881.186 26.3232 0
2288.62 -889.089 25.853 0
2288.82 -892.251 25.6641 0
2288.95 -897.553 25.3484 0
2288.99 -903.381 25.3667 0
2288.99 -912.405 25.4089 0
2288.99 -917.871 25.4348 0
2288.95 -927.685 25.481 0
2288.92 -936.378 25.522 0
2288.92 -946.06 25.5674 0
2288.92 -954.622 25.6077 0
2288.92 -964.337 25.6467 0
2288.96 -971.088 25.6675 0
2288.96 -978.003 25.689 0
2288.99 -987.816 25.719 0
2288.99 -992.196 25.7324 0
2288.99 -997.564 25.749 0
2289.02 -1004.21 25.7695 0
2288.94 -1015.14 25.803 0
2288.95 -1020.58 25.8198 0
2288.97 -1022.4 25.8254 0
2288.97 -1027.87 25.8323 0
2288.97 -1033.0 25.8379 0
2288.97 -1037.74 25.843 0
2288.96 -1042.56 25.8484 0
2288.96 -1047.49 25.8538 0
2288.88 -1051.73 25.8586 0
2288.78 -1057.74 25.8652 0
2288.82 -1064.61 25.8728 0
2288.82 -1072.59 25.8816 0
2288.82 -1079.9 25.8896 0
2288.89 -1091.5 25.8955 0
2288.86 -1094.15 25.896 0
2288.89 -1101.24 25.658 0
2288.91 -1105.69 25.8955 0
2288.95 -1110.09 25.8955 0
2288.83 -1117.29 25.658 0
2289.01 -1137.59 25.858 0
2288.95 -1144.57 25.7396 0
2288.95 -1149.6 25.7567 0
2288.99 -1154.59 25.7496 0
2288.93 -1161.5 25.5404 0
2288.99 -1168.28 25.367 0
2288.99 -1173.05 25.2454 0
2288.99 -1180.21 24.8673 0
2288.99 -1186.0 24.5589 0
2289.0 -1201.96 23.6085 0
2289.0 -1218.01 22.9989 0
2288.94 -1233.97 22.9979 0
2288.94 -1240.08 22.9979 0
2288.99 -1250.0 22.9979 0
2288.99 -1258.64 22.9979 0
2288.99 -1265.95 22.9979 0
2288.95 -1274.39 22.9979 0
2288.95 -1282.05 22.9979 0
2288.97 -1290.42 22.9979 0
2288.97 -1298.0 22.9979 0
2288.96 -1306.94 22.9979 0
2288.96 -1316.82 22.998 0
2288.91 -1330.0 22.998 0
2288.91 -1345.89 22.998 0
2288.91 -1350.83 22.998 0
2289.01 -1358.52 22.998 0
2289.1 -1369.06 23.0114 0
2289.1 -1381.21 23.1069 0
2289.01 -1386.91 23.112 0
2288.91 -1393.56 22.9721 0
2288.86 -1399.11 22.8867 0
2288.74 -1407.02 22.8605 0
2288.68 -1412.21 22.8432 0
2288.5 -1415.1 22.8166 0
2287.84 -1422.7 22.7473 0
2287.36 -1428.16 22.6979 0
2286.89 -1432.82 22.6279 0
2286.32 -1437.79 22.5537 0
2285.57 -1444.2 22.4577 0
2282.89 -1460.07 22.125 0
2281.41 -1467.22 21.9118 0
2279.82 -1473.72 21.7099 0
2278.47 -1479.09 21.7519 0
2277.27 -1483.99 21.5856 0
2276.06 -1488.89 21.5834 0
2274.69 -1494.05 21.2644 0
2270.7 -1506.28 20.5754 0
2268.17 -1512.73 20.2656 0
2266.19 -1517.5 20.0368 0
2254.32 -1546.18 18.6445 0
2248.12 -1561.0 17.9136 0
2229.9 -1605.83 15.6374 0
2223.79 -1619.77 14.9214 0
2218.29 -1636.24 14.402 0
2215.01 -1647.76 14.2955 0
2212.0 -1659.33 13.7741 0
2208.45 -1672.51 13.4105 0
2205.95 -1686.16 12.9677 0
2203.88 -1702.87 12.5582 0
2202.9 -1720.32 12.2955 0
2202.92 -1732.29 12.4003 0
2202.92 -1744.38 12.1803 0
2202.83 -1760.68 12.1804 0
2202.83 -1776.02 12.1804 0
2202.79 -1792.8 12.1804 0
2202.79 -1808.98 12.1804 0
2202.86 -1824.4 12.1804 0
2202.86 -1840.25 12.1804 0
2202.68 -1858.43 12.4844 0
2202.73 -1869.18 12.55 0
2202.75 -1879.64 12.55 0
2202.71 -1889.41 12.7485 0
2202.68 -1899.4 12.75 0
2202.63 -1906.63 12.55 0
2201.94 -1914.0 12.55 0
2200.09 -1920.79 12.55 0
2197.29 -1927.42 12.55 0
2193.96 -1933.39 12.55 0
2189.54 -1939.36 12.55 0
2184.59 -1944.3 12.55 0
2178.77 -1948.73 12.55 0
2173.02 -1952.05 12.55 0
2166.27 -1954.91 12.55 0
2159.68 -1956.72 12.55 0
2152.76 -1957.85 12.55 0
2149.66 -1957.85 12.55 0
2140.74 -1957.87 12.55 0
2127.4 -1957.87 12.55 0
2110.88 -1957.94 12.55 0
2098.42 -1957.94 12.55 0
2087.26 -1957.93 12.55 0
2078.24 -1957.93 12.55 0
2069.98 -1957.92 12.55 0
2052.99 -1957.92 12.55 0
2025.94 -1957.92 12.55 0
1992.27 -1957.92 12.55 0
1965.66 -1957.92 12.7263 0
1940.75 -1957.82 12.55 0
1917.13 -1957.82 12.55 0
1896.82 -1957.82 12.55 0
1876.51 -1957.92 12.55 0
1857.49 -1957.93 12.55 0
1841.92 -1957.93 12.55 0
1826.62 -1957.84 12.55 0
1817.05 -1957.84 12.55 0
1807.65 -1957.84 12.55 0
1792.25 -1957.79 12.55 0
1775.3 -1957.81 12.55 0
1755.53 -1957.81 12.55 0
1739.66 -1957.87 12.55 0
1708.84 -1957.91 12.55 0
1699.03 -1957.89 12.55 0
1684.97 -1957.89 12.55 0
1673.75 -1957.89 12.55 0
1663.88 -1957.89 12.55 0
1647.74 -1957.84 12.55 0
1632.88 -1957.79 12.55 0
1618.08 -1957.79 12.55 0
1603.33 -1957.73 12.55 0
1588.36 -1957.73 12.55 0
1573.67 -1957.68 12.55 0
1558.86 -1957.68 12.55 0
1543.95 -1957.73 12.55 0
1529.04 -1957.68 12.55 0
1514.34 -1957.73 12.55 0
1499.48 -1957.73 12.55 0
1484.63 -1957.79 12.55 0
1472.76 -1957.95 12.55 0
1460.74 -1957.95 12.55 0
1448.44 -1957.84 12.5496 0
1436.36 -1957.36 12.1819 0
1423.65 -1956.18 11.7883 0
1410.82 -1954.53 11.2075 0
1397.67 -1952.07 10.2417 0
1384.04 -1948.75 8.73853 0
1370.09 -1944.48 7.3877 0
1355.56 -1938.87 5.25659 0
1340.48 -1932.03 2.55615 0
1332.25 -1927.32 1.26929 0
1323.49 -1921.02 -0.00170898 0
1314.08 -1913.37 -1.0564 0
1304.14 -1904.13 -2.11597 0
1293.72 -1894.03 -2.74805 0
1282.87 -1882.75 -3.59399 0
1271.65 -1870.51 -3.81348 0
1260.16 -1857.79 -4.01685 0
1254.06 -1850.74 -4.23608 0
1248.4 -1844.38 -4.43872 0
1234.61 -1828.5 -4.74039 0
1221.57 -1813.64 -5.00186 0
1207.94 -1797.77 -5.16593 0
1194.74 -1782.57 -5.32291 0
1180.79 -1766.38 -5.392 0
1167.64 -1751.15 -5.45597 0
1154.49 -1735.65 -5.44309 0
1140.33 -1719.4 -5.42869 0
1126.43 -1703.05 -5.34763 0
1112.75 -1687.44 -5.26902 0
1097.41 -1669.8 -5.12424 0
1084.96 -1655.32 -5.00559 0
1070.15 -1638.35 -4.82712 0
1056.92 -1623.32 -4.66867 0
1042.77 -1607.09 -4.47555 0
1028.55 -1591.16 -4.28415 0
1016.74 -1578.02 -4.11886 0
999.691 -1559.1 -3.88058 0
984.886 -1542.85 -3.68113 0
970.435 -1527.35 -3.48875 0
958.115 -1514.05 -3.34105 0
951.539 -1506.87 -3.2617 0
940.796 -1495.74 -3.13572 0
930.054 -1484.62 -3.03392 0
920.808 -1474.73 -2.94481 0
910.867 -1464.63 -2.85154 0
902.156 -1456.08 -2.7982 0
892.535 -1446.3 -2.73839 0
880.149 -1433.81 -2.66173 0
859.741 -1413.85 -2.61925 0
849.06 -1403.59 -2.59728 0
843.24 -1398.19 -2.61282 0
833.83 -1389.5 -2.63895 0
825.969 -1382.16 -2.66092 0
817.844 -1374.42 -2.68387 0
812.364 -1369.58 -2.66824 0
801.82 -1360.06 -2.6304 0
794.224 -1353.29 -2.60355 0
786.514 -1346.37 -2.57596 0
778.767 -1339.46 -2.54837 0
774.081 -1335.19 -2.53152 0
769.621 -1331.41 -2.46707 0
759.115 -1322.49 -2.26297 0
750.234 -1314.82 -2.0889 0
742.184 -1307.98 -1.9324 0
733.265 -1300.53 -1.76053 0
727.559 -1295.62 -1.64896 0
715.844 -1286.21 -1.27176 0
708.21 -1280.16 -1.02689 0
698.648 -1272.42 -0.717804 0
690.561 -1266.07 -0.459747 0
681.566 -1258.89 -0.170685 0
671.136 -1251.1 0.266327 0
661.159 -1243.58 0.686005 0
646.458 -1232.7 1.29953 0
634.969 -1223.93 1.78391 0
618.454 -1212.59 2.58664 0
609.987 -1206.68 3.0007 0
598.952 -1199.15 3.53513 0
587.354 -1191.19 4.09787 0
580.666 -1186.93 4.45114 0
566.556 -1177.95 5.19699 0
551.591 -1168.76 5.97873 0
538.871 -1160.53 6.65231 0
522.303 -1151.12 7.54758 0
504.826 -1141.34 8.48727 0
489.434 -1132.52 9.31857 0
479.76 -1127.66 9.82956 0
463.994 -1119.8 10.6611 0
452.396 -1113.71 11.2776 0
438.875 -1107.08 11.9868 0
417.443 -1097.83 13.0417 0
401.098 -1090.67 13.8464 0
387.202 -1084.63 14.529 0
347.568 -1070.17 16.2534 0
334.26 -1065.14 16.8332 0
325.976 -1062.79 17.1291 0
302.492 -1055.81 17.9697 0
280.119 -1049.08 18.769 0
271.049 -1047.04 19.007 0
248.148 -1041.9 19.6067 0
224.641 -1036.69 20.2202 0
209.373 -1034.27 20.4489 0
187.681 -1030.72 20.7724 0
167.651 -1027.7 21.0693 0
151.779 -1026.41 21.1023 0
128.272 -1024.37 21.1511 0
109.604 -1022.78 21.1899 0
98.1147 -1022.63 21.0258 0
79.5967 -1022.4 20.8291 0
57.4509 -1022.18 20.5608 0
46.2646 -1022.03 20.2304 0
26.2349 -1022.1 19.9887 0
2.72852 -1022.03 19.8867 0
-20.8535 -1022.03 19.622 0
-44.4355 -1022.03 18.832 0
-67.7908 -1022.03 17.173 0
-79.6572 -1022.03 15.885 0
-91.2217 -1022.1 14.2758 0
-106.338 -1022.71 12.3129 0
-121.682 -1024.44 11.0498 0
-137.479 -1027.47 10.3671 0
-153.275 -1031.32 10.2194 0
-168.846 -1036.31 10.5314 0
-183.887 -1042.13 11.2314 0
-198.399 -1048.86 12.2629 0
-211.928 -1056.34 13.5512 0
-224.248 -1064.35 15.0202 0
-235.208 -1072.82 16.6049 0
-244.58 -1081.89 18.2563 0
-252.063 -1091.26 19.8828 0
-259.017 -1101.54 21.5644 0
-266.65 -1112.58 23.3818 0
-274.738 -1123.99 25.2646 0
-283.203 -1135.86 27.2026 0
-292.046 -1148.18 29.1816 0
-300.814 -1160.12 31.0651 0
-309.729 -1172.28 32.9182 0
-318.494 -1183.83 34.6181 0
-326.885 -1194.89 36.1479 0
-335.062 -1205.31 37.4847 0
-342.544 -1214.72 38.5489 0
-349.439 -1223.16 39.3292 0
-357.082 -1231.02 39.8812 0
-366.541 -1238.29 40.3118 0
-377.444 -1244.91 40.6356 0
-389.523 -1250.69 40.865 0
-402.617 -1255.39 41.0162 0
-416.353 -1258.81 41.1016 0
-430.302 -1260.95 41.1351 0
-444.572 -1261.59 41.1316 0
-458.414 -1260.52 41.1048 0
-471.829 -1257.37 41.0682 0
-484.549 -1252.29 41.0359 0
-496.2 -1244.86 41.022 0
-505.98 -1237.27 41.022 0
-513.997 -1231.02 41.022 0
-520.945 -1225.62 41.022 0
-527.252 -1220.86 41.022 0
-533.024 -1216.48 41.022 0
-538.957 -1211.94 41.022 0
-545.326 -1207.08 41.022 0
-552.279 -1201.41 41.022 0
-560.669 -1194.76 41.022 0
-570.419 -1186.6 41.022 0
-582.437 -1176.85 41.022 0
-596.646 -1164.91 41.0223 0
-611.915 -1153.27 41.3821 0
-626.88 -1143.52 42.3931 0
-641.165 -1136.11 43.908 0
-655.148 -1130.44 45.8397 0
-668.753 -1126.74 48.056 0
-681.829 -1124.92 50.415 0
-694.451 -1124.47 52.8117 0
-706.62 -1125.76 55.1222 0
-718.411 -1128.25 57.2331 0
-729.853 -1132.14 59.0309 0
-740.81 -1137.38 60.3725 0
-751.285 -1143.63 61.1269 0
-761.012 -1150.21 61.568 0
-769.831 -1156.67 62.0673 0
-777.847 -1163.3 62.6508 0
-785.116 -1170.3 63.3432 0
-791.497 -1177.97 64.1584 0
-797.166 -1186.4 65.112 0
-802.418 -1195.96 66.2441 0
-806.994 -1207.07 67.5768 0
-811.238 -1219.85 69.1335 0
-815.138 -1234.47 70.9194 0
-818.647 -1251.46 72.9892 0
-821.854 -1271.02 75.3603 0
-824.74 -1291.7 77.8669 0
-827.413 -1311.96 80.3261 0
-829.874 -1331.89 82.7262 0
-832.607 -1351.35 85.0341 0
-835.571 -1370.31 87.2199 0
-839.123 -1388.15 89.1957 0
-843.205 -1405.53 91.0063 0
-848.12 -1421.76 92.5553 0
-854.052 -1436.88 93.8249 0
-861.161 -1450.67 94.7714 0
-869.552 -1463.23 95.3698 0
-879.599 -1474.08 95.5773 0
-891.518 -1483.33 95.2436 0
-905.253 -1490.06 94.2726 0
-920.646 -1495.35 92.6933 0
-937.374 -1498.93 90.5683 0
-955.118 -1501.44 87.9531 0
-973.877 -1503.21 84.8659 0
-993.278 -1504.38 81.3781 0
-1013.21 -1505.56 77.5129 0
-1033.27 -1506.76 73.3569 0
-1053.53 -1508.42 68.8955 0
-1073.46 -1510.93 64.2348 0
-1093.08 -1514.62 59.3706 0
-1112.36 -1518.29 54.5244 0
-1131.9 -1520.66 49.7119 0
-1151.36 -1522.11 45.1013 0
-1170.86 -1522.11 40.7585 0
-1190.65 -1521.77 36.7104 0
-1210.68 -1520.85 33.0603 0
-1231.1 -1519.42 29.8544 0
-1252.27 -1518.1 27.1284 0
-1274.06 -1516.45 24.9863 0
-1296.49 -1514.96 23.4992 0
-1315.94 -1514.39 22.7285 0
-1328.75 -1514.16 22.715 0
-1347.52 -1513.87 22.6922 0
-1369.11 -1513.52 22.5252 0
-1392.12 -1513.11 22.0955 0
-1417.54 -1512.68 21.3975 0
-1443.59 -1511.82 20.5118 0
-1469.98 -1510.64 19.4978 0
-1496.97 -1508.76 18.3916 0
-1523.63 -1506.41 17.2781 0
-1550.61 -1503.13 16.1756 0
-1577.11 -1498.77 15.1619 0
-1603.43 -1493.28 14.2725 0
-1629.08 -1486.73 13.5743 0
-1654.01 -1478.69 13.1145 0
-1677.75 -1469.3 12.951 0
-1701.2 -1456.92 12.9493 0
-1724.04 -1441.75 12.9493 0
-1746.49 -1423.94 12.9493 0
-1768.07 -1403.53 12.9493 0
-1789.07 -1381.56 12.9493 0
-1809.03 -1358.46 12.9493 0
-1828.42 -1334.27 12.9493 0
-1846.91 -1309.37 12.9493 0
-1863.91 -1284.68 12.9493 0
-1879.89 -1260.37 12.9493 0
-1894.74 -1237.03 12.9493 0
-1907.79 -1214.79 12.9493 0
-1919.73 -1194.28 12.949 0
-1930.23 -1175.01 13.1468 0
-1939.62 -1155.88 13.7022 0
-1947.84 -1137.17 14.5335 0
-1955.41 -1118.27 15.5997 0
-1961.81 -1099.03 16.8318 0
-1967.27 -1079.63 18.1524 0
-1971.89 -1059.67 19.5122 0
-1975.62 -1039.23 20.8321 0
-1978.52 -1018.1 22.053 0
-1980.73 -996.0 23.1194 0
-1982.2 -972.845 23.9624 0
-1982.88 -948.235 24.5193 0
-1982.74 -922.784 24.7159 0
-1982.6 -896.404 24.7159 0
-1982.5 -870.75 24.7159 0
-1982.29 -844.853 24.7159 0
-1982.36 -819.016 24.7159 0
-1982.41 -793.655 24.7159 0
-1982.55 -768.103 24.7159 0
-1982.62 -742.828 24.7159 0
-1982.77 -717.491 24.7159 0
-1983.04 -692.492 24.7159 0
-1983.25 -667.424 24.7159 0
-1983.53 -642.425 24.7159 0
-1983.74 -617.118 24.7159 0
-1984.02 -592.391 24.7159 0
-1984.02 -580.002 24.9147 0
-1984.11 -568.061 24.7155 0
-1984.14 -552.006 24.7147 0
-1984.05 -537.641 24.7147 0
-1983.98 -520.079 24.7147 0
-1983.35 -504.081 24.7147 0
-1982.39 -488.083 24.7147 0
-1981.06 -471.958 24.7147 0
-1979.47 -456.151 24.7147 0
-1977.57 -440.089 24.7147 0
-1975.79 -424.091 24.7147 0
-1974.14 -408.157 24.7147 0
-1972.62 -392.096 24.7147 0
-1971.22 -376.098 24.7149 0
-1970.14 -360.095 24.7149 0
-1969.38 -344.034 24.7149 0
-1968.11 -328.036 24.7149 0
-1966.27 -311.975 24.7149 0
-1964.87 -301.373 24.7149 0
-1963.15 -289.836 24.7149 0
-1961.32 -277.609 24.7149 0
-1959.65 -267.58 24.7149 0
-1957.92 -256.64 24.7149 0
-1955.97 -243.959 24.7149 0
-1954.94 -235.45 24.7149 0
-1954.39 -230.549 24.7149 0
-1952.76 -216.085 24.7149 0
-1951.21 -200.038 24.7148 0
-1950.42 -190.283 24.7148 0
-1949.52 -180.449 24.7148 0
-1948.76 -167.955 24.7148 0
-1948.43 -152.55 24.7148 0
-1948.38 -133.097 24.7148 0
-1948.43 -108.439 24.7148 0
-1948.45 -83.8563 24.7148 0
-1948.44 -57.4929 24.7148 0
-1948.34 -37.3184 24.7148 0
-1948.36 -20.2229 24.7148 0
-1948.36 -4.10059 24.7148 0
-1948.35 10.9575 24.7148 0
-1948.38 20.6107 24.7148 0
-1948.41 24.937 24.7148 0
-1948.43 28.6384 24.7148 0
-1948.4 36.1809 24.7148 0
-1948.42 38.7493 24.7184 0
-1948.42 40.9591 24.7148 0
-1948.42 46.4926 24.7148 0
-1948.42 53.8744 24.7148 0
-1948.42 60.3335 24.7148 0
-1948.42 67.5431 24.7148 0
-1948.42 73.8146 24.7148 0
-1948.42 78.9069 24.7148 0
-1948.42 84.964 24.7148 0
-1948.42 92.0127 24.7148 0
-1948.42 99.9995 24.7148 0
-1948.42 107.236 24.7148 0
-1948.42 113.743 24.7148 0
-1948.42 119.774 24.7148 0
-1948.41 125.646 24.7148 0
-1948.36 128.062 24.7148 0
-1948.3 129.996 24.7148 0

 

 

 

 

 

Link to comment
Share on other sites

1 hour ago, ZAZ said:

How did your train move? With you as driver?

Hallo ZAZ.. i have to clarify more to find a solution.. on the 2th and 4th picture i've used a trainer (RZL Trainer's "Speed Up" function) to move past the barrier area, reversed the trains as more as possible and show you where i can go further..

 

Changing the integer stat 181 solves my problem but off course that's not i'm after. I'm trying to improve my main.scm on my content and i've already activated the freight train mission but it's impossible to complete at the beginning. There must be a memory adress to unblock it and allow me to move past through barriers.. just like removing the wanted level at the beginning.. 🤔

Link to comment
Share on other sites

28 minutes ago, ZAZ said:

Isolate the Freight Train script, make a short stripped main with the Freight Train Sub-Mission only and find it out

i will definitely modify the Freight Train Mission and it seems the integer stat 181 is inevitable for me..

 

I do have a plan.. i will increase the integer stat 181 right after mission start/trigger and than i will revert the stats back to normal when the mission passed or failed.. the problem is..

 

how can i find out which island did i unlock and how can i apply this to the mission script? Can i use these variables for these checks?

 

$LS_FINAL_TOTAL_PASSED_MISSIONS == 1 < Integer Stat 0 
$170	VAR_INT	170	opened_badlands_up	170 = opened_badlands_up < Integer Stat 1
$171	VAR_INT	171	opened_sanfran_up	171 = opened_sanfran_up < Integer Stat 2
$172	VAR_INT	172	opened_vegas_up	172 = opened_vegas_up < Integer Stat 3
$173	VAR_INT	173	opened_desert_up	173 = opened_desert_up < Integer Stat 4
$174	VAR_INT	174	opened_la2_up	174 = opened_la2_up < Integer Stat 4

 

Edited by ArmanCan
Link to comment
Share on other sites

On 11/27/2023 at 9:29 PM, ZAZ said:

why not just store the current stat 181 to any var

 

hallo ZAZ.. ich entschuldige mich für die verspätete Antwort.. 🙂

 

I'm digging the opcodes to find a useful stuff but i couldn't.. where can i find it or do you have an example?.. I could only find these..

 

0EB1: get_char_stat_id 1@ store_to 2@
04A3:   $CURRENT_TOWN_NUMBER == 1 // $ == constant
07EF: get_town_number_from_point 83@ 84@ 85@ store_to 58@

 

Link to comment
Share on other sites

This segment runs every frame at the start of the :MAIN loop:

077E: get_active_interior_to $Active_Interior 
0652: $STAT_Unlocked_Cities_Number = integer_stat 181 
07D0: $Weekday = weekday 
09FB: $Current_Language = current_language 
0842: $Current_Town_Number = player $PLAYER_CHAR town_number 
01BD: $5284 = current_time_in_ms 

 

Stat 181 = (there's a lot of misinformation on this)

  • 0, LS1
  • 1, Green Sabre, SF and Countryside unlocked
  • 2, YKBB, LV and Desert unlocked
  • 3, Breaking the Bank..., Didier Sachs unlocked, openup terminates
  • 4, Home In The Hills, Didier Sachs unlocked, openup terminates

 

Added: $174, opened_la2_up never gets set. The script terminates before the command is executed.

Edited by OrionSR
Link to comment
Share on other sites

@OrionSR i don't fully understand that you are trying to help me or giving me some informations but thank you so much for your infos 🙏

 

@ZAZ i think i will do like this.. 🙂

 

Edit: It didn't work...

 

Spoiler
:FREIGHT_80 //Mission Start/Trigger
Player.ClearWantedLevel($PLAYER_CHAR)
03C7: set_sensitivity_to_crime 0.0 
135@ = 999999.0 
$ONMISSION = 1 
$161 = 1 
130@ = 0 
126@ = 0 
125@ = 0 
if 
  $163 == 0 
jf @FREIGHT_162 
$163 = 1
0652: 0@ = integer_stat 181 //---
0629: change_integer_stat 181 to 4 //---

---------

:FREIGHT_2773 //Mission Failed - Cancelled
Camera.SetBehindPlayer
Camera.Restore_WithJumpCut
00BE: text_clear_all 
03E6: remove_text_box 
00BA: show_text_styled GXT 'FREI_02' time 5000 style 1  // ~r~Freight mission cancelled!
014F: stop_timer $8238 
0151: remove_status_text $8241 
0151: remove_status_text $8242 
0629: change_integer_stat 181 to 0@ //---
wait 2000 
return

---------

:FREIGHT_3051 //First Mission/Freight Side Mission Passed 
if and
  $8240 == 0 
  $163 == 1 
jf @FREIGHT_3085 
0595: mission_complete 
$8240 = 1 
0629: change_integer_stat 181 to 0@ //---

:FREIGHT_3085
if and
  $8239 == 0 
  $163 == 2 
jf @FREIGHT_3123 
0595: mission_complete 
030C: progress_made = 1 
$8239 = 1
0629: change_integer_stat 181 to 0@ //--- 

 

Edited by ArmanCan
Link to comment
Share on other sites

Looks like you'll have to stick with stat 181. Checked IDA,
There is a function CTrain::IsNextStationAllowed(CTrain *train) and it uses the same stat 181.

[skip]
*&train = CTheZones::GetLevelFromPosition((12 * numStations + 9259256));
 return CStats::GetStatValue(181) + 1.0 >= *&train;

 

Edited by vladvo
Link to comment
Share on other sites

5 hours ago, vladvo said:

Looks like you'll have to stick with stat 181. Checked IDA,
There is a function CTrain::IsNextStationAllowed(CTrain *train) and it uses the same stat 181.

[skip]
*&train = CTheZones::GetLevelFromPosition((12 * numStations + 9259256));
 return CStats::GetStatValue(181) + 1.0 >= *&train;

 

do you have a list of them? If yes just post it here or send me a message.. 🙂

Link to comment
Share on other sites

26 minutes ago, ArmanCan said:

do you have a list of them? If yes just post it here or send me a message.. 🙂

A list of what ?

Link to comment
Share on other sites

You'll need to tweak this part of the R3 script:

:R3_2901
00D6: if 
0018:   $STAT_Unlocked_Cities_Number > 1 
004D: jump_if_false @R3_3455 
00D6: if or
00DD:   actor $PLAYER_ACTOR driving_car_with_model #FREIGHT 
00DD:   actor $PLAYER_ACTOR driving_car_with_model #STREAK 
004D: jump_if_false @R3_3455 

 

Setting stat 181 to 2 is good enough. Any higher and you risk the openup script shutting down.

 

Edited by OrionSR
Link to comment
Share on other sites

13 hours ago, OrionSR said:

You'll need to tweak this part of the R3 script:

if i tweak this part like this i can easily start the freight mission AT THE BEGINNING but the problem is "integer stat 181" prevents me to go further from Richman to Flint County area and Palomino Creek to Frederick Bridge..

:R3_2901
if 
  $STAT_UNLOCKED_CITIES_NUMBER >= 0 
jf @R3_3455 
if or
  Actor.DrivingVehicleType($PLAYER_ACTOR, #FREIGHT)
  Actor.DrivingVehicleType($PLAYER_ACTOR, #STREAK)
jf @R3_3455 

- If i modify the freight train mission to increase integer stat 181 to 2 (like i did above) i can finish all two levels but this time i can't get phonecalls from Sweet and Tenpenny because "MOB_LA" segments has been shutdown..

- I need to store the current value of integer stat 181 BEFORE triggering the freight mission and than i'm going to revert the changes if this mission passed or failed.. i digged to find a useful opcode or an example but i couldn't.. that's why i need help from you and the @ZAZ..

- I know that changing integer stat 181 is risky and not so making sense and that's why i hate doing this but i need help at least storing the current value and getting a good or bad result. In both case i will either move on or give up this idea 🙂

14 hours ago, vladvo said:

A list of what ?

A list of these adresses.. maybe i can look for a useful memory adress and apply a cleo script 🙂

 

Edit: well.. i think i found a memory adress to solve my problem but i have no idea how to turn this value into the "true"

 

0x6F7260	=	char __cdecl CTrain::NextStationIsAllowed(CTrain *train)

 

Edited by ArmanCan
Link to comment
Share on other sites

2 hours ago, ArmanCan said:

i can finish all two levels but this time i can't get phonecalls from Sweet and Tenpenny because "MOB_LA" segments has been shutdown..

Ah, I see the problem now. You need to restore stat 181 after $OnMission has been reset to 0.

If you are wondering where to edit, you could try saving stat 181 after naming the script and restore it just before terminating the script, keep all the edits right at the top of the mission.

 

Whoops, that's not quite right either. Don't change stat 181 until after $OnMission is True and don't restore until $OnMission is False.

@ArmanCan (updated)

Edited by OrionSR
Link to comment
Share on other sites

1 hour ago, OrionSR said:

you could try saving stat 181

but how can i save the current stat 181 and maybe how can i restore the saved stat 181? I only need to know how to do it so i can edit the freight train script properly 🙂

Link to comment
Share on other sites

You did that already in a previous snippet. 

0004: $ONMISSION = 1 
0652: 0@ = integer_stat 181 //---
0629: change_integer_stat 181 to 2 //---
...
0629: change_integer_stat 181 to 0@ //---
0004: $ONMISSION = 0 

 

Edited by OrionSR
Link to comment
Share on other sites

just a small update.. my attempts to complete the freight mission at the beginning and train passage through flint county and the frederick bridge area has been unsuccesfull.. tht means i'm giving up this idea and closing this case..

Link to comment
Share on other sites

Don't give up. Something may be found.

So, just to clarify.

1. The train stops automatically near the point where barriers were.

2. Altering stat 181 screws the game. Right ?

Edited by vladvo
Link to comment
Share on other sites

Ok. I managed to do this. I was expecting the train to crash on that barrier, but it just went through it. Of course, in my game I immediately got 4 stars.
Test and let me know.
https://i.imgur.com/Jk5eYrR.jpg

 

The code
 

0A8C: write_memory 0x6F8A63 size 1 value 0x50 virtual_protect 0
0A8C: write_memory 0x6F8A64 size 1 value 0x8B virtual_protect 0
0A8C: write_memory 0x6F8A65 size 1 value 0x85 virtual_protect 0


0A8C: write_memory 0x6F8B11 size 1 value 0x50 virtual_protect 0
0A8C: write_memory 0x6F8B12 size 1 value 0x8B virtual_protect 0
0A8C: write_memory 0x6F8B13 size 1 value 0x85 virtual_protect 0


Explanation.
There is a 

0x6F86A0 CTrain::ProcessControl(CTrain *this)

which at some point calls this

 0x4418E0 CGameLogic::CalcDistanceToForbiddenTrainCrossing(float, float, float, float, float, float, char, int)


I thought that the only reason to calculate this distance is to safely stop the train. Stuff in CalcDistance uses stat 181 to do calculate, but checks only
for 0.0 and 1.0. Yes, floats. Not sure why, I've seen it before. Anyone knows why the code uses floats ?
Ok, back to CTrain:ProcessControl.
After calling CGameLogic::CalcDistanceToForbiddenTrainCrossing the code compares the result to 230.0 
 

0x6F8B0A E8 D1 8D D4 FF call _ZN10CGameLogic36CalcDistanceToForbiddenTrainCrossingE7CVectorS0_bPS0_ ; CGameLogic::CalcDistanceToForbiddenTrainCrossing(CVector,CVector,bool,CVector*)
0x6F8B0F D8 1D 80 8F 85 00                 fcomp   ds:flt_858F80   ; Compare Real and Pop

There's a similar call and fcomp at 0x6F8A5C.
So, we just change flt_858F80 to flt_858B50 (f_Zero in IDA, 0.0) in both locations.

@ArmanCan please test and let me know if it worked. 
I have a 1.0 US game exe version.

Link to comment
Share on other sites

4 hours ago, vladvo said:

So, just to clarify.

- Yes and yes..train stops (from both sides) near barrier areas and storing - changing and restoring the current integer stat 181 doesn't work.. 181 always initiates it's effects and restoring the current value doesn't help me..

- As you can see above i'm trying to improve and fix the main.scm with preserving the scm originality.. well.. it would be also great if i could complete the oddjobs from the "forbidden" cities at the beginning but our main focus is traveling the train without restrictions... 🙂

- My aim to get a most free main.scm with all unlocked features as possible and it seems there are only two things (free travel with trains and the freight train mission at the beginning) left..

2 hours ago, vladvo said:

The code

If i understand it correctly these two groups are for the flint county and the frederick bridges and all i have to do is apply these in a CLEO script..

2 hours ago, vladvo said:

Anyone knows why the code uses floats ?

You already said that before.. it's all about "distance"..🙂

2 hours ago, vladvo said:

 please test and let me know if it worked. 
I have a 1.0 US game exe version.

for sure my man.. i was thinking to complete %100 and you gave me a nice noel present 😉

Link to comment
Share on other sites

24 minutes ago, ArmanCan said:

If i understand it correctly these two groups are for the flint county and the frederick bridges and all i have to do is apply these in a CLEO script..

The CalcDistance function reads stat 181 and counts stuff based on this. The first 3 addresses are for the case when stat 181==0.0 (SF closed), the second three is for stat 181==1.0 (LV closed).

That's why I asked why the code uses floats. 

 

Link to comment
Share on other sites

12 minutes ago, vladvo said:

The CalcDistance function reads stat 181 and counts stuff based on this. The first 3 addresses are for the case when stat 181==0.0 (SF closed), the second three is for stat 181==1.0 (LV closed).

That's why I asked why the code uses floats. 

 

YOU THE MANN!! 👍 they are working like a charm 😉

 

i've tried to complete the freight mission from both directions and i've never encountered any problem.. and than i've immediately started the big smoke mission to see if the "MOB_LA" segments are terminated (Phonecalls from the Sweet, Cesar and the Tenpenny).. no issue has been observed so far.. i'm getting the phonecall.. i've saved the game after big smoke mission.. you can also test my file if you want..

 

https://gtasnp.com/1OjBSd

 

Now i need a complete %100 run and test the remaining stuff 🙂

 

Thank you so much vladvo.. 🙏.. i wish i could buy you some drink but at least i can give you this.. 🍺 😎

Link to comment
Share on other sites

Some further inspections of this functions show stat at some point, when conditions for train stop are met, it just gives a command for the train to activate train breaks.
 

ESI->m_fTrainBreak = 512.0;
mov     dword ptr [esi+5B4h], 44000000h

44000000h is hex value for 512.0
(float to hex and hex to float converter here https://gregstoll.com/~gregstoll/floattohex/ )
So, we can just change one byte (44) to 00 with this command:
 

0A8C: write_memory 0x6F8B28 size 1 value 0x00 virtual_protect 0

Seems to work as well, and less code. ))

Well, good that it works. How do game-controlled trains behave when they reach barriers ? Is there a possibility that allowing them to pass (not to stop) will mess up something ? 

Link to comment
Share on other sites

Ok, checked that. Followed a game-created train. It just went through the barrier and traveled to SF as usual. Stopped there and passengers walked out. Looks like no problems with that.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • 1 User Currently Viewing
    0 members, 0 Anonymous, 1 Guest

×
×
  • Create New...

Important Information

By using GTAForums.com, you agree to our Terms of Use and Privacy Policy.