Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

XP Drops exploit? #44

Closed
wolfkidsounds opened this issue Oct 21, 2021 · 9 comments
Closed

XP Drops exploit? #44

wolfkidsounds opened this issue Oct 21, 2021 · 9 comments

Comments

@wolfkidsounds
Copy link

Hey, so first of all I'm not sure if this is really an issue or related to your mod directly..

I'm playing this modpack right now: https://www.curseforge.com/minecraft/modpacks/wolfpack-5 and I have noticed, that when I die, I lose all my xp (so far so good). - However as soon as I collect my items, I gain xp (for example when i get killed by a creeper) which basicly makes this an exploit?

Like, collect 10minecraft levels, get killed collect 5minecraft levels and get killed and collect 2.5 minecraft levels (again, so far so good).

However levelz is counting only the collected xp - So by getting killed 3 times (for example by a creeper) you not only collect 10 levels but 17.5 leves in total.

Beware, I maybe messed up levels and xp right now... - However I was able to gain more skill points by running around and getting killed...

@Globox1997
Copy link
Owner

Globox1997 commented Oct 21, 2021

hey wolfkidsounds,
thanks for the report, it is a good description of the exploit.
I see two solutions for it:

  1. Subtracting the levelprogress minus the dropped xp (which could lead to minus levelprogress)
  2. Player doesn't drop xp, either loosing it completely or just keeping it

What do you think?
If you play in hardmode, there is no exploit.

@wolfkidsounds
Copy link
Author

wolfkidsounds commented Oct 21, 2021

hey, thanks for getting back so fast! :)

Are XP orbs that dropped from your death any special? If yes (if they have a tag or something) - Would it be possible to "decline" the collection of those inside of levelz?

I also tested this behavior using only your mod (same as described above).


Yes, using hard mode doesn't have this exploit. However all skills are lost instantly.


Another solution that comes to my mind (however i don't know if it is viable) would be to not count "free" xp. Basicly counting based on action (xp from mined blocks, killed mobs, furnaces etc.) I guess that would make the mod overly complicated since it would involve hooking into the events and probably having a selfbuilt "xp system"?


From the solutions you explained above I guess solution 2 would be the most forgiving and flexible option (for example this behaviour could be triggered on/off/switched via a configuration option?)

Thank you for keeping the mod active and improving on it. I've found it a very nice concept having a lot of fun. Also seing it a some kind of "gate" that bonds players somewhat more together as different playstyles are more equaly rewarding in my eyes.

@wolfkidsounds
Copy link
Author

One more option that comes to my head right now: Collecting the XP in a special xp orb, that only drops on a players death and contains the normal "minecraft" amount of xp. - When collecting this orb, the xp gets counted to the normal "minecraft" levels. However the collection of "skill xp" for the levelZ mod is bypassed with that orb? - Just been brainstorming on a solution right now 😄

@Globox1997
Copy link
Owner

levelz-1.0.14.zip
If you wanna test it :) Added info to xp orbs so it will only increase the vanilla xp
(Unpacking necessary)

@wolfkidsounds
Copy link
Author

wolfkidsounds commented Oct 28, 2021

Hey, so the current behavior is as follows:

levelZ only

  • Level up using bottle of Enchanting (5 levels) - XP 7/50 - Level 1 - Points 1
  • 1 Point to spend in the skills menu
  • Spawn creeper and die
  • All XP and excess levels are removed, I kept the skill points to spend
  • I collected my items back and gained roughly 3.5 levels back
  • No XP or levels gained in the skills menu as intended. - Perfect <3

Inside the Modpack

  • Deleted old configuration file (to have the same starting point as above)
  • Level up using bottle of Enchanting (5 levels) - XP 7/50 - Level 1 - Points 1
  • 1 Point to spend in the skills menu
  • Spawn creeper and die
  • All XP and excess levels are removed, I kept the skill points to spend
  • I regained 35XP in the skills menu (did not level up further)

Logfile from the session I've played: latest.log

I suspect either "Charm" or "Clumps" right now to interfere with the XP orb drops.


Test with leveZ, Charm and Clumps only

  • Level up using bottle of Enchanting (5 levels) - XP 6/50 - Level 1 - Points 1
  • 1 Point to spend in the skills menu
  • Spawn creeper and die
  • All XP and excess levels are removed, I kept the skill points to spend
  • I regained 35XP in the skills menu (did not level up further)

Here is the log file for that session too: latest.log

@Globox1997
Copy link
Owner

Could you test without Clumps but with Charm and the other way around too?

@wolfkidsounds
Copy link
Author

wolfkidsounds commented Oct 28, 2021

Test with levelZ, + Clumps

  • Level up using bottle of Enchanting (5 levels) - XP 4/50 - Level 1 - Points 1
  • 1 Point to spend in the skills menu
  • Spawn creeper and die
  • All XP and excess levels are removed, I kept the skill points to spend
  • I regained 28XP in the skills menu (did not level up further)

Test with levelZ, + Charm

  • Level up using bottle of Enchanting (5 levels) - XP 5/50 - Level 1 - Points 1
  • 1 Point to spend in the skills menu
  • Spawn creeper and die
  • All XP and excess levels are removed, I kept the skill points to spend
  • I did not regain any XP in the skills menu

So Clumps is the mod, that does not work (I guess its because of the xp drop combination functionality)

@Globox1997
Copy link
Owner

Checked the mod (which is a very small mod btw^^) and it injects at the head of the method and cancels it, so my injected lines won't get executed: https://github.com/jaredlll08/Clumps/blob/fabric/1.17/src/main/java/com/blamejared/clumps/mixin/MixinExperienceOrb.java#L59
So I guess we can close this issue and remember that clumps opens an exploit for the players

@wolfkidsounds
Copy link
Author

I guess one of the mods should mention this type of incompatibility in their wiki or description page.

But thanks for implementing this feature! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants