[mod] Realtime Elevators [elevator]

shacknetisp
Member
 
Posts: 25
Joined: Wed Feb 25, 2015 15:27
GitHub: shacknetisp
IRC: behalebabo
In-game: beha

[mod] Realtime Elevators [elevator]

by shacknetisp » Wed Mar 22, 2017 13:15


This mod provides stable entity-based elevators for fast vertical travel without teleportation.
Current I've only written recipes for use with technic and homedecor/chains, so if anyone would like to make a pull request with default-compatible recipes that would be appreciated.

This mod has been live on Survival in Ethereal for a couple weeks, and has been tested by several players there.

Requires a version of Minetest Engine newer than 0.4.15 for best usage, though it is compatible with 0.4.15-release. Development began with a version from 2017-03-07.

Image
Last edited by shacknetisp on Sun Mar 26, 2017 14:32, edited 4 times in total.
 

User avatar
TheReaperKing
Member
 
Posts: 516
Joined: Sun Nov 22, 2015 21:36

Re: [mod] Realtime Elevators [elevator]

by TheReaperKing » Wed Mar 22, 2017 16:35

Looks interesting!
Resources on happiness and life management - http://MikesHappyPlace.com
Project Lead of the Doom 3 Mod Last Man Standing - http://Doom3Coop.com
Project Lead of Platinum Arts Sandbox Free 3D Game Maker - http://SandboxGameMaker.com
Youtube Channel - https://www.youtube.com/user/PlatinumArtsKids
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO

Re: [mod] Realtime Elevators [elevator]

by azekill_DIABLO » Thu Mar 23, 2017 17:18

is it smooth? if yes i need it!
【Voxellar 2.0】 ; 【MILA】 update ; 【Rec_a_MT】 ; 【BB,HD】 update ; 【▶ Youtube】 This person worked too hard to be forgotten: Feedback me!
 

shacknetisp
Member
 
Posts: 25
Joined: Wed Feb 25, 2015 15:27
GitHub: shacknetisp
IRC: behalebabo
In-game: beha

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Thu Mar 23, 2017 21:15

In singleplayer it is quite smooth. I have not tested on a very powerful server, but even with lag it is generally smooth, and it works without losing much (if any) speed, which is one of the most important features.
 

User avatar
azekill_DIABLO
Member
 
