[Mod] Carts [carts]

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

by PilzAdam » Fri Dec 14, 2012 12:23

Zeg9 wrote:New model:
http://pastebin.sabayon.org/pasties/store/11564/cart.x
Should work without modifying init.lua

Nice!
Now, one last thing: Move the pitch frames a little bit into the upwards facing direction, so that it looks better when a player sits in the cart and looks down.
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Fri Dec 14, 2012 12:26

:-D
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

by PilzAdam » Sat Dec 15, 2012 23:59

Update:
3D model added. It supports pitch when driving down/uphill.
The cart now gets picked up when holding shift while punching it.
Updated mesecon API functions.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Dec 16, 2012 05:15

I'm finding that the carts can no longer be placed on default steel rails, but they seem to work fine on moreores copper rails.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Sun Dec 16, 2012 05:27

also the mese torches dont boost the carts
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Dec 16, 2012 05:30

Confirmed, mesecons power sources aren't boosting the carts' speed anymore.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Sun Dec 16, 2012 07:00

VanessaE wrote:Confirmed, mesecons power sources aren't boosting the carts' speed anymore.

Same here. However torches placed prior to update still propel carts. Just not newly placed torches.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Sun Dec 16, 2012 08:00

not for our server
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

by PilzAdam » Sun Dec 16, 2012 10:27

Are you sure you have latest carts mod and latest mesecons installed?
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Sun Dec 16, 2012 11:06

PilzAdam wrote:Are you sure you have latest carts mod and latest mesecons installed?

yes she updated both the carts and mesecons today.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

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

by PilzAdam » Sun Dec 16, 2012 17:47

Okay, fixed the problem. It was double re-definition of default rails with moreblocks. Calinou removed the one in moreblocks so now it should work fine.
 

User avatar
RAPHAEL
Member
 
Posts: 627
Joined: Tue Nov 01, 2011 09:09

by RAPHAEL » Sun Dec 16, 2012 23:48

PilzAdam wrote:Okay, fixed the problem. It was double re-definition of default rails with moreblocks. Calinou removed the one in moreblocks so now it should work fine.


Hmm latest version of carts seems to introduce an issue. Previous versions sometimes the cart would just "stop" all of a sudden at random. Now when it does that "stop" it starts going in opposite direction.

Also an issue I've noticed even with previous versions is occasionally cart will embed itself underground after a long slope down.
"Before you speak, ask yourself: Is it kind, is it true, is it necessary, does it improve upon the silence?"
My mods: http://goo.gl/n4kpn
(Currently Various, Industrial, Fakeblocks, Jail, MoarCraft, Christmas, Replicator, minetest dev installer for linux, bash mod installer, windows mod installer)
 

trukoil
Member
 
Posts: 145
Joined: Mon Oct 22, 2012 03:32

by trukoil » Mon Dec 17, 2012 23:37

Idea (maybe right for the Technic mod): electric powered cart, where W speeds up and S speeds down, made with (C -> cart; B -> batteries):

B B B
B C B
B B B

Eight batteries, the cart would have the charge of battery*8, and the electric cart block may be charged on the battery box.
Mesecon energy could load batteries.

Power drain could depend on speed.
Last edited by trukoil on Mon Dec 17, 2012 23:39, edited 1 time in total.
I don't always sign a post
but when i do, i dig.
 

botokiller
New member
 
Posts: 1
Joined: Wed Dec 19, 2012 13:02

by botokiller » Wed Dec 19, 2012 13:15

This page: http://multa.bugs3.com/minetest/forum/viewmod.php?id=18
says that there should be switches, cart detectors, cart slowers, railchests etc. I'd very much like to try them, but I can't find any of them in the mod .zip archive. Where are they?
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Wed Dec 19, 2012 14:32

That is with the old version. Before minetest 0.4.4 and the carts were laggier. Adam had to rewrite the program for 0.4.4
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

glomie
Member
 
Posts: 141
Joined: Sun Aug 07, 2011 19:41

