Page 21 of 24

Re: [Mod] Carts [carts]

Posted: Mon Jul 21, 2014 22:28
by kamiles
Hello!

I have This problem, someone know how to repeir this?

Re: [Mod] Carts [carts]

Posted: Tue Jul 22, 2014 05:39
by Kilarin
rename your folder from carts-master to just carts.

Re: [Mod] Carts [carts]

Posted: Tue Jul 22, 2014 06:17
by lotek
Brockenflabel wrote:Are the carts designed to go up and down slopes and stairs? When I go up stairs
I always end up flying, sometimes several blocks in the air and my cart floats there.
I have fall to the ground then build up blocks to get it back.
I had the same problem. in my case this fork solved the problem https://github.com/Kilarin/carts

Note 2014-07-31
Please note that in my case, the patches from kilarin crashed my server with the error message "attempt to perform arithmetic on a nil value" https://github.com/PilzAdam/carts/pull/15

Re: [Mod] Carts [carts]

Posted: Wed Aug 06, 2014 22:48
by lag01
Hi!
I forked and rewritten original PilzAdam mod, so it can work fast and with less bugs.
I tested it on my server and it works pretty good.

Licence GNU LGPLv2.1 or later.

Source on github: https://github.com/AndrejIT/carts
Zip download https://github.com/AndrejIT/carts/archive/master.zip, folder need to be renamed to "carts".

What is still missing:
not tested with mesecons
sometimes cart just stops with no reason, but much less than in original mod
user controls may be improved, now they work only on low speed
cart just stops if at 0 speed on uphill/downhill

Re: [Mod] Carts [carts]

Posted: Thu Aug 07, 2014 08:18
by Krock
Interesting, I forked it too and rewrote some parts of it.
Positive
Efficient way checking (every 1-2 nodes)
Almost no position resets

Negative: Can glitch through walls
Todo: Add player controls to switch direction

https://github.com/SmallJoker/boost_cart

Re: [Mod] Carts [carts]

Posted: Thu Aug 07, 2014 18:31
by Glünggi
sometimes cart just stops with no reason
-----
thats the Reason why i dont implement this Mod in my Game. But i missed this Mod. :(
***
Add player controls to switch direction
---
This can make the Stoppbug tolerable


Keep on Working plz.. Need a bugfree Carts ;)

Re: [Mod] Carts [carts]

Posted: Thu Aug 07, 2014 20:04
by lag01
I just tested it in version 4.10 on my server and i was able to ride 1200 blocks long railway without stops or other issues(on version 4.9 there was stops and freezes).
So i think that cart mod is pretty usable now.

Re: [Mod] Carts [carts]

Posted: Fri Aug 08, 2014 00:39
by gsmanners
The stops in 0.4.9 were due to get_node(p).name returning "ignore" erroneously at chunk boundaries. You still see lighting glitches from time to time at the chunk bounds, so I don't know that the issue won't continue to come up in some other use cases.

Re: [Mod] Carts [carts]

Posted: Fri Aug 08, 2014 02:54
by Kilarin
Interesting. I was considering rewriting Carts again myself.

The change I was thinking of, which perhaps you guys would be interested in implementing was this:

It seems like there are several different ideas for rails, and even some different ideas for carts (I still want to make a powered steam cart!). But under the current cart mod structure, to add a new type of rail or a new cart requires forking the mod. What if we rewrote the Cart mod as a cart api. All of the basic functionality for movement on the rails, and acceleration due to gravity, would be built into the cart mod. But actual carts and rails would be done separately, and would call a carts_register_cart(mycart.mycartfunction) or carts_register_rail(myrail.myrailfunction)

When the cart mod is moving a cart along on the rails, each turn it would calculate the rail direction, deal with controls, and calculate acceleration due to gravity. BUT, then it would call the registered function for that particular cart to allow that cart to add any acceleration unique to that cart. And then it would call the registered function for the rail it is currently on and add any acceleration for that particular rail.

That way, if someone wanted to add low power rails, or reverse power rails, or mesecon conductive but non-power rails, or my touring rails, or whatever kind of rails they wanted, they could do so without having to fork and rewrite the cart mod. And if someone wanted to add a steam cart, they could do so without having to fork and rewrite the cart mod.

Just an idea for consideration.

Re: [Mod] Carts [carts]

Posted: Fri Aug 08, 2014 03:33
by HeroOfTheWinds
Kilarin wrote:Interesting. I was considering rewriting Carts again myself.

The change I was thinking of, which perhaps you guys would be interested in implementing was this:

It seems like there are several different ideas for rails, and even some different ideas for carts (I still want to make a powered steam cart!). But under the current cart mod structure, to add a new type of rail or a new cart requires forking the mod. What if we rewrote the Cart mod as a cart api. All of the basic functionality for movement on the rails, and acceleration due to gravity, would be built into the cart mod. But actual carts and rails would be done separately, and would call a carts_register_cart(mycart.mycartfunction) or carts_register_rail(myrail.myrailfunction)