Posts: 7342
Joined: Wed Oct 29, 2014 20:05
Location: Under my desk (but I can't see my monitor now X'[ )
GitHub: azekillDIABLO
In-game: azekill_DIABLO
 

User avatar
DS-minetest
Member
 
Posts: 969
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [mod] Realtime Elevators [elevator]

by DS-minetest » Sat Mar 25, 2017 11:47

Cool! I like it!
You should make the player bigger (with set_properties) when you attach it.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

shacknetisp
Member
 
Posts: 25
Joined: Wed Feb 25, 2015 15:27
GitHub: shacknetisp
IRC: behalebabo
In-game: beha

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Sat Mar 25, 2017 14:08

DS-minetest wrote:Cool! I like it!
You should make the player bigger (with set_properties) when you attach it.


Thanks & done!
 

Cage
Member
 
Posts: 54
Joined: Mon Oct 24, 2016 21:07

Re: [mod] Realtime Elevators [elevator]

by Cage » Sat Mar 25, 2017 23:51

I have a problem and a question.

First if I right click on the elevator I get this error which crashes the game....

2017-03-25 16:05:47: ERROR[Main]: ServerError: Lua: Runtime error from mod 'elevator' in callback item_OnPlace(): .minetest/mods/elevator/init.lua:456: attempt to call method 'get_pos' (a nil value)
2017-03-25 16:05:47: ERROR[Main]: stack traceback:
2017-03-25 16:05:47: ERROR[Main]: .minetest/mods/elevator/init.lua:456: in function 'on_rightclick'
2017-03-25 16:05:47: ERROR[Main]: /usr/share/minetest/builtin/game/item.lua:337: in function </usr/share/minetest/builtin/game/item.lua:330>

I am using the latest stable release.

The question is how exactly to you set up and use the elevator. I know you need the motor at the top and the shafts between. There are two elevator nodes, one that looks like the elevator and the other that looks like a shaft until the motor is attached. Then it turns into the elevator node. Not sure if I am setting this up correctly nor how to make the elevator work once it is set up. Can you elaborate on how to set up and use the mod. Thanks in advance.
 

shacknetisp
Member
 
Posts: 25
Joined: Wed Feb 25, 2015 15:27
GitHub: shacknetisp
IRC: behalebabo
In-game: beha

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Sun Mar 26, 2017 02:54

Cage wrote:First if I right click on the elevator I get this error which crashes the game....

I'm unable to reproduce this, are you using any other mods? What exact steps can you use to do it again? By stable, do you mean 0.4.15? Please remember to update the mod before trying again.

Cage wrote:The question is how exactly to you set up and use the elevator. I know you need the motor at the top and the shafts between. There are two elevator nodes, one that looks like the elevator and the other that looks like a shaft until the motor is attached. Then it turns into the elevator node. Not sure if I am setting this up correctly nor how to make the elevator work once it is set up. Can you elaborate on how to set up and use the mod. Thanks in advance.


Once there are at least two elevators connected to the shaft and the motor is attached, they can be used. You can enter one of the elevators, right click on it, and travel to any other elevator on the shaft.
 

User avatar
Melkor
Member
 
Posts: 292
Joined: Sat Sep 24, 2011 01:03
Location: Underground
 

Cage
Member
 
Posts: 54
Joined: Mon Oct 24, 2016 21:07

Re: [mod] Realtime Elevators [elevator]

by Cage » Sun Mar 26, 2017 04:24

I'm unable to reproduce this, are you using any other mods? What exact steps can you use to do it again? By stable, do you mean 0.4.15? Please remember to update the mod before trying again.


Yes I am using other mods but the ones I thought might be causing the problem weren't the ones. I can place the elevators and shaft node, right click on the elevators and the formspec comes up. It says that the elevator is inactive. I type in the name for the elevator and all is okay. After I place the motor on top of the upper elevator they activate. Then that is were the problem comes in. I go into the elevator and right click, then the game crashes. Error say that the player location detection is a nil value. By stable I did mean 0.4.15. I re-downloaded the mod, removed the one in the game and reinstalled it again. Same results.
 

User avatar
DS-minetest
Member
 
Posts: 969
Joined: Thu Jun 19, 2014 19:49
Location: in front of my pc (which is at home)
GitHub: DS-Minetest
In-game: DS

Re: [mod] Realtime Elevators [elevator]

by DS-minetest » Sun Mar 26, 2017 09:18

@Cage: Try editing the "get_pos" to "getpos" in file.
Do not call me -minetest.
Call me DS or DS-minetest.
I am German, so you don't have to pm me English if you are also German.
The background is a lie.
 

shacknetisp
Member
 
Posts: 25
Joined: Wed Feb 25, 2015 15:27
GitHub: shacknetisp
IRC: behalebabo
In-game: beha

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Sun Mar 26, 2017 14:29

I've changed that now and confirmed it works with 0.4.15-stable. There are still some problems with how 0.4.15 release handles double-height nodes, but it is now possible to use and will improve with the next release of Minetest.
 

Cage
Member
 
Posts: 54
Joined: Mon Oct 24, 2016 21:07

Re: [mod] Realtime Elevators [elevator]

by Cage » Sun Mar 26, 2017 21:12

Thank you sir, that did the trick and it works great. Keep up the great work.
 

User avatar
Andrey01
Member
 
Posts: 1912
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: [mod] Realtime Elevators [elevator]

by Andrey01 » Mon Mar 27, 2017 17:05

Wow, nice!Have you made real elevators?I will try it.Will new views of elevators?For example, steel elevator or wooden elevator
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
v-rob
Member
 
Posts: 500
Joined: Thu Mar 24, 2016 03:19

Re: [mod] Realtime Elevators [elevator]

by v-rob » Wed May 03, 2017 23:58

This is a wonderful mod, but there is a problem. The elevator works, but after I exit the game and reenter, the elevators become inactive. I have to replace the motor to fix it. I redownloaded Minetest and the mod. I'm using Minetest 4.15. Could you help?
 

User avatar
Andrey01
Member
 
Posts: 1912
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: [mod] Realtime Elevators [elevator]

by Andrey01 » Thu May 04, 2017 20:07

v-rob wrote:This is a wonderful mod, but there is a problem. The elevator works, but after I exit the game and reenter, the elevators become inactive. I have to replace the motor to fix it. I redownloaded Minetest and the mod. I'm using Minetest 4.15. Could you help?

What have you redownloaded minetest for?
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
v-rob
Member
 
Posts: 500
Joined: Thu Mar 24, 2016 03:19

Re: [mod] Realtime Elevators [elevator]

by v-rob » Fri May 05, 2017 04:25

I just tried to see if it fixed it, but it didn't do anything.
 

User avatar
Andrey01
Member
 
Posts: 1912
Joined: Wed Oct 19, 2016 15:18
Location: Russia, Moscow
GitHub: Andrey2470T
In-game: Andrey01

Re: [mod] Realtime Elevators [elevator]

by Andrey01 » Sat May 06, 2017 16:36

v-rob wrote:I just tried to see if it fixed it, but it didn't do anything.

You could just delete the mod and downloaded it afresh.
DL9Eh7xVBw7DXwLAMX1lStE21bSD2XUQ
 

User avatar
v-rob
Member
 
Posts: 500
Joined: Thu Mar 24, 2016 03:19
 

Nofabe
New member
 
Posts: 1
Joined: Sun Sep 24, 2017 16:05

Re: [mod] Realtime Elevators [elevator]

by Nofabe » Sun Sep 24, 2017 16:16

having the same problem as v-rob... when i quit game (to desktop as well as to menu) and rejoining the elevators reset and i have to replace the motor to make them work again... kinda annoying.
i have W10, 64-bit, Minetest version 4.16...
also there is a short moment when i load the world where the elevators are in an active state, but when i click it the game crashes - the error looks something like the one Cage got, not sure though, didnt take a closer look yet...
 

cubestacker
New member
 
Posts: 4
Joined: Wed Nov 01, 2017 00:03
In-game: Och_Noe

Re: [mod] Realtime Elevators [elevator]

by cubestacker » Wed Nov 01, 2017 00:30

This is a nice mod, but the inactive elevators after restart and the overshooting are showstoppers.

I have here a patch for both problems:
Code: Select all
diff elevator-orig/init.lua elevator-patched/init.lua
32c32,37
<     local f = io.open(elevator_file .. ".tmp", "w")
---
> --  FIX  inactive elevators
> --       renaming (os.rename) is blocked by mod_security
> --       --> write direct to savefile
> --
> --    local f = io.open(elevator_file .. ".tmp", "w")
>     local f = io.open(elevator_file , "w")
35c40
<     os.rename(elevator_file .. ".tmp", elevator_file)
---
> --    os.rename(elevator_file .. ".tmp", elevator_file)
103a109,117
>
>     -- FIX for "overshooting"
>
>     local delta_y = math.abs(pos.y-target.y)
>     local speed = SPEED
>     if (delta_y<10) then
>        speed = 2
>     end
>
113c127,128
<     obj:setvelocity({x=0, y=SPEED*obj:get_luaentity().vmult, z=0})
---
>     -- obj:setvelocity({x=0, y=SPEED*obj:get_luaentity().vmult, z=0})
>     obj:setvelocity({x=0, y=speed*obj:get_luaentity().vmult, z=0})



The inactive elevators were caused by the security as "os.<anything>" is not anymore freely available. The fast fix is to go without a backup save file.

The "overshooting" seems to be caused by a to high speed in relation to the distance. I have simply limited the speed for short distances.

I have now no more trouble with inactive elevators or landing outside of the elevator range.

PS: If you want to edit by hand: the lines with "<" have to be removed (mostly commented out) and the lines with ">" at that place included (added).
 

User avatar
AccidentallyRhine
Member
 
Posts: 216
Joined: Sun Aug 02, 2015 05:43

Re: [mod] Realtime Elevators [elevator]

by AccidentallyRhine » Tue Nov 28, 2017 23:40

No fallback recipes for default? I guess I could always make my own... otherwise this mod is a pleasure to use!

Just one caveat: Only the person who placed the elevator nodes should be able to set floor labels. And it doesn't seem that protection mods do anything to help that.

Edit: My default fallback recipe recommendations:
Image
 

parasite
Member
 
Posts: 58
Joined: Sat May 06, 2017 17:45

Re: [mod] Realtime Elevators [elevator]

by parasite » Tue Dec 26, 2017 14:10

Hi!
I just tested this mod for a few minutes in default singleplayer (0.4.16-win64, minetest_game). What I can say, is that is awesome! It really works! (except what was mentioned above: after relogin elevateor is inactive and there is need to change its motor - I consider this as temporary bug; this mod is so wonderful that I belive someone will fix it soon). As I remeber it correctly, here we have a long history of many, many attempts to create exactly something like that. But nobody was successful till now. Great work shacknetisp. I hope this will be great update to many worlds and servers :D Especially it is fair that player pay all costs for single meter/node of her or his shaft instead of crafting single teleport device ;-)

