[Mod] Warps [warps] (portal|warp|teleport)

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

[Mod] Warps [warps] (portal|warp|teleport)

by sofar » Post

Warps - a warp location and warp stone mod

Keywords: portal|warp|teleport

Image

This is a fairly simple warp mod, designed to make it easy for novice users to travel around a map without having to type in text commands, but without granting users permission to teleport to any location on the map.

Warps are created by the warp admin. Warp privilege needs to be granted to users (not enabled by default). The user can list and warp to the warp locations that exist.

Warp stones are available with /give and through a creative inventory. These stones work as one-way teleporters that can be programmed with a target by the warp_admin. No privileges are needed to use these warp stones. Users can't reprogram the target, only use it to warp. Users can also call the /warp command directly if they know the name of the warp location.

While warping, the user needs to stand still in one location for 5 seconds. This prevents combat escape and teleport overuse, as teleporting can cause large amounts of blocks to be loaded.

Commands:
  • /warp [warp name] - warp to a destination, if allowed and exists
  • /listwarps [warp name] - list all known warp destinations
  • /setwarp [warp name] - create a new, or modify a warp destination
  • /delwarp [warp name] - remove a warp destination
Nodes
  • warps:warpstone - The warp stone node looks like a purple floating gem
Actions that can be performed on the warp stone:
  • Punching the node initiates a warp, similar to typing the /warp command.
  • Right-clicking the warpstone reprograms the target. By default there is no target set.
  • Shift-punching (shift-left click) removes the warp stone from the map.

Permissions
  • warp_admin - allows creating, changing warps and modifying warp stones
  • warp_user - allows listing warps, and using warps and warp stones
Config

Warps are stored in a "warps.txt" file in the world folder. This file isn't meant to be editable, but it's format is trivial enough to edit it with a text editor.

Dependencies: None (default game only)

Download

The project is on github, like my other mods:
Project page: https://github.com/minetest-mods/warps
Download latest version: https://github.com/minetest-mods/warps/ ... master.zip

License:: LGLPv21+ for code, CC-BY-SA-3.0 for models/textures, sounds are CC-BY-3.0 and CC-BY-NC-3.0

Upcoming plans:
  • Assign a cost to using a warpstone (item, other?)
  • Permission audit
======================================
Check out my mods:
Last edited by sofar on Thu Jan 19, 2017 01:03, edited 7 times in total.

User avatar
indriApollo
Member
Posts: 146
Joined: Fri Sep 26, 2014 11:34
GitHub: indriApollo
IRC: indriApollo
In-game: SudoAptGetPlay
Location: Belgium
Contact:

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by indriApollo » Post

I wonder, where you aware of viewtopic.php?f=9&t=10681 ? Do you want to do it your own way, or is this just duplicate effort ?

User avatar
Evergreen
Member
Posts: 2135
Joined: Sun Jan 06, 2013 01:22
GitHub: 4Evergreen4
IRC: EvergreenTree
In-game: Evergreen
Location: A forest in the midwest
Contact:

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by Evergreen » Post

indriApollo wrote:I wonder, where you aware of viewtopic.php?f=9&t=10681 ? Do you want to do it your own way, or is this just duplicate effort ?
This works pretty differently from your mod, your command uses a lot of commands to create warps, but this uses nodes.
Back from the dead!

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

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by sofar » Post

Evergreen wrote:
indriApollo wrote:I wonder, where you aware of viewtopic.php?f=9&t=10681 ? Do you want to do it your own way, or is this just duplicate effort ?
This works pretty differently from your mod, your command uses a lot of commands to create warps, but this uses nodes.
Right. Having "waypoints" or "bookmarks is nice, and is certainly needed, but the main thing I was missing in those other mods is something where a player does not need to actually remember or even type commands in the terminal at all.

I was used to having this functionality when I was still playing MC, and really needed it back in MT. Since I could not find a good solution, this was easy enough ;^)

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

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by Krock » Post

I think you should rename it to "Portals" because using warp is not the same as teleporting (but is almost the same speed on a map like Minetest uses).
Also using an entity (+ invisible node) as replacement for the meshnode would be a nice idea because you could rotate that one.
Look, I programmed a bug for you. >> Mod Search Engine << - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>

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

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by sofar » Post

Krock wrote:I think you should rename it to "Portals" because using warp is not the same as teleporting (but is almost the same speed on a map like Minetest uses).
Renaming usually is ugly, and I thought about the name for a bit. In the end I didn't like "portal" because it assumes a shape. Whereas warping denominates the idea of "translocating". I can still change the name later, I know the name is in use by other mods anyway.
Krock wrote:Also using an entity (+ invisible node) as replacement for the meshnode would be a nice idea because you could rotate that one.
Yes, *absolutely*. I'm only fairly new to blender and mesh nodes, and I realized immediately that when I made this a mesh node that I couldn't animate it. You also can't have a permanent sound on a mesh node, and I really wanted to add a "humming" sound coming from the warp stone as well.

So my idea is to change the current warp node to a "pedestal" shape, something 1/10th of a node height. The "pedestal" by default is unprogrammed, so there won't be a crystal above it when you set it down. Once programmed, the crystal appears as an object and it rotates and wobbles slightly up-and-down. The programming and removal of the warp stones can then be done by interaction with the warp pedestal, and the actual teleporting can be done by interacting with the warp crystal.

Maybe we can even have some alternative designs, like portals in MC (collision detection?), but ... one thing at a time.

Now you spoiled the surprise :)

User avatar
everamzah
Member
Posts: 490
Joined: Thu Jan 29, 2015 00:47
GitHub: everamzah
IRC: everamzah
In-game: everamzah

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by everamzah » Post

