Page 1 of 1

[Mod] Player Ranks [0.2.0] [rank]

PostPosted: Thu Oct 27, 2016 21:37
by bigfoot547
Hello! This mod adds a rank system to minetest!

I wrote this in 0.4.14 and it is suggested you use that version.

Bugs
To report a bug, you may use Github or post it here.

Suggestions
Suggestions are welcome. If you have a suggestion, post it on Github or here.

+ Features

+ Planned Features

+ Screenshots


License
The code: LGPL v2.1+

Mod Dependencies
  • default

Downloads
Download
or
Browse the code on github

+ Old Downloads

+ Changelog


Image Image Image

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Fri Oct 28, 2016 08:18
by mahmutelmas06
Nice idea

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Fri Oct 28, 2016 12:12
by DS-minetest
nice!

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Fri Oct 28, 2016 17:48
by Krock
There's no possibility to get more privileges with these ranks right now but they're still a nice addition for the nickname when I've got too many ores :)

PS: It would be possible to put the ranks into a table, which describes the required nodes for each rank. Additionally it shortens your code by about 60 lines for the same effect. But that's all up to you ;)

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Fri Oct 28, 2016 18:06
by azekill_DIABLO
This is an awesome mod! I Will think to fork it!

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Sat Oct 29, 2016 17:29
by bigfoot547
Krock wrote:There's no possibility to get more privileges with these ranks right now but they're still a nice addition for the nickname when I've got too many ores :)

PS: It would be possible to put the ranks into a table, which describes the required nodes for each rank. Additionally it shortens your code by about 60 lines for the same effect. But that's all up to you ;)


Thanks for the feedback and suggestion.
I want to actually not give privileges but instead give mineral blocks on a regular basis. (~4 minetest days.)
Thanks again for the suggestions!

azekill_DIABLO wrote:This is an awesome mod! I Will think to fork it!


Cool!

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Mon Oct 31, 2016 17:05
by Modern Hippie
Will the rank be displayed in the chat on multiplayer servers?

Great idea btw :) I think about to put this mod on the server where I am moderator...

Greetings, Modern Hippie

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 03:51
by bigfoot547
Modern Hippie wrote:Will the rank be displayed in the chat on multiplayer servers?

Great idea btw :) I think about to put this mod on the server where I am moderator...

Greetings, Modern Hippie


I made an attempt to do this but it can be a little flakey.

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 05:11
by Modern Hippie
bigfoot547 wrote:I made an attempt to do this but it can be a little flakey.


Okay, this would be really great.
I think you know what I mean?
If I'm writing "Hello" in chat...

normal: <minehippie> Hello
something like this: [Moderator] <minehippie> Hello

But this version is also very good, too :)
Thank you for your try!

Greetings Modern Hippie

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 08:39
by DS-minetest
you mean something like this: [Moderator] <minehippie> Hello

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 10:03
by Modern Hippie
DS-minetest wrote:you mean something like this: [Moderator] <minehippie> Hello


Yeah, that's exactly, what I'm meaning ^^

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 10:50
by azekill_DIABLO
Modifying chat is harder

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 11:05
by Modern Hippie
azekill_DIABLO wrote:Modifying chat is harder


Oh okay... I'm sorry, I don't know very much about modifying XD Just a little bit of.

It's no problem, if it doesn't work :) This mod is without this feature a cool idea, too!

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 15:51
by azekill_DIABLO
I don't say it's impossible, but for now the chat is hardcoded!

Re: [Mod] Player Ranks [0.1.0] [rank]

PostPosted: Tue Nov 01, 2016 18:40
by bigfoot547
What I tried to do was use this to handle the message then send my own message like this:
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
minetest.chat_send_all("<[moderator] minehippie> message")

Where minehippie is the name, moderator is rank, and message is the typed message.
One problem is that if you type an invalid command, it will send "/command" as the message and not say invalid command only to you.

EDIT: Believe me. I tried. (:-D)
EDIT2: The way to fix the problem in the initial post is to check the first character of the message and if it is a "/" character, then don't handle the message and just have normal operation. Else, handle the message.
EDIT3: Totally working on this later today.
EDIT4: Added in new release: 0.2.0. Haha, minetest is a great place.

Re: [Mod] Player Ranks [0.2.0] [rank]

PostPosted: Tue Nov 01, 2016 19:11
by bigfoot547
One thing, when you type a message, you will see your message in the chat like this:
<name> message
<[Moderator] name> message

But, don't worry! Only you see the first part. Nobody else.

As of 2f56a00, this is no longer a problem.

Re: [Mod] Player Ranks [0.2.0] [rank]

PostPosted: Tue Nov 01, 2016 20:12
by Milan*
w0000t people told me this isn't possible in minetest. :o

Re: [Mod] Player Ranks [0.2.0] [rank]

PostPosted: Thu Nov 10, 2016 02:09
by octacian
NOT POSSIBLE!? I did this months ago in ServerTools xD lel

Still, great job! This even has something ServerTools doesn't, that being changing the player nametag. Not for long though, I'm implementing it right now :D (because I just discovered how from this mod, thx!)

Take a look at the source code of ServerTools though, it might give you a good idea as to how privileges could be implemented for each rank. It never hurts to have more than one mod that does the same thing anyways.

Re: [Mod] Player Ranks [0.2.0] [rank]

PostPosted: Sat Nov 12, 2016 23:37
by bigfoot547
endev15 wrote:NOT POSSIBLE!? I did this months ago in ServerTools xD lel

Still, great job! This even has something ServerTools doesn't, that being changing the player nametag. Not for long though, I'm implementing it right now :D (because I just discovered how from this mod, thx!)

Take a look at the source code of ServerTools though, it might give you a good idea as to how privileges could be implemented for each rank. It never hurts to have more than one mod that does the same thing anyways.


Thanks for the feedback!
About the last part, I think that the server moderators and admins should be responsible for this. If you want this feature, you could make a fork of the mod. Thanks for the suggestion! :-)

P.S. This is my 50th post! :-D