[Mod] Advanced Trains [advtrains] [1.7.2]

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sat Jan 14, 2017 12:51

and a new wagon texture
advtrains_wagon.png
advtrains_wagon.png (70.58 KiB) Viewed 2961 times
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sat Jan 14, 2017 13:10

I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by krokoschlange » Sat Jan 14, 2017 14:42

I animated it but is it even possible to animate nodes? Or is it ment to be an entity?
Get it!
Next time if you want me to animate something, would it be possible to make the moving things extra objets (lever is an extra object). The most time I spend on cleaning up your mesh. You can use the option "remove doubles" in edit mode if you work with blender. For the subway I deleted ~300 vertices that way
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by krokoschlange » Sat Jan 14, 2017 14:52

And great work on the textures and models.
Only on the locomotive I removed 113 vertices. :-)
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sat Jan 14, 2017 15:56

krokoschlange wrote:And great work on the textures and models.
Only on the locomotive I removed 113 vertices. :-)

thx cool work
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sat Jan 14, 2017 15:59

@krokoschlange look into your privat mesenges
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

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

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by gpcf » Sat Jan 14, 2017 16:15

I think advtrains is currently making servers unstable with 0.4.15. Can you investigate a bit on this?
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by DS-minetest » Sat Jan 14, 2017 16:22

@mbb: The maglev locomotive looks pretty nice. The modifier seems to be very useful, interesting. You could add glass to the train models you make, else it's a bit drafty.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sat Jan 14, 2017 17:26

@ds minetest ok i can add glass but i don´t know how i can make it transparent
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by krokoschlange » Sat Jan 14, 2017 17:38

use a transperent texture (with alpha) but it can't be partially transparent so you have to use something like the default glass texture
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by DS-minetest » Sat Jan 14, 2017 17:41

Yes, just add another material, select the faces and attach them to the material and give the new material the glass texture. And don't forget the uv-map! With uv-maps you can give the trains nice textures, not only these boring, not nice looking colors you use.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sat Jan 14, 2017 17:47

Last edited by mbb on Sun Jan 15, 2017 08:01, edited 1 time in total.
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by krokoschlange » Sat Jan 14, 2017 18:36

DS-minetest wrote:Yes, just add another material, select the faces and attach them to the material and give the new material the glass texture. And don't forget the uv-map! With uv-maps you can give the trains nice textures, not only these boring, not nice looking colors you use.

Actually you don't need the materials. You can just make seems and go to the uv editor (split your screen) select the faces you want a texture on, press [u] > unwrap, again [u] > reset uv and rescale the single faces in the uv editor.
Later in the code you have to give all textures you used e.g.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
textures = {"texture1.png", "texture2.png"}

There you have to figure out the right order, but thats easy.
Look at my Submarine Mod as an example
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sun Jan 15, 2017 09:45

telegramm advanced trains mod group https://t.me/joinchat/AAAAAD7S185aqDTlrBOcrQ
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
DS-minetest
Member
 
Posts: 707
Joined: Thu Jun 19, 2014 19:49
GitHub: DS-Minetest
In-game: DS

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by DS-minetest » Sun Jan 15, 2017 10:07

krokoschlange wrote:
DS-minetest wrote:Yes, just add another material, select the faces and attach them to the material and give the new material the glass texture. And don't forget the uv-map! With uv-maps you can give the trains nice textures, not only these boring, not nice looking colors you use.

Actually you don't need the materials. You can just make seems and go to the uv editor (split your screen) select the faces you want a texture on, press [u] > unwrap, again [u] > reset uv and rescale the single faces in the uv editor.
Later in the code you have to give all textures you used e.g.
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
textures = {"texture1.png", "texture2.png"}

There you have to figure out the right order, but thats easy.
Look at my Submarine Mod as an example

As much as I know you have to use materials for multiple textures.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Sun Jan 15, 2017 15:00

locomotie for industry and personal train:
Image
Image'

@krokoschlange PLease animate it :D
downloadhttps://archive.org/download/Dampflock4_201701/dampflock4pipe%20.blend
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by orwell » Sun Jan 15, 2017 17:34

