[Mod] xp_redo [1.0] [xp_redo]

Post Reply
User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

[Mod] xp_redo [1.0] [xp_redo]

by BuckarooBanzay » Post

XP Redo

Minetest mod for player experience management (xp) It adds an xp counter per player and ranks according to your xp level. The xp level, your rank and a progress bar to the next rank will show up in your hud. On every rank level up you get a award-like notification. There is also a xpgate block which, when placed under a wooden door will only allow players with a certain xp level to go through.

Previous work

Based on the works, but completely rewritten, from viewtopic.php?id=3291

Downloads:
Source: https://github.com/thomasrudin-mt/xp_redo
Version 1.0: https://github.com/thomasrudin-mt/xp_re ... ve/1.0.zip

Dependencies
default
protector?
doors?
mobs_redo?
mobs_animal?
mobs_monster?
ehlphabet?

Screenshots:

Player HUD:
Image
Note: Android screenshot, ignore wrong spacing

XP Gate (checks xp level)
Image

Colored player nametag
Image

License

Code: LGPL 2.1
Textures: CC0
Last edited by BuckarooBanzay on Thu Jul 19, 2018 08:18, edited 3 times in total.
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
Phoenixflo44
Member
Posts: 639
Joined: Fri Jul 28, 2017 15:01
In-game: EvilPhoenix
Location: Behind my PC, in Germany

Re: [Mod] xp_redo [1.0] [xp_redo]

by Phoenixflo44 » Post

This mod is good for a server.
Spoiler
I hate my life

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] xp_redo [1.0] [xp_redo]

by BuckarooBanzay » Post

Yes, its intended to go with a reward/penalty system:
viewtopic.php?f=9&t=20125&p=318949

You can build areas only accessible for players of certain rank/xp or above
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

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

Re: [Mod] xp_redo [1.0] [xp_redo]

by rubenwardy » Post

What mod is this a redo of?
Please either credit the mod or say it's not actually a redo here: https://content.minetest.net/packages/B ... y/xp_redo/
Renewed Tab (my browser add-on) | Donate | Mods | Minetest Modding Book

Hello profile reader

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] xp_redo [1.0] [xp_redo]

by BuckarooBanzay » Post

Sure, i forgot to mention that.

I clarified the previous work from viewtopic.php?id=3291
Is it still a redo if the api is completely different?
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] xp_redo [1.0] [xp_redo]

by Clyde » Post

I tested this mod on my private Server:

Code: Select all

2019-08-03 18:54:05: ACTION[Server]: master digs xp_redo:xpgate at (17,17,404)
2019-08-03 18:54:05: ACTION[Main]: Server: Shutting down
2019-08-03 18:54:05: ACTION[Main]: [Hyperloop] Store data...
2019-08-03 18:54:05: ACTION[Main]: [Hyperloop] Data stored
2019-08-03 18:54:05: ACTION[Main]: [fishing] Server shuts down. saving trophies table
2019-08-03 18:54:06: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'xp_redo' in callback node_on_dig(): ...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: attempt to index local 'currentRank' (a nil value)
2019-08-03 18:54:06: ERROR[Main]: stack traceback:
2019-08-03 18:54:06: ERROR[Main]: 	...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: in function 'add_xp'
2019-08-03 18:54:06: ERROR[Main]: 	...test/.minetest/games/Civ_reload/mods/xp_redo/builtin.lua:93: in function 'callback'
2019-08-03 18:54:06: ERROR[Main]: 	/usr/share/minetest/builtin/game/item.lua:636: in function </usr/share/minetest/builtin/game/item.lua:543>
and another

Code: Select all

2019-08-03 18:55:38: ACTION[Server]: master places node xp_redo:protector at (18,17,405)
2019-08-03 18:55:38: ACTION[Main]: Server: Shutting down
2019-08-03 18:55:38: ACTION[Main]: [Hyperloop] Store data...
2019-08-03 18:55:38: ACTION[Main]: [Hyperloop] Data stored
2019-08-03 18:55:38: ACTION[Main]: [fishing] Server shuts down. saving trophies table
2019-08-03 18:55:38: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): ...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: attempt to index local 'currentRank' (a nil value)
2019-08-03 18:55:38: ERROR[Main]: stack traceback:
2019-08-03 18:55:38: ERROR[Main]: 	...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: in function 'add_xp'
2019-08-03 18:55:38: ERROR[Main]: 	...test/.minetest/games/Civ_reload/mods/xp_redo/builtin.lua:32: in function 'callback'
2019-08-03 18:55:38: ERROR[Main]: 	/usr/share/minetest/builtin/game/item.lua:396: in function </usr/share/minetest/builtin/game/item.lua:264>
Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] xp_redo [1.0] [xp_redo]

by BuckarooBanzay » Post

Clyde wrote:I tested this mod on my private Server:

Code: Select all

