[Mod] Carts [carts]

kamiles
New member
Posts: 1
Joined: Mon Jul 21, 2014 22:27

Re: [Mod] Carts [carts]

by kamiles » Post

Hello!

I have This problem, someone know how to repeir this?
Attachments
lol.jpg
lol.jpg (19.58 KiB) Viewed 1593 times

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: [Mod] Carts [carts]

by Kilarin » Post

rename your folder from carts-master to just carts.

lotek
Member
Posts: 22
Joined: Mon Jun 02, 2014 20:21
GitHub: LotekHeavy
IRC: lotek
In-game: lotek
Location: Switzerland
Contact:

Re: [Mod] Carts [carts]

by lotek » Post

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
----
Mine Heavy
http://mine.heavy.ch

User avatar
lag01
Member
Posts: 321
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag
Contact:

Re: [Mod] Carts [carts]

by lag01 » Post

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

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Carts [carts]

by Krock » Post

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
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Glünggi
Member
Posts: 128
Joined: Wed Apr 16, 2014 08:13
Location: Switzerland

Re: [Mod] Carts [carts]

by Glünggi » Post

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 ;)

User avatar
lag01
Member
Posts: 321
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag
Contact:

Re: [Mod] Carts [carts]

by lag01 » Post

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.

gsmanners
Member
Posts: 159
Joined: Fri Jan 10, 2014 21:37

Re: [Mod] Carts [carts]

by gsmanners » Post

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.

User avatar
Kilarin
Member
Posts: 894
Joined: Mon Mar 10, 2014 00:36
GitHub: Kilarin

Re: [Mod] Carts [carts]

by Kilarin » Post

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.

User avatar
HeroOfTheWinds
Member
Posts: 470
Joined: Wed Apr 23, 2014 23:16
GitHub: HeroOfTheWinds
IRC: WindHero
Location: Hawaii

Re: [Mod] Carts [carts]

by HeroOfTheWinds » Post

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...
Nam ex spatio, omnes res venire possunt.
Why let the ground limit you when you can reach for the sky?
Back to college now, yay for sophomore year schedules. :P

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Carts [carts]

by Krock » Post

Well, it's already now possible to add own rails, it only needs some meta information about the acceleration.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

Sokomine
Member
Posts: 4276
Joined: Sun Sep 09, 2012 17:31
GitHub: Sokomine
IRC: Sokomine
In-game: Sokomine

Re: [Mod] Carts [carts]

by Sokomine » Post

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.
A list of my mods can be found here.

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Carts [carts]

by Krock » Post

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)
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
lag01
Member
Posts: 321
Joined: Sun Mar 16, 2014 03:41
GitHub: AndrejIT
IRC: lag01
In-game: lag
Contact:

Re: [Mod] Carts [carts]

by lag01 » Post

Carts test video, it turned out to little story :)
http://youtu.be/tP8SoW7BeSw

User avatar
Moab
Member
Posts: 10
Joined: Sat Aug 16, 2014 01:48
In-game: Moab

Re: [Mod] Carts [carts]

by Moab » Post

uh, Mr. Adam, your cart mod and skin changer didnt work! I followed the intructions
So, I said YEAH! YEAH- Wait, what?!

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Carts [carts]

by Krock » Post

Moab wrote:uh, Mr. Adam, your cart mod and skin changer didnt work! I followed the intructions
*Guide-slaps Moab*
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

User avatar
Moab
Member
Posts: 10
Joined: Sat Aug 16, 2014 01:48
In-game: Moab

Re: [Mod] Carts [carts]

by Moab » Post

Krock wrote:
Moab wrote:uh, Mr. Adam, your cart mod and skin changer didnt work! I followed the intructions
*Guide-slaps Moab*
Oh! Thanks!
So, I said YEAH! YEAH- Wait, what?!

User avatar
balthazariv
Member
Posts: 214
Joined: Mon Apr 07, 2014 15:48
Contact:

Re: [Mod] Carts [carts]

by balthazariv » Post

lag01 wrote:Carts test video, it turned out to little story :)
http://youtu.be/tP8SoW7BeSw
I like this ;-)

User avatar
trev
Member
Posts: 45
Joined: Fri Sep 26, 2014 16:49
In-game: trev

Re: [Mod] Carts [carts]

by trev » Post

Awesome mod! Great Job. Do you think it would be possible to add sounds?

u34

Re: [Mod] Carts [carts]

by u34 » Post

great mod, sounds would be a cool feature...

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] Carts [carts]

by sofar » Post

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

sofar
Developer
Posts: 2146
Joined: Fri Jan 16, 2015 07:31
GitHub: sofar
IRC: sofar
In-game: sofar

Re: [Mod] Carts [carts]

by sofar » Post

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)

User avatar
Krock
Developer
Posts: 4649
Joined: Thu Oct 03, 2013 07:48
GitHub: SmallJoker
Location: Switzerland
Contact:

Re: [Mod] Carts [carts]

by Krock » Post

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.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

twoelk
Member
Posts: 1482
Joined: Fri Apr 19, 2013 16:19
GitHub: twoelk
IRC: twoelk
In-game: twoelk
Location: northern Germany

Re: [Mod] Carts [carts]

by twoelk » Post

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

ASciortino
New member
Posts: 1
Joined: Sat Feb 21, 2015 19:46
In-game: Aodan

Re: [Mod] Carts [carts]

by ASciortino » Post

How do you remove the carts from the tracks?

Post Reply

Who is online

Users browsing this forum: No registered users and 18 guests