[Mod]Recall mirror [v0.2] (recall_mirror)

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

[Mod]Recall mirror [v0.2] (recall_mirror)

by davidthecreator » Sat Nov 30, 2019 21:04

Yet another mod, I was inspired by terraria to make!

Basically, this mod adds an expensive item into the game (the recall mirror) ...
and you can use it to return to the last bed you slept in, or to (x0,y16,z0) by default, if you've never slept... but you can change the cordinates in the mod's init.lua file quite easily... ("placeholder_pos" at the top inside the file)

the mirror has infinite uses, but it does have a cooldown of 15 seconds after use... (can also easily be changed at the top of init.lua file "recall_mirror_cooldown")

Image
Image

Depends: beds, mana(optional)https://forum.minetest.net/viewtopic.php?t=11154%20.
Minimum MT version requirement: 5.0.0
License: ☭
Attachments
recall_mirror 0.2.zip
(25.8 KiB) Downloaded 1 time
recall_mirror.zip
(25.57 KiB) Downloaded 3 times
Last edited by davidthecreator on Tue Dec 03, 2019 15:21, edited 3 times in total.
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by FreeGamers » Sun Dec 01, 2019 04:22

Awesome!

I had just posted about getting functionality for something like this added into "Mirror of Returning" by Wuzzy.
viewtopic.php?p=362254&sid=ee4511aafd7ecd95ee2e0d629ab170ef#p362254

I was going to take a stab at this myself but have been busy modding a lot of mods and haven't had the time.

This is a really nice concept because I find that in my game, players find returning up mineshafts to be one of the most boring and mundane aspect of the game. I added the elevator mod to try to help this but I haven't noticed anyone using it. I still get requests for a way to return to surface all the time.

I will test it in a few minutes, but how does this work exactly? In your screenshot it looks like you placed it and are holding it.

Could you add optional support for mana mod for hbhunger by wuzzy? I use a lot of magic in my game and requiring it to cost mana may help me balance it a bit.

Terraria has some really cool items and concepts in it. I used to play it a lot. I'm happy to see this mod!
 

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by davidthecreator » Sun Dec 01, 2019 08:09

FreeGamers wrote:Awesome!

I had just posted about getting functionality for something like this added into "Mirror of Returning" by Wuzzy.
viewtopic.php?p=362254&sid=ee4511aafd7ecd95ee2e0d629ab170ef#p362254

I was going to take a stab at this myself but have been busy modding a lot of mods and haven't had the time.

This is a really nice concept because I find that in my game, players find returning up mineshafts to be one of the most boring and mundane aspect of the game. I added the elevator mod to try to help this but I haven't noticed anyone using it. I still get requests for a way to return to surface all the time.

I will test it in a few minutes, but how does this work exactly? In your screenshot it looks like you placed it and are holding it.

Could you add optional support for mana mod for hbhunger by wuzzy? I use a lot of magic in my game and requiring it to cost mana may help me balance it a bit.

Terraria has some really cool items and concepts in it. I used to play it a lot. I'm happy to see this mod!


You just take it into your hand and click Left Mouse Button
And you are teleported to either your bed, or (x0,y16,z0), if you had never slept...

Also, the mirror has a 15 second cooldown by default and you can't use it again, if you didn't pass the cooldown time from your last use.


Fun fact: I was actually inspired to make this mod, by seeing your reply, asking if there's a way to restrict the return mirror from wuzzy's mod, to beds only.
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by FreeGamers » Sun Dec 01, 2019 10:14

Thanks for making it!

I used a different sound effect for the teleportation: https://freesound.org/people/Breviceps/sounds/453391/

I tested it with some players. It worked great, was easy to use, and the particles and sounds work well. They will be asking me to get a recipe or drop ready for it asap.

The only other additions I can think to ask for are:
*make it so you can interact with the world with right click (opening doors and chests while holding the mirror)
* mana support
* perhaps try to grab a fallback spawn point from the minetest.conf
Code: Select all
#    If this is set, players will always (re)spawn at the given position.
#    type: string
 static_spawnpoint = (-1614,10.5,-1089.0)

with something like this
Code: Select all
geomoria.generate_ores = minetest.setting_getbool('geomoria_generate_ores')
if geomoria.generate_ores == nil then
  geomoria.generate_ores = false
end

I will try to provide these if you cannot.
 

Astrobe
Member
 
Posts: 246
Joined: Sun Apr 01, 2018 10:46

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by Astrobe » Sun Dec 01, 2019 10:25

I was too lazy to look into your mod, but it seems to me you could use:
Code: Select all
local spawnpos =minetest.setting_get_pos("static_spawnpoint") or {x=0,y=0,z=0}


... as a reasonable fallback if the player has no bed. They will be teleported to the spawning point.
This is old code that was commented out (because not needed anymore) in one of my mods, I don't guarantee it does work with 5.0 though.
 

ThorfinnS
Member
 
Posts: 200
Joined: Mon Feb 25, 2019 22:05
GitHub: ThorfinnS

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by ThorfinnS » Mon Dec 02, 2019 01:44