When the cart mod is moving a cart along on the rails, each turn it would calculate the rail direction, deal with controls, and calculate acceleration due to gravity. BUT, then it would call the registered function for that particular cart to allow that cart to add any acceleration unique to that cart. And then it would call the registered function for the rail it is currently on and add any acceleration for that particular rail.

That way, if someone wanted to add low power rails, or reverse power rails, or mesecon conductive but non-power rails, or my touring rails, or whatever kind of rails they wanted, they could do so without having to fork and rewrite the cart mod. And if someone wanted to add a steam cart, they could do so without having to fork and rewrite the cart mod.

Just an idea for consideration.
+100, a marvelous idea. I know of someone who has had to fork it and add his own rails, I'm sure a lot of people would benefit from this...

Re: [Mod] Carts [carts]

Posted: Fri Aug 08, 2014 09:32
by Krock
Well, it's already now possible to add own rails, it only needs some meta information about the acceleration.

Re: [Mod] Carts [carts]

Posted: Fri Aug 08, 2014 13:39
by Sokomine
There are always problems with carts on a server to some degree due to lag. I think the only way to do it properly would be to teach the client about rails in general so that the client can predict the movement of objects attached to rails. Handling rail switches would still require updates from the server, but most movements could be done by the client. "Rails" ought to be a very general concept so that things like tubes from pipeworks and the items shooting through them are handled by the same code.

Re: [Mod] Carts [carts]

Posted: Fri Aug 08, 2014 13:51
by Krock
Sokomine wrote:There are always problems with carts on a server to some degree due to lag.
Excactly. Also, the global step is not always the same and that's the reason I made my own fork of it. It seems to run smoothly now beause the position is not always sent to the player.

EDIT: Added rail switching by keys (used some lines of code by Kilarin)

Re: [Mod] Carts [carts]

Posted: Sun Aug 10, 2014 19:24
by lag01
Carts test video, it turned out to little story :)
http://youtu.be/tP8SoW7BeSw

Re: [Mod] Carts [carts]

Posted: Sat Aug 16, 2014 15:55
by Moab
uh, Mr. Adam, your cart mod and skin changer didnt work! I followed the intructions

Re: [Mod] Carts [carts]

Posted: Sat Aug 16, 2014 16:11
by Krock
Moab wrote:uh, Mr. Adam, your cart mod and skin changer didnt work! I followed the intructions
*Guide-slaps Moab*

Re: [Mod] Carts [carts]

Posted: Sat Aug 16, 2014 23:47
by Moab
Krock wrote:
Moab wrote:uh, Mr. Adam, your cart mod and skin changer didnt work! I followed the intructions
*Guide-slaps Moab*
Oh! Thanks!

Re: [Mod] Carts [carts]

Posted: Sun Aug 17, 2014 08:55
by balthazariv
lag01 wrote:Carts test video, it turned out to little story :)
http://youtu.be/tP8SoW7BeSw
I like this ;-)

Re: [Mod] Carts [carts]

Posted: Tue Dec 02, 2014 18:18
by trev
Awesome mod! Great Job. Do you think it would be possible to add sounds?

Re: [Mod] Carts [carts]

Posted: Thu Jan 08, 2015 19:02
by u34
great mod, sounds would be a cool feature...

Re: [Mod] Carts [carts]

Posted: Thu Feb 05, 2015 07:15
by sofar
https://github.com/PilzAdam/carts/pull/19

Added a patch which makes the player "sit" in carts. Please pull if you like, I think this is quite reasonable.

Image

Re: [Mod] Carts [carts]

Posted: Thu Feb 05, 2015 07:18
by sofar
I'm a bit disappointed that carts are unmovable when you're inside of them. I'd rather see a cart be slow (e.g. max speed while manually pushing 4) than the current situation, since carts are just no fun unless you start building all sorts of mese-powered contraptions. Please consider making carts player-powered when attached (e.g. punching them while in one should just work)

Re: [Mod] Carts [carts]

Posted: Fri Feb 06, 2015 11:03
by Krock
sofar wrote:I'm a bit disappointed that carts are unmovable when you're inside of them.
Yes, I had the same "problem" and solved this with a few lines of code:
https://github.com/SmallJoker/boost_car ... lua#L82-87
I hope PilzAdam merges the pull requests, some of them are very good.

Re: [Mod] Carts [carts]

Posted: Fri Feb 06, 2015 12:17
by twoelk
you could of course place a powered rail and connect a button to it by using mesecons or simply two blocks of mese. Hop inside and press the button. Not much unlike mc iirc.

Image

ok could be done simpler but this one on VanessaE's creative server was supposed to serve four lines ... if I get it sorted some day

Re: [Mod] Carts [carts]

Posted: Sat Feb 28, 2015 20:40
by ASciortino
How do you remove the carts from the tracks?