[Mod] Advanced Trains [advtrains] [2.4.3]
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:43, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
To what extent is this relevant to the development of advtrains?56independent_actual wrote: ↑Sun Jun 26, 2022 14:15Take a minute to think. Who do we make advtrains for? The users. Who tends to be the biggest users of advtrains? server admins.
Server maintenance is quite important. Maybe we need to tell server admins NOT to give out LuaATC by default after a server admin brings up a fork bomb attack on the server.
There is the mailing list (and the forum) for feature requests.Take Vanessa's forum reply. They asked for what is essentially forgiving collision mode, and they got what is essentially forgiving collision mode. Their server was important to the development of advtrains.
Advtrains also causes server maintenance, so finding ways to make it easier is important to increase adoption.
That sounds like release notes and proper documentation, the former of which is made for every release anyway and the latter is WIP (-> the doc branch)I have come up with an idea: Press conferences. The Advtrains developer team give out tips and information to server admins at regular intervals, summarising the git history, and potential features and retrofits needed to ensure future-compatibility with new features. These do not need to be live, instead possibly kept as wiki pages. I could actually do this myself.
"Future compatibility" is IMO BS in that you can not tell what will ever be added to advtrains (or MT) that involves breaking things. Backward compatibility will obviously be kept, but that is a completely different matter.
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:44, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- Member
- Posts: 157
- Joined: Sat Nov 28, 2020 06:33
- GitHub: W3RQ01
- In-game: Dario23 or W3RQ01
- Contact:
Re: [Mod] Advanced Trains [advtrains] [2.4.1]
1) instead of using the single doors would be better the entire wagon since every wagon has a road number56independent_actual wrote: ↑Sun Jun 26, 2022 18:34I think we need an ATC interface for choosing which doors to open and what units to use (Cariage index (C, which opens doors on carriage numbers until the number which does not fit), length index (L, which measures metres of train and uses command until specific metre), or door index (D, measures by each door on the wagon, lengthwise), each works in a different way).
On the London Underground, some stations are not long enough for the entire train, so sometimes the back carriages do not open their doors (this is warned before however).
Personally, i believe that by adding a number to the end of a door command would work best. For example, take OL20L. This tells us to open the left doors until index 20, in distance units. This means after 20 metres, the doors do not open.
I understand that this may be hard to implement. How i can imagine it working is that advtrains uses the model length*multiplier to find the true length of a carriage and train mods possibly supplying position of the doors. Then Advtrains takes the wagons of the train and adds their distances together until it finds a wagon which surpassess the index, and refuses to open the doors on that specific wagon and the trailing wagons.
On approach to an ATC rail with a command, it warns that people in wagon x and beyond will have their doors not opened.
This is simple a little proposal, but i hope this can be accepted to allow me to make longer trains without worrying about station length
2) put down a good proposal and post it on the wiki or submit it at the mailing list
3) too long trains are bad ahah
OneUnitedPower
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:44, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:45, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
- Blockhead
- Member
- Posts: 1634
- 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]
Definitely don't touch the new files - my best guess is they would override the main files and then all your advtrains data would be gone! These errors come from the advtrains serialize_lib code. The .new files are written to before the original files are deleted. Then the original files are deleted, and then the .new files are moved to the main file name. This makes the entire operation safely atomic.56independent_actual wrote: ↑Tue Jun 28, 2022 06:43Why does advtrains need the .new files? Should i just do touch?
What operating system does your server run? Have you configured serialize_lib_no_auto_windows_mode in your minetest.conf? You may want to enable advtrains_enable_logging to save a sparate advtrains.log file.
Are there any other error messages from serialize_lib and/or advtrains? The most likely message I would expect before these is "[serialize_lib] (?): Unable to save data to '<filename>'.new:".
Do you have a very large number of any object such as trains, wagons, TCBs, signals etc? Have you been putting any funny symbols into advtrains formspecs e.g. wagon properties, onboard computer, LuaATC environments?
Finally, if troubleshooting doesn't help, can you upload your advtrains files for debugging? + Mention any train mods you have. We don't need the actual Minetest world file - one can change advtrains' init.lua with advtrains.IGNORE_WORLD = true to run the advtrains without the actual world file then use singlenode.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:45, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:45, edited 5 times in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:45, edited 2 times in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
I don't think "funny symbols" should be a problem from what I have tested so far.56independent_actual wrote: ↑Tue Jun 28, 2022 16:30I don't know what you mean by "very large", but i run an hourly survey of advtrains nodes and put them all inside my website: http://56i.duckdns.org/maps/.Do you have a very large number of any object such as trains, wagons, TCBs, signals etc? Have you been putting any funny symbols into advtrains formspecs e.g. wagon properties, onboard computer, LuaATC environments?
About the funny symbols... I have a station called "Monshō crest", which has been put inside a station track. The name borrows the Japanese word for crest, just like "Shahara Desert" means Desert Desert.
From what I know this is likely a very bad setup or a bug.56independent_actual wrote: ↑Wed Jun 29, 2022 09:41What is a TS lock? How does the routesetting routine even come across TS locks?
These messages have been annoying chat
How do i prevent them?Code: Select all
Encountered ts lock during real run of routsetting routine, at ts=481109 While setting route L3 of S[(52, 22, -2985)/1]
From my knowledge Advtrains does two runs of the routesetting routine when setting a route: once to check whether the route can be set and once to actually set the route (the latter is the "real run" and obviously only runs when the route can be set).
What the message says is basically that it should be possible to set the route, but, during the second run (i.e. when actually setting the route), the track section is already "locked" (i.e. occupied by a train or reserved for a route). Perhaps the route goes through the same section more than once?
What is the full RC you use for these trains? In particular, does the routing code only contain F or C?56independent_actual wrote: ↑Wed Jun 29, 2022 09:48I have a problem with ARS rules on station tracks.
Below is the entire list of ARS rules.
However, when i have a train with RC of F or C, the train does not stop, however routing code F stops at this station:Code: Select all
RC O !RC S !RC C !RC F
Without this working, i am unable to run express services on the same line as local services.Code: Select all
RC O RC S RC C !RC F
Edit: regardless of this situation, the return nil line does not look right here:
Code: Select all
for arskey, arsent in ipairs(ars) do
--atdebug(arsent, line, routingcode)
if arsent.n then
-- rule is inverse...
if arsent.ln and (not line or arsent.ln ~= line) then
return arskey
elseif arsent.rc and (not routingcode or not string.find(" "..routingcode.." ", " "..arsent.rc.." ", nil, true)) then
return arskey
end
return nil
end
if arsent.ln and line and arsent.ln == line then
return arskey
elseif arsent.rc and routingcode and string.find(" "..routingcode.." ", " "..arsent.rc.." ", nil, true) then
return arskey
end
end
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:47, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
I think Blockhead meant characters with codepoints outside the 0000-007F range. I have not had any problem using advtrains with these characters.56independent_actual wrote: ↑Sat Jul 02, 2022 09:36As a sidenote, it is also potentially an offensive phrase, a westerner (although they are more of a south-easterner) calling any other language (sic) "funny symbols" could be a cancellable offence on Twitter (using quote marks and possibly sic may help prevent this). I think many people would prefer the phrase "non-roman symbols" or "foreign symbols". I always think that the capability to handle Unicode is of high priority in an increasingly globalised world with people needing ß, ĥ, or ñ to be able to actually speak.
In addition, UTF-8 encodes multibyte characters in such a way that it does not interfere with serialize_lib's (un)escaping code.
And I have seen messages written in romanized form in a language where Latin alphabets are not the official script, and yes, it was awkward.(i have heard of informal internet Spanish neglecting to use diacritics, relying on context and autocorrect)
With only the RC F or C, I could not reproduce any of the behavior you described (which is, from hindsight, not surprising):Yes, generally the RC is only these. I have a three-tier system of "stoppage", where O (Often) is very often and stops at every station, S (Skipper) the most useless and stopping only at "select stations", and C (Chronic Skipper) which only stops at important stations, such as termini or important interchanges. F means Freight, which is equivalent to FREIGHT on LF. So, on passenger networks, a train would be given a line, which dictates the route it takes, and a routing code (on lines which use them, such as L3 on the metro or some Potemkin lines, which allow skipping services by only using RC O, but i would like to be explicit on what i allow to stop and what i allow to skip). The routing code is normally a single character as that is all that is needed.What is the full RC you use for these trains? In particular, does the routing code only contain F or C?
I've had no problem with diesel locomotives pretending they are freight (despite not having any wagons) using only F.
56independent_actual wrote: ↑Wed Jun 29, 2022 09:48Below is the entire list of ARS rules.
However, when i have a train with RC of F or C, the train does not stop, however routing code F stops at this station:Code: Select all
RC O !RC S !RC C !RC F
Code: Select all
RC O RC S RC C !RC F
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:48, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
I thought you had problems with ARS not behaving in the way it is expected? I could not reproduce any of the behavior you described.56independent_actual wrote: ↑Sat Jul 02, 2022 10:39What hindsight have you gotten?(unsurprisingly, from hindsight):
On my device, with only the RC F or C, the train did stop at the station with the following rules:
Code: Select all
RC O
!RC S
!RC C
!RC F
With only the RC F, the train did not stop at the station:
Code: Select all
RC O
RC S
RC C
!RC F
- LMD
- Member
- Posts: 1394
- Joined: Sat Apr 08, 2017 08:16
- GitHub: appgurueu
- IRC: appguru[eu]
- In-game: LMD
- Location: Germany
- Contact:
Re: [Mod] Advanced Trains [advtrains] [2.4.1]
But most importantly: All of this can be considered offtopic. This is a thread about advtrains, not about your thoughts on westernization or how others call non-ASCII characters. As long as there is no advtrains bug here (for which only UTF-8 encoding specifics would be relevant, mind you) I'd advise you to keep this out of here.56independent_actual wrote: ↑Sat Jul 02, 2022 10:39Such as Chinese pinyin, which uses diacritics to mark tones. Or romanized Russian, in which some systems use many diacritics. But this can be considered a westernisation of other cultures, a European attack on native writing systems. [...]
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:48, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:49, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
That behavior is likely intended.56independent_actual wrote: ↑Sat Jul 02, 2022 16:21That is my issue. The train stops when it's not supposed to.yw05 wrote: ↑Sat Jul 02, 2022 10:56On my device, with only the RC F or C, the train did stop at the station with the following rules:Code: Select all
RC O !RC S !RC C !RC F
A train matches a set of ARS rules if it matches at least one of the rules. This means that a train with only the RC F would match the set of ARS rules as it matches !RC S.
In the context of ARS, this means that, if a train matches an ARS rule in a set, the system does not check whether it also matches other rules in the set as doing so would not affect the result (i.e. the fact that the train matches the set of ARS rules).What does "short-circuit" mean?I originally did not expect this to be the case, but later I figured out the reason for this behavior. Specifically, the train matches the rule !RC S and short-circuits.
You can not.56independent_actual wrote: ↑Sat Jul 02, 2022 17:13How do i take ATC delays and use them in LuaATC?
Internally, the ATC Dx and W commands work by saving the rest of the ATC commands and setting specific properties of a train. This is possible with plain ATC largely because of its simplicity and the fact that it can easily be represented by a string.
A blocking "wait" function is not possible with LuaATC largely because Lua functions/coroutines can not be saved across restarts. A non-blocking "wait" function similar to interrupt or schedule could be possible, but I suppose there is not much need for this feature.
This seems more like a XY problem to me.Say we were waiting for the point a train was at 1 m/s, using B1W.
Once W is over, the next part of the LuaATC code continues.
I have tried using:
However, the digilines display displays only the second message without waiting for the train to stop before sending..Code: Select all
__approach_callback_mode = 1 if event.type == "approach" then digiline_send("a", "Train is stopping") atc_send("B0W") digiline_send("a", "Train has stopped") end
LuaATC provides the atc_set_lzb_tsr function if you want the train to pass the track without exceeding a given speed limit. You can then use B0 to stop the train when the train is on the track. The time to brake from 1m/s to 0m/s can generally be neglected.
The code would look something like this:
Code: Select all
__approach_callback_mode = 1
if event.type == "approach" then
atc_set_lzb_tsr(1)
digiline_send("a", "Train is stopping")
elseif event.type == "train" then
atc_send("B0")
digiline_send("a", "Train has stopped")
end
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:49, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
What is the reason you can not use interrupt(13) to run code at around the time the train departs (which is what I think you want)?56independent_actual wrote: ↑Sat Jul 02, 2022 19:20When a train finishes at a station, i want to display different information.
An example ATC command i would like to run is (without the spaces) BO W OL D10 OC D3 SM Once execution finishes, a different piece of code is made.
I made this sketch in a rushed state:
Code: Select all
if event.train then -- Arrival code atc_send("BOWOLD10OCD3SM") interrupt_safe(1) if train_speed == 0 or stopped then -- Check if train has stopped stopped = true if train_speed == 1 then clear_interrupts() -- Prevent future interrupts -- Departure code here end end end
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:49, edited 2 times in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:49, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
-
- 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]
From my experience interrupts are generally safe as long as you know what you are doing.56independent_actual wrote: ↑Sat Jul 02, 2022 19:49That's a good idea. Thanks. Except for the lack of interrupt_safe()...?
Did I not explain this already?I'd like to find out for myself when the train departs; slowing down to 0 can take a few seconds.
atc_set_lzb_tsr(1)
- 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]
💥🚄
Last edited by 56independent_actual on Sun Jan 15, 2023 16:50, edited 1 time in total.
Warnig: Al my laguage ekscept English is bad, includig Hungarian (magyàränoлиски), Spanish (esпagnyoл), and Russian (рÿсскïанöл).
Who is online
Users browsing this forum: No registered users and 5 guests