koth reward tweaks - #16
fayeforpay wants to merge 4 commits into
Conversation
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
|
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
left a comment
There was a problem hiding this comment.
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)
|
|
||
| #[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 } | ||
| } |
There was a problem hiding this comment.
I feel like this function doesn't belong here. Maybe put it in utils. Also try to give it a more descriptive name
There was a problem hiding this comment.
I renamed it to max_valid_item_level and put it into utils.rs
| 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] | ||
| }; |
There was a problem hiding this comment.
This could actually be useful to have in the constants module of the protocol crate
There was a problem hiding this comment.
done. definitely the right call
and other smaller fixes
|
Answers to your questions first before my own thoughts on the current KotH:
My thoughts on Legacy KotH: 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. (sorry for this wall of text, I've just grown to be very passionate about KotH, mostly in a negative way though) |
|
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 |
adjust loot pool and make weights configurable - community feedback