[Mod] Player tools [1.4] [playertools]

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

[Mod] Player tools [1.4] [playertools]

by Wuzzy » Post

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.
Attachments
playertools1.4.zip
(6.54 KiB) Downloaded 162 times
playertools1.3.zip
(5.48 KiB) Downloaded 41 times
playertools1.2.zip
(3.11 KiB) Downloaded 298 times
Last edited by Wuzzy on Sun Nov 13, 2016 17:39, edited 9 times in total.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
Neon
Member
Posts: 126
Joined: Thu Aug 15, 2013 02:03
In-game: Neon

by Neon » Post

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.

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

by Wuzzy » Post

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
jojoa1997
Member
Posts: 2890
Joined: Thu Dec 13, 2012 05:11
Location: Earth

by jojoa1997 » Post

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.
Coding;
1X coding
3X debugging
12X tweaking to be just right

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

Version 1.1 released

by Wuzzy » Post

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.

User avatar
Calinou
Moderator
Posts: 3162
Joined: Mon Aug 01, 2011 14:26
GitHub: Calinou
IRC: Calinou
In-game: Calinou
Location: Troyes, France
Contact:

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

by Calinou » Post

Added to Carbone (tweaked).

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

Version 1.2 released

by Wuzzy » Post

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.

bajanhgk
Member
Posts: 75
Joined: Sun Apr 06, 2014 16:31
In-game: bajanhgk
Location: The World Of Darkness

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

by bajanhgk » Post

why not make the command /kill but instead /killme
Just a Loner In the Winds which Blow Endlessly towards Death

User avatar
rubenwardy
Moderator
Posts: 6107
Joined: Tue Jun 12, 2012 18:11
GitHub: rubenwardy
IRC: rubenwardy
In-game: rubenwardy
Location: United Kingdom
Contact:

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

by rubenwardy » Post

How about /ip username, for admins?

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

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

by Wuzzy » Post

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.

User avatar
Tmanyo
Member
Posts: 196
Joined: Mon Sep 29, 2014 01:20
GitHub: Tmanyo
IRC: Tmanyo
In-game: tmanyo
Location: United States
Contact:

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

by Tmanyo » Post

Is there a way to make hotbar size permanent instead of having to reset it every time you logon?
Tmanyo
http://www.rrhmsservers.ml
Servers I Host:
Tmanyo-Realism
Mods of mine that I don't totally hate:
Bank Accounts
T-Rating
Tmusic Player

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

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

by Wuzzy » Post

No.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

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

Version 1.3 released!

by Wuzzy » Post

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
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

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

by kaeza » Post

Spanish locale.
Attachments
0001-Add-Spanish-locale.patch.gz
(1.24 KiB) Downloaded 125 times
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

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

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

by Wuzzy » Post

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?
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
kaeza
Moderator
Posts: 2162
Joined: Thu Oct 18, 2012 05:00
GitHub: kaeza
IRC: kaeza diemartin blaaaaargh
In-game: kaeza
Location: Montevideo, Uruguay
Contact:

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

by kaeza » Post

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.
Your signature is not the place for a blog post. Please keep it as concise as possible. Thank you!

Check out my stuff! | Donations greatly appreciated! PayPal

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

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

by Wuzzy » Post

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). :-)
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

User avatar
christoferlevich
Member
Posts: 324
Joined: Thu Dec 01, 2016 23:44
GitHub: ChristoferL
Location: Athol, Massachusetts

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

by christoferlevich » Post

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?
everything can be a learning experience...

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

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

by Wuzzy » Post

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.
My creations. I gladly accept bitcoins: 17fsUywHxeMHKG41UFfu34F1rAxZcrVoqH

Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 4 guests