[Mod] Online Players [online_players]

Post Reply
User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

[Mod] Online Players [online_players]

by bosapara » Post

Online Players
___________________________________________________________________________________________________

Image Download


"Online Players" show player list with skin head and ping info with "/online".

Optional dependency on 'simple_skins' mod. Can show not more 44 players.

Image

P.S. Inspired by MC player list mods
Last edited by bosapara on Sat May 09, 2020 11:29, edited 2 times in total.

User avatar
runs
Member
Posts: 3225
Joined: Sat Oct 27, 2018 08:32

Re: [Mod] Online Players [online_players]

by runs » Post

Cool

User avatar
Yvanhoe
Member
Posts: 140
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: [Mod] Online Players [online_players]

by Yvanhoe » Post

Really nice! I can't use skins because of another dependency on my server. Could the dependency be optional?

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Online Players [online_players]

by bosapara » Post

Yvanhoe wrote:Really nice! I can't use skins because of another dependency on my server. Could the dependency be optional?
Currently works only with simple_skins. What skin mod do you use?

User avatar
Yvanhoe
Member
Posts: 140
Joined: Fri Jul 05, 2019 03:18
Location: Japan

Re: [Mod] Online Players [online_players]

by Yvanhoe » Post

A modified version of appearance, that makes it works kinda ok with clothing. I need to revisit all that, but I know there are several incompatible ways to change skins right now. An optional dependency would make it useful to more people! I bookmarked it anyway. When I get to it I may make a PR or better yet, solve my skins problems in a more satisfying way...

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Online Players [online_players]

by Miniontoby » Post

Please put it on content.minetest.net
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Online Players [online_players]

by bosapara » Post

Yvanhoe wrote:An optional dependency would make it useful to more people!
Agree. Again, what is skin mod you use? I will try to add 1 more optional dependency.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Online Players [online_players]

by ShadMOrdre » Post

bosapara,

I also use the appearance mod for skins. This mod does not use texture based skins in the traditional way. Appearance, instead, uses skin 'parts' to construct the player skin. I've hacked the mod to work with 3d_armor, but it took some hacking to 3d_armor to make it all work.

Perhaps a different way of creating the 'head' of a player, is to not depend on any skin mod at all.

Use player_api to get the player skin. Then use texture modifiers to extract the players head from the supplied skin and construct a 16x16 texture. You can do all this regardless of the mod supplying the skin.


Shad

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Online Players [online_players]

by bosapara » Post

Image Update
______________________________

Added optional dependency, currently for 'simple_skins' mod only

ShadMOrdre wrote:Use player_api to get the player skin.
Thanks you for advices, but i don't use player_api
Miniontoby wrote:Please put it on content.minetest.net
You can download this mod from github.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Online Players [online_players]

by ShadMOrdre » Post

Just wondering, do you play a custom game or MTG? Player_api is part of MTG, and is simply a central access point to player attributes. So, even if you don't think you use it, you might be using it already, if you play MTG.

Alternatively, simply go straight to the source. The idea in my previous post is still usable, regardless of whether you use player_api.

Instead of getting the skin from the skin mod, get the skin from the player object. There are some functions available that enable this. This will, again, allow you to run without the dependencies on the various skin mods.

Your mod, bosapara, I'm just trying to help you make it work for more than just a very outdated skin mod.


Shad

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Online Players [online_players]

by bosapara » Post

ShadMOrdre wrote:Just wondering, do you play a custom game or MTG?
Custom, 4.17. Not all using 5.1 of minetest.

ShadMOrdre
Member
Posts: 1118
Joined: Mon Dec 29, 2014 08:07
Location: USA

Re: [Mod] Online Players [online_players]

by ShadMOrdre » Post

All the player_api does, is move that stuff out of default mod.

You can make it work for v4.17, simply by having your mods point to it instead of default. In the v5.0 version of MTG, the default mod includes a legacy.lua file, that actually provides the override statements, so you may not necessarily need to update mods, just have default, or optionally the other mods, depend on player_api.

However, player_api is not necessary to do what I am suggesting. Since player_api includes functionality previously in default, you should still be able to access the player object, the one provided by the lua api. This should get you the player skin, without having to know which mod provides the skin. You are asking MT what skin the player is using, not a mod...


Shad

User avatar
Miniontoby
Member
Posts: 616
Joined: Fri Mar 01, 2019 19:25
GitHub: Miniontoby
IRC: Miniontoby
In-game: Miniontoby
Location: The Netherlands

Re: [Mod] Online Players [online_players]

by Miniontoby » Post

But when you put it on content.minetest.net we can download the mod easyer than downloading from github
Working on mtctl ---- Check my mod "Doorbell" -- Stay safe

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Online Players [online_players]

by bosapara » Post

Mod works now with <= 44 players. Form can be resized x4, depends on player's quantity

Image

User avatar
bosapara
Member
Posts: 637
Joined: Fri Apr 07, 2017 08:49

Re: [Mod] Online Players [online_players]

by bosapara » Post

Update



Small fix to prevent server crash - download
Attachments
online_players.zip
(2.3 KiB) Downloaded 246 times

Post Reply

Who is online

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