by glomie » Sun Dec 23, 2012 12:56

You can make switch with mesecon piston, as it was done in my server.
Sorry for my bad english...
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Sun Dec 23, 2012 16:43

The only problem with using pistons for switches (which we do on my server also) is that a piston only has two states (basically stop/go or turn/don't-turn if your tracks are simple, or turn-left/turn-right with a somewhat convoluted track layout around the piston), but one of those carts switches has *three*, allowing for left and right turns or stopping entirely.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

glomie
Member
 
Posts: 141
Joined: Sun Aug 07, 2011 19:41

by glomie » Sun Dec 23, 2012 17:06

So, using two piston ?
Sorry for my bad english...
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Sun Dec 23, 2012 17:10

glomie wrote:So, using two piston ?

i have 3 pistons on here server and it is COMPLICATED
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

J-Block
Member
 
Posts: 39
Joined: Sun Dec 23, 2012 20:04

by J-Block » Sun Dec 23, 2012 20:18

Hi, I'm really new to this site so sorry if I do something wrong.

I downloaded this mod and for some reason it fails to load. It displays the message (NOT copying and pasting):

Failed to load and run C:\Users\..\Documents\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\mods\minetest\PilzAdam-carts-01b4bc5\init.lua
 

User avatar
jojoa1997
Member
 
Posts: 2890
Joined: Thu Dec 13, 2012 05:11

by jojoa1997 » Sun Dec 23, 2012 20:53

J-Block wrote:Hi, I'm really new to this site so sorry if I do something wrong.

I downloaded this mod and for some reason it fails to load. It displays the message (NOT copying and pasting):

Failed to load and run C:\Users\..\Documents\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\mods\minetest\PilzAdam-carts-01b4bc5\init.lua

Rename the mod to carts. Its okay this happens to everyone. I had the same problem. If you look in the topic name [Mod] Carts [carts] the words in the [] are usually what you name it.
Coding;
1X coding
3X debugging
12X tweaking to be just right
 

J-Block
Member
 
Posts: 39
Joined: Sun Dec 23, 2012 20:04

by J-Block » Sun Dec 23, 2012 21:47

jojoa1997 wrote:
J-Block wrote:Hi, I'm really new to this site so sorry if I do something wrong.

I downloaded this mod and for some reason it fails to load. It displays the message (NOT copying and pasting):

Failed to load and run C:\Users\..\Documents\minetest-0.4.4-win32\minetest-0.4.4-win32\bin\..\mods\minetest\PilzAdam-carts-01b4bc5\init.lua

Rename the mod to carts. Its okay this happens to everyone. I had the same problem. If you look in the topic name [Mod] Carts [carts] the words in the [] are usually what you name it.


Oh, ok, thanks, I'll remember that! It's working well now!

EDIT: I saw in the first post you can power it with the mesecons mod, but I don't have that. Is there an alternative power source or is that the only one?
Last edited by J-Block on Sun Dec 23, 2012 21:50, edited 1 time in total.
 

User avatar
VanessaE
Member
 
Posts: 3894
Joined: Sun Apr 01, 2012 12:38
GitHub: VanessaE
IRC: VanessaE
In-game: VanessaEzekowitz

by VanessaE » Mon Dec 24, 2012 02:12

Glomie: Using two pistons requires a bare minimum of EIGHT nodes' worth of space (two pistons, two switches, two pieces of track that can move, and one space each for the track to move into/out of when the piston moves), where two (one track, one switch) was sufficient before. Add several more nodes if you need extra wiring to position the switches conveniently.

And if you want left-right behavior out of a piston, you need roughly 12 nodes worth of space for just one such turnout because of the way the track has to be routed to allow for such a thing.

There are examples of these arrangements on my server.
You might like some of my stuff:
Plantlife ~ More Trees ~ Home Decor ~ Pipeworks ~ HDX Textures (16-512px)
Tips (BTC): 13LdcdUFcNCFAm7HfvAXh5GHTjCnnQj6KE
 

User avatar
jordan4ibanez
Member
 
Posts: 1865
Joined: Tue Sep 27, 2011 18:44
GitHub: jordan4ibanez
IRC: jordan4ibanez
In-game: jordan4ibanez

by jordan4ibanez » Mon Dec 24, 2012 20:37

Pilzadam I was beginning to develop trains with your mod, while I'm on break I hope to see you develop the ability for minecarts to essentially be "attached" to eachother.
I was starting with a very simple code:
Replace this:
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
    local dir = cart_func:velocity_to_dir(self.velocity)

Which is in the on_step function of your carts with:

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
    for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 10)) do
        if object:is_player() then
            local objdir = object:getpos()
            self.velocity.x = objdir.x - pos.x
            self.velocity.z = objdir.z - pos.z
        end
    end
    local dir = cart_func:velocity_to_dir(self.velocity)

This essentially makes the minecarts pathfind to a player through rails, this can be further heavily developed into attaching carts to eachother by right clicking with a special chain tool or something. You'd have to add another another self variable, which would be self.follow. But I did not get to that point yet. Let me explain further:
1.) A player right clicks the cart that should be the "lead" for the other cart with the tool.
2.) When the player clicks that cart, the luaentity should be stored in a table for that player's name.
3.) When the player clicks the "following" cart, it would be given the self variable (self.follow) of the luaentity it is supposed to follow.
4.) On step, if the luaentity it is supposed to follow is in it's radius (Maybe a radius of 5 or so) It would try to go towards that other cart.
5.) If it gets stopped, or disconnected (Someone breaks the rail in between them and the "lead" cart gets away) then the radius function should set the self.follow variable to nil or "" so that it will not try to follow the cart as if the connection between the "lead" and the "follow" broke.


Also, i have made a train out of your cart, it is very simple but it looks nice-ish. This train should get if the player is pushing the move forward key (w) and backwards key (s), and move forward, and stop/move backwards accordingly.

Here is a mesh that kaeza made: http://pastebin.com/raw.php?i=5Wz8BqA5
It is very simple and needs to be moved forward a bit so it appears that you are actually sitting in the train. I hope you can work with this information, as it will greatly help minetest achieve another awesome mod. Best of wishes. and merry Christmas.
If you can think it, you can make it.
 

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

by PilzAdam » Wed Dec 26, 2012 12:32

J-Block wrote:EDIT: I saw in the first post you can power it with the mesecons mod, but I don't have that. Is there an alternative power source or is that the only one?

You can punch the cart to accelerate it. Or simply drive downhill.
 

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

by PilzAdam » Wed Dec 26, 2012 12:34

jordan4ibanez wrote:Pilzadam I was beginning to develop trains with your mod, while I'm on break I hope to see you develop the ability for minecarts to essentially be "attached" to eachother.
I was starting with a very simple code:
Replace this:
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
    local dir = cart_func:velocity_to_dir(self.velocity)

Which is in the on_step function of your carts with:

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
    for _,object in ipairs(minetest.env:get_objects_inside_radius(pos, 10)) do
        if object:is_player() then
            local objdir = object:getpos()
            self.velocity.x = objdir.x - pos.x
            self.velocity.z = objdir.z - pos.z
        end
    end
    local dir = cart_func:velocity_to_dir(self.velocity)

This essentially makes the minecarts pathfind to a player through rails, this can be further heavily developed into attaching carts to eachother by right clicking with a special chain tool or something. You'd have to add another another self variable, which would be self.follow. But I did not get to that point yet. Let me explain further:
1.) A player right clicks the cart that should be the "lead" for the other cart with the tool.
2.) When the player clicks that cart, the luaentity should be stored in a table for that player's name.
3.) When the player clicks the "following" cart, it would be given the self variable (self.follow) of the luaentity it is supposed to follow.
4.) On step, if the luaentity it is supposed to follow is in it's radius (Maybe a radius of 5 or so) It would try to go towards that other cart.
5.) If it gets stopped, or disconnected (Someone breaks the rail in between them and the "lead" cart gets away) then the radius function should set the self.follow variable to nil or "" so that it will not try to follow the cart as if the connection between the "lead" and the "follow" broke.


Also, i have made a train out of your cart, it is very simple but it looks nice-ish. This train should get if the player is pushing the move forward key (w) and backwards key (s), and move forward, and stop/move backwards accordingly.

Here is a mesh that kaeza made: http://pastebin.com/raw.php?i=5Wz8BqA5
It is very simple and needs to be moved forward a bit so it appears that you are actually sitting in the train. I hope you can work with this information, as it will greatly help minetest achieve another awesome mod. Best of wishes. and merry Christmas.

Thanks for this bunch of information. Now I have something to do. But I dont know if I can start right away, I have some other things to do. But I will try my best.
 

User avatar
BrandonReese
Member
 
Posts: 836
Joined: Wed Sep 12, 2012 00:44
GitHub: bremaweb
IRC: BrandonReese
In-game: BrandonReese

by BrandonReese » Mon Dec 31, 2012 18:56

I had the idea to make a jousting arena... make two oval tracks one block apart from each other, have the competitors put a cart on the track and have them go in opposite directions and as they pass by each other attack until one of the competitors is dead. I was sorely disappointed when I was testing this that when I tried to attack the other player it just accelerated their cart, which makes sense once I thought about it.

This is my question... if I modify the code so it doesn't accelerate the cart if you are wielding a sword, will I be able to hurt the person attached to the cart?
 

aximx51v
Member
 
Posts: 60
Joined: Fri Dec 07, 2012 03:47

by aximx51v » Tue Jan 08, 2013 04:25

Is there a way to limit cart speed? I have a track that runs down hill. If i put mesecons alongside it to push my cart up the hill, when i go down the hill i end up going so fast that, well... let's just say glitch city.
what if mesecons could act as brakes for the cart? like, mesecons on the right side speed the cart up, and mesecons on the left slow it down. or maybe a mesecon block that slows down/speeds up the cart to a specific speed, regardless of direction?
all in all, great mod so far!
 

rarkenin
Member
 
Posts: 668
Joined: Tue Nov 20, 2012 20:48

by rarkenin » Wed Jan 09, 2013 12:33

aximx51v wrote:Is there a way to limit cart speed? I have a track that runs down hill. If i put mesecons alongside it to push my cart up the hill, when i go down the hill i end up going so fast that, well... let's just say glitch city.
what if mesecons could act as brakes for the cart? like, mesecons on the right side speed the cart up, and mesecons on the left slow it down. or maybe a mesecon block that slows down/speeds up the cart to a specific speed, regardless of direction?
all in all, great mod so far!

No, you can't, since Mesecons triggers a per-node on or off. I'll make a manual powered rail and manual brake rail, and I'll submit a pull request for that.
Admin pro tempore on 0gb.us:30000. Ask me if you have a problem, or just want help.
This is a signature virus. Add me to your signature so that I can multiply.
Now working on my own clone, Mosstest.
I guess I'm back for some time.
 

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

by PilzAdam » Wed Jan 09, 2013 15:45

rarkenin wrote:
aximx51v wrote:Is there a way to limit cart speed? I have a track that runs down hill. If i put mesecons alongside it to push my cart up the hill, when i go down the hill i end up going so fast that, well... let's just say glitch city.
what if mesecons could act as brakes for the cart? like, mesecons on the right side speed the cart up, and mesecons on the left slow it down. or maybe a mesecon block that slows down/speeds up the cart to a specific speed, regardless of direction?
all in all, great mod so far!

No, you can't, since Mesecons triggers a per-node on or off. I'll make a manual powered rail and manual brake rail, and I'll submit a pull request for that.

Would be nice.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: Bing [Bot] and 9 guests

cron