I have just two questions:
A) why all stops/floors have some additional, default name except those given by the player?
B) what will happened when in the same time, in one shaft, a few players enter the elevators on different floors and start useing it in such that some will be going down, and some of them will be going up? (I guess, nothing wrong should happens, like carts do not crash when meet each other during rid on the same track, but I had no opportunity to test it in singleplayer).

How to use/build: (1) first you need to build a vertival shaft with "elevator_shaft" blocks/nodes; (2) on each floor replace two of them with "elevator" device; there are 2 kinds of elevators, and there is no matter which of them you will use; (3) with rightclick on each "elevator" you can give a name to it; (4) finally you need to put an "elevator_motor" node just on the top of shaft. Then your construction become "active" and you will be able to walk inside the lift. Of course you can start with "elevator" device on each floor and then connect them with "elevator_shaft" blocks, but I found it is not so easy to put anything on "elevator" device (as you will call/execute the lift-stop-on-this-floor naming formspec instead) so that is why I rather suggest to start with shaft itself.
Last edited by parasite on Tue Dec 26, 2017 15:16, edited 2 times in total.
 

User avatar
sorcerykid
Member
 
Posts: 737
Joined: Fri Aug 26, 2016 15:36
Location: Illinois, USA
In-game: Nemo

Re: [mod] Realtime Elevators [elevator]

by sorcerykid » Tue Dec 26, 2017 14:56

This looks like a very promising mod :) I am seriously considering adapting this for use on JT2.

I'd long been debating whether to install travelnet elevators, but they have the disadvantage (as parasite mentioned), that users can instantly teleport to any height or depth in the world, which offers no challenge whatsoever. This might be just the solution I need. Thanks!
 

Next

Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 6 guests