[Mod] Advanced Trains [advtrains] [2.4.3]
-
- Member
- Posts: 39
- Joined: Wed Sep 17, 2014 21:34
- GitHub: electrodude
- IRC: electrodude512
- In-game: electrodude512
- Location: USA
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I saw all the Lua restrictions mentioned in the xATC proposal. Instead of trying to prevent DoS attacks by only supporting a severely limited subset of Lua, why don't you use the debug.sethook() trick used in mesecons_luacontroller? As a side effect, it disables JIT on those functions, but it seems to be a bullet-proof way of allowing all of Lua's features to be used in a safe way.
- Andrey01
- Member
- Posts: 2577
- Joined: Wed Oct 19, 2016 15:18
- GitHub: Andrey2470T
- In-game: Andrey01
- Location: Russia, Moscow
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Orwell, can I ask from which github repos and which a version of the blitz3d exporter did you use for your tracks and trains models?
- BuckarooBanzay
- Member
- Posts: 437
- Joined: Tue Apr 24, 2018 05:58
- GitHub: BuckarooBanzay
- IRC: BuckarooBanzai
- In-game: BuckarooBanzai
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
- Blockhead
- Member
- Posts: 1678
- 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.1.1]
I don't think this is what Andrey is asking about at all, he's asking about where the get the Blitz3d export plugin for blender. As a side note about advtrains mirrors: the advtrains main repository is hosted on git.bananach.space, as linked in the first post in the thread, though this is a cgit instance that doesn't support shallow clones. For a version of advtrains with the assets folder (which weighs around 100MB + diffs) removed see my lite branch on GitHub, which can be shallow cloned and then if you want to develop for advtrains you can make unshallow (or submit patches to the bug tracker)BuckarooBanzay wrote: ↑Wed Jun 24, 2020 11:46If it helps: i set up a mirror-repo on github:
https://github.com/minetest-mirrors/advtrains/
Andrey01: orwell is not the main author of the models for advtrains. Mostly it was done by mbb. (If I am wrong, please correct me). The most recently active asset creator for advtrains is rubberduck. I recommend you ask him which Blitz3d exporter he uses for moretrains (moretrains forum thread).
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Blockhead
- Member
- Posts: 1678
- 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.1.1]
Hmmmm....
Update: Yeah, the b3d exporter plugin that I used (source unknown sorry) really doesn't seem to like n-gons. If you want to use b3d for the smaller file size compared to obj, then you should break all your faces into triangles before exporting. But OBJ seems to handle more cases of n-gons better.
Update: Yeah, the b3d exporter plugin that I used (source unknown sorry) really doesn't seem to like n-gons. If you want to use b3d for the smaller file size compared to obj, then you should break all your faces into triangles before exporting. But OBJ seems to handle more cases of n-gons better.
- Attachments
-
- Diamond Crossing
- screenshot_20200704_021210.png (866.81 KiB) Viewed 1443 times
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Those crossings look really nice!
Play on Linuxworks server. We have got lots of trains.
My mods (Industrial Livestock Farming, Farebox and Faregate, Moving Walkways, Atm)
My mods (Industrial Livestock Farming, Farebox and Faregate, Moving Walkways, Atm)
- 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.1.1]
Also @Andrey01Blockhead wrote: ↑Fri Jul 03, 2020 16:17Hmmmm....
Update: Yeah, the b3d exporter plugin that I used (source unknown sorry) really doesn't seem to like n-gons. If you want to use b3d for the smaller file size compared to obj, then you should break all your faces into triangles before exporting. But OBJ seems to handle more cases of n-gons better.
It doesn't really seem to matter which B3d exporter you use. However, break faces into triangles (blender has Ctrl+F Triangulate for that). Best do that right before export and don't save it.
You can use both b3d and obj. However:
- b3d doesnt support multiple textures, but does support animations
- obj is the other way round.
For obj to use multiple textures, create multiple materials and assign them to the correct faces. make sure that in the export dialog "Material Groups" is checked.
Blockhead, are the crossings only decorational or are they integrated? If not and you want to code it, the at_conns table needs to have 4 entries, where 1-2 and 3-4 map to each other. Moving across this is already supported.
- Blockhead
- Member
- Posts: 1678
- 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.1.1]
Oh yes, they are fully functional. I read the comment in advtrains/tracks.lua about how to do it. More crossing angles to come then I'll release them once the set is complete.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- Blockhead
- Member
- Posts: 1678
- Joined: Wed Jul 17, 2019 10:14
- GitHub: Montandalar
- IRC: Blockhead256
- In-game: Blockhead Blockhead256
- Location: Land Down Under
- Contact:
Crossing nodes
Hi orwell, I didn't want to put this on hemiptera as the patch is big and technically it describes itself as a bugtracker not a project mangement tool. Here is a PR with a set of diamond crossing nodes (perpendicular and 45/90).
Update: The nodes have had an initial merge, but I forgot to add crafting recipes! In the process of adding the recipes for crossing nodes, I noticed the dependencies around advtrains_train_track were badly arranged, so I re-arranged those. Pull Request. Now mods like linetrack (see my fork on GitHub) can depend on advtrains mods like luaautomation but without having any default tracks registered.
Update: The nodes have had an initial merge, but I forgot to add crafting recipes! In the process of adding the recipes for crossing nodes, I noticed the dependencies around advtrains_train_track were badly arranged, so I re-arranged those. Pull Request. Now mods like linetrack (see my fork on GitHub) can depend on advtrains mods like luaautomation but without having any default tracks registered.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Proposal for advtrains.path_get_index_by_offset optimization:
https://github.com/minestead/minestead_ ... 00812cd424
On our server this patch made advtrains globalstep lower by 20%: from 92 ms to 76 ms average.
https://github.com/minestead/minestead_ ... 00812cd424
On our server this patch made advtrains globalstep lower by 20%: from 92 ms to 76 ms average.
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
Thanks, I just merged it into the master branch.
Play on Linuxworks server. We have got lots of trains.
My mods (Industrial Livestock Farming, Farebox and Faregate, Moving Walkways, Atm)
My mods (Industrial Livestock Farming, Farebox and Faregate, Moving Walkways, Atm)
-
- Member
- Posts: 38
- Joined: Sat Jun 06, 2020 00:21
- GitHub: Emojigit
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I think this mod can add a Luacontrolled rail (with switch support)
Craft Way:
* = Blank
^ = Luacontroller (From Mesecons)
% = Rail
Craft Way:
* = Blank
^ = Luacontroller (From Mesecons)
% = Rail
Code: Select all
----------------
% % %
* ^ *
* * *
----------------
Have a look at my mod >> https://content.minetest.net/users/Emojiminetest <<
- 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.1.1]
The LuaAutomation ATC Rail is what you are looking for. More information on the wiki:Emojiminetest wrote: ↑Wed Jul 15, 2020 10:05I think this mod can add a Luacontrolled rail (with switch support)
https://advtrains.de/wiki/doku.php?id=u ... c:latcrail
Unfortunately it doesn't have a crafting recipe yet. I might pick up your suggestion.
-
- Member
- Posts: 38
- Joined: Sat Jun 06, 2020 00:21
- GitHub: Emojigit
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I never see a LuaAutomation ATC Rail to be a switch!orwell wrote: ↑Wed Jul 15, 2020 19:00The LuaAutomation ATC Rail is what you are looking for. More information on the wiki:Emojiminetest wrote: ↑Wed Jul 15, 2020 10:05I think this mod can add a Luacontrolled rail (with switch support)
https://advtrains.de/wiki/doku.php?id=u ... c:latcrail
Unfortunately it doesn't have a crafting recipe yet. I might pick up your suggestion.
Have a look at my mod >> https://content.minetest.net/users/Emojiminetest <<
- Blockhead
- Member
- Posts: 1678
- 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.1.1]
How to use a LuaAutomation ATC Rail to operate a switch:Emojiminetest wrote: ↑Thu Jul 16, 2020 07:46I never see a LuaAutomation ATC Rail to be a switch!orwell wrote: ↑Wed Jul 15, 2020 19:00The LuaAutomation ATC Rail is what you are looking for. More information on the wiki:Emojiminetest wrote: ↑Wed Jul 15, 2020 10:05I think this mod can add a Luacontrolled rail (with switch support)
https://advtrains.de/wiki/doku.php?id=u ... c:latcrail
Unfortunately it doesn't have a crafting recipe yet. I might pick up your suggestion.
- Use the Passive Component Naming Tool to name the switch, e.g. "Switch1"
- Place a LuaAutomation ATC Rail in the train's path
- Put some code in the LuaAutomation ATC Rail that changes the state of the switch. States for switches are "cr" for curved and "st" for straight. Here is an example of some code to set the state of the switch based on which way the train is travelling, for example to make it follow Left/Right hand traffic:
Code: Select all
if atc_arrow then setstate("Switch1", "st") else setstate("Switch1", "cr") end
See advtrains/advtrains_luaautomation/README.txt for the full API. I know this is not something it is easy to figure out on your own.. I should make a video..
- Attachments
-
- screenshot_20200718_174837.png (169.86 KiB) Viewed 1443 times
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
-
- Member
- Posts: 38
- Joined: Sat Jun 06, 2020 00:21
- GitHub: Emojigit
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
what is the value "atc_arrow" in your code?Blockhead wrote: ↑Sat Jul 18, 2020 07:41How to use a LuaAutomation ATC Rail to operate a switch:Emojiminetest wrote: ↑Thu Jul 16, 2020 07:46I never see a LuaAutomation ATC Rail to be a switch!orwell wrote: ↑Wed Jul 15, 2020 19:00
The LuaAutomation ATC Rail is what you are looking for. More information on the wiki:
https://advtrains.de/wiki/doku.php?id=u ... c:latcrail
Unfortunately it doesn't have a crafting recipe yet. I might pick up your suggestion.Here is a screenshot in case it is not clear:
- Use the Passive Component Naming Tool to name the switch, e.g. "Switch1"
- Place a LuaAutomation ATC Rail in the train's path
- Put some code in the LuaAutomation ATC Rail that changes the state of the switch. States for switches are "cr" for curved and "st" for straight. Here is an example of some code to set the state of the switch based on which way the train is travelling, for example to make it follow Left/Right hand traffic:
Code: Select all
if atc_arrow then setstate("Switch1", "st") else setstate("Switch1", "cr") end
See advtrains/advtrains_luaautomation/README.txt for the full API. I know this is not something it is easy to figure out on your own.. I should make a video..
Have a look at my mod >> https://content.minetest.net/users/Emojiminetest <<
- Blockhead
- Member
- Posts: 1678
- 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.1.1]
As I said, the full LuaATC API is documented in your copy of advtrains. See the file inside your mods directory: advtrains/advtrains_luaautomation/README.txt.
Here is lines 179 and 180 of that file:
Code: Select all
atc_arrow
Boolean, true when the train is driving in the direction of the arrows of the ATC rail. Nil if there is no train.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂
- 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.1.1]
Thanks Blockhead, this is pretty accurate.
The reason why you can't use mesecons for this is simply because mesecons don't work when the area is not loaded (no player is near). Trains however do.
Btw the Lua API is also on the wiki here: http://advtrains.de/wiki/doku.php?id=usage:atlatc:api
The reason why you can't use mesecons for this is simply because mesecons don't work when the area is not loaded (no player is near). Trains however do.
Btw the Lua API is also on the wiki here: http://advtrains.de/wiki/doku.php?id=usage:atlatc:api
- Hume2
- Member
- Posts: 710
- Joined: Tue Jun 19, 2018 08:24
- GitHub: Hume2
- In-game: Hume2
- Location: Czech Republic
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I made the subway trains display up to two digits of the line. The colours are generated automagically. You can look here: https://gitlab.com/tunnelers-abyss/advt ... 0bbb96f53d
- Attachments
-
- screenshot_20200720_134557.png (175.87 KiB) Viewed 1443 times
If you lack the reality, go on a trip or find a job.
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I will merge your PR, as soon as I fix the couple of bugs I found in it. It should happen today or tomorrow.
Play on Linuxworks server. We have got lots of trains.
My mods (Industrial Livestock Farming, Farebox and Faregate, Moving Walkways, Atm)
My mods (Industrial Livestock Farming, Farebox and Faregate, Moving Walkways, Atm)
-
- Member
- Posts: 32
- Joined: Sat Jul 25, 2020 08:36
- GitHub: qawsedrftgzh
- Location: Germany
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
How can I create several lines with the interlocking system and where do i use the rwt in the advtrains lua block. I am to dumb to set up wirking lines. And please make manuals in German. Thanks to everyone, who can help me.
My English is not so good, because I am german
-
- Member
- Posts: 38
- Joined: Sat Jun 06, 2020 00:21
- GitHub: Emojigit
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
When i try to use worldedit to edit rail's param2, it sometimes not work.
Is it an advtrain bug? Or a worldedit bug?
Is it an advtrain bug? Or a worldedit bug?
Have a look at my mod >> https://content.minetest.net/users/Emojiminetest <<
- 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.1.1]
I said this multiple times in this thread, and I imagine it was also written in the manual. So here I say it again:Emojiminetest wrote: ↑Sat Jul 25, 2020 23:31When i try to use worldedit to edit rail's param2, it sometimes not work.
Is it an advtrain bug? Or a worldedit bug?
Do not use worldedit to edit advtrains nodes!
Reason: advtrains keeps a separate database of tracks and signals, known as the NDB (node database). It is used to look them up even if minetest has unloaded the mapblocks they're in. Due to reasons, advtrains always trusts the nodedb more than the minetest-managed world. Worldedit doesn't know about the nodedb, so it can't update it.
What works: you can use worldedit to construct rails using //stack and //copy, or delete rails. Whenever you delete rails using worldedit, run "/at_sync_ndb" afterwards. But NEVER touch signals, TCBs or that kind of stuff! Also, don't modify rails in place.
-
- Member
- Posts: 32
- Joined: Sat Jul 25, 2020 08:36
- GitHub: qawsedrftgzh
- Location: Germany
Re: [Mod] Advanced Trains [advtrains] [2.1.1]
I ask my Question again: Are there german manuals/Gibt es Anleitungen für Advtrains auf Deutsch?
My English is not so good, because I am german
- 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.1.1]
Im Moment noch nicht. Ich kann mir ja mal vormerken sie auf deutsch zu übersetzen.
Who is online
Users browsing this forum: No registered users and 31 guests