[Mod] Advanced Trains [advtrains] [2.4.3]

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Maverick2797 wrote:
Thu Feb 24, 2022 14:08

Rather than add another texutre/another file/another image for a simple colour change, you can use texture modifiers

Code: Select all

base_texture.png^[­colorize:#ff00dc
will use the texture base_texture.png and apply colour (in this case pink) to it afterwards.

Search for "Texture modifiers" in lua_api.txt for more info on how to use them.
Wouldn't that change the colour of the sleepers? I'm sure real-world railways don't have pink sleepers.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

Maverick2797 wrote:
Thu Feb 24, 2022 13:54
FYI the advtrains mailing list has been deprecated and split into advtrains-devel and advtrains-discuss to minimise patches etc getting lost in lengthy threads.
Woops, thank you for the reminder. I'll send patches to that in future..
56independent_actual wrote:
Thu Feb 24, 2022 14:42
Maverick2797 wrote:
Thu Feb 24, 2022 14:08

Rather than add another texutre/another file/another image for a simple colour change, you can use texture modifiers

Code: Select all

base_texture.png^[­colorize:#ff00dc
will use the texture base_texture.png and apply colour (in this case pink) to it afterwards.

Search for "Texture modifiers" in lua_api.txt for more info on how to use them.
Wouldn't that change the colour of the sleepers? I'm sure real-world railways don't have pink sleepers.
We could transition the tracks to use separate materials in blender for the actual track part and the track equipment part as I refer to it, which is the two cuboids which usually have arrows on them, and then colourise the base texture of a grey track equipment texture. At the same time, a lot of special tracks have different textures on their track equipment, such as the station/stop track. So I don't see a real benefit to colourising really. There could be benefit to splitting the texture parts up though, especially if we got a better track texture or multiple track types e.g. concrete sleepers.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
orwell
Member
Posts: 958
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
IRC: orwell96_mt
In-game: orwell
Location: Raxacoricofallapatorius

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by orwell » Post

Maverick2797 wrote:
Thu Feb 24, 2022 13:54
56independent_actual wrote:
Thu Feb 24, 2022 13:44
I've made my first two patches to advtrains at the mailing list:
FYI the advtrains mailing list has been deprecated and split into advtrains-devel and advtrains-discuss to minimise patches etc getting lost in lengthy threads. There's a notice on the advtrains list page (here for reference) and your git-send-email config should probably be adjusted to use the advtrains-devel address instead.
Interesting... I didn't know that either. Since when is this? (btw. I am subscribed nouw)
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

Hmm ... I still need to work on this for a while

Image
This is basically the same as above, but I have to put it this way so that the image doesn't show up again in the attachments.
2022-03-02-23-32-14.png
2022-03-02-23-32-14.png (37.04 KiB) Viewed 4103 times

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

yw05 wrote:
Wed Mar 02, 2022 22:45
Hmm ... I still need to work on this for a while

Image
This is basically the same as above, but I have to put it this way so that the image doesn't show up again in the attachments.
2022-03-02-23-32-14.png
That should be Gleis, not Schiene (ein Gleis hat zwei Schienen und viele Schwellen). Of course, this error may have been in advtrains for a while..
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

Blockhead wrote:
Thu Mar 03, 2022 04:27
That should be Gleis, not Schiene (ein Gleis hat zwei Schienen und viele Schwellen). Of course, this error may have been in advtrains for a while..
I did not notice that somehow for months. Thanks for pointing it out.

Edit: This seems to also be the case for some other translation files. I have corrected those as well. There is also a bug in the GUI where the file is not closed properly, which I have fixed now.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Hello. I am thinking of using numbers to check the development of Advtrains infrastructure on servers. I came up with the Advtrains Development Quotient.
We have these variables:

Amount of Lines, l
Amount of Stations, s
Amount of interchanges, i

and we have these biases:

s, 3
l, 1.1
i, 1

And this formula:

((s*3)+(l*1.1)+(i*1))/3

I have 29 stations, of which there are 12 lines serving these, and 14 interchanges. (Numbers including planned railways).

So i put these numbers in my formula:

((29*3)+(12*1.1)+(14*1))/3

I got 38 to 2 SF.
I'm just wondering how i could improve this formula, knowing there are mathematicians on the advtrains development team, beyond GCSE level.

I'm also wondering what quotients other servers have.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Maverick2797 » Post

Why do we need to compare advtrains network sizes? I fee like this is comparable to measuring something else. ie "I've got a bigger "station" than you."

Also number of stations and lines does not indicate how well a network flows or runs in general. 3 well planned stations with proper interlocking of routes will always be more enjoyable to work with than a dozen poorly made stations.
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

User avatar
Festus1965
Member
Posts: 4181
Joined: Sun Jan 03, 2016 11:58
GitHub: Festus1965
In-game: Festus1965 Thomas Thailand Explorer
Location: Thailand ChiangMai
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Festus1965 » Post

56independent_actual wrote:
Fri Mar 04, 2022 22:20
I'm also wondering what quotients other servers have.
My servcer sure not, after I know the effects of lag from ADV Trains ...
If you count also basic rail cart systems ... I will count the one on Asia Thailand (just mine as 14.000 nodes long) or Pandorabox I build about 35.000 nodes ...
Human has no future (climate change)
If urgend, you find me in Roblox (as CNXThomas)

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Festus1965 wrote:
Fri Mar 04, 2022 22:51
56independent_actual wrote:
Fri Mar 04, 2022 22:20
I'm also wondering what quotients other servers have.
My servcer sure not, after I know the effects of lag from ADV Trains ...
If you count also basic rail cart systems ... I will count the one on Asia Thailand (just mine as 14.000 nodes long) or Pandorabox I build about 35.000 nodes ...
I don't think you understand. The Quotient is a combination of measures, which can be taken from an average network map. It does not measure amount of nodes (This was measured in earlier versions, but i removed it as i like things to be easy).

This quotient can be used by any system with a web of lines, stations, and interchanges.
Last edited by 56independent_actual on Fri Mar 04, 2022 23:32, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Maverick2797 wrote:
Fri Mar 04, 2022 22:24
Why do we need to compare advtrains network sizes? I fee like this is comparable to measuring something else. ie "I've got a bigger "station" than you."

Also number of stations and lines does not indicate how well a network flows or runs in general. 3 well planned stations with proper interlocking of routes will always be more enjoyable to work with than a dozen poorly made stations.
This Quotient, like all models, is flawed in some way. This is meant to give a balanced meter of size and not the quality of a network. I might make a different quotient in the future which takes interlocking systems into account. Size, whilst not perfect, is a good way of measuring advtrains networks. Take suburban rail. Having more span makes it easier for people to get on the network, regardless of quality.

The Quotient is designed for server admins (like me) who aim to catch up with the networks of others to guage their network size in comparison to other networks.

In the case of my server, i build upon past experience. My first railways use practices my new railways would never think of. So i believe these can cancel out.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Blockhead » Post

As Maverick pointed out, poorly run service is signficant much more than network size or complexity. For a timetabled service, you might incorporate delivery and punctuality statistics as Public Transport Victoria requires of its rail and bus operators.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

Blockhead wrote:
Sat Mar 05, 2022 03:15
As Maverick pointed out, poorly run service is signficant much more than network size or complexity. For a timetabled service, you might incorporate delivery and punctuality statistics as Public Transport Victoria requires of its rail and bus operators.
Maybe i add more variables, like:

* Average speed of trains, sp
* Percentage of signals at green, g
* Amount of time spent in signal sections vs amount of time to wait in the station track, sw

Adding biases and adding them to the formula is a task which goes to someone else (or future me).

This requires someone to visit the server and use a stopwatch and radar gun. Whilst ADQ-2 (ADQ-1 included amount of nodes) focused on size and being accessible to all, ADQ-3 focuses on providing a more realistic number.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

In addition to what Blockhead and Maverick2797 wrote, IMO the most important factor on public transit in general is the level of demand and how well the demand is satisfied by the network.

For a transit system in an urban area, what matters may include
  • the coverage of stops/stations
  • the ease of accessing different types of services (bus, subway, express trains)
  • the easy of actually getting somewhere using the transit network
When putting this into a MT server, this means that you need to consider
  • how well an area is served by a station
  • how easy it is to get to the nearby station
  • if I want to travel somewhere far away, how easy it is to get to a station where I can take an express train
  • how much time I need to spend on transfers
None of these can be well represented with what you proposed:
  • Number of (physical) lines: This can depend on how well the tracks are shared. I can run local trains and express services on the same line or separately.
  • Number of services: This can depend on the length of the services. Some people prefer operating services with less stations and instead creating a hierarchy of more levels, while some may prefer operating services with more stations.
  • Number of stations: This does not reflect how well the stations are served and how well the station serves the area around it.
  • Number of interchanges: This can depend on how you run your services. If you have a long commuter service and a corresponding express service, then every express station is technically an interchange, but that is probably not what you want.
  • Average speed of trains: I am not sure how this is relevant at all. Sure, with a higher average speed you can get to places faster, but in a hierarchy of train networks this can depend on the type of the service, so this can vary depending on the weight of each type of service, and it is obviously nonsensical to calculate the average speed of tram lines and express trains put together, as the average speed of neither would be sensibly close to the average.
  • Percentages of signals of green: This can depend on the signaling system that is involved.
  • Amount of time spent in signal sections vs amount of time to wait in the station track: I am not sure what you expect to get here at all, especially "time spent in signal sections"

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Sat Mar 05, 2022 11:13
When putting this into a MT server, this means that you need to consider
  • how well an area is served by a station
  • how easy it is to get to the nearby station
  • if I want to travel somewhere far away, how easy it is to get to a station where I can take an express train
  • how much time I need to spend on transfers
None of these can be well represented with what you proposed:
  • Number of (physical) lines: This can depend on how well the tracks are shared. I can run local trains and express services on the same line or separately.
Since i am speaking a human language which is naturally ambiguous, i meant lines as they appear on a map. I might add a second factor for quadruple and octuple rail segments
[*] Number of services: This can depend on the length of the services. Some people prefer operating services with less stations and instead creating a hierarchy of more levels, while some may prefer operating services with more stations.

[*] Amount of time spent in signal sections vs amount of time to wait in the station track: I am not sure what you expect to get here at all, especially "time spent in signal sections"
I mean time spent on a route. If it is vastly longer then the station track, this is very poor, as this means the service is inneficent.
[/list]
I'll make sure to make an ADQ-4 which fixes these issues.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sat Mar 05, 2022 13:24
i meant lines as they appear on a map.
Then it does not simplify things much. You can have a single line served by multiple types of services where (for example) a local service stops at every station and an express service serves only a few on the line.
I might add a second factor for quadruple and octuple rail segments
I am not sure how that addresses what I mentioned on satisfying demands. It is obviously a way to allow higher train capacity, but not necessarily the only (and the best) way. Sometimes tracks being used at (almost) the full capacity is a sign of excessive services/trains and not of the need to add more.
  • Amount of time spent in signal sections vs amount of time to wait in the station track: I am not sure what you expect to get here at all, especially "time spent in signal sections"
I mean time spent on a route. If it is vastly longer then the station track, this is very poor, as this means the service is inneficent.
I do not understand this argument.

The time for which a train stops at a station may be constant regardless of the type of train you are on. However, depending on the type of the service, the distance between the stations (and therefore also the time spent traveling between the stations) can differ. For long-distance services in-game, this means that the ratio can be much higher than on subway services.

What I think you really want is a comparison of the time spent between stations and the time that is theoretically needed to travel between stations. However, this ratio can differ depending on lag and the method used to calculate the distance. The latter may be less significant for services with stations far away from each other, but lag is generally hard to measure and depends on other factors that can not be guaranteed to be constant.

As a note on the "method used to calculate the distance": afaik advtrains currently uses a model where trains either move at constant speed or constant acceleration. However, in real life, the acceleration can depend on various factors, including the difference between the current speed and the target speed set by some system. I currently do not have the mathematical background to work on differential equations, but this could be something to implement in the future for realism.

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

I added a text renderer to the trainhud-unifont branch to (hopefully) make some things easier. There has not been any particular visual changes to the train HUD so far. Currently there are a few potential issues:
  • I have changed some internals of the train HUD presets and there may be some regressions that are rather hard to test programmatically.
  • I need to implement lazy texture generation (the texture generation at startup takes about 8 seconds or so). Edit: Done.
Attachments
2022-03-13-14-01-40.png
2022-03-13-14-01-40.png (860 Bytes) Viewed 3588 times
Last edited by yw05 on Sun Mar 20, 2022 19:08, edited 1 time in total.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

I am thinking of building a cargo railyard where wagons are powered by momentum from humps, but i am a bit dusty on:

* Splitting wagons from a longer train and making the wagons take a different route with no power, whilst the train is moving.
* Identifying wagons by type (gondola containing mese, track car, tank car) using LuaATC
* Starting wagon movement without external power (for use on sloped storage areas)

I do not want to have to use a locomotive to move wagons when in real life, railyards can often join cars to trains, using humps.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Maverick2797
Member
Posts: 128
Joined: Sun Aug 05, 2018 12:37
In-game: Maverick2797
Location: Poking about here and there...

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by Maverick2797 » Post

56independent_actual wrote:
Fri Mar 18, 2022 21:31
* Splitting wagons from a longer train and making the wagons take a different route with no power, whilst the train is moving.
Unfortunately wagons can't (yet) move under their own power without a locomotive connected. If you had short interlocking sections and a locomotive at each end of the train you could possibly simulate a kick manoeuvre, but with a locomotive still connected. Something involving split_at_index(length,"B0WRD1S3") or split_at_fc("B0WRD1S3",max_length) would work.
* Identifying wagons by type (gondola containing mese, track car, tank car) using LuaATC
You can use split_at_fc() to separate off the locomotives (which should have a blank FC field) and the first set of matching wagons. (See the Atlac Readme for more info, under Shunting Functions and Variables)
* Starting wagon movement without external power (for use on sloped storage areas)
See first point. Also the slopes achievable are both too short and too steep for a realistic hump yard (either 33% or 50% grades.)
The number you have called is not available during a solar eclipse. This message will self destruct in ten seconds in protest... [BEEP]

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

Maverick2797 wrote:
Sat Mar 19, 2022 00:09
56independent_actual wrote:
Fri Mar 18, 2022 21:31
* Splitting wagons from a longer train and making the wagons take a different route with no power, whilst the train is moving.
Unfortunately wagons can't (yet) move under their own power without a locomotive connected.
train_step_b clips the maximum speed to 0 for trains without a locomotive. This could be changed, but with the default -3m/s^2 the train is probably not going anywhere sensibly far without having a high initial speed. Perhaps changing the default lever to "roll" (-0.5m/s^2) would then make more sense,

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

How do i get information from trains not on a LuaATC rail? Maybe i was to run train_length(id) to get the length of a train of id id. I am working on a subway information system, and i can't seem to be able to get any useful information without placing a ton of slave LuaATC tracks sending diglines to the master.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sun Mar 20, 2022 08:22
How do i get information from trains not on a LuaATC rail?
I don't think that is possible at the moment except for the approach callback. A function that returns a (similar) copy of the internal train table would be interesting, though.
slave LuaATC tracks sending diglines to the master.
Is there a reason you need digilines for the purpose? You could define something in the init code like this:

Code: Select all

local tbl = { --[[...]] }
function F.update(...)
  -- do something to tbl here
end
And then (for example) call the F.update function. You can also use the S table if you want the information to be persistent across server restarts (there are some implementation-defined restrictions though)

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Sun Mar 20, 2022 09:15

Code: Select all

local tbl = { --[[...]] }
function F.update(...)
  -- do something to tbl here
end
And then (for example) call the F.update function. You can also use the S table if you want the information to be persistent across server restarts (there are some implementation-defined restrictions though)
Do i make another function for accessing tbl? Why can't i use, say F.tbl = to make it simpler?

Do i have to use F.x for every component or is F neglected in LuaATC tracks?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

yw05
Member
Posts: 366
Joined: Tue May 07, 2019 12:59
GitHub: y5nw
IRC: y5nw
In-game: ywang
Location: Germany

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by yw05 » Post

56independent_actual wrote:
Sun Mar 20, 2022 09:45
yw05 wrote:
Sun Mar 20, 2022 09:15

Code: Select all

local tbl = { --[[...]] }
function F.update(...)
  -- do something to tbl here
end
And then (for example) call the F.update function. You can also use the S table if you want the information to be persistent across server restarts (there are some implementation-defined restrictions though)
Do i make another function for accessing tbl? Why can't i use, say F.tbl = to make it simpler?
You can use the F table as well. I tend to use local variables as a habit and (in certain cases) to prevent direct access to certain variables.
Do i have to use F.x for every component or is F neglected in LuaATC tracks?
You do have to use F.x if that is stored in the F table. F is just a global variable like other parts of the API.

You could, however, make certain variables local, such as local x = F.x. However, changing (in this case) x does not affect F.x or vice versa, which may or may not be what you want.

User avatar
56independent_actual
Member
Posts: 452
Joined: Sun May 23, 2021 16:10
IRC: independent56
In-game: 56independent
Location: Girona Province
Contact:

Re: [Mod] Advanced Trains [advtrains] [2.4.1]

by 56independent_actual » Post

yw05 wrote:
Sun Mar 20, 2022 09:56
You can use the F table as well. I tend to use local variables as a habit and (in certain cases) to prevent direct access to certain variables.
Does that have negative security implications here?

Can i subtract two POS() objects using the standard subtraction operator (-) with no difficulties? I want to calculate distance between two arbituary points in space which i hope the user will match to the location of the LuaATC and station tracks. Otherwise, i will have to use longform (pos1.x - pos2.x) + (pos1.y - pos2.y) + (pos1.z - pos2.z) (I think this is how it works).

Can i bypass using the environment init code if i directly write to F.tbl from the LuaATC track?
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).

Post Reply

Who is online

Users browsing this forum: Ahrefs [Bot], Semrush [Bot] and 19 guests