[Mod] Server Start Location [1.2] [startlocation]

User avatar
YoukaiCountry
Member
 
Posts: 29
Joined: Sat Jan 10, 2015 03:23
GitHub: nbcwell

[Mod] Server Start Location [1.2] [startlocation]

by YoukaiCountry » Tue Jan 13, 2015 07:34

This is a simple mod to add a server-wide start location. When a new player enters, or when a player dies they respawn at the start location.
Furthermore, there are commands to teleport all online and/or offline players to the start location.

Code License: GPLv2
No textures.
Mod dependencies: none

From the readme:
Code: Select all
Server Start Location
--------------

This simple mod adds a start position that all new players start at
automatically, and players warp to on death.

Use
---

It adds a new privilege, startlocation. With this privilege, you have access
to the following new commands:

/setstart - sets the start location to wherever the invoking user is standing.

/gotostart - teleport to the start location.

/allongotostart - teleport all players online to the start location.

/alloffgotostart - teleport all players offline to the start location.

/allgotostart - teleport all players offline or online to the start location.

In addition, if there is a valid start location then all NEW players will
begin life at the start location.
Also, players will begin at the start location upon respawning.

By: Nathaniel Caldwell
www.youkaicountry.com


Download:
https://github.com/nbcwell/startlocation/zipball/master

Github:
https://github.com/nbcwell/startlocation
Last edited by YoukaiCountry on Wed Jan 14, 2015 07:43, edited 1 time in total.
 

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

Re: [Mod] Server Start Location [1.1] [startlocation]

by Krock » Tue Jan 13, 2015 18:38

There are already some spawn mods but it's a simple thing to start with - Well done :)
I hope my pull request is welcome, I rewrote some parts of the codes.
Mod Search Engine - Mods by Krock - DuckDuckGo mod search bang: !mtmod <keyword here>
 

User avatar
TG-MyinaWD
Member
 
Posts: 356
Joined: Thu May 08, 2014 21:22
Location: Far Eden
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: [Mod] Server Start Location [1.1] [startlocation]

by TG-MyinaWD » Tue Jan 13, 2015 18:52

Hmm. Maybe make this stand out form all the others is to do a, force all players goto the Start location. That is if Minetest Lua API has a such demand. that if wasn't thought of and add to other mods.
But I think spawn mods somewhat a good start to show some skills. Hope some cool mods.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

User avatar
YoukaiCountry
Member
 
Posts: 29
Joined: Sat Jan 10, 2015 03:23
GitHub: nbcwell

Re: [Mod] Server Start Location [1.1] [startlocation]

by YoukaiCountry » Tue Jan 13, 2015 19:22

Krock wrote:There are already some spawn mods but it's a simple thing to start with - Well done :)
I hope my pull request is welcome, I rewrote some parts of the codes.


Thanks, I'm still learning the ropes. I have coding experience, but Lua is a new language to me, and so is the Minetest API!
Pull requests are absolutely welcome. I'll check it out later tonight!

Alt. Tester wrote:Hmm. Maybe make this stand out form all the others is to do a, force all players goto the Start location. That is if Minetest Lua API has a such demand. that if wasn't thought of and add to other mods.
But I think spawn mods somewhat a good start to show some skills. Hope some cool mods.


That's a good idea. I'm pretty sure it can be done. Do you mean for all logged in players, or even logged out ones? The second is trickier, but I think I know how I could do it.
 

User avatar
TG-MyinaWD
Member
 
Posts: 356
Joined: Thu May 08, 2014 21:22
Location: Far Eden
GitHub: Maddie-Myina
IRC: Maddie-Myina
In-game: .

Re: [Mod] Server Start Location [1.1] [startlocation]

by TG-MyinaWD » Tue Jan 13, 2015 19:27

Well I was thinking the first since be useful on a Hunger Games map. But if think can do both I would like see it in action.
But it should be maybe the command "/allongotostart" and "/alloffgotostart".

Off for Offline Players and On foe Online.
And keep the modding going.
I'm a Transgender no shame about it.
I prefer to be considered as a "Girl/Lady/Miss/Madam/Female" for now on.
 

User avatar
YoukaiCountry
Member
 
Posts: 29
Joined: Sat Jan 10, 2015 03:23
GitHub: nbcwell

Re: [Mod] Server Start Location [1.1] [startlocation]

by YoukaiCountry » Tue Jan 13, 2015 20:48

Just browsed the pull, looks good to me. I'm not always the cleanest coder, so I very much appreciate the help! I'll merge it when I get to my dev machine.
Also thanks for getting the initialized field out of the position table. I'm having my Minecraft -> Minetest converter parse the serialized lua table, and that makes it much simpler!

Alt. Tester wrote:Well I was thinking the first since be useful on a Hunger Games map. But if think can do both I would like see it in action.
But it should be maybe the command "/allongotostart" and "/alloffgotostart".

Off for Offline Players and On foe Online.
And keep the modding going.


And /allgotostart for everyone offline and online.

It is a server-wide spawn point, so it will be pandemonium when everyone online ends up in the same exact space, but I could definitely see how it would be helpful to get everyone wrangled together for a Hunger games server!
 

User avatar
YoukaiCountry
Member
 
Posts: 29
Joined: Sat Jan 10, 2015 03:23
GitHub: nbcwell

Re: [Mod] Server Start Location [1.2] [startlocation]

by YoukaiCountry » Wed Jan 14, 2015 07:46

I added /allongotostart, /alloffgotostart, and /allgotostart. Tested them a bit, and they seem to work just fine.
To teleport offline characters, I just keep a list of players that do NOT need teleported (the online players), and reference it / teleport as needed when players join the server.
 

User avatar
YoukaiCountry
Member
 
Posts: 29
Joined: Sat Jan 10, 2015 03:23
GitHub: nbcwell

Re: [Mod] Server Start Location [1.2] [startlocation]

by YoukaiCountry » Thu Jan 22, 2015 07:02

Fixed an issue with the latest version that prevented setting the start location.
 

superschizo
Member
 
Posts: 110
Joined: Mon Aug 26, 2013 17:08
Location: Missouri, USA

Re: [Mod] Server Start Location [1.2] [startlocation]

by superschizo » Fri Jan 23, 2015 14:15

I just tried it out on my Candlestick Park world. It is quick and easy, just what I wanted. Thank you.
 

User avatar
YoukaiCountry
Member
 
Posts: 29
Joined: Sat Jan 10, 2015 03:23
GitHub: nbcwell
 

clymancer
New member
 
Posts: 3
Joined: Fri Jan 23, 2015 23:31
Location: Rhode Island
GitHub: clymancer
IRC: clymancer
In-game: clymancer

Re: [Mod] Server Start Location [1.2] [startlocation]

by clymancer » Fri Jan 23, 2015 23:43

Awesome! Good job!
If you hide in the telnet, you will be found.
If you hide in Windows, you will be found.
 


Return to Mod Releases



Who is online

Users browsing this forum: No registered users and 7 guests