2019-08-03 18:54:05: ACTION[Server]: master digs xp_redo:xpgate at (17,17,404)
2019-08-03 18:54:05: ACTION[Main]: Server: Shutting down
2019-08-03 18:54:05: ACTION[Main]: [Hyperloop] Store data...
2019-08-03 18:54:05: ACTION[Main]: [Hyperloop] Data stored
2019-08-03 18:54:05: ACTION[Main]: [fishing] Server shuts down. saving trophies table
2019-08-03 18:54:06: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod 'xp_redo' in callback node_on_dig(): ...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: attempt to index local 'currentRank' (a nil value)
2019-08-03 18:54:06: ERROR[Main]: stack traceback:
2019-08-03 18:54:06: ERROR[Main]: 	...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: in function 'add_xp'
2019-08-03 18:54:06: ERROR[Main]: 	...test/.minetest/games/Civ_reload/mods/xp_redo/builtin.lua:93: in function 'callback'
2019-08-03 18:54:06: ERROR[Main]: 	/usr/share/minetest/builtin/game/item.lua:636: in function </usr/share/minetest/builtin/game/item.lua:543>
and another

Code: Select all

2019-08-03 18:55:38: ACTION[Server]: master places node xp_redo:protector at (18,17,405)
2019-08-03 18:55:38: ACTION[Main]: Server: Shutting down
2019-08-03 18:55:38: ACTION[Main]: [Hyperloop] Store data...
2019-08-03 18:55:38: ACTION[Main]: [Hyperloop] Data stored
2019-08-03 18:55:38: ACTION[Main]: [fishing] Server shuts down. saving trophies table
2019-08-03 18:55:38: ERROR[Main]: ServerError: AsyncErr: ServerThread::run Lua: Runtime error from mod '' in callback item_OnPlace(): ...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: attempt to index local 'currentRank' (a nil value)
2019-08-03 18:55:38: ERROR[Main]: stack traceback:
2019-08-03 18:55:38: ERROR[Main]: 	...st/.minetest/games/Civ_reload/mods/xp_redo/functions.lua:112: in function 'add_xp'
2019-08-03 18:55:38: ERROR[Main]: 	...test/.minetest/games/Civ_reload/mods/xp_redo/builtin.lua:32: in function 'callback'
2019-08-03 18:55:38: ERROR[Main]: 	/usr/share/minetest/builtin/game/item.lua:396: in function </usr/share/minetest/builtin/game/item.lua:264>
Greetings, Clyde.
Hmm, that may be because i split the mod in two parts:
  • Core part (xp registrations)
  • Ranks part (textures, levels)
I'm guessing the error comes from the missing ranks.
You can choose between two rank-systems right now: Sorry for the lack of documentation, i added and fixed a lot of stuff but haven't taken the time to document that properly... :/
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
Clyde
Member
Posts: 222
Joined: Sat Jul 30, 2016 14:23
GitHub: acmgit
In-game: clyde

Re: [Mod] xp_redo [1.0] [xp_redo]

by Clyde » Post

Seem's you're right, with the second part of the mod, it works without crash.

Greetings, Clyde.
My Server: Welcome to Zeitsprung - deadsoft.org:49152 Jungle The next Gundul - jungle-tng.deadsoft.org:49152

User avatar
rabenkind
Member
Posts: 21
Joined: Tue Aug 09, 2016 19:55
IRC: rabenkind
In-game: rabenkind
Location: Rhineland

Re: [Mod] xp_redo [1.0] [xp_redo]

by rabenkind » Post

Hello!
Every player love this mod me too!

My players told me that when they hit a Skeleton or a Scorpion they recive no xp. Other mobs like eg. animals, sandman or oerkkie works.

Scorpion fron Nathan [1]
Skeleton from Saturn [2]

I've had a look at the code but no clue where to change or add something.
Please bring some light into it or some advice, thanks!

greetings rabenkind

[1]https://notabug.org/NathanS21/Scorpion
[2]viewtopic.php?t=26668

User avatar
BuckarooBanzay
Member
Posts: 437
Joined: Tue Apr 24, 2018 05:58
GitHub: BuckarooBanzay
IRC: BuckarooBanzai
In-game: BuckarooBanzai

Re: [Mod] xp_redo [1.0] [xp_redo]

by BuckarooBanzay » Post

rabenkind wrote:
Thu Jul 21, 2022 13:55
Hello!
Every player love this mod me too!

My players told me that when they hit a Skeleton or a Scorpion they recive no xp. Other mobs like eg. animals, sandman or oerkkie works.

Scorpion fron Nathan [1]
Skeleton from Saturn [2]

I've had a look at the code but no clue where to change or add something.
Please bring some light into it or some advice, thanks!

greetings rabenkind

[1]https://notabug.org/NathanS21/Scorpion
[2]viewtopic.php?t=26668
I _think_ it only works if the `entity.on_punch` method is available, which might only be the case with mobs_redo :/
Relevant code-part: https://github.com/mt-mods/xp_redo/blob ... bs.lua#L32

(it's been a while since i worked on this mod though, it is one of my first ones and it might need some maintenance here and there, or even a rewrite ¯\_(ツ)_/¯)
¯\_(ツ)_/¯ Not active here anymore, contact me on the minetest discord, irc, lemmy or github (for programming issues)

User avatar
rabenkind
Member
Posts: 21
Joined: Tue Aug 09, 2016 19:55
IRC: rabenkind
In-game: rabenkind
Location: Rhineland

Re: [Mod] xp_redo [1.0] [xp_redo]

by rabenkind » Post

Hello!

Thanks for your reply.

The solution was indeed simple. I simply entered this mods as optional mod (dependency) for xp_redo. That way the entities are "registered" (the table is read) and then it counts the xp.

greetings rabenkind

ps. Sorry for my bad explanation but writing in english is difficult for an old german guy like me. ;-)

Post Reply

Who is online

Users browsing this forum: No registered users and 12 guests