[Mod] Carts [carts]

Post Reply
User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

[Mod] Carts [carts]

by PilzAdam » Post

Hello everyone!
This mod adds minecarts to Minetest.

Craft them like this:

Code: Select all

steel       steel
steel steel steel
Place them on the default rails or any rails, that have the group "rails = 1" (this is the case for moreores' copper rails).

Punch them with leftclick to speed them up a bit. They will accelerate when driving downhill, and also decelerate while driving uphill. Punching them while holding shift will add them back to your inventory.

Rightclick the carts to jump into them and make sure to enjoy the ride!

The carts can follow each track you can build! At t-junctions they will always turn left (as you can see in the default textures). There are no railroad switches.

There is a powerrail and a brakerail. The powerrail will accelerate the cart when driving over it, the brakerail decelerates the cart. They can be crafted like this:
Powerrail:

Code: Select all

steel  mese_crystal_fragment  steel
steel        stick            steel
steel                         steel
Brakerail:

Code: Select all

steel  coal  steel
steel  stick steel
steel        steel
This mod has also mesecon compatibility. When placing the power- or brakerail with a the mesecon mod installed, the rails will only work if they get a mesecon signal.

License:
WTFPL

Dependencies:
default

Minetest Version:
0.4.4 or later

GitHub:
https://github.com/PilzAdam/carts

Download:
https://github.com/PilzAdam/carts/zipball/master

Old Version:
https://github.com/PilzAdam/carts/archive/old.zip
Last edited by PilzAdam on Thu Feb 28, 2013 16:09, edited 1 time in total.

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

It works really well when it's on the rails. I blocked the corners so it stayed on. It's also difficult to put on the rails. Can you ride the cart?

jin_xi
Member
Posts: 165
Joined: Mon Jul 02, 2012 18:19

by jin_xi » Post

this is brilliant, thanks. placing of carts is tricky but i find it very nice. cool!

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

InfinityProject wrote:Can you ride the cart?
Not yet. Its difficult to implement it but maybe it gets easier with some changes in the lua-api in the future. But i give my best to do it.

User avatar
InfinityProject
Member
Posts: 1009
Joined: Sat Mar 17, 2012 00:52
Location: World of Infinity, US

by InfinityProject » Post

I remember sapier had a pushable block mod with a cart that you could ride but it was EXTREEMELY buggy. Maybe you could use that. But over all this is an amazing mod +∞

User avatar
Mito551
Member
Posts: 1271
Joined: Sat Jun 16, 2012 15:03

by Mito551 » Post

thank you very much!this so amazing! i will see what i can do about riding too, if you don't mind ;)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Could somebody provide new graphics or maybe sound? I want to add sound but i have none.
Last edited by PilzAdam on Fri Jul 20, 2012 20:14, edited 1 time in total.

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

by SegFault22 » Post

If we ever get entity-to-entity collision or collision frame technology for entities, we could make the minecart where that you just ''jump'' into the cart and you're in it, instead of latching to it.
"All we need it the right major crisis and the nations will accept the new world order."

lkjoel
Member
Posts: 779
Joined: Wed Feb 29, 2012 19:27
Location: Gallifrey
Contact:

by lkjoel » Post

This looks identical to thexyz's mod
My mods: The Nether | Doctor Who (WIP)

I have quit minetest ... again. I am heavily unimpressed by both the game and the community.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

lkjoel wrote:This looks identical to thexyz's mod
I used the graphics of his mod because im not so good in painting. But the code is completly self-made. xyz moved the carts by using the setpos() command. This is laggy because everey 0.05 seconds the server moves the cart one step.
I used the setacceleration() and setvelocity() methods to use the in c++ implemented move methods. This is not so laggy.

User avatar
SegFault22
Member
Posts: 872
Joined: Mon May 21, 2012 03:17
Location: NaN

by SegFault22 » Post

I was working on a mineshaft, and got the idea of using this mod with it. Just for the screenshots.
Here are some screenshots:


Image
The opening of the mineshaft


Image
A 4-way junction inside the mine. One leads off to a dead end, another to a helix going down, and the other to where some gravel fell in the shaft.


Image
This is where the gravel fell in the shaft.


Image
And a degrading bridge over a lake of magma.
"All we need it the right major crisis and the nations will accept the new world order."

cornernote
Member
Posts: 844
Joined: Wed Jul 11, 2012 15:02

by cornernote » Post

i assume its pretty easy to make these act like a chest where you can put items in it?

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

cornernote wrote:i assume its pretty easy to make these act like a chest where you can put items in it?
It is not easy because of 2 reasons:
  • 1. You start/stop the cart with an rightclick and you open chests with a rightclick too.
  • 2. Objects that are implemented in lua cant have an inventory (if im wrong tell me how you can implement it).
But you can transport items without an inventory (see description).

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

take the meta code from chests and apply to any node you want. I had chests in the shapes of oil drums and wooden barrels.

In order to keep the carts moving you could use punchnode for start/stop, that way keeping right click for inventory. Hope this helps :-)

