Page 1 of 3

[Modpack] ServerExtended [0.4-S/0.5pre2.2-U] [serverextended]

PostPosted: Fri Feb 08, 2013 13:45
by Traxie21
[h]ServerExtended v0.4 Stable/0.5pre2.2 Unstable[/h]
This mod is a collection of useful commands and features meant for servers.
(Post updated 3/20/2013)

Features:

Modules can be enabled/disabled from init.txt in a way that keeps the modules from being loaded at all in the server, therby reducing server load.
Individual Modules are configurable from simple, easy-to-read text files.

VIDEO:
Feature Demo video, a bit boring, showcases some features and glitches of the unstable version.

KILLER FEATURE: Ranks Module WIP
Admins can define ranks with different privs in serverextended/ranks/config.txt
They can then specify one rank as the default. Now all new players will get those privs.
Afterwards, they can be changed with /setrank, /demote, or /promote.


  • /setrank [playername] [rankname]
  • /promote [playername]
  • /demote [playername]

Config: serverextended/ranks/config.txt


TeleportRequest Module
Allows players to request to teleport to each other (privs: se_tpr, se_tphr)
  • /tpr [name]
  • /tphr [name]
  • /tpy
  • /tpn

Config: serverextended/tpr/config.txt


Homes Module (Optional item cost for both commands)
Allows players to set one home each. (privs: se_homes)
  • /home, /sethome

Config: serverextended/homes/config.txt


Warps Module (Optional item cost for /warp)
Allows admins to specify server-wide warps that players can then teleport to. (privs: se_warps)
  • /warp [warpname]
  • /warp [blank] (shows all warps)
  • /setwarp [warpname]
  • /delwarp [warpname] (Admin Only)

Config: serverextended/warps/config.txt


Admin Tools Module:
Extra tools for admins (privs: se_admin)
  • /clearinv [name (optional)][configurably players can use.]
  • /god [name (optional)]
  • /heal [name (optional)]
  • /morning, /evening, /night, /noon etc.

Config: serverextended/admin_tools/config.txt

Player Extras Module:
Extra commands for players. (privs: se_player)
  • /m [name] [message](/t, /message)
  • /r [message](/reply)
  • /spawn
  • /suicide
Config: serverextended/player_extras/config.txt


Economy Module WIP [Disabled by default, somewhat useless until finished]:
  • /bal [name (optional)[/*]
  • /pay [name] [amount]
Config: serverextended/economy/config.txt

[h]Download:[/h]
ServerExtended 0.4 Stable
ServerExtended 0.5pre UNSTABLE/Nightly
[h]GitHub:[/h]
ServerExtended Stable
ServerExtended Unstable


Known Bugs:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
!!CRITICAL!! Stable download does not work in recent versions, use the unstable instead. !!CRITICAL!!



Changelog:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
0.5pre2.2-Unstable:
*Changed Chat_String format to use longer names, added nickname support with &nick and &name
*Added nickname system. Priv defaults to Admins rank,
/nick [name] [nickname] -- Sets nickname for [name],
/nick [nickname] -- Sets own nickname
/nick -- Clears nickname if set
In chat, nicknames are preceded by a ~ to prevent trolls.
Example:
/nick Traxie21 UBERLORD Traxie21
[Admin] ~UBERLORD Traxie21: Hi all!
/nick
[Admin] Traxie21: Hi all!
If you do not want to use nicknames in chat, you can replace &name in Chat_String with &dname (default name)
-------------------------------
0.5pre2.1-Unstable:
*Added new config option in se_startup: Chat_String. Allows owners to specify the way
they want chat displayed. EG: Chat_String = "[&r] &n: &m" would produce something like this:
[Admin] Traxie21: Hi all!
*There is a slight engine bug that causes the sending player to see this when he types a chat message (receiving players will not have this problem):
<foobar> FooBar
[Player] foobar: FooBar
-------------------------------
0.5pre2-Unstable:
*Added /info [playername] --Shows all playerdata info for [playername]
*Added /players --Shows all registered players on server
*Changed to modpack system
*NOTE: To disable/enable modules, you now have to delete them.
DO NOT DELETE API FOLDER!!!
-------------------------------
0.5pre-Unstable:
*Added partially working GUI system
*Added /ranks, and /ranks [rankname]
*/setrank fixed
*Changed all static files in /playerdata to /worldname/playerdata.txt
*removed playerdata folder
*slightly optimized code
-------------------------------
0.4.6-Unstable:
*Added Unstable Branch to Github, so that I don't break the stable download on updates.
*Added experimental GUI support for warping, disable-able.
*Added descriptions to warps.
*A few bug fixes/additions :3
*Added unused GUI folder for upcoming API
--------------------------------
0.4-Stable:
*Redesigned warp system, warps are now saved in worlds folder (warpslist.txt).
*Fixed issue with players items being taken even on invalid warp.
*/warp [nothing] or /warp [invalid warp] now shows player all available warps
*Added playerlist.txt (useless ATM, but I am doing something with it)
--------------------------------
0.3b
*Added activation messages to /god, added ability to /god other players with /god [name]
*Added /promote [name]
*Added /demote [name]
*Changed ranks config format slightly.
*Changed all configuration filenames to lowercase.
--------------------------------
0.02a: Bugfix release:
*Fixed /setrank errors, made the config more logical
*Removed default warps.
---------------------------------
0.01a: Initial Release
---------------------------------


[h] MORE COMING SOON :D[/h]

License: WTFPL

PostPosted: Fri Feb 08, 2013 18:15
by socramazibi
Good Mod .

+10

PostPosted: Fri Feb 08, 2013 19:57
by Calinou
Traxie21 wrote:NOTE: This is my first release, and It's bound to be riddled with bugs, I need people with machines capable of running several minetest windows or a server to test this.
(I have a 7 year old laptop with a Intel 945GM graphics card. One window with a server runnning gets about 20 FPS.)


Challenge accepted.
Stuff works (did not test economy), however:

Teleport requests always do not teleport due to an engine bug (mostly when lagging). A workaround would be to attempt to teleport 5 times or so at a very fast pace so that you're almost sure the players are teleported.

Also, /god returns no message when it is typed. Maybe "/god <player>", "/god <player> on" and "/god <player> off" (toggle and force on/off) could be added too, but this is more a suggestion than a bug report.

Lastly, putting capitals to config file names is not really a good thing -- as a Linux user, you probably know that. ;)

Fun fact: I actually tested this mod on a netbook. :D

PostPosted: Fri Feb 08, 2013 21:20
by Traxie21
Calinou wrote:
Traxie21 wrote:NOTE: This is my first release, and It's bound to be riddled with bugs, I need people with machines capable of running several minetest windows or a server to test this.
(I have a 7 year old laptop with a Intel 945GM graphics card. One window with a server runnning gets about 20 FPS.)


Challenge accepted.
Stuff works (did not test economy), however:

Teleport requests always do not teleport due to an engine bug (mostly when lagging). A workaround would be to attempt to teleport 5 times or so at a very fast pace so that you're almost sure the players are teleported.

Also, /god returns no message when it is typed. Maybe "/god <player>", "/god <player> on" and "/god <player> off" (toggle and force on/off) could be added too, but this is more a suggestion than a bug report.

Lastly, putting capitals to config file names is not really a good thing -- as a Linux user, you probably know that. ;)

Fun fact: I actually tested this mod on a netbook. :D


Thank you Very, very much Calinou! This is a great help.

I'm not so sure about rapidly teleporting the player multiple times.. What if it dosn't lag? Then the player will be teleported 5 times to the person, and if he moves, it will look really odd..... I might do a poll on this.

Also, don't test Economy, there's nothing really to test, I've made sure there's no bugs on whats there.

Updated

Changelog 0.03:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
*Added activation messages to /god, added ability to /god other players with /god [name]
*Added /promote [name]
*Added /demote [name]
*Changed ranks config format slightly.
*Changed all configuration filenames to lowercase.

PostPosted: Wed Feb 20, 2013 13:20
by Ragnar
the teleporter module, its almost like MineCraft's tp command...
request: tpa [name]
accept: tpaccept
deny: tpdeny

PostPosted: Wed Feb 20, 2013 14:56
by Traxie21
Lol, indeed, that is what it is based off of.

The original commands I used were /tpr, /tpaccept, /tpdeny.
Jojoa suggested to make them smaller.

Does anyone use this mod yet?

PostPosted: Wed Feb 20, 2013 15:32
by jojoa1997
I will test it when I get home but I can't make a server for more than me and another client. Also can you make a guide to different features like /god I still don't know what it does

PostPosted: Wed Feb 20, 2013 15:35
by Ragnar
Traxie21 wrote:Lol, indeed, that is what it is based off of.

The original commands I used were /tpr, /tpaccept, /tpdeny.
Jojoa suggested to make them smaller.

Does anyone use this mod yet?

I will, right when i get my pc back :/

PostPosted: Wed Feb 20, 2013 15:43
by Traxie21
Yey :D
Btw, its pretty much stable as far as I can tell. Waiting for some feedback before I add more features.

PostPosted: Wed Feb 20, 2013 16:02
by jojoa1997
i will test it when i get home. what is god mode and also could you add a /renamewarp and if the game is singleplayer then the privs are given by default.

PostPosted: Wed Feb 20, 2013 16:23
by Traxie21
God mode just sets your health to 20 every server tick. You can actually still die when you fall from a very high height, but you will respawn where you died with no consequences.

The /removewarp is called /delwarp

I don't want to give privs to singleplayer by default, because thats how I test the rank system.
However, if you must, just add singleplayer.txt to the playerdata folder, and
rank him up, or add this to the first line: rank = Admins

PostPosted: Wed Feb 20, 2013 20:04
by jojoa1997
im sorry but when i run the game with it the mods give me cant run for most of them. also maybe you should make it a modpack to make it easy for server host to disable certain mods.

PostPosted: Wed Feb 20, 2013 20:44
by Traxie21
The way you disable certain mods is by opening init.txt and changing the values to true/false

Can you post the error you have?

PostPosted: Sun Feb 24, 2013 06:33
by jordan4ibanez
This is a great mod which my mod cannot compete with. Good work.

PostPosted: Sun Feb 24, 2013 07:12
by jordan4ibanez
Note: in admins level config, you forgot a space after se_clearinventory_admin, which cause issues for about a half an hour :L

PostPosted: Sun Feb 24, 2013 07:27
by jordan4ibanez
And I'll just help you make this one better instead of having people have to choose between 2 of them, have you heard of auctions?

PostPosted: Sun Feb 24, 2013 13:10
by Traxie21
Darn, I need to make error chacks for the config files.

And yes, I would love help :D
If you'd like, I'll give you permissions for the github account so you can push to it.

Auctions sounds like a good idea. I need to get my arse up and working on the economy code though.

PostPosted: Mon Feb 25, 2013 07:03
by jordan4ibanez
Traxie21 wrote:Darn, I need to make error chacks for the config files.

And yes, I would love help :D
If you'd like, I'll give you permissions for the github account so you can push to it.

Auctions sounds like a good idea. I need to get my arse up and working on the economy code though.

lol! and awesome! and the player should have the warp list sent to them if they just do /warp

PostPosted: Mon Feb 25, 2013 13:05
by Traxie21
Yeah... If you can make that work, great. Because of the way warps are stored, its hard to find a way to store a correct list of warps without introducing lots of room for bugs. Im thinking mabye a table in a file or smth.

I'll add you to the github as soon as get on a real computer. (On kindle ATM)

EDIT: Do you have a github account? I cant seem to find you.

PostPosted: Mon Feb 25, 2013 20:03
by Calinou
Traxie21 wrote:Yeah... If you can make that work, great. Because of the way warps are stored, its hard to find a way to store a correct list of warps without introducing lots of room for bugs. Im thinking mabye a table in a file or smth.


Look at how the /mods and /privs commands list stuff maybe?

Traxie21 wrote:EDIT: Do you have a github account? I cant seem to find you.


https://github.com/jordan4ibanez :)

PostPosted: Mon Feb 25, 2013 23:10
by Traxie21
Oh.

I spelled him with an l XD

And thanks, I will.

PostPosted: Mon Feb 25, 2013 23:47
by prestidigitator
Instead of simply repeating the teleport a bunch of times in a row, you could record the teleporting player's staring position and the destination, try to teleport him, wait for a short delay, then test his new position and if it is still closer to the starting position than the destination, repeat the (request, delay, test) cycle. unless the maximum repeat count has been reached. Something like (WTFPL):

Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
local MAX_TELEPORT_ATTEMPTS = 5
local TELEPORT_ATTEMPT_DELAY = 0.5

local dist_sq = function(p1, p2)
   return (p2.x - p1.x)^2 + (p2.y - p1.y)^2 + (p2.z - p1.z)^2
end

local report_teleport_success = function(context)
   print("Teleported player "..context.player:get_player_name()..
         " to "..minetest.pos_to_string(context.dest).." after "..
         context.attempts.." attempts")
   -- or whatever you're going to do on success
end

local report_teleport_failure = function(context)
   print("FAILED to teleport player "..context.player:get_player_name()..
         " to "..minetest.pos_to_string(context.dest).." after "..
         context.attempts.." attempts")
   -- or whatever you're going to do on failure
end

local do_teleport_player -- <- forward declaration for "recursive" call
do_teleport_player = function(context)
   if context.attempts > 0 then
      local pos = context.player:getpos()

      if dist_sq(pos, context.dest) < dist_sq(pos, context.start) then
         return report_teleport_success(context)
      elseif context.attempts + 1 > MAX_TELEPORT_ATTEMPTS then
         return report_teleport_failure(context)
      end
   end

   player:setpos(context.dest)
   context.attempts = context.attempts + 1

   minetest.after(TELEPORT_ATTEMPT_DELAY, do_teleport_player, context)
end

function teleport_player(player, pos)
   do_teleport_player({ player = player, dest = pos, start = player:getpos(), attempts = 0 })
end

PostPosted: Tue Feb 26, 2013 00:10
by Traxie21
Good idea !
TYVM

I have so many ideas right now, need to make a to-do list.

EDIT:
how effective would something simple like this be?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
player1pos = player:get_pos()
while player1pos == player:get_pos() do
player:setpos(player2pos)
end


I also have ideas for a player profile/info system using formspec.

@jordan4ibanes: You are now listed as a collaborator on github. I think that means you can push to the main repo.

PostPosted: Tue Feb 26, 2013 16:38
by Calinou
Traxie21 wrote:EDIT:
how effective would something simple like this be?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
player1pos = player:get_pos()
while player1pos == player:get_pos() do
player:setpos(player2pos)
end


Would be fun to see when the teleporter is jumping/running/falling/swimming. :P

PostPosted: Tue Feb 26, 2013 18:33
by Traxie21
Yeah... I didn't think about that.

I need to think this through. Don't expect a change on the tpr for awhile.

EDIT: Warps are now saved in warpslist.txt in the world directory, in a table format instead of files. This increases speed, effeciency, and allows me to do more with it.

Changelog 0.4b:
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
*Redesigned warp system, warps are now saved in worlds folder (warpslist.txt).
*Fixed issue with players items being taken even on invalid warp.
*/warp [nothing] or /warp [invalid warp] now shows player all available warps
*Added playerlist.txt (useless ATM, but I am doing something with it)

PostPosted: Tue Feb 26, 2013 18:37
by prestidigitator
Traxie21 wrote:how effective would something simple like this be?
Your phone or window isn't wide enough to display the code box. If it's a phone, try rotating it to landscape mode.
Code: Select all
player1pos = player:get_pos()
while player1pos == player:get_pos() do
player:setpos(player2pos)
end

I would suggest taking my example above instead, and simply recording the name of the destination player instead of the coordinates of the destination position. Then simply get the coordinates of the destination player each time do_teleport() is called, both for the check and for the argument to player:setpos(). That way you'll only teleport them ONCE, but it should be to your updated position if it takes a few attempts.

PostPosted: Fri Mar 01, 2013 19:54
by Traxie21
Working on a warp GUI, it's stable enough to put in the unstable github :D
Also, added warp descriptions.

So far no bugs, except that if the warp text is too long, it runs into the description.
It can be disabled with Warp_GUI in the config.txt
If it is disabled, it will use the normal text list.

You cannot tell by the screenshot, but /setwarp does work with it.
Image

PostPosted: Mon Mar 04, 2013 21:23
by Traxie21
Profile System:

WIP

Image

At the moment, it's just decorative, but I'm working on the functionality.. The message box will be in the big open space.

PostPosted: Sat Mar 09, 2013 02:15
by Traxie21
Unstable version of ServerExtended bumped to 0.5pre Check main post for changelog. Theres still a lot to do for the GUI module, keep it disabled by default. Also, setrank is now fixed. It won't crash anything though.
Use the unstable instead of the stable, ironically, the unstable is stable-er...

I will be unable to work on this for most of next week, so have a teaser video of 0.5 instead.
http://www.youtube.com/watch?v=XTyiIhnWZYQ

PostPosted: Tue Mar 12, 2013 02:28
by Tedypig
I just got 0.4.5 when I found this. I tried anyway despite the warning. Twas a mistake. Are you going to update this? I would love to use it. I tried to make this same mod yesterday (before I found this), but being VERY new to modding, I gave up for now.


EDIT: Never mind. I only clicked on the 1st page. After I hit reply I saw your above post.