Page 41 of 93

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

Posted: Fri Jun 08, 2018 21:10
by imcasper
Soon:
You can use any available sort of wood, and available metals:
Image

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

Posted: Sat Jun 09, 2018 11:48
by Andrey01
Oh, it would be nice to see tracks from various sorts of wood. I hope Orwell will add it.

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

Posted: Sat Jun 09, 2018 20:30
by imcasper
"unique_id" is undefined => exception (for open cargo wagon)

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

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

Posted: Mon Jun 11, 2018 21:50
by gpcf
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.

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

Posted: Tue Jun 12, 2018 08:32
by imcasper
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.

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

Posted: Tue Jun 12, 2018 22:53
by v-rob
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.

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

Posted: Wed Jun 13, 2018 10:07
by imcasper
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)

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

Posted: Thu Jun 14, 2018 16:46
by gpcf

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

Posted: Fri Jun 15, 2018 18:50
by imcasper
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)

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

Posted: Mon Jun 18, 2018 08:02
by orwell
Ok,thanks, looking at it

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

Posted: Mon Jun 18, 2018 16:49
by orwell
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?

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

Posted: Mon Jun 18, 2018 17:08
by imcasper
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"?

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

Posted: Tue Jun 19, 2018 02:59
by FaceDeer
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.

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

Posted: Tue Jun 19, 2018 08:46
by gpcf
I just merged the changes into the bananach repo.

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

Posted: Tue Jun 19, 2018 13:12
by orwell
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.

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

Posted: Tue Jun 19, 2018 15:02
by imcasper
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--

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

Posted: Wed Jun 20, 2018 09:14
by orwell
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.

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

Posted: Wed Jun 20, 2018 18:15
by orwell
Track section interlocking is on its way!
Image

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

Posted: Thu Jun 21, 2018 20:19
by imcasper
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.

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

Posted: Mon Jun 25, 2018 09:13
by orwell
The link is broken. Intended?

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

Posted: Mon Jun 25, 2018 20:15
by imcasper
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.

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

Posted: Wed Jul 11, 2018 09:33
by Andrey01
orwell wrote:Track section interlocking is on its way!
Image
Is this something new feature for future release?

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

Posted: Wed Jul 11, 2018 11:01
by orwell
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

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

Posted: Sat Jul 14, 2018 22:48
by v-rob
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.

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

Posted: Thu Jul 19, 2018 13:34
by Phoenixflo44
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