[Mod] Carts [carts]

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Wed Nov 07, 2012 19:27

It would be great if players could be handled the same way as other lua entities. Why can players be moved downwards (gravity in action) or even upwards (with the group of the node the player falls onto set like in the jumping mod) but not be moved/accelerated sideways? Does anyone know if there is a reason to this? Accelerating the player might cause its own problems (like players falling down and dying), but in a controlled environment (like a 2x1 underground tunnel) that might be less of a problem.
A list of my mods can be found here.
 

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

by PilzAdam » Thu Nov 08, 2012 16:14

Sokomine wrote:It would be great if players could be handled the same way as other lua entities. Why can players be moved downwards (gravity in action) or even upwards (with the group of the node the player falls onto set like in the jumping mod) but not be moved/accelerated sideways? Does anyone know if there is a reason to this? Accelerating the player might cause its own problems (like players falling down and dying), but in a controlled environment (like a 2x1 underground tunnel) that might be less of a problem.

How to decide who has control of the player? The human in front of the screen via keyboard or the Lua API?
There are many problems when you want to realize this in a good way.
 

Iqualfragile
Member
 
Posts: 160
Joined: Tue Sep 18, 2012 22:11

by Iqualfragile » Thu Nov 08, 2012 16:52

there is no problem if the scripts and the controls just apply forces
if you want to solve it without forces you can make a script lock the players controlls on a per-key-basis
Gr8 b8, m8. I rel8, str8 appreci8, and congratul8. I r8 this b8 an 8/8. Plz no h8, I'm str8 ir8. Cr8 more, can't w8. We should convers8, I won't ber8, my number is 8888888, ask for N8. No calls l8 or out of st8. If on a d8, ask K8 to loc8. Even with a full pl8, I always have time to communic8 so don't hesit8.
 

Sokomine
Member
 
Posts: 2980
Joined: Sun Sep 09, 2012 17:31

by Sokomine » Thu Nov 08, 2012 18:07

A player entering a vehicle would under ideal conditions be transported to the destination and be free to move inside the vehicle. That is of course rather complicated (velocity relative to vehicle and relative to the rest of the world) and would imply such things as player without safety-belt beeing thrown out/off a vehicle that comes to a sudden halt - realistic but impractical.
When the player enters a vehicle it can be assumed that the player wants to go where the vehicle goes and - if he doesn't agree with the direction anymore - will leave the vehicle. Free movement inside the vehicle is not that important. A key to enter/leave it would be ok. It would be good if the player could turn around inside the vehicle and such change the direction into which he's looking. Water and air do that already when the player is falling/swimming. Now add the same thing for horizontal travel :-)
Another related point is that in order to move on one has to constantly press keys. Be it forward+fast for travelling for minutes through tunnels, be it some strange shift+space+whatever combination to climb strange ladders, be it just space for swimming...that is annoying. It may be something players on gaming consoles are used to. For players with a keyboard it's bad. A "continue travelling forward" key would help a lot. Or a vehicle that doesn't have to move the player through set_position.
A list of my mods can be found here.
 

User avatar
Topywo
Member
 
Posts: 1718
Joined: Fri May 18, 2012 20:27

by Topywo » Thu Nov 08, 2012 20:25

Sokomine wrote:A "continue travelling forward" key would help a lot.


minetest.conf.example?

# Continuous forward movement (for testing)
#continuous_forward = false

But I didn't try it yet.
 

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

by mauvebic » Fri Nov 09, 2012 03:12

problem is nodes don't move, they're removed and added +1 on any given axis. What we need are nodes that have directions and velocities and a drag effect on any object sitting on it. It would help alot with my boats :-)
"Fuck the hat." - Paulie Gualtieri
 

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

by PilzAdam » Fri Nov 09, 2012 21:28

If someone uses the 3D model dev version by Taoki (alias MirceaKitsune) (https://github.com/MirceaKitsune/minetest/tree/models) you may want to look at this branch of this mod: https://github.com/PilzAdam/carts/tree/attachment.
It uses the attachment code from the dev version to transport players smoothly. It works realy good.
Please report bugs here and I will tell them Taoki if they are relevant for him and the development of the 3D models.
 

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

by jin_xi » Fri Nov 09, 2012 22:10

been testing it and its great, works really well too. nice work!
 

luciferleftwing
Member
 
Posts: 10
Joined: Tue Oct 23, 2012 14:21

by luciferleftwing » Sat Nov 10, 2012 00:43

very cool i may signal that it derails if the player tries to dig a node while riding the cart, well it is realistic in a certain way but i do not know if it was intended
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sat Nov 10, 2012 04:39

I have seen a few cases where the carts will get stuck in motion between the node right in front of it and the node behind it. I once clicked a cart in this state in my single player game and the game crashed. Afterwards, the map would not load.
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Fri Nov 23, 2012 15:12

Do your two previous posts recommend potential bug fixes to the code, Hybrid Dog? If so, then they might be of use to PilzAdam.
 

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

by PilzAdam » Fri Nov 23, 2012 15:15

Hybrid Dog, if you can provide bug fixes (patches or pull requests on GitHub) I will gladly add them.
But changes like MAX_SPEED = 40.5 should stay in your own version ;-)
 