What do you think about per-user warplists? For example: /setwarp LocationName PlayerName. This way people with warp_user priv can't go just anywhere, and player's can have hidden warps. /setwarp LocationNameTwo without a player name param would be global and anyone with warp_user priv could see it and warp there as normal.

There's a bug when a player punches the stone and stands still and then disconnects before warping. This crashes the server. I added an if not nil e.p:setpos() but that took me 30 minutes to figure out, so that shows the extent of my abilities there. :-) I'm running this mod at amhi.duckdns.org.

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

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by sofar » Post

everamzah wrote:What do you think about per-user warplists? For example: /setwarp LocationName PlayerName. This way people with warp_user priv can't go just anywhere, and player's can have hidden warps. /setwarp LocationNameTwo without a player name param would be global and anyone with warp_user priv could see it and warp there as normal.

There's a bug when a player punches the stone and stands still and then disconnects before warping. This crashes the server. I added an if not nil e.p:setpos() but that took me 30 minutes to figure out, so that shows the extent of my abilities there. :-) I'm running this mod at amhi.duckdns.org.
Can you post this patch so I can merge it? github pull request works fine.https://github.com/sofar/warps.

There are mods already there that implement private or per-player warp points - I didn't setup the permission system to account for multiple players, so that would be hard to change, and not something I currently prefer doing.

scottvee
Member
Posts: 18
Joined: Thu Jan 12, 2017 07:59
In-game: scottvee

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by scottvee » Post

Bit of a typo in your download link. Should be https://github.com/minetest-mods/warps/ ... master.zip

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

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by sofar » Post

scottvee wrote:Bit of a typo in your download link. Should be https://github.com/minetest-mods/warps/ ... master.zip
Thanks, fixed that up.

lightseer
Member
Posts: 132
Joined: Mon Jan 23, 2017 16:18

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by lightseer » Post

Just trying this out (With version 0.4.13 since I'm too incompetent to get 0.4.15 going on Ubuntu 16.04). Standalone there was an error when the get_player_privs function tried to run, so I just took out the permissions checking. Now it works standalone for me. Thanks, because going up and down 600 sections of ladder was going to be a little annoying.

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

Re: [Mod] Warps [Warps] (portal, warp, teleport)

by sofar » Post

lightseer wrote:Just trying this out (With version 0.4.13 since I'm too incompetent to get 0.4.15 going on Ubuntu 16.04). Standalone there was an error when the get_player_privs function tried to run, so I just took out the permissions checking. Now it works standalone for me. Thanks, because going up and down 600 sections of ladder was going to be a little annoying.
right, in general older versions are not supported. Enjoy! glad you got it to work.

User avatar
thminer
Member
Posts: 83
Joined: Sat Aug 12, 2017 16:24
GitHub: TEbinger
In-game: thomas or thomas321
Contact:

Re: [Mod] Warps [warps] (portal|warp|teleport)

by thminer » Post

I'm using Your mod on my Adventskalender server. https://blogs.rpi-virtuell.de/minetest/ ... st-online/
Unfortunately it doesn't work with the android app. Maybe You can change the code to make that work? This would be great, because it's a very helpful and good looking mod for getting around.
Find my minetest stuff in my blog: http://thomas-ebinger.de/?s=minetest

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

Re: [Mod] Warps [warps] (portal|warp|teleport)

by sofar » Post

thminer wrote: Unfortunately it doesn't work with the android app. Maybe You can change the code to make that work? This would be great, because it's a very helpful and good looking mod for getting around.
I wouldn't know where to start. The code runs on the server. There is no client specific code anywhere. The server code involved doesn't know or even care about the client version or OS.

What part of the code doesn't work? Your report is very sparse on actual details. Perhaps you can elaborate and precisely describe the issue you're seeing.

User avatar
thminer
Member
Posts: 83
Joined: Sat Aug 12, 2017 16:24
GitHub: TEbinger
In-game: thomas or thomas321
Contact:

Re: [Mod] Warps [warps] (portal|warp|teleport)

by thminer » Post

I tried it again. Just a tap is not enough, You need to touch the screen for some time, then it will work. So no need to change the code, just a strange behaviour. Thank You for Your reply ...
Find my minetest stuff in my blog: http://thomas-ebinger.de/?s=minetest

User avatar
1faco
Member
Posts: 84
Joined: Tue Sep 08, 2020 20:32
GitHub: minefaco
In-game: faco

Re: [Mod] Warps [warps] (portal|warp|teleport)

by 1faco » Post

this mod don't work for minetest 5+ :(

User avatar
Blockhead
Member
Posts: 1622
Joined: Wed Jul 17, 2019 10:14
GitHub: Montandalar
IRC: Blockhead256
In-game: Blockhead Blockhead256
Location: Land Down Under
Contact:

Re: [Mod] Warps [warps] (portal|warp|teleport)

by Blockhead » Post

1faco wrote:
Sun Jan 24, 2021 23:05
this mod don't work for minetest 5+ :(
It does now!
Last edited by Blockhead on Thu Nov 03, 2022 13:05, edited 1 time in total.
/˳˳_˳˳]_[˳˳_˳˳]_[˳˳_˳˳\ Advtrains enthusiast | My map: Noah's Railyard | My Content on ContentDB ✝️♂

User avatar
1faco
Member
Posts: 84
Joined: Tue Sep 08, 2020 20:32
GitHub: minefaco
In-game: faco

Re: [Mod] Warps [warps] (portal|warp|teleport)

by 1faco » Post

Blockhead wrote:
Tue Jan 26, 2021 11:35
1faco wrote:
Sun Jan 24, 2021 23:05
this mod don't work for minetest 5+ :(
It does now!
Oh nice! thanks you so much :D

Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests