[Mod] Advanced Trains [advtrains] [2.1.1]

electrodude512
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]

by electrodude512 » Post

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.

User avatar
Andrey01
Member
Posts: 2386
Joined: Wed Oct 19, 2016 15:18
GitHub: Andrey2470T
In-game: Andrey01
Location: Russia, Moscow

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

by Andrey01 » Post

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?

User avatar
BuckarooBanzay
Member
Posts: 371
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

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

by BuckarooBanzay » Post

Andrey01 wrote:
Mon Jun 22, 2020 13:03
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?
If it helps: i set up a mirror-repo on github:
https://github.com/minetest-mirrors/advtrains/

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

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

by Blockhead » Post

BuckarooBanzay wrote:
Wed Jun 24, 2020 11:46
Andrey01 wrote:
Mon Jun 22, 2020 13:03
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?
If it helps: i set up a mirror-repo on github:
https://github.com/minetest-mirrors/advtrains/
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)

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).

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

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

by Blockhead » Post

Hmmmm....
Image

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
screenshot_20200704_021210.png
Diamond Crossing
(866.81 KiB) Not downloaded yet

gpcf
Member
Posts: 354
Joined: Fri May 27, 2016 10:48
In-game: gabriel

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

by gpcf » Post

Those crossings look really nice!

User avatar
orwell
Member
Posts: 825
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]

by orwell » Post

Blockhead wrote:
Fri Jul 03, 2020 16:17
Hmmmm....
Image

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.
Also @Andrey01

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.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

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

by Blockhead » Post

orwell wrote:
Fri Jul 03, 2020 23:49
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.
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.

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

Crossing nodes

by Blockhead » Post

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.

User avatar
techniX
Member
Posts: 26
Joined: Sun Dec 08, 2019 20:55
GitHub: technix
In-game: techniX

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

by techniX » Post

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.

gpcf
Member
Posts: 354
Joined: Fri May 27, 2016 10:48
In-game: gabriel

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

by gpcf » Post

Thanks, I just merged it into the master branch.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests