Page 7 of 24

Posted: Wed Nov 07, 2012 19:27
by Sokomine
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.

Posted: Thu Nov 08, 2012 16:14
by PilzAdam
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.

Posted: Thu Nov 08, 2012 16:52
by Iqualfragile
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

Posted: Thu Nov 08, 2012 18:07
by Sokomine
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.

Posted: Thu Nov 08, 2012 20:25
by Topywo
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.

Posted: Fri Nov 09, 2012 03:12
by mauvebic
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 :-)

Posted: Fri Nov 09, 2012 21:28
by PilzAdam
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.

Posted: Fri Nov 09, 2012 22:10
by jin_xi
been testing it and its great, works really well too. nice work!

Posted: Sat Nov 10, 2012 00:43
by luciferleftwing
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

Posted: Sat Nov 10, 2012 04:39
by Inocudom
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.

Posted: Fri Nov 23, 2012 15:12
by Inocudom
Do your two previous posts recommend potential bug fixes to the code, Hybrid Dog? If so, then they might be of use to PilzAdam.

Posted: Fri Nov 23, 2012 15:15
by PilzAdam
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 ;-)

Posted: Sun Nov 25, 2012 20:15
by lesto
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.

Posted: Tue Nov 27, 2012 00:49
by aldobr
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...

Posted: Tue Nov 27, 2012 02:16
by Menche
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.

Posted: Sat Dec 01, 2012 05:26
by BrandonReese
I'm getting an error periodically when trying to enter a cart. Using the attachment branch.

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)

Posted: Sat Dec 01, 2012 10:09
by Aslanex
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!

Posted: Sat Dec 01, 2012 10:57
by PilzAdam
BrandonReese wrote:I'm getting an error periodically when trying to enter a cart. Using the attachment branch.

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?

Posted: Sat Dec 01, 2012 10:58
by PilzAdam
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.

Posted: Sat Dec 01, 2012 18:54
by BrandonReese
PilzAdam wrote:
BrandonReese wrote:I'm getting an error periodically when trying to enter a cart. Using the attachment branch.

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:

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:

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.

Posted: Sat Dec 01, 2012 22:18
by yohoho
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.

Posted: Sat Dec 01, 2012 22:22
by PilzAdam
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 :-(

Posted: Sun Dec 02, 2012 02:10
by Josh
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 ... ature=plcp
that carts are now rideable. But when i go to craft the cart i dosen't work. Any help?

Posted: Sun Dec 02, 2012 03:57
by yohoho
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.

Posted: Sun Dec 02, 2012 05:15
by kaeza
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.