About unstable servers: Don't know, but the modback stuff seems to have caused trouble.
@krokoschlange thx for helping.
Before I get to integrating all the new models I want to finish the ATC stuff.
I will do a major change in the handling of unloaded tracks. Server owners, better stay on a version from last year until the new features have been tested.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by krokoschlange » Mon Jan 16, 2017 16:11

Ok, I have animated it! Download
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by ShadMOrdre » Mon Jan 16, 2017 17:04

orwell,

Previously, I reported an issue, regarding nil values. Problem SOLVED!

It was on my end. In my edits to add varied trains, I failed to remove the "steam" param from the register_wagon calls.

After loading the mod, verifying that they are properly configured, ie, all the mods in the modpack loaded, everything works, including older worlds that had trains. I did not have to remove the advtrains or advtains_wagon_save files either.

I also want to contribute the code modifications and graphics I made to the Steam init.lua, to add colored engines, the tank and lumber cars, and retaining the older passenger coach. The code to add these is below. A complete init.lua for the Steam mod is included in the zip file

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
advtrains.register_wagon("steam_engine_black", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_black.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "smoke_puff.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Black", "advtrains_newlocomotive_black_inv.png")
advtrains.register_wagon("steam_engine_ltblue", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_ltblue.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "smoke_puff.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Lt Blue", "advtrains_newlocomotive_ltblue_inv.png")
advtrains.register_wagon("steam_engine_blue", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_blue.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "smoke_puff.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Blue", "advtrains_newlocomotive_blue_inv.png")
advtrains.register_wagon("steam_engine_green", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_green.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "smoke_puff.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Green", "advtrains_newlocomotive_green_inv.png")
advtrains.register_wagon("steam_engine_red", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_red.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "SmokePuff_02b_HD.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Red", "advtrains_newlocomotive_red_inv.png")
advtrains.register_wagon("steam_engine_pink", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_pink.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "SmokePuff_02b_HD.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Pink", "advtrains_newlocomotive_pink_inv.png")
advtrains.register_wagon("steam_engine_purple", {
   mesh="advtrains_engine_steam.b3d",
   textures = {"advtrains_newlocomotive_purple.png"},
   is_locomotive=true,
   drives_on={default=true},
   max_speed=4,
   seats = {
      {
         name="Driver Stand (left)",
         attach_offset={x=-5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
      {
         name="Driver Stand (right)",
         attach_offset={x=5, y=10, z=-10},
         view_offset={x=0, y=6, z=0},
         driving_ctrl_access=true,
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=1.85,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
--[[
   update_animation=function(self, velocity)
      --if self.old_anim_velocity~=advtrains.abs_ceil(velocity) then
         self.object:set_animation({x=1,y=60}, 100)--math.floor(velocity))
         --self.old_anim_velocity=advtrains.abs_ceil(velocity)
      --end
   end,
]]
   custom_on_activate = function(self, staticdata_table, dtime_s)
      minetest.add_particlespawner({
         amount = 10,
         time = 0,
      --  ^ If time is 0 has infinite lifespan and spawns the amount on a per-second base
         minpos = {x=0, y=2, z=1.2},
         maxpos = {x=0, y=2, z=1.2},
         minvel = {x=-0.2, y=1.8, z=-0.2},
         maxvel = {x=0.2, y=2, z=0.2},
         minacc = {x=0, y=-0.1, z=0},
         maxacc = {x=0, y=-0.3, z=0},
         minexptime = 2,
         maxexptime = 4,
         minsize = 1,
         maxsize = 5,
      --  ^ The particle's properties are random values in between the bounds:
      --  ^ minpos/maxpos, minvel/maxvel (velocity), minacc/maxacc (acceleration),
      --  ^ minsize/maxsize, minexptime/maxexptime (expirationtime)
         collisiondetection = true,
      --  ^ collisiondetection: if true uses collision detection
         vertical = false,
      --  ^ vertical: if true faces player using y axis only
         texture = "SmokePuff_02b_HD.png",
      --  ^ Uses texture (string)
         attached = self.object,
      })
   end,
   drops={"default:steelblock 4"},
}, "Steam Engine Purple", "advtrains_newlocomotive_purple_inv.png")


advtrains.register_wagon("steam_car_box", {
   mesh="advtrains_wagon.b3d",
   textures = {"advtrains_steam_car_box.png"},
   drives_on={default=true},
   max_speed=4,
   seats = {},
   visual_size = {x=1, y=1},
   wagon_span=1.8,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
   drops={"default:steelblock 4"},
   has_inventory = true,
   get_inventory_formspec = function(self)
      return "size[8,11]"..
         "list[detached:advtrains_wgn_"..self.unique_id..";box;0,0;8,6;]"..
         "list[current_player;main;0,7;8,4;]"..
         "listring[]"
   end,
   inventory_list_sizes = {
      box=8*6,
   },
}, "Steam Box Car", "advtrains_wagon_box_inv.png")
advtrains.register_wagon("steam_car_coach", {
   mesh="advtrains_wagon.b3d",
   textures = {"advtrains_steam_car_coach.png"},
   drives_on={default=true},
   max_speed=4,
--[[   seats = {
      {
         name="Default Seat",
         attach_offset={x=0, y=10, z=0},
         view_offset={x=0, y=6, z=0},
      },
   },
]]
   seats = {
      {
         name="1",
         attach_offset={x=-4, y=8, z=8},
         view_offset={x=0, y=0, z=0},
      },
      {
         name="2",
         attach_offset={x=4, y=8, z=8},
         view_offset={x=0, y=0, z=0},
      },
      {
         name="3",
         attach_offset={x=-4, y=8, z=-8},
         view_offset={x=0, y=0, z=0},
      },
      {
         name="4",
         attach_offset={x=4, y=8, z=-8},
         view_offset={x=0, y=0, z=0},
      },
   },
   visual_size = {x=1, y=1},
   --wagon_span=1.8,
   wagon_span=3.1,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
   drops={"default:steelblock 4"},
}, "Steam Passenger Coach", "advtrains_wagon_inv.png")
advtrains.register_wagon("steam_car_log", {
   mesh="advtrains_wagon_wood.b3d",
   textures = {"advtrains_steam_car_wood_green.png"},
   drives_on={default=true},
   max_speed=4,
   seats = {},
   --visual_size = {x=1, y=1},
   visual_size = {x=0.85, y=0.85},
   wagon_span=1.8,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
   drops={"default:steelblock 4"},
   has_inventory = true,
   get_inventory_formspec = function(self)
      return "size[8,11]"..
         "list[detached:advtrains_wgn_"..self.unique_id..";box;0,0;8,6;]"..
         "list[current_player;main;0,7;8,4;]"..
         "listring[]"
   end,
   inventory_list_sizes = {
      box=8*6,
   },
}, "Steam Log Car", "advtrains_wagon_wood_green_inv.png")
advtrains.register_wagon("steam_car_tank", {
   mesh="advtrains_wagon_tank.b3d",
   textures = {"advtrains_steam_car_tank_yellow.png"},
   drives_on={default=true},
   max_speed=4,
   seats = {},
   --visual_size = {x=1, y=1},
   visual_size = {x=0.85, y=0.85},
   wagon_span=1.8,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
   drops={"default:steelblock 4"},
   has_inventory = true,
   get_inventory_formspec = function(self)
      return "size[8,11]"..
         "list[detached:advtrains_wgn_"..self.unique_id..";box;0,0;8,6;]"..
         "list[current_player;main;0,7;8,4;]"..
         "listring[]"
   end,
   inventory_list_sizes = {
      box=8*6,
   },
}, "Steam Tank Car", "advtrains_wagon_tank_yellow_inv.png")

advtrains.register_wagon("steam_car_pullman", {
   mesh="advtrains_passenger_wagon.b3d",
   drives_on={default=true},
   max_speed=4,
   textures = {"advtrains_steam_pullman_car.png"},
   seats = {
      {
         name="1",
         attach_offset={x=-4, y=8, z=8},
         view_offset={x=0, y=0, z=0},
      },
      {
         name="2",
         attach_offset={x=4, y=8, z=8},
         view_offset={x=0, y=0, z=0},
      },
      {
         name="3",
         attach_offset={x=-4, y=8, z=-8},
         view_offset={x=0, y=0, z=0},
      },
      {
         name="4",
         attach_offset={x=4, y=8, z=-8},
         view_offset={x=0, y=0, z=0},
      },
   },
   visual_size = {x=1, y=1},
   wagon_span=3.1,
   collisionbox = {-1.0,-0.5,-1.0, 1.0,2.5,1.0},
   drops={"default:steelblock 4"},
}, "Steam Pullman Coach", "advtrains_wagon_inv.png")


minetest.register_craft({
   output = 'advtrains:steam_engine_black',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:black', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_engine_ltblue',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:cyan', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_engine_blue',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:blue', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_engine_green',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:green', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_engine_red',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:red', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_engine_pink',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:pink', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_engine_purple',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'dye:violet', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})


minetest.register_craft({
   output = 'advtrains:steam_car_box',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'default:chest_locked', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_car_coach',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'default:book', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_car_log',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'group:tree', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})
minetest.register_craft({
   output = 'advtrains:steam_car_tank',
   recipe = {
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
      {'default:steelblock', 'group:liquid', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})

minetest.register_craft({
   output = 'advtrains:steam_car_pullman',
   recipe = {
      {'default:steelblock', 'default:book', 'default:steelblock'},
      {'default:steelblock', 'default:book', 'default:steelblock'},
      {'default:steelblock', 'default:steelblock', 'default:steelblock'},
   },
})


Image
Image

Shad MOrdre
Attachments
screenshot_20170113_201834.png
screenshot_20170113_201834.png (762.94 KiB) Viewed 2961 times
AdvTrains_Additions.zip
Include .png files with modified colors for the steam engines, and modified graphics for the tank and log cars. Also includes mbb's updated texture for the new passenger car, or pullman car.
(868.51 KiB) Downloaded 63 times
screenshot_20170115_195652.png
screenshot_20170115_195652.png (497.17 KiB) Viewed 2961 times
My other virtual world is an Opensimulator.
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by orwell » Mon Jan 16, 2017 20:02

[missing post, accidentally deleted content]
Last edited by orwell on Tue Jan 17, 2017 21:45, edited 2 times in total.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Tue Jan 17, 2017 16:05

@orvell96 I don´t like this colerful trains because they arent looking real
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Tue Jan 17, 2017 16:09

I made the "transib"
Image
Image
Attachments
lockomotive.png.png
lockomotive.png.png (189.65 KiB) Viewed 2961 times
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by ShadMOrdre » Tue Jan 17, 2017 16:49

mbb,

The colored trains were built for my five year old son, who loves trains and minetest. The original black engine wasn't enough for him, so I simply added colors, to make them more child friendly. Like Thomas the Tank Engine, and the Brio wooden railway train toys for children. The minetest world I used for taking those screenshots is actually using the phrase "TheIsleOfSodor" as the seed for a v6 map. I like it because there are several large villages near enough to make a railway.

However, I am salivating over the models that you are showing. The diesel engine above, and the detailed steam model further above are absolutely stunning. Do you only have the .blend files for those, or have you exported them to the .b3d format? I ask, because I am willing to help add the definitions to the code to include these beautiful models, and adding a more realistic train set to Minetest.

My son has been asking me for a coal car, aka, a tender, for the steam engines. All steamies need coal, and if the coal can't be carried on the engine, the engine must pull a tender. I would also like to see more train cars, like a flatbed, a hopper, a log car with logs, and maybe a better box car. As you see in my screenshots, the cars can be made interchangeable with the various types of trains available, ie, steam, electric, maglev. I would personally add a diesel definition in there, as the red industrial engine is a diesel, as is the model in the post directly above.

Anyways, now I think I'm just rambling on.....but.....would love to help where possible. I'm more of a code monkey than a graphics whiz. Not strong on Blender, per se, but know GIMP and Meshlab.

Shad MOrdre
My other virtual world is an Opensimulator.
 

User avatar
mbb
Member
 
Posts: 162
Joined: Sat Jan 17, 2015 17:47
GitHub: mbblp
IRC: mBb
In-game: MBB

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by mbb » Tue Jan 17, 2017 17:37

ShadMOrdre wrote:mbb,

The colored trains were built for my five year old son, who loves trains and minetest. The original black engine wasn't enough for him, so I simply added colors, to make them more child friendly. Like Thomas the Tank Engine, and the Brio wooden railway train toys for children. The minetest world I used for taking those screenshots is actually using the phrase "TheIsleOfSodor" as the seed for a v6 map. I like it because there are several large villages near enough to make a railway.

However, I am salivating over the models that you are showing. The diesel engine above, and the detailed steam model further above are absolutely stunning. Do you only have the .blend files for those, or have you exported them to the .b3d format? I ask, because I am willing to help add the definitions to the code to include these beautiful models, and adding a more realistic train set to Minetest.

My son has been asking me for a coal car, aka, a tender, for the steam engines. All steamies need coal, and if the coal can't be carried on the engine, the engine must pull a tender. I would also like to see more train cars, like a flatbed, a hopper, a log car with logs, and maybe a better box car. As you see in my screenshots, the cars can be made interchangeable with the various types of trains available, ie, steam, electric, maglev. I would personally add a diesel definition in there, as the red industrial engine is a diesel, as is the model in the post directly above.

Anyways, now I think I'm just rambling on.....but.....would love to help where possible. I'm more of a code monkey than a graphics whiz. Not strong on Blender, per se, but know GIMP and Meshlab.

Shad MOrdre

sorry I dont know that you made it for your son

I dont know how i can export the models to minetest B3D

in the "dampflock_better" in a animated tender
here is the lockomotive with the tender
lockomotive:https://archive.org/download/dampflock_better/dampflock_better.blend
tender:https://archive.org/download/dampflock_better/tender.blend
("Dampflock" is german and means steamlockomotive)
the other trainmodels you can download in the history of the forum
!not the ge.tt links
I like trains....and: minetest, blender, gaming, linux, cats, computers
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by krokoschlange » Tue Jan 17, 2017 18:58

I dont know how i can export the models to minetest B3D

I can. There is a python script that adds this to blender but I can't remember where I found it... It was somhere on the forums.
 

ShadMOrdre
Member
 
Posts: 51
Joined: Mon Dec 29, 2014 08:07
In-game: shadmordre

Re: [Mod] Advanced Trains [advtrains] [r. 1.1.1]

by ShadMOrdre » Tue Jan 17, 2017 19:15

krokoschlange,

python script for blender to export .b3d for minetest.

.b3d blender export

Also, this, Using Blender on the mintest wiki.

Using Blender
My other virtual world is an Opensimulator.
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Advanced Trains [advtrains] [r. 1.2]

by orwell » Tue Jan 17, 2017 21:40

Version 1.2
Changelog:
- internal: changed save format for track database. Needs testing.
- Added detailed steam engine
- Added new subway train wagon (with door animations, but I don't have code for doors yet)
- Made animation for regular steam engine work
- Fix crash when wagons do no longer exist
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Advanced Trains [advtrains] [r. 1.2]

by orwell » Tue Jan 17, 2017 21:46

@ShadMOrdre: You could distribute your additions as separate mod. Since there is now an API, you can use it (as you do).
Just put all code and all models/textures that are not found in advtrains_train_steam into a separate directory, put a 'depends.txt' with the content
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
advtrains
advtrains_train_steam

in that directory and upload it as ZIP to either this or a new forum topic (better a new one).
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

User avatar
krokoschlange
Member
 
Posts: 38
Joined: Sat Jul 02, 2016 08:33
GitHub: krokoschlange
In-game: krokoschlange

Re: [Mod] Advanced Trains [advtrains] [r. 1.2]

by krokoschlange » Wed Jan 18, 2017 07:37

@orwell: Looks cool but if you reverse the animation is still forward. If you can code it, do it, else let me know then I can add the same animation for backwards into the b3d file.
Also there are some red edges on the model.
 

User avatar
orwell
Member
 
Posts: 467
Joined: Wed Jun 24, 2015 18:45
GitHub: orwell96
In-game: orwell

Re: [Mod] Advanced Trains [advtrains] [r. 1.2]

by orwell » Wed Jan 18, 2017 14:09

Alright.
Working on the new subway wagon, I figured out how to create and manipulate basic animations. I think I get this corrected myself. But thx for offering help.
On the steam engine, I was lazy and just did Smart UV Project and Bake Textures, so there are possibly some edges.
I'll see if they are severe enough that I have to fix them.
Lua is great!
List of my mods
I like singing. I like dancing. I like ... niyummm...
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 67 guests

cron