Skip to content

koth reward tweaks - #16

Open
fayeforpay wants to merge 4 commits into
LastExceed:masterfrom
fayeforpay:community-feedback
Open

fayeforpay wants to merge 4 commits into
LastExceed:masterfrom
fayeforpay:community-feedback

Conversation

@fayeforpay

Copy link
Copy Markdown
Contributor

adjust loot pool and make weights configurable - community feedback

limit koth rewards to be class specific and legitimately obtainable items in vanilla Cube World
+ added automatic power level to koth and /give
reward odds are now configurable in the config file + added Amulet, Ring, and Leftovers to the pool
@fayeforpay fayeforpay closed this Sep 16, 2026
@fayeforpay fayeforpay reopened this Sep 16, 2026
@fayeforpay

Copy link
Copy Markdown
Contributor Author

I thought I made a mistake in the most recent "lamp" commit. After testing it, I can confirm it works. I was stressing for no reason, sorry about that.

@LastExceed LastExceed left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure about the weighting system. Do we really need this?

Also, I wish I had had this idea earlier, but how about instead of generating discrete items, we just generate leftovers and let the identifier NPC do all the randomization? I like having some interaction involved, and it removes a lot of code complexity for us (though I don't remember how leftovers work exactly, so not 100% sure if this is even feasible)

Comment thread protocol/src/packet/common/item/kind.rs Outdated
Comment on lines +45 to +51

#[must_use]
pub fn item_level(&self, player_level: i16) -> i16 {
if self.uses_power() { max_level_of(player_level.into()) as i16 }
else if self.uses_level() { player_level }
else { 1 }
}

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I feel like this function doesn't belong here. Maybe put it in utils. Also try to give it a more descriptive name

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I renamed it to max_valid_item_level and put it into utils.rs

Comment thread server/src/addon/events/legacy_koth.rs Outdated
Comment on lines +37 to +44
const VANILLA_PETS: &[Race] = {
use Race::*;
&[Collie, Alpaca, AlpacaBrown, Turtle, Terrier, TerrierScottish, Cat, Pig, Sheep, Bunny, Porcupine,
SlimeGreen, SlimePink, SlimeYellow, SlimeBlue, Monkey, Hornet, Crow, Chicken, Seagull, Parrot, Bat,
Fly, Midge, Mosquito, RunnerPlain, RunnerLeaf, RunnerSnow, RunnerDesert, Peacock, Duckbill, Crocodile,
Spitter, Mole, Biter, Squirrel, Raccoon, Owl, Penguin, Horse, Camel, BeetleDark, BeetleFire,
BeetleSnout, BeetleLemon, Crab, Bumblebee]
};

@LastExceed LastExceed Sep 17, 2026

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This could actually be useful to have in the constants module of the protocol crate

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

done. definitely the right call

and other smaller fixes
@fayeforpay

Copy link
Copy Markdown
Contributor Author

Answers to your questions first before my own thoughts on the current KotH:

  1. I chose the weighting system because the community requested changing the odds of drops in the config file.
  2. The identifier NPC generates a random item with the same rarity and level as the Leftover (other values, such as seed of the Leftover seem to have no effect on the generated item). The issue with this is that they can be class-unrelated and class-related items is a feature that the community has explicitly requested. I've also seen people say that they love KotH because it is constant, indiscriminate fighting. Having to walk to an NPC to identify leftovers would likely break that momentum of the fights, with the added risk of high level players camping the NPC to kill new players.

My thoughts on Legacy KotH:
Before I even thought about recreating the original KotH script, I wanted to make my own KotH, unrelated to the original one. After debating on what to do for a couple days, I decided to recreate the original script first and then later on write my own version, hence the name "legacy" for the current KotH. I did it in this order, because I figured that veteran players would be disappointed after seeing a different version of KotH from what they remember - no matter how good my version would be. To be completely honest, I regretted writing the legacy koth implementation the second I was finished with it. Not just the code, but I think the design of it is lacking in many ways and to be completely honest, I'm personally incapable of writing good code for it. I'm at the point where I've accepted that legacy_koth.rs is just a mess and the most recent changes are essentially just hardcoded features that don't have any logical relation at all. I'm personally split between writing bad code to satisfy the community and not writing any code for it at all, which would defeat the purpose of having created it in the first place.

If it were up to me, I'd remove the legacy koth all together and write another version that is not bound by the design limitations of the original script.
To answer your question "Do we really need this?": I know my answer is no, we don't need it. However, do the people on CWPVP really need this? I don't know and I think the more important question is: Even if they need it, is it worth keeping bad code to provide this feature?

(sorry for this wall of text, I've just grown to be very passionate about KotH, mostly in a negative way though)

@LastExceed

Copy link
Copy Markdown
Owner

I'm sorry for your grief. I am painfully familiar with that feeling. Please know that I genuinely find legacy koth to be an amazing addition to berld exactly the way it is, precisely because it is so faithful to the original with all its quirks. Nostalgia does not care about quality, so the jank is actually a feature as far as I am concerned. (Also I don't even find the code that bad, especially since it is well contained in 1 file)

I'm gonna talk to the others about how they feel about drop weighting, because to my understanding it was just meant to reduce the "weird" item drops (pitchfork etc), which we later decided to just throw out entirely.

Same for the leftovers idea, but we'll probably have to forget about it since the lack of class association is indeed a problem. Maybe we can introduce some mechanism for deconstructing unneded items, and increase the drop rates to compensate for the class rng, but this probably would introduce too much micro management... idk i'll have to think about htis

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

Successfully merging this pull request may close these issues.

2 participants