sfan5
Moderator
Posts: 4093
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Moved back because forum Guidelines not followed
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

mauvebic wrote:take the meta code from chests and apply to any node you want.
The cart isnt a node its an object.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

sfan5 wrote:Moved back because forum Guidelines not followed
??

sfan5
Moderator
Posts: 4093
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

The topic was in Mod Releases but did not follow the guidelines
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

sfan5 wrote:The topic was in Mod Releases but did not follow the guidelines
I have everything in the first post that is needed.

mauvebic
Member
Posts: 1550
Joined: Fri Jan 27, 2012 11:32

by mauvebic » Post

everything does indeed look fine.
Last edited by mauvebic on Sun Jul 22, 2012 13:59, edited 1 time in total.

User avatar
severak
Member
Posts: 35
Joined: Fri Jul 06, 2012 10:40
GitHub: severak
In-game: Severak
Location: Kudowa-Zdroj
Contact:

by severak » Post

Great! I really like your mod.

I will probably make a fork (mainly for better graphics), so I have one question: Where to place code-modification to support concepts of turnouts/rairoad switchs?

http://en.wikipedia.org/wiki/Railroad_switch

This would be real advance in transport in minetest.
back in Mintest after 10 years | my old mods

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

severak wrote:Great! I really like your mod.

I will probably make a fork (mainly for better graphics), so I have one question: Where to place code-modification to support concepts of turnouts/rairoad switchs?

http://en.wikipedia.org/wiki/Railroad_switch

This would be real advance in transport in minetest.
I have added railroad switches in Version 8. If you want to create new graphics you can post them here and i will take them gratefully.

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

Has anyone an idea what do add next?

sfan5
Moderator
Posts: 4093
Joined: Wed Aug 24, 2011 09:44
GitHub: sfan5
IRC: sfan5
Location: Germany

by sfan5 » Post

Add Detector Rails
And fix this Bug:
If you right click the Rail Switch with a Rail and change the State of it, the cart seemse to ignore the switch
Last edited by sfan5 on Mon Jul 23, 2012 16:57, edited 1 time in total.
Mods: Mesecons | WorldEdit | Nuke & Minetest builds for Windows (32-bit & 64-bit)

User avatar
PilzAdam
Member
Posts: 4026
Joined: Fri Jul 20, 2012 16:19
GitHub: PilzAdam
IRC: PilzAdam
Location: Germany

by PilzAdam » Post

sfan5 wrote:If you right click the Rail Switch with a Rail and change the State of it, the cart seemse to ignore the switch
How do you change the state of the switch with a rightclick? You can only change the state with a leftclick and this works ive testet it very well.
EDIT: And could you please move this back to Mod releases or tell me whats missing?
Last edited by PilzAdam on Mon Jul 23, 2012 17:08, edited 1 time in total.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests