Page 1 of 1

[Mod] Player tools [1.4] [playertools]

Posted: Wed Oct 23, 2013 09:57
by Wuzzy
Purpose: Adds some useful player-related server commands
Version: 1.4
Download link: In the attachment
Project page (Git): http://repo.or.cz/w/minetest_playertools.git
Dependencies: None
Optional dependency: Internationalization Library [intllib]
Works on: 0.4.7 to 0.4.14 and later (It will probably work stable for a long time without changes)
License: MIT License

This mod adds some player-related server commands and privileges to Minetest.
The commands allow players to change their health, clear their inventory and set their player physics. The privileges are created for the health, physics and hotbar commands and are named “heal”, “physics” and “hotbar”, respectively.

List of all commands
  • whoami: shows your player name
  • ip: shows your IP address
  • pulverizeall: destroys all items in your player inventory
  • killme: kills yourself
  • sethotbarsize <1...23>: Sets the number of slots in your hotbar to the given number (1-23) (“hotbar” privilege required).
  • sethealth <hearts>: Sets your health to <hearts> hearts (“heal” privilege and damage required).
  • sethp <hp>: Sets your health to <hp> HP (=hearts/2) (“heal” privilege and damage required).
  • setbreath <breath>: Sets your breath to <breath> breath points (“heal” privilege and damage required).
  • setspeed [<speed>]: Sets your movement speed to <speed> (default: 1) (“physics” privilege required)
  • setgravity [<gravity>]: Sets your gravity to <gravity> (default: 1) (“physics” privilege required).
  • setjump [<jump height>]: Sets your jump height to <jump height> (default: 1) (“physics” privilege required)
Everything is also documentated in-game and README.md

There is another gravity mod out there: multigrav. This is not the same, because playertools allows you to edit (mostly) the raw values.

Suggestions for other commands are welcome, given that they are player-related, useful and more or less for testing purposes.

Posted: Thu Oct 24, 2013 04:23
by Neon
Perhaps you could incorporate the code from this mod? as near as I can tell, it doesn't have any formal mod code wrapping it (i.e. no "init.lua", no formal mod name, etc). And it hasn't been maintained in over a year and a half.

Posted: Fri Oct 25, 2013 07:47
by Wuzzy
Nope.

I won’t include /afk because it is more chat-related. It belongs to a collection of chat-related commands.
/spawn sounds actually useful for this mod but I won’t include it because it is difficult, sorry. Spawning is complex; You don’t just simply spawn at the same spot every time. The engine would have to expose spawning to the Lua API, then I would probably include it.

Jail would clearly deserve its own mod.

Posted: Fri Oct 25, 2013 09:56
by jojoa1997
Maybe /afk would make you invincible but once you move or type /afk again you lose invincibility. If you go with the /afk to de-afk then the player should be be allowed to ,move.

Version 1.1 released

Posted: Thu Jul 03, 2014 01:32
by Wuzzy
Version 1.1 released!

New features:
  • New command “whoami”. This command simply shows your name. It has no parameters.
  • Mod now includes an in-game description (description.txt).
You find the download in the attachment of the opening post.

Re: [Mod] Player tools [1.1] [playertools]

Posted: Thu Jul 03, 2014 11:05
by Calinou
Added to Carbone (tweaked).

Version 1.2 released

Posted: Thu Jul 03, 2014 16:38
by Wuzzy
Version 1.2 released!
New features:
  • New command: “ip”. This command shows your IP address.
  • New command “sethotbarsize <1...23>”. This command sets the number of slots in your hotbar to the provided number. This required the new privilege “hotbar”.
  • The heal commands now check if the server setting “enable_damage” is true. The commands do not work if enable_damage = false and the player is warned if this is the case.
I noticed that killme does not work if damage is disabled, because this command simply sets the health to 0. If you know a better way to kill a player, please let me know.

Re: [Mod] Player tools [1.2] [playertools]

Posted: Mon Jul 14, 2014 18:02
by bajanhgk
why not make the command /kill but instead /killme

Re: [Mod] Player tools [1.2] [playertools]

Posted: Mon Jul 14, 2014 18:31
by rubenwardy
How about /ip username, for admins?

Re: [Mod] Player tools [1.2] [playertools]

Posted: Mon Jul 14, 2014 19:42
by Wuzzy
bajanhgk wrote:why not make the command /kill but instead /killme
Because /kill sounds like you want to kill someone else, e.g. /kill Guest.
This mod is only for commands to affect oneself, not others.
rubenwardy wrote:How about /ip username, for admins?
Rejected. This mod is only for commands to affect oneself, not others. I think this belongs to a different mod.

Re: [Mod] Player tools [1.2] [playertools]

Posted: Thu Apr 14, 2016 23:21
by Tmanyo
Is there a way to make hotbar size permanent instead of having to reset it every time you logon?

Re: [Mod] Player tools [1.2] [playertools]

Posted: Fri Apr 15, 2016 04:19
by Wuzzy
No.

Version 1.3 released!

Posted: Sat Nov 12, 2016 19:56
by Wuzzy
Version 1.3 released! Changes:
  • New command: /setbreath for setting your breath
  • intllib support added
  • German translation added
  • /setbreath, /sethealth and /sethp are now disabled when damage is disabled
  • Setting negative value for /setbreath sets breath to 0
  • Setting negative value in /sethealth or /sethp now kills you
  • Rewrite README file
  • MIT License

Re: [Mod] Player tools [1.3] [playertools]

Posted: Sun Nov 13, 2016 12:46
by kaeza
Spanish locale.

Re: [Mod] Player tools [1.3] [playertools]

Posted: Sun Nov 13, 2016 13:38
by Wuzzy
Thanks, kaeza! But Minetest seems to not like this file. When I do /help all or /help privs, Minetest shows “<invalid multibyte string>”. Sorry, I can't include this patch as this would break the /help command, which is of course a no-go.
Do you have any idea how to deal with this?

Re: [Mod] Player tools [1.3] [playertools]

Posted: Sun Nov 13, 2016 15:30
by kaeza
Hmm... looks fine over here (note the ó in corazón):
Image
Works with DE locale here too:
Image
Is your system configured as UTF-8?

While I can remove the accents on the vowels while still keeping it readable, I cannot change the 'ñ' in "tamaño" ("size") to anything meaningful.

Re: [Mod] Player tools [1.4] [playertools]

Posted: Sun Nov 13, 2016 17:42
by Wuzzy
Whatever. The system shows your files as correct UTF-8 encoded text, so I assume your file is OK.
UTF-8 works on my system. So does German with umlauts. I don't really know how to properly test translations other than my home language (German) and English. I tried “LANG=es minetest” but maybe this is wrong.

I released version 1.4 anyways.
Changelog:
- Added Spanish translation by kaeza
- Fix typo in German translation

Please report any bugs (of course). :-)

Re: [Mod] Player tools [1.4] [playertools]

Posted: Tue Jul 25, 2017 09:41
by christoferlevich
This would be highly functional as an admin tool - particularly in classrooms. I am currently looking for teacher interface solutions to assist them in using the game without me standing there. :) They have me doing 4-5 classes a day this year... lol. so I guess I should look and see, but is there and "Admin Tools" version of this?

Re: [Mod] Player tools [1.4] [playertools]

Posted: Wed Jul 26, 2017 02:55
by Wuzzy
Not that I know of. And I don't really care much about this mod anymore. Maybe one day the modder community should collect the most useful commands and try to get them into the core.
There are too many chat command mods.