escape_wings (Duane, IIRC) functions similarly.

And unless I'm mistaken, he also wrote xlocate, which is bi-directional. Kind of like a permanent, movable version of Darkstone's Town Portal spell.
 

User avatar
Wuzzy
Member
 
Posts: 3643
Joined: Mon Sep 24, 2012 15:01
GitHub: Wuzzy2
IRC: Wuzzy
In-game: Wuzzy

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by Wuzzy » Mon Dec 02, 2019 05:22

This reminds me of something
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH
 

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by davidthecreator » Mon Dec 02, 2019 06:17

Wuzzy wrote:This reminds me of something


Yea... Your mod did inspire me a little...

And I kinda decided to make this, because a person who replied to your mod, wanted a mirror that only returns people the the last bed they slept in...
 

User avatar
runs
Member
 
Posts: 926
Joined: Sat Oct 27, 2018 08:32
GitHub: runsy

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by runs » Mon Dec 02, 2019 18:35

This type of mods really make the difference.

It's not an original idea, it is a recurring item in RPG's. Even the Terraria game has a Magic Mirror with the same effect, but who cares? It is COOL!!!

I will insert it into my Bogart Game next version.
 

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by davidthecreator » Mon Dec 02, 2019 19:17

runs wrote:This type of mods really make the difference.

It's not an original idea, it is a recurring item in RPG's. Even the Terraria game has a Magic Mirror with the same effect, but who cares? It is COOL!!!

I will insert it into my Bogart Game next version.

Not only does Terraria have it, but it is the game that mainly inspired me to make this mod.
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by FreeGamers » Tue Dec 03, 2019 10:51

Terraria is such a well done game, I enjoy seeing some concepts from it being brought to Minetest.

I've been programming events in my game that are seasonal such as halloween mobs, items, and costumes and plan to do one for christmas as well.
 

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by davidthecreator » Tue Dec 03, 2019 10:59

FreeGamers wrote:Terraria is such a well done game, I enjoy seeing some concepts from it being brought to Minetest.

I've been programming events in my game that are seasonal such as halloween mobs, items, and costumes and plan to do one for christmas as well.

If only I had time for this... God damn, do I have a great Terraria inspired mod and subgame, that I'd like to finish and relase...
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by FreeGamers » Tue Dec 03, 2019 12:14

Feel free to take a look. Its part of a bigger mobpack I'm developing for Minetest. When I'm happy with it it will be released here. I started it about 6 months ago and have learned a lot since then. I start a full-time job in two weeks and have been rushing to get as much done as possible before then.

The halloween creatures are here, I use a date to set their spawn parameters but this requires the game to be started withing that time frame.
https://www.notabug.org/FreeGamers/Sara ... a#L96-L105
In the future I may see if I can use the mob_redo on_spawn custom function to remove the entities if they are spawned outside of the time range. This would let the server stay on and enter holiday modes automatically and allow higher uptime and less manual work by admins.

I think you could create invasion events using similar functions. I really liked Terraria when I used to play it. Its a very creative game. I'd be interested in seeing what else you could create inspired by it. :)
 

User avatar
FreeGamers
Member
 
Posts: 334
Joined: Sat May 25, 2019 00:15
Location: United States
GitHub: is proprietary I use NotABug

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by FreeGamers » Tue Dec 03, 2019 13:54

I created a version of the magic mirror mod. I used your version as the base template and Wuzzy's as a way to reference how to build mana support back into it. You should at least include the line for the spawn point position.

This project took me about 8 hours and taught me a lot about the difference between local and global variables, and some more things about functions and statements.

I initially planned a version that used your timers as a fallback if mana mod was too present but all the if statements got a bit too confusing for me. I ended up dropping to help me focus on why my program didn't work. Maybe I'll add it back later, but I figured people could use your mod if they wanted timers only. If people wanted a two way mirror they could use Wuzzy's original mod. The one I have uses the full default 200 points from a player's mana bar.

In the future I may try to add a few seconds of delay to the mirror to "nerf" it a slight amount.

I noticed that if the player's bed got destroyed they still went to the bed location, but I think that is something to do with the way the beds mod works

Here is my mod "Magic Mirror"
https://www.notabug.org/FreeGamers/Sara ... gic_mirror

Once again, thanks.
 

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [Mod]Recall mirror [v0.1] (recall_mirror)

by davidthecreator » Tue Dec 03, 2019 14:15

I will add Mana support to this mod, later on myself...
 

User avatar
davidthecreator
Member
 
Posts: 332
Joined: Mon Aug 18, 2014 19:48
Location: Lithuania
GitHub: daviddoesminetest
In-game: DavidDoesMinetest

Re: [Mod]Recall mirror [v0.2] (recall_mirror)

by davidthecreator » Tue Dec 03, 2019 15:18

v 0.2 - added mana support (mirrors now require 175 mana to use, if wuzzy's mana mod is installed)





U can easily change the mana usage in the init.lua file, at the top, just like cooldown and placeholder teleport position.

Image
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 5 guests