[Mod] Advanced Trains [advtrains] [2.2.1]

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

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

by Andrey01 » Post

Oh, it would be nice to see tracks from various sorts of wood. I hope Orwell will add it.

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

"unique_id" is undefined => exception (for open cargo wagon)

Im replace it ("unique_id"=>"id"), and Im lost all cargo after server restart((

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

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

by gpcf » Post

The different kinds of metal feature doesn't make much sense, since a lot of metals aren't usable for train tracks due to being too soft or having other undesirable features.

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

Therefore, the rails are made of steel and not of iron. It seems to have been tried out of cast iron - but it's too fragile. I do not think that in a game where there is a wooden and golden pickax this is important. Nevertheless, it is possible to specify different characteristics for different rails in the future.

I'm very worried about something else:
-lags with direct movement of the unit
-Camera jerks at turn
-No inclination of the unit (on the slopes)
-Also I changed the visual position of the rail itself. It seems reasonable to me that the height of the rail (with the embankment) is exactly half the cube.

User avatar
v-rob
Developer
Posts: 832
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

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

by v-rob » Post

imcasper wrote:golden pickax
What? There are no gold pickaxes in MTG.

Anyway, copper, tin, and bronze are definitely not strong enough, and cast iron doesn't even exist in Minetest. I suppose it doesn't matter, though.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

Copper rail in:
https://github.com/minetest-mods/moreor ... t.lua#L326

Cast iron in:
https://github.com/minetest-mods/techni ... /manual.md

There's really no gold pickaxe. There are only bronze, diamond, wooden etc... I think after the wooden picks, any metal is suitable for rails. I would just add for example a speed limit for "bad rails".

By the way, by analogy I do a set of wagon (any wood + any metal)

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

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

by gpcf » Post


imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

If I put wagon, and load cargo into wagon, and move far (from wagon) -- cargo lost.
If I reset server (near wagon) -- wagon work correctly
Also
-dont work all wagon/engine button (except "get off") !
-I make in code new engine with inventory: "Show inventory" -> (exception, because player==nil)

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

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

by orwell » Post

Ok,thanks, looking at it
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

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

by orwell » Post

imcasper wrote:If I put wagon, and load cargo into wagon, and move far (from wagon) -- cargo lost.
If I reset server (near wagon) -- wagon work correctly
I can't reproduce this. Does it happen when the wagon stays where it is and you move away, or when the wagon moves away?
imcasper wrote:-dont work all wagon/engine button (except "get off") !
Fixed
imcasper wrote:-I make in code new engine with inventory: "Show inventory" -> (exception, because player==nil)
Can't reproduce either, probably there's something wrong with your code. Can you send me your code please?
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

1. This reproduced always, but only after FIRST server start %)
minetest 0.4.17.1, advtrains (tss "Mention testers in readme.txt")
1. Start new server (and login)
2. Place rail, put single wagon, put cargo into wagon.
3. Move far (wait for wagon hiding)
4. Move back -- wagon is empty (cargo lost)
2. Also outgoing steam engine continues to make noise. When it returns (if it return), there will be two sound tracks (add one sound tracks for every return xD).

3. Digtron dont want place rail (maybe because the rails in the inventory and on the map - different entities?)

4. Maybe I'm doing something wrong. But I still have nothing going on by clicking on the "wagon properties" button and "board com"

5. I copy next lines (from "wagon_box" define to "detailed_steam_engine" define)
has_inventory = true,
get_inventory_formspec = function(self)
return "size[8,11]"..
"list[detached:advtrains_wgn_"..self.id..";box;0,0;8,3;]"..
"list[current_player;main;0,5;8,4;]"..
"listring[]"
end,
inventory_list_sizes = {
box=8*3,
},
to (advtrains_train_steam/init.lua:152)

And then put "new" loco, and select "show inventory" from engine (item correctly added to steam menu):
end
end
if fields.inv and self.has_inventory and self.get_inventory_formspec then
minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..self.id, self:get_inventory_formspec(player:get_player_name()))
end
if fields.prop and self.owner==pname then
exception on advtrains/advtrains/wagons.lua:1003 (attemp to index global 'player' (a nil value))
Is "player:get_player_name()" equal "pname"?

FaceDeer
Member
Posts: 491
Joined: Sat Aug 29, 2015 19:01
GitHub: FaceDeer

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

by FaceDeer » Post

There's a simple fix for Digtron track-laying, but Github desktop is having trouble cloning the bananach.space repository and I don't have an account on the Mantis issue server so I'll just comment here and hopefully someone can just stick it in.

In the advtrains mod, on line 271 of trackplacer.lua, in function tp.register_track_placer, where the "_placer" craftitem is registered, change

Code: Select all

groups={advtrains_trackplacer=1},
to

Code: Select all

groups={advtrains_trackplacer=1, digtron_on_place=1},
This tells Digtron that this craftitem is a valid item to allow as a buildable item, and also tells it to trigger the item's "on_place" code when attempting to build it.

Once that change is made the "digtron.lua" file in advtrains should be deleted, it's now redundant. In fact, I think advtrain's optional dependency on the digtron mod can be removed - group membership has no impact if digtron's not installed and advtrains doesn't need to use digtron's API this way.

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

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

by gpcf » Post

I just merged the changes into the bananach repo.

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

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

by orwell » Post

imcasper wrote:1. This reproduced always, but only after FIRST server start %)
minetest 0.4.17.1, advtrains (tss "Mention testers in readme.txt")
1. Start new server (and login)
2. Place rail, put single wagon, put cargo into wagon.
3. Move far (wait for wagon hiding)
4. Move back -- wagon is empty (cargo lost)
I'll try that.
imcasper wrote:
2. Also outgoing steam engine continues to make noise. When it returns (if it return), there will be two sound tracks (add one sound tracks for every return xD).
That's a bug in the engine. But i'll look over it
imcasper wrote:
3. Digtron dont want place rail (maybe because the rails in the inventory and on the map - different entities?)
now fixed
imcasper wrote:
4. Maybe I'm doing something wrong. But I still have nothing going on by clicking on the "wagon properties" button and "board com"

5. I copy next lines (from "wagon_box" define to "detailed_steam_engine" define)
has_inventory = true,
get_inventory_formspec = function(self)
return "size[8,11]"..
"list[detached:advtrains_wgn_"..self.id..";box;0,0;8,3;]"..
"list[current_player;main;0,5;8,4;]"..
"listring[]"
end,
inventory_list_sizes = {
box=8*3,
},
to (advtrains_train_steam/init.lua:152)

And then put "new" loco, and select "show inventory" from engine (item correctly added to steam menu):
end
end
if fields.inv and self.has_inventory and self.get_inventory_formspec then
minetest.show_formspec(player:get_player_name(), "advtrains_inv_"..self.id, self:get_inventory_formspec(player:get_player_name()))
end
if fields.prop and self.owner==pname then
exception on advtrains/advtrains/wagons.lua:1003 (attemp to index global 'player' (a nil value))
Is "player:get_player_name()" equal "pname"?
[/quote]
Ah, ok, there lies the problem.
There's a pitfall in the advtrains code that there are 2 mechanisms for handling player seating and inventory. The box wagon uses the old one, the one without seat groups, while your code uses the variant with seat groups. apparently this is broken. Thanks, I'll fix that.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

I would like to add custom rails and wagons to the game. The code is almost ready. However, I need to add an array of "textures" for tracks:
(advtrains\advtrains\tracks.lua:268)
tiles = def.textures or {def.shared_texture or (def.texture_prefix.."_"..img_suffix..".png"), def.second_texture},
Also I would like to add a description of the wheels (the position of the front axis and the back axis), for better rendering of long wagons on turns (the experimental code already exists).

In addition, I would like to add fuel (the experimental code is already there)

I'm experiencing difficulties, because I do not understand how to propose changes now. On a github, for example, I could just create my own brunch. (Manual fuss with branches is hell).

I'm afraid I can not specifically reproduce the bug, although he appeared in the game three times. Maybe it's my (custom rails / or fuel). Nevertheless, if there is an opportunity to look:
2018-06-19 02:06:47: ACTION[Server]: [advtrains]Restore node database: Replaced 0 nodes, removed 0 ghost nodes.
2018-06-19 02:06:47: WARNING[Server]: [advtrains]Lua Error occured: ...7.1-win64\bin\..\mods\advtrains\advtrains/occupation.lua:176: attempt to index local 'train' (a nil value)
2018-06-19 02:06:47: WARNING[Server]: [advtrains]stack traceback:
...-0.4.17.1-win64\bin\..\mods\advtrains\advtrains\init.lua:43: in function '__index'
...7.1-win64\bin\..\mods\advtrains\advtrains/occupation.lua:176: in function 'check_collision'
...7.1-win64\bin\..\mods\advtrains\advtrains/trainlogic.lua:426: in function 'train_step_c'
...7.1-win64\bin\..\mods\advtrains\advtrains/trainlogic.lua:81: in function 'mainloop_trainlogic'
...-0.4.17.1-win64\bin\..\mods\advtrains\advtrains\init.lua:337: in function <...-0.4.17.1-win64\bin\..\mods\advtrains\advtrains\init.lua:323>
[C]: in function 'xpcall'
...-0.4.17.1-win64\bin\..\mods\advtrains\advtrains\init.lua:41: in function <...-0.4.17.1-win64\bin\..\mods\advtrains\advtrains\init.lua:38>
...minetest-0.4.17.1-win64\bin\..\builtin\game\register.lua:420: in function <...minetest-0.4.17.1-win64\bin\..\builtin\game\register.lua:400>
2018-06-19 02:06:47: ACTION[Server]: [advtrains]i: CP Position Dir CN ->Dist->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]--Back on-track border here--
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-12 : 1 (-4601,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-11 : 1 (-4600,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-10 : 1 (-4599,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-9 : 1 (-4598,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-8 : 1 (-4597,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-7 : 1 (-4596,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-6 : 1 (-4595,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-5 : 1 (-4594,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-4 : 1 (-4593,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-3 : 1 (-4592,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-2 : 2 (-4591,5,3367) -1.5707963267949 1 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]-1 : 1 (-4590,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]0 : 2 (-4589,5,3367) -1.5707963267949 1 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]1 : 1 (-4588,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]2 : 1 (-4587,5,3367) -1.5707963267949 2 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]3 : 2 (-4586,5,3367) -1.5707963267949 1 -> 1 ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]4 : 1 (-4585,5,3367) -1.5707963267949 2 -> nil ->
2018-06-19 02:06:47: ACTION[Server]: [advtrains]--Front on-track border here--

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

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

by orwell » Post

Do it as you would do it on github: Fork my repository by cloning it to your computer and then pushing it to Github, and then tell me the link to your changes
I've included a contribution guide at https://git.bananach.space/advtrains.gi ... ibuting.md

Feel free to write around in the code. For those axes you mentioned, some people call it "trucks", extend the on_step callback of wagons in a way that the wagon positions itself between the trucks and make the trucks position on the rails.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

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

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

by orwell » Post

Track section interlocking is on its way!
Image
Attachments
Bildschirmfoto_2018-06-20_20-12-27.png
(472.63 KiB) Not downloaded yet
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

https://github.com/imcasper/bananach_ad ... ree/custom

I did it, although it was very troublesome. All the same, the final measure was incorrect, so I'll redo it again.

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

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

by orwell » Post

The link is broken. Intended?
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

imcasper
Member
Posts: 16
Joined: Wed May 30, 2018 21:49

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

by imcasper » Post

I deleted it, because the merge is incorrect. I'm sorry, but I want to test more, and add something before the publication. In addition, I need to draw arrows and special rails (loading / unloading / control).

Rails and wagons can be crafted from any tree, and some metals. This affects the appearance. Approximately 25 sort of wood and 5 sorts of metal are available (which gives more than a hundred combinations!!!)

PS. You can offer your list of metals from which you can collect rails.
PPS. Also, the difficulty levels will be available.
PPPS. If there are willing to help draw wagons for the "custom set" please.

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

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

by Andrey01 » Post

orwell wrote:Track section interlocking is on its way!
Image
Is this something new feature for future release?

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

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

by orwell » Post

I am currently working on an interlocking system. What that is, see here
http://www.railwaysignalling.eu/railway ... signalling
However, the final result looks different from the screenshot
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...

User avatar
v-rob
Developer
Posts: 832
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

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

by v-rob » Post

EDIT: Actually, never mind. I don't think I will use advtrains because there are too many bugs as of now. Maybe if these bugs are ironed out, then I will use advtrains as the base for advcarts.
GUI Core Developer | My Best Mods: Bridger - Slats - Stained Glass | To contact me, send a PM

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

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

by Phoenixflo44 » Post

When I go to the link I come to a white page. I would like to know what these moves look like.

https://mbblp.github.io/advanced-trains ... index.html
+ Spoiler

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

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

by gpcf » Post

New website is at https://advtrains.de/

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests