[Mod] Carts [carts]
- jordan4ibanez
- Member
- Posts: 1923
- Joined: Tue Sep 27, 2011 18:44
- GitHub: jordan4ibanez
- IRC: jordan4ibanez
- In-game: jordan4ibanez
Hi there. I am quite new to posting but have enjoyed the game for quite some time now.
One thing I really like is the carts mod - so much that I created a "station rail" which is the combination of the brake rail and the accelerate rail such that the rail accelerated when powered and brakes if not.
That way I can make carts stop where I want them to and move them along again when throwing a switch.
The carts module does however contain a bug which can be shown by just using the accelerate rail:
Build a stretch of accelerate rails and power them all. Place a cart and move it along by punching a button. Power off immediately again so that the cart will stop eventually. Notice the direction. If it is in the negative x or z direction the cart will reverse!
In one the the directions you will notice that the cart reverses direction even if more rail is available in the direction it was travelling before when power is restored once more.
I have looked at the code and am half way to understanding it but the mod writer might have a better clue here. To me it seems that the mod has to save the sign of the direction vector to let the cart travel along in the direction it was going towards so that it does not reverse if it was going in the negative direction.
One thing I really like is the carts mod - so much that I created a "station rail" which is the combination of the brake rail and the accelerate rail such that the rail accelerated when powered and brakes if not.
That way I can make carts stop where I want them to and move them along again when throwing a switch.
The carts module does however contain a bug which can be shown by just using the accelerate rail:
Build a stretch of accelerate rails and power them all. Place a cart and move it along by punching a button. Power off immediately again so that the cart will stop eventually. Notice the direction. If it is in the negative x or z direction the cart will reverse!
In one the the directions you will notice that the cart reverses direction even if more rail is available in the direction it was travelling before when power is restored once more.
I have looked at the code and am half way to understanding it but the mod writer might have a better clue here. To me it seems that the mod has to save the sign of the direction vector to let the cart travel along in the direction it was going towards so that it does not reverse if it was going in the negative direction.
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
I dont know exactly how to reproduce this.kpo wrote:The carts module does however contain a bug which can be shown by just using the accelerate rail:
Build a stretch of accelerate rails and power them all. Place a cart and move it along by punching a button. Power off immediately again so that the cart will stop eventually. Notice the direction. If it is in the negative x or z direction the cart will reverse!
In one the the directions you will notice that the cart reverses direction even if more rail is available in the direction it was travelling before when power is restored once more.
Ehm. Okay I am not sure how to attach an image. But imagine this:PilzAdam wrote:I dont know exactly how to reproduce this.kpo wrote:The carts module does however contain a bug which can be shown by just using the accelerate rail:
Build a stretch of accelerate rails and power them all. Place a cart and move it along by punching a button. Power off immediately again so that the cart will stop eventually. Notice the direction. If it is in the negative x or z direction the cart will reverse!
In one the the directions you will notice that the cart reverses direction even if more rail is available in the direction it was travelling before when power is restored once more.
B
(-x or -z) ==============C======================= (+x or +z)
<---- if the cart stops while moving this way it will move ----> this way when powered again.
'=' = long accelerate track
'B' = Mesecon Button (either the lever, switch or button) and mesecons to each and every piece of track
'C' = Cart
When the button is pressed the cart will move in the positive direction (+x or +z) and return when it reaches the end of the track - sort of bouncing back and forth if power is kept on.
IF the cart is stopping while travelling in the negative direction (-x or -z) it will reverse its direction when the tracks are powered again.
For ease of debugging this set the acceleration to be negative when the accelerate rail is off (that is the extra rail type I made here). That will cause the cart to stop when power is off.
As I write I suspect the code to be "positively inclined" towards the positive direction vector rather than saving the vector it came to a halt with.
Does that make any sense?
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Oh, I understand now.kpo wrote:Ehm. Okay I am not sure how to attach an image. But imagine this:PilzAdam wrote:I dont know exactly how to reproduce this.kpo wrote:The carts module does however contain a bug which can be shown by just using the accelerate rail:
Build a stretch of accelerate rails and power them all. Place a cart and move it along by punching a button. Power off immediately again so that the cart will stop eventually. Notice the direction. If it is in the negative x or z direction the cart will reverse!
In one the the directions you will notice that the cart reverses direction even if more rail is available in the direction it was travelling before when power is restored once more.
B
(-x or -z) ==============C======================= (+x or +z)
<---- if the cart stops while moving this way it will move ----> this way when powered again.
'=' = long accelerate track
'B' = Mesecon Button (either the lever, switch or button) and mesecons to each and every piece of track
'C' = Cart
When the button is pressed the cart will move in the positive direction (+x or +z) and return when it reaches the end of the track - sort of bouncing back and forth if power is kept on.
IF the cart is stopping while travelling in the negative direction (-x or -z) it will reverse its direction when the tracks are powered again.
For ease of debugging this set the acceleration to be negative when the accelerate rail is off (that is the extra rail type I made here). That will cause the cart to stop when power is off.
As I write I suspect the code to be "positively inclined" towards the positive direction vector rather than saving the vector it came to a halt with.
Does that make any sense?
The carts dont save their previous direction, so when they are powered they again they look in wich direction they can move, independently from the previous direction.
I see if I can fix it somehow.
Did you install the mod in the right location? If you're playing the build game, it must go under $MINETEST_FOLDER/mods/build, in a folder named "carts". Inside that folder should be the file init.lua.
WorldEdit 1.0 released
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
The Mesecons Laboratory - the art of Mesecons circuitry
Latest article: Mesecons Basics.
- Dan Duncombe
- Member
- Posts: 904
- Joined: Thu May 09, 2013 21:11
- Location: In the unknown depths of Earth
The only bug is that if going at speed then hitting a downward slope it just flies into the air- quite realistic actually
InfinityProject wrote: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 +∞
Some Mods: Castles Prefab Camouflage
My Games: Nostalgia Realtest Revamped
Servers: See above games.
My Games: Nostalgia Realtest Revamped
Servers: See above games.
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Can try collecting some more information about the error as described here: http://forum.minetest.net/viewtopic.php?id=5073?222jkm wrote:Hi, I am trying to install this mod but every time I start the game, it says error cannot read init.lua. Im running 4.6.6. LM 14. Thanks! The same thing happened with the boats mod.
Thanks a lot, jim
Also there is no Minetest version "4.6.6".
try renaming the mod from 'carts-master' to 'carts'.222jkm wrote:Hi, I am trying to install this mod but every time I start the game, it says error cannot read init.lua. Im running 4.6.6. LM 14. Thanks! The same thing happened with the boats mod.
Thanks a lot, jim
My Essential Server Modpack: ServerExtended
Maintainer of the Minitest Game
[0.4.6-git] SunriseTest Minecraft-Like Hardcore Server
My Kindle broke... Online time will drop significantly.
Maintainer of the Minitest Game
[0.4.6-git] SunriseTest Minecraft-Like Hardcore Server
My Kindle broke... Online time will drop significantly.
Maybe powered carts would be nice. like putting coal in a furnace allowing it to move and also linking carts would also be nice.
Last edited by jojoa1997 on Wed May 22, 2013 22:26, edited 1 time in total.
Coding;
1X coding
3X debugging
12X tweaking to be just right
1X coding
3X debugging
12X tweaking to be just right
I have a bug with the carts, they stop for no reason or even bouncing and going backwards when I'm travelling, each 10 meters or so, forcing me to get out of the cart, punching it and go back inside. Love your mod btw but it kinda wastes the pleasure!
Also, sorry for the bad english.
Also, sorry for the bad english.
k8NzxjXgxpd3KOKx8pz2z12pStfpe5tR
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
The cart doesnt keep its velocity forever. It slows constantly down. Try driving down a hill or use acceleration rails.AndrOn wrote:I have a bug with the carts, they stop for no reason or even bouncing and going backwards when I'm travelling, each 10 meters or so, forcing me to get out of the cart, punching it and go back inside. Love your mod btw but it kinda wastes the pleasure!
Also, sorry for the bad english.
Yes, I use accelerators (with mesecons) and it works, but my issue is that sometimes even at full speed on an horizontal track, suddenly the cart stops with no reason or goes instantly back with the same speed as if it were hurting or bouncing against something invisible. I could make a video of that tomorrow if I'm not clear (though tomorrow because it's 01.40 am here in France).
k8NzxjXgxpd3KOKx8pz2z12pStfpe5tR
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
Could you test if this commit causes it: https://github.com/PilzAdam/carts/commi ... 931d795413?AndrOn wrote:Yes, I use accelerators (with mesecons) and it works, but my issue is that sometimes even at full speed on an horizontal track, suddenly the cart stops with no reason or goes instantly back with the same speed as if it were hurting or bouncing against something invisible. I could make a video of that tomorrow if I'm not clear (though tomorrow because it's 01.40 am here in France).
Also, a video would be helpful, I guess.
Thanks Adam. I like these little carts and how I can at least create circular railroads within chunk limits.PilzAdam wrote:Finally fixed :-)kpo wrote:Will you work on the direction issue as well? You know: The one where the cart reverses its direction to the positive direction if stopped and started using the brake and accelerate rails? :-) (Issue described further up this page)
I may bother you with a powered accelerate/brake rail just the same at some stage :-P
The idea of having the cart stop at stations and punching a mesecon button makes it go again is great fun on rails.
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
You may want to look at MiniTest, it has rails that stop you if they are not powered by redstone, and accelerate you when they are powered.kpo wrote:Thanks Adam. I like these little carts and how I can at least create circular railroads within chunk limits.PilzAdam wrote:Finally fixed :-)kpo wrote:Will you work on the direction issue as well? You know: The one where the cart reverses its direction to the positive direction if stopped and started using the brake and accelerate rails? :-) (Issue described further up this page)
I may bother you with a powered accelerate/brake rail just the same at some stage :-P
The idea of having the cart stop at stations and punching a mesecon button makes it go again is great fun on rails.
Hi PilzAdam, I was just wondering: I am having a server error type with the carts where in the console says to me, "08:13:20: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=2 m_static_exists=true but static data doesn't actually exist in (21,-1,37)." What does this mean? The cart accelerates well but it suddenly stops completely in a random pattern.
- PilzAdam
- Member
- Posts: 4026
- Joined: Fri Jul 20, 2012 16:19
- GitHub: PilzAdam
- IRC: PilzAdam
- Location: Germany
What Minetest version do you use?AlphaD1 wrote:Hi PilzAdam, I was just wondering: I am having a server error type with the carts where in the console says to me, "08:13:20: ERROR[ServerThread]: ServerEnvironment::deactivateFarObjects(): id=2 m_static_exists=true but static data doesn't actually exist in (21,-1,37)." What does this mean? The cart accelerates well but it suddenly stops completely in a random pattern.
In the current development version there is a commit that fixes the storage of static data.
Who is online
Users browsing this forum: Google [Bot] and 27 guests