lesto
New member
 
Posts: 9
Joined: Sun Nov 25, 2012 20:00

by lesto » Sun Nov 25, 2012 20:15

hi, i have a request. Can you make the railchest locket, or better idea, make the railchest drop things in the nearest chest or locked chest (that way we can use bigger chest and/or from others mod)?

edit: and switch! mesecon controlled switch! with lock!

ri-edit: meseconrail stop doesn't seems to work, i've placed mesetorch all around, but cart won't stop.. at lest the "sensor" works, i'm using it with piston, but the cart have to be manually restarted.
Last edited by lesto on Sun Nov 25, 2012 23:18, edited 1 time in total.
 

User avatar
aldobr
Member
 
Posts: 316
Joined: Sun Nov 25, 2012 05:46

by aldobr » Tue Nov 27, 2012 00:49

I have a request :

Powered tunneler/railroad layer.

Make a powered cart that breaks rocks in front of it (up to 3 upside, 3 left 3 right) and lays a new track over the recently opened area, and so on (like those tunel making machines that are used today to build tunnels for the subway), until it runs out of tracks (You place tracks into the cart, kick it and it turns on and do his things...

At the same time rocks and material that are removed get inside the cart and can be collected by the player...

Maybe add another cart that goes back and fort along the line transporting tracks in the trip towards the cart and bringing back collected material in the return trip...

This would simplifly resource collection/track building...
 

User avatar
Menche
Member
 
Posts: 994
Joined: Sat Jul 02, 2011 00:43

by Menche » Tue Nov 27, 2012 02:16

aldobr wrote:I have a request :

Powered tunneler/railroad layer.

Make a powered cart that breaks rocks in front of it (up to 3 upside, 3 left 3 right) and lays a new track over the recently opened area, and so on (like those tunel making machines that are used today to build tunnels for the subway), until it runs out of tracks (You place tracks into the cart, kick it and it turns on and do his things...

At the same time rocks and material that are removed get inside the cart and can be collected by the player...

Maybe add another cart that goes back and fort along the line transporting tracks in the trip towards the cart and bringing back collected material in the return trip...

This would simplifly resource collection/track building...

Great idea, would make building long tunnels much less boring and time consuming.
An innocent kitten dies every time you top-post.
I am on the Voxelands Forums more often than here.
Try Voxelands (forked from Minetest 0.3) by darkrose
 

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

by BrandonReese » Sat Dec 01, 2012 05:26

I'm getting an error periodically when trying to enter a cart. Using the attachment branch.

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
23:18:55: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error running function 'on_rightclick': ...inetest-ru-win32\bin\..\mods\minetest\carts\init.lua:746: attempt to index a nil value
23:18:55: ERROR[main]: stack traceback:

In thread 1450:
..\..\minetest\src\main.cpp:1749: main: Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 1450:
#0  main
(Leftover data: #1  Dedicated server branch)
(Leftover data: #2  ServerMap::save)
(Leftover data: #3  ServerMap::saveBlock)
(Leftover data: #4  ItemStack::serialize)
 

Aslanex
 

by Aslanex » Sat Dec 01, 2012 10:09

Hi, meseconrail stop really doesn't work. I've tried to put the mesecon everywhere but the cart won't stop. Please fix it. Thanks!
 

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

by PilzAdam » Sat Dec 01, 2012 10:57

BrandonReese wrote:I'm getting an error periodically when trying to enter a cart. Using the attachment branch.

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
23:18:55: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error running function 'on_rightclick': ...inetest-ru-win32\bin\..\mods\minetest\carts\init.lua:746: attempt to index a nil value
23:18:55: ERROR[main]: stack traceback:

In thread 1450:
..\..\minetest\src\main.cpp:1749: main: Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 1450:
#0  main
(Leftover data: #1  Dedicated server branch)
(Leftover data: #2  ServerMap::save)
(Leftover data: #3  ServerMap::saveBlock)
(Leftover data: #4  ItemStack::serialize)

Do you use 0.4.4-dev version of Minetest?
 

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

by PilzAdam » Sat Dec 01, 2012 10:58

Aslanex wrote:Hi, meseconrail stop really doesn't work. I've tried to put the mesecon everywhere but the cart won't stop. Please fix it. Thanks!

Mesecon mod had some changes in the API so I have to look over it a bit.
 

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

by BrandonReese » Sat Dec 01, 2012 18:54

PilzAdam wrote:
BrandonReese wrote:I'm getting an error periodically when trying to enter a cart. Using the attachment branch.

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
23:18:55: ERROR[main]: ERROR: An unhandled exception occurred: ServerError: LuaError: error running function 'on_rightclick': ...inetest-ru-win32\bin\..\mods\minetest\carts\init.lua:746: attempt to index a nil value
23:18:55: ERROR[main]: stack traceback:

In thread 1450:
..\..\minetest\src\main.cpp:1749: main: Assertion '0' failed.
Debug stacks:
DEBUG STACK FOR THREAD 1450:
#0  main
(Leftover data: #1  Dedicated server branch)
(Leftover data: #2  ServerMap::save)
(Leftover data: #3  ServerMap::saveBlock)
(Leftover data: #4  ItemStack::serialize)

Do you use 0.4.4-dev version of Minetest?


I'm using 0.4.4 but not the latest. It was the latest as of a week or so ago. I think I fixed it with a little change to check for a nil value.

I replaced 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
for i,item in ipairs(tmp) do
      if not item:is_player() and item:get_luaentity().name ~= "carts:cart" then
    table.insert(self.items, item)
      end
end


With 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
for i,item in ipairs(tmp) do
   if item:is_player() ~= nil and item:get_luaentity() ~= nil then
      if not item:is_player() and item:get_luaentity().name ~= "carts:cart" then
    table.insert(self.items, item)
      end
    end
end


And it hasn't crashed yet. I love the carts. My kids love them also, I laid track between two cities and my kids just ride carts in between them all the time now.
 

User avatar
yohoho
Member
 
Posts: 13
Joined: Tue Nov 27, 2012 17:47

by yohoho » Sat Dec 01, 2012 22:18

Not sure if its been discussed but it seems the cart "stops" at seeming random going up or down a "slope".

I have been testing this mod and I like it but it has a few issues. One seems to be as mentioned above. I have a mine cart tunnel slope going down to my mines from the surface. The cart will continue down the slope a way but almost always stop somewhere midway with no apparent rhyme or reason. The tunnel is a simple stair basically (before stairs were added to minetest). I can't seem to find a "reason" for the apparent random stops. However so long as all rails are on same level it seems to work just fine except for occasional derail at corners.

Another issue is I have mesecons installed and it seems the built in mesecons features of cart mod just don't work.
 

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

by PilzAdam » Sat Dec 01, 2012 22:22

yohoho wrote:but it has a few issues.

Are you kidding? This is the most buggy mod I can imagine!
yohoho wrote:Another issue is I have mesecons installed and it seems the built in mesecons features of cart mod just don't work.

As I said above the mesecon API changed a bit and I have to update it. Dunno when I will do that.
The carts mod code makes the depressive because its so bad :-(
 

Josh
Member
 
Posts: 1146
Joined: Fri Jun 29, 2012 23:11

by Josh » Sun Dec 02, 2012 02:10

PilzAdam, i need the cart mod working for 0.4.4. The reason is im making an adventure map, i saw in this video:
http://www.youtube.com/watch?v=Wta7K7hG__I&list=UUgc3zP0FfBqM9yiy6WNFFPw&index=3&feature=plcp
that carts are now rideable. But when i go to craft the cart i dosen't work. Any help?
 

User avatar
yohoho
Member
 
Posts: 13
Joined: Tue Nov 27, 2012 17:47

by yohoho » Sun Dec 02, 2012 03:57

PilzAdam wrote:
yohoho wrote:but it has a few issues.

Are you kidding? This is the most buggy mod I can imagine!

I've seen worse lol


PilzAdam wrote:
yohoho wrote:Another issue is I have mesecons installed and it seems the built in mesecons features of cart mod just don't work.

As I said above the mesecon API changed a bit and I have to update it. Dunno when I will do that.
The carts mod code makes the depressive because its so bad :-(

Maybe someone (or multiple people) on the forums with some knowledge and skill can band together with you to re-write this mod to make it the best it can be? Seems "carts" is something almost everyone wants. I wish I could be of service but all I can do is offer some testing.
 

User avatar
kaeza
Member
 
Posts: 2141
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza

by kaeza » Sun Dec 02, 2012 05:15

yohoho wrote:Maybe someone (or multiple people) on the forums with some knowledge and skill can band together with you to re-write this mod to make it the best it can be? Seems "carts" is something almost everyone wants. I wish I could be of service but all I can do is offer some testing.

Maybe if someone fixed the entity duplication bug. I have like 6 chests full of carts.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal | BTC: 1DFZAa5VtNG7Levux4oP6BuUzr1e83pJK2
 

User avatar
Inocudom
Member
 
Posts: 2889
Joined: Sat Sep 29, 2012 01:14
IRC: Inocudom
In-game: Inocudom

by Inocudom » Sun Dec 02, 2012 17:27

yohoho wrote:
PilzAdam wrote:
yohoho wrote:but it has a few issues.

Are you kidding? This is the most buggy mod I can imagine!

I've seen worse lol


PilzAdam wrote:
yohoho wrote:Another issue is I have mesecons installed and it seems the built in mesecons features of cart mod just don't work.

As I said above the mesecon API changed a bit and I have to update it. Dunno when I will do that.
The carts mod code makes the depressive because its so bad :-(

Maybe someone (or multiple people) on the forums with some knowledge and skill can band together with you to re-write this mod to make it the best it can be? Seems "carts" is something almost everyone wants. I wish I could be of service but all I can do is offer some testing.


This is a mod you will need help fixing and completing, PilzAdam. Sometimes, you must seek the aid and knowledge of others. There is no shame in asking for help when you need it. I recommend that you ask for assistance with your simple mobs mod as well, for that one too needs some fixing. With the aid of others, I am certain that the two mods can finally reach their full potential. Never give up hope.
 

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

by BrandonReese » Sun Dec 02, 2012 20:49

yohoho wrote:The cart will continue down the slope a way but almost always stop somewhere midway with no apparent rhyme or reason. The tunnel is a simple stair basically (before stairs were added to minetest).


I have issues with the stairs also. It seems to help if you make the slope less steap. Instead of:

(side view of stair step down)

#
##
###
####

do

#
###
#####
#######
 

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

by BrandonReese » Tue Dec 04, 2012 06:05

I have mesecons working with the rails and switches.

Replace your carts/mesecons.lua with this one:

http://ubuntuone.com/66jJaOqsloRvL3EATTzIO8

and add mesecons to your carts/depends.txt file

All I had to do was remove the old add_receptor_node functions and register the nodes with register_effector, I also added, mesecon=2 to the rail group so the mesecons will attach to the rails.

The original effect on the switch may be changed also, power on == right, power off == left
Last edited by BrandonReese on Tue Dec 04, 2012 16:30, edited 1 time in total.
 

User avatar
dannydark
Member
 
Posts: 428
Joined: Fri Aug 12, 2011 21:28

by dannydark » Tue Dec 04, 2012 06:56

BrandonReese wrote:I have mesecons working with the rails and switches.

Replace your carts/mesecons.lua with this one:

[link]http://ubuntuone.com/66jJaOqsloRvL3EATTzIO8[/link]

and add mesecons to your carts/depends.txt file

All I had to do was remove the old add_receptor_node functions and register the nodes with register_effector, I also added, mesecon=2 to the rail group so the mesecons will attach to the rails.

The original effect on the switch may be changed also, power on == right, power off == left


Problem with this is it will mean anyone who wants to use this mod will also have to install mesecons which for me is not a problem but some people might not want to, maybe it would be better to add the extra functionality and just have a simple bool in the code that will check if mesecon_support is enabled and if so use the extra features.

Obviously the user would also need to then add mesecons to the depends file maybe this can be told to them above the mesecon_support bool?
 

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

by BrandonReese » Tue Dec 04, 2012 13:07

dannydark wrote:Problem with this is it will mean anyone who wants to use this mod will also have to install mesecons which for me is not a problem but some people might not want to, maybe it would be better to add the extra functionality and just have a simple bool in the code that will check if mesecon_support is enabled and if so use the extra features.

Obviously the user would also need to then add mesecons to the depends file maybe this can be told to them above the mesecon_support bool?


The first line of the mesecons.lua file is

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
if minetest.get_modpath("mesecons") ~= nil then


So it should skip all of the mesecons functionality if mesecons is not installed.
 

PreviousNext

Return to Mod Releases

Who is online

Users browsing this forum: No registered users and 65 guests

cron