[mod] Realtime Elevators [elevator]

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

[mod] Realtime Elevators [elevator]

by shacknetisp » Post

Updated for 5.4.0.

This mod provides stable entity-based elevators for fast vertical travel without teleportation.
This mod has no dependencies. This mod supports MineClone 2 and Minetest Game with improved recipes with Technic and either homedecor/chains or farming redo.

Image
Last edited by shacknetisp on Mon Jan 09, 2023 15:25, edited 9 times in total.

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

Re: [mod] Realtime Elevators [elevator]

by TheReaperKing » Post

Looks interesting!
Become A Real Life Superhero - http://SuperheroHill.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: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [mod] Realtime Elevators [elevator]

by azekill_DIABLO » Post

is it smooth? if yes i need it!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

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

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Post

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: 7507
Joined: Wed Oct 29, 2014 20:05
GitHub: azekillDIABLO
In-game: azekill_DIABLO
Location: OMICRON
Contact:

Re: [mod] Realtime Elevators [elevator]

by azekill_DIABLO » Post

just perfect!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!

User avatar
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [mod] Realtime Elevators [elevator]

by Desour » Post

Cool! I like it!
You should make the player bigger (with set_properties) when you attach it.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

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

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Post

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: 81
Joined: Mon Oct 24, 2016 21:07
Location: Phoenix, Arizona

Re: [mod] Realtime Elevators [elevator]

by Cage » Post

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: 32
Joined: Wed Feb 25, 2015 15:27
GitHub: linewriter1024
IRC: behalebabo
In-game: beha
Contact:

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Post

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: 369
Joined: Sat Sep 24, 2011 01:03
Location: Underground

Re: [mod] Realtime Elevators [elevator]

by Melkor » Post

can anyone upload a video of the mod working?

Cage
Member
Posts: 81
Joined: Mon Oct 24, 2016 21:07
Location: Phoenix, Arizona

Re: [mod] Realtime Elevators [elevator]

by Cage » Post

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
Desour
Member
Posts: 1469
Joined: Thu Jun 19, 2014 19:49
GitHub: Desour
IRC: Desour
In-game: DS
Location: I'm scared that if this is too exact, I will be unable to use my keyboard.

Re: [mod] Realtime Elevators [elevator]

by Desour » Post

@Cage: Try editing the "get_pos" to "getpos" in file.
he/him; Codeberg; GitHub; ContentDB; public personal TODO list; "DS" is preferred (but often too short)

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

Re: [mod] Realtime Elevators [elevator]

by shacknetisp » Post

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: 81
Joined: Mon Oct 24, 2016 21:07
Location: Phoenix, Arizona

Re: [mod] Realtime Elevators [elevator]

by Cage » Post

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

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

Re: [mod] Realtime Elevators [elevator]

by Andrey01 » Post

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

User avatar
v-rob
Developer
Posts: 969
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [mod] Realtime Elevators [elevator]

by v-rob » Post

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?
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

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

Re: [mod] Realtime Elevators [elevator]

by Andrey01 » Post

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?

User avatar
v-rob
Developer
Posts: 969
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [mod] Realtime Elevators [elevator]

by v-rob » Post

I just tried to see if it fixed it, but it didn't do anything.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

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

Re: [mod] Realtime Elevators [elevator]

by Andrey01 » Post

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.

User avatar
v-rob
Developer
Posts: 969
Joined: Thu Mar 24, 2016 03:19
GitHub: v-rob
IRC: v-rob
Location: Right behind you.

Re: [mod] Realtime Elevators [elevator]

by v-rob » Post

I did, but it didn't fix the problem.
Core Developer | My Best Mods: Bridger - Slats - Stained Glass

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

Re: [mod] Realtime Elevators [elevator]

by Nofabe » Post

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

Re: [mod] Realtime Elevators [elevator]

by cubestacker » Post

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: 252
Joined: Sun Aug 02, 2015 05:43

Re: [mod] Realtime Elevators [elevator]

by AccidentallyRhine » Post

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: 186
Joined: Sat May 06, 2017 17:45
GitHub: Parasitoid

Re: [mod] Realtime Elevators [elevator]

by parasite » Post

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: 1841
Joined: Fri Aug 26, 2016 15:36
GitHub: sorcerykid
In-game: Nemo
Location: Illinois, USA

Re: [mod] Realtime Elevators [elevator]

by sorcerykid » Post

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!

Post Reply

Who is online

Users browsing this forum: No registered users and 7 guests