[Mod] Restart Gift [restart_gift]

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

[Mod] Restart Gift [restart_gift]

by ChimneySwift » Sun Dec 24, 2017 04:49

Restart Gift

Server restarts and crashes are a necessary but annoying part of the Minetest game, so this mod tries to make them more bearable by giving players who log back in after a restart/crash a little gift.

GitHub
ZIP Download

Code license: MIT

Dependencies: None

Usage

Modify the variables on lines 1 to 7 of init.lua to change gift timeout (amount of time after a restart players who were kicked have to log in bu to receive a gift) in seconds (default: 300 seconds or 5 minutes), gift name (default: "default:mese"), and gift count (default: 1)
A spoon is basically a tiny bowl with a stick on it
 

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

Re: [Mod] Restart Gift [restart_gift]

by AccidentallyRhine » Sun Dec 24, 2017 06:57

The only problem I foresee is that this could incentivize players to abuse issues known to cause server crashes. Though I guess that would also be motivation to actually address server crashes...
 

User avatar
KatzEyez
Member
 
Posts: 29
Joined: Tue Aug 08, 2017 18:24
Location: (IG: Depends) (RL: USA)
GitHub: LadyK
IRC: LadyK
In-game: LadyK

Re: [Mod] Restart Gift [restart_gift]

by KatzEyez » Sun Dec 24, 2017 12:06

It's a neat idea. Probably best used on PvP servers.

You could make the gift something small. Perhaps the gift could be a fruit that isn't available in the game, but admins have access to it, like strawberry, orange or banana.

I have died because of crashes before. It would have been nice to have a small token gift, even if it was just a food item.

The only servers that might not be able to offer gifts would be creative servers, since there's not too much that you can give a player that they're not able to give themselves, unless the owners add some desirable blocks that are hidden from creative.
Hiya everyone! ^_^ LadyK is officially back! Got Discord? I'm LadyK#3914 if you want to add me.
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Restart Gift [restart_gift]

by ChimneySwift » Mon Dec 25, 2017 02:53

The issue of players exploiting this feature is real, just by restarting in singleplayer with it enabled while I was debugging I collected a not insignificant quantity of mese blocks, which is why I recommend servers set the item to something like a Cookie, where it doesn't really matter if players have access to lots of them easily.

I may investigate (if enough community interest is shown toward this mod) making it so a gift can be given randomly from a list of items.
A spoon is basically a tiny bowl with a stick on it
 

Chem871
Member
 
Posts: 864
Joined: Sat Aug 19, 2017 21:49
Location: SCP-2935
GitHub: Chemguy99
In-game: Nyx Serris

Re: [Mod] Restart Gift [restart_gift]

by Chem871 » Mon Dec 25, 2017 03:26

Free cookies are nice :P
What is SCP-055 again? I forgot.
 

User avatar
ThomasMonroe
Member
 
Posts: 278
Joined: Tue Apr 04, 2017 16:21
Location: Wherever I am at
GitHub: ThomasMonroe314
IRC: ThomasMonroe TMcSquared
In-game: ThomasMonroe TMcSquared

Re: [Mod] Restart Gift [restart_gift]

by ThomasMonroe » Mon Dec 25, 2017 12:32

COOOOKKKIIIIEEESSSSS
Everyone like cookies!
Projects|:*sigh* school: :Qub³d: :Legends Of Survival: :making people think:
I don't make things messy, I just *cough* disturb the local entropy.
 

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

Re: [Mod] Restart Gift [restart_gift]

by AccidentallyRhine » Mon Dec 25, 2017 19:34

If you configure your server to use this mod, it would be nice to set

ask_reconnect_on_crash = true

and

kick_msg_crash = There was an issue but you may reconnect to receive a free cookie.
 

Byakuren
Member
 
Posts: 813
Joined: Tue Apr 14, 2015 01:59
GitHub: raymoo
IRC: Hijiri
In-game: Raymoo + Clownpiece

Re: [Mod] Restart Gift [restart_gift]

by Byakuren » Wed Dec 27, 2017 04:01

There could be a cooldown time so that players are limited to one restart bonus per X hours or something like that.
Every time a mod API is left undocumented, a koala dies.
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Restart Gift [restart_gift]

by ChimneySwift » Wed Dec 27, 2017 05:23

Byakuren wrote:There could be a cooldown time so that players are limited to one restart bonus per X hours or something like that.


Yeah I'm going to look into doing that, should be doable with a bit of reworking, I'd have to have a separate database to record who has been rewarded or something like that, I'll look into it, LadyK actually mentioned a similar idea to me via PM so I'm glad to hear others agree.

BTW, your signature is amazing
A spoon is basically a tiny bowl with a stick on it
 

User avatar
ManElevation
Member
 
Posts: 893
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation

Re: [Mod] Restart Gift [restart_gift]

by ManElevation » Wed Dec 27, 2017 13:40

ah nice mod, does it send them a message too?
My Public Mods! Discord: Rottweiler Games#3368
 

User avatar
ChimneySwift
Member
 
Posts: 319
Joined: Fri Sep 22, 2017 06:46
Location: 127.0.0.1
GitHub: ChimneySwift
IRC: ChimneySwift
In-game: ChimneySwift

Re: [Mod] Restart Gift [restart_gift]

by ChimneySwift » Thu Dec 28, 2017 00:24

ManElevation wrote:does it send them a message too?


yep!

"We're sorry you were kicked, have <gift quantity> <gift description> as a thank you gift for coming back :)"

You can modify it on line 50 of init.lua if you wish.
A spoon is basically a tiny bowl with a stick on it
 

lonestar
Member
 
Posts: 39
Joined: Mon Jul 17, 2017 03:25
Location: Texas,USA

Re: [Mod] Restart Gift [restart_gift]

by lonestar » Thu Dec 28, 2017 01:20

This is the type of mods that I like to see, along with your sendstack and temp_priv mods, as they actually give something unique to the game. Nothing wrong with the other mods here, but there are so many variations of the same type of mod or do basically the same thing. Good job and thank you for your contributions.
 

User avatar
ManElevation
Member
 
Posts: 893
Joined: Tue Aug 02, 2016 22:04
Location: Madrid,Spain
GitHub: ManElevation
IRC: ManElevation
In-game: ManElevation

Re: [Mod] Restart Gift [restart_gift]

by ManElevation » Thu Dec 28, 2017 15:37

ChimneySwift wrote:yep!

"We're sorry you were kicked, have <gift quantity> <gift description> as a thank you gift for coming back :)"

You can modify it on line 50 of init.lua if you wish.

sounds great
My Public Mods! Discord: Rottweiler Games#3368
 


Return to WIP Mods



Who is online

Users browsing this forum: No registered users and 2 guests