[Client-side Mod] Simple stats [counter]
- TalkLounge
- Member
- Posts: 324
- Joined: Sun Mar 26, 2017 12:42
- GitHub: TalkLounge
- In-game: TalkLounge
- Location: Germany
[Client-side Mod] Simple stats [counter]
Hi,
this mod counts various ingame actions on servers and in singleplayer
Usage
License
MIT
Dependencies
None
Download
Video
Download
Browse on Github
Changelog
1.0: The mod was created
1.1: Changed some grammar mistakes
1.2: Added the total online time
1.4: Now compatible with minetest 5.x and fixed not working singleplayer count
this mod counts various ingame actions on servers and in singleplayer
Usage
License
MIT
Dependencies
None
Download
Video
Download
Browse on Github
Changelog
1.0: The mod was created
1.1: Changed some grammar mistakes
1.2: Added the total online time
1.4: Now compatible with minetest 5.x and fixed not working singleplayer count
Last edited by TalkLounge on Sat Jul 03, 2021 22:41, edited 8 times in total.
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de
- maikerumine
- Member
- Posts: 1420
- Joined: Mon Aug 04, 2014 14:27
- GitHub: maikerumine
- In-game: maikerumine
Re: [Client-side Mod] Simple stats [counter]
This is sweet! So it tracks everything on all servers visited eh!
Talamh Survival Minetest-->viewtopic.php?f=10&t=12959
-
- Member
- Posts: 3476
- Joined: Sun Jul 12, 2015 22:51
- GitHub: BBmine
- IRC: BBmine
- In-game: Baggins
- Location: USA
Re: [Client-side Mod] Simple stats [counter]
Cool CSM, but a few things I must point out:
"dug", not "digged"
"sent", not "send"
"connected", not "connect"
:D
Just me being a little Grammer-Nazi ;)
"dug", not "digged"
"sent", not "send"
"connected", not "connect"
:D
Just me being a little Grammer-Nazi ;)
- TalkLounge
- Member
- Posts: 324
- Joined: Sun Mar 26, 2017 12:42
- GitHub: TalkLounge
- In-game: TalkLounge
- Location: Germany
Re: [Client-side Mod] Simple stats [counter]
Thanks
I will change it. :)
I will change it. :)
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: [Client-side Mod] Simple stats [counter]
I'm definitely getting this mod lol!
Re: [Client-side Mod] Simple stats [counter]
Please also add "Played N hours"
- TalkLounge
- Member
- Posts: 324
- Joined: Sun Mar 26, 2017 12:42
- GitHub: TalkLounge
- In-game: TalkLounge
- Location: Germany
Re: [Client-side Mod] Simple stats [counter]
Very cool idea. I added it.Please also add "Played N hours"
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de
Re: [Client-side Mod] Simple stats [counter]
As of engine 5117ce4c:
ERROR[Main]: ModError: Failed to load and run mod "counter":
ERROR[Main]: counter:init.lua:51: attempt to call field 'register_on_sending_chat_messages' (a nil value)
ERROR[Main]: stack traceback:
ERROR[Main]: counter:init.lua:51: in main chunk
- TalkLounge
- Member
- Posts: 324
- Joined: Sun Mar 26, 2017 12:42
- GitHub: TalkLounge
- In-game: TalkLounge
- Location: Germany
Re: [Client-side Mod] Simple stats [counter]
Change in the init.lua, that "register_on_sending_chat_messages" to that "register_on_sending_chat_message". Then it should work with your minetest version. There are two version of Minetest. The official 0.4.16, they say: register_on_sending_chat_messagesAs of engine 5117ce4c:
On the 0.4.16 dev they say: "register_on_sending_chat_message"
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de
- Lone_Wolf
- Member
- Posts: 2578
- Joined: Sun Apr 09, 2017 05:50
- GitHub: LoneWolfHT
- IRC: LandarVargan
- In-game: LandarVargan
Re: [Client-side Mod] Simple stats [counter]
Might want to do a kind of Q&A spoiler in the first post. Or at least explain this above. Some ppl might be too lazy to scroll down lolTalkLounge wrote:Change in the init.lua, that "register_on_sending_chat_messages" to that "register_on_sending_chat_message". Then it should work with your minetest version. There are two version of Minetest. The official 0.4.16, they say: register_on_sending_chat_messagesAs of engine 5117ce4c:
On the 0.4.16 dev they say: "register_on_sending_chat_message"
- azekill_DIABLO
- Member
- Posts: 7507
- Joined: Wed Oct 29, 2014 20:05
- GitHub: azekillDIABLO
- In-game: azekill_DIABLO
- Location: OMICRON
- Contact:
Re: [Client-side Mod] Simple stats [counter]
yeepee!
Gone, but not dead. Contact me on discord: azekill_DIABLO#6565
DMs are always open if you want to get in touch!
DMs are always open if you want to get in touch!
Re: [Client-side Mod] Simple stats [counter]
New error as of engine 584d00a0, when starting singleplayer world:
Code: Select all
2018-01-30 21:19:04: ERROR[Main]: ModError: Failed to load and run mod "counter":
2018-01-30 21:19:04: ERROR[Main]: counter:init.lua:61: attempt to call field 'register_on_connect' (a nil value)
2018-01-30 21:19:04: ERROR[Main]: stack traceback:
2018-01-30 21:19:04: ERROR[Main]: counter:init.lua:61: in main chunk
- PolySaken
- Member
- Posts: 817
- Joined: Thu Nov 09, 2017 05:18
- GitHub: PolySaken-I-Am
- In-game: PolySaken
- Location: Wānaka, Aotearoa
- Contact:
Re: [Client-side Mod] Simple stats [counter]
"Grammar", not "Grammer"BBmine wrote:Cool CSM, but a few things I must point out:
"dug", not "digged"
"sent", not "send"
"connected", not "connect"
:D
Just me being a little Grammer-Nazi ;)
"Grammer" is a name.
>:)
Guidebook Lib, for in-game docs | Poly Decor, some cool blocks | Vision Lib, an all-purpose library.
- aristotle
- Member
- Posts: 79
- Joined: Wed Mar 14, 2018 23:40
- GitHub: askotos
- IRC: aristotle_
- In-game: aristotle
- Location: Currently on Melpomene, waiting for the starship to be fixed.
- Contact:
Re: [Client-side Mod] Simple stats [counter]
+1!TalkLounge wrote:this mod counts your doing on a server....
:D
Happy builds & explorations! | Initiating my Creative Minetest channel on YouTube
- Wolfshippie
- Member
- Posts: 116
- Joined: Mon Jul 24, 2017 12:37
- GitHub: Wolfshippie
- IRC: wolfshippie
- In-game: wolfshippie minehippie
- Location: Franconia, Bavaria, Germany
- Contact:
Re: [Client-side Mod] Simple stats [counter]
Code: Select all
2020-04-19 18:32:54: ERROR[Main]: ModError: Failed to load and run mod "counter":
2020-04-19 18:32:54: ERROR[Main]: counter:init.lua:68: attempt to call field 'register_on_connect' (a nil value)
2020-04-19 18:32:54: ERROR[Main]: stack traceback:
2020-04-19 18:32:54: ERROR[Main]: counter:init.lua:68: in main chunk
- debiankaios
- Member
- Posts: 910
- Joined: Thu Dec 03, 2020 12:48
- IRC: debiankaios
- In-game: debiankaios Nowe
- Location: germany
- Contact:
Re: [Client-side Mod] Simple stats [counter]
Don't worl!!!TalkLounge wrote: ↑Sat Jul 08, 2017 16:00Hi,
this mod counts your doing on a server. There are many counts to different topics(look screenshot spoiler).
Usage
License
Code: LGPL v2.1+
Dependencies
None
Download
Video
Download
Browse on Github
Spoiler
Spoiler
- 1.0
The mod was created- 1.1
Changed some grammar mistakes- 1.2
Added the total online time
📖 Deutsches Modding Book 👽 My Mod 🔌 TechAge Extension (WIP)
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
2147483 is the new world border.
⛏ Proxima Survival(WIP) ⚔️ Minigames A.E.S(WIP)
🌐 My Website
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Client-side Mod] Simple stats [counter]
Client side modding is not meaned for singleplayer, so if you go on singleplayer just disable it (or maybe try to use as an mod instead of client side)Fixer wrote: ↑Tue Jan 30, 2018 19:29New error as of engine 584d00a0, when starting singleplayer world:Code: Select all
2018-01-30 21:19:04: ERROR[Main]: ModError: Failed to load and run mod "counter": 2018-01-30 21:19:04: ERROR[Main]: counter:init.lua:61: attempt to call field 'register_on_connect' (a nil value) 2018-01-30 21:19:04: ERROR[Main]: stack traceback: 2018-01-30 21:19:04: ERROR[Main]: counter:init.lua:61: in main chunk
[EDIT]
Its not possible to do register_on_connect in csm. check: https://github.com/minetest/minetest/bl ... ua_api.txt
You could use do the following:
edit:
Code: Select all
minetest.register_on_connect(function()
variable = true
local number = mod_storage:get_int(connect)
mod_storage:set_int(connect, number + 1)
end)
Code: Select all
minetest.after(5, function()
variable = true
local number = mod_storage:get_int(connect)
mod_storage:set_int(connect, number + 1)
end)
- Mesenotaur
- New member
- Posts: 6
- Joined: Tue Mar 02, 2021 12:42
- GitHub: Mesenotaur
Re: [Client-side Mod] Simple stats [counter]
Hello there!
In the quoted message, you said you’d fix these grammar issues. But they are still present. Could you, TalkLounge, please fix them?
And it’d be nice if you also fixed the bug with register_on_connect. Miniontoby’s solution works perfectly for me.
I will make a PR.
--Mesenotaur
- Mesenotaur
- New member
- Posts: 6
- Joined: Tue Mar 02, 2021 12:42
- GitHub: Mesenotaur
Re: [Client-side Mod] Simple stats [counter]
Hi!Miniontoby wrote: ↑Sat Jan 30, 2021 13:50Client side modding is not meaned for singleplayer, so if you go on singleplayer just disable it (or maybe try to use as an mod instead of client side)Fixer wrote: ↑Tue Jan 30, 2018 19:29New error as of engine 584d00a0, when starting singleplayer world:Code: Select all
2018-01-30 21:19:04: ERROR[Main]: ModError: Failed to load and run mod "counter": 2018-01-30 21:19:04: ERROR[Main]: counter:init.lua:61: attempt to call field 'register_on_connect' (a nil value) 2018-01-30 21:19:04: ERROR[Main]: stack traceback: 2018-01-30 21:19:04: ERROR[Main]: counter:init.lua:61: in main chunk
[EDIT]
Its not possible to do register_on_connect in csm. check: https://github.com/minetest/minetest/bl ... ua_api.txt
You could use do the following:
edit:to:Code: Select all
minetest.register_on_connect(function() variable = true local number = mod_storage:get_int(connect) mod_storage:set_int(connect, number + 1) end)
Code: Select all
minetest.after(5, function() variable = true local number = mod_storage:get_int(connect) mod_storage:set_int(connect, number + 1) end)
Thanks a lot, a lot and a real lot for this explanation and the fix of register_on_connect Miniontoby! Many CSM I tried out used this, I’ll test if they work after changing that one line :D
May I ask: What does the after(5 mean? Does it mean that five seconds after join, the mod will be started? If so, could it be put lower to like 2 or even 1 or 0?
--Mesenotaur
- Miniontoby
- Member
- Posts: 616
- Joined: Fri Mar 01, 2019 19:25
- GitHub: Miniontoby
- IRC: Miniontoby
- In-game: Miniontoby
- Location: The Netherlands
Re: [Client-side Mod] Simple stats [counter]
Hey dude,Mesenotaur wrote: ↑Fri Jun 04, 2021 20:25Hi!Miniontoby wrote: ↑Sat Jan 30, 2021 13:50You could use do the following:
edit:to:Code: Select all
minetest.register_on_connect(function() variable = true local number = mod_storage:get_int(connect) mod_storage:set_int(connect, number + 1) end)
Code: Select all
minetest.after(5, function() variable = true local number = mod_storage:get_int(connect) mod_storage:set_int(connect, number + 1) end)
Thanks a lot, a lot and a real lot for this explanation and the fix of register_on_connect Miniontoby! Many CSM I tried out used this, I’ll test if they work after changing that one line :D
May I ask: What does the after(5 mean? Does it mean that five seconds after join, the mod will be started? If so, could it be put lower to like 2 or even 1 or 0?
--Mesenotaur
I can explain you why after(5 and not 0 or 1, that's because if you do it too early then your client might crash because you are not yet fully in, (mostly when you are joining huge server) when they restart it (or your connection times out) whilest you are in joining then you get an error too, because it couldn't save anything.
So thats why it should be after(5 and not anything else.
- TalkLounge
- Member
- Posts: 324
- Joined: Sun Mar 26, 2017 12:42
- GitHub: TalkLounge
- In-game: TalkLounge
- Location: Germany
Re: [Client-side Mod] Simple stats [counter]
Update
Client-side Mod works now on all minetest versions and in the singleplayer
Client-side Mod works now on all minetest versions and in the singleplayer
Subgames Server: Sky World Subgames German Survival Server: Wildes Land 2 E-Mail: talklounge@yahoo.de
Who is online
Users browsing this forum: No registered users and 4 guests