Bountiful

Bountiful

35M Downloads

[Bug]: Extreme broken weighting discrepancy between two decrees with same objectives but different variations of rewards.

Darkmega18 opened this issue ยท 9 comments

commented

What happened?

I have gone through in my modpack and overriden all decrees and reward tables with my own. Dummying out all the compatibility sides by making them dependent on a mod my pack doesn't have (and also crashes with when loaded with) so that they don't inject.

But I have a leatherer and a huntsman who both work together and share objectives, however they offer different rewards.
But what is happening is that the leatherer for some reason his objectives always break and he gives stuff away for literally 1 flint or a piece of rotten flesh. Instead of asking for mob hunt bounties or actual substantial amounts.

While the huntsman works just fine. Just he's doing them proper and has his own reward tables also.

I checked the nbt of one of the bounties and it literally shows flint as 50 cost, while the things he's offering for them are literally in the 10s of thousands worth of cost. Sus?

How can we reproduce it?

Replace two decrees with overlapping objectives, but give them slightly different personalized rewards.

when the one who will act up's decree is placed in a bounty box, it breaks and starts offering lowest objectives for highest rewards seemingly.

Mod Version

Bountiful-1.16.4-3.3.1

Forge Version

36.2.33

Relevant log output

it's kinda big. cause I've been reloading and copy pasting a fair bit. I'll try another idea then get back to you on that if you've got no clue. But the logs don't report anything is wrong with their tables. as the hunter works perfectly fine, while the leatherer has suddenly become a philanthropist...

commented

attempting big brain, and combining their tables into same, but different jsons with different names... see if I can't fool it into working again incase you've really got a weird issue with two decrees sharing exact same objective requirements breaking.

one is now hunter_leatherer, where i copied leathers stuff onto the bottom of hunters page.
and one is now leather_hunter where I copied hunters page to bottom of leather's json to differentiate them.

edit:
ok no good.

image
one such broke bounty.

those such rewards which are for some reason breaking:
image

his items which aren't related to commanding a lootbox to give to someone for randomization appear to be functioning just fine when they appear. but his typical rewards are themed gear with random enchants from a loot command.

the flint and rotten flesh are like 10 and 25 a piece, respectively. so they likely should NOT be getting chosen by this man. :V

I'm just going to update my pack and drop that one off and hope it's not happening with any others I haven't more extensively checked... The tester command prints out that it's found several matches for objectives just fine however.
once the pack is updated, you can then maybe take a look at the issue by pulling apart my datapack that I use to edit stuff throughout my pack using that latest version.

commented

So, your unitWorth for flint and such are set at 10 and 25? If that's the case, then they should be offering up to the max amount of flint/leather, which is whatever max is. If you have the max amount of flint set to 1, that would also be a reason why only 1 is showing up.

commented

but the max amount of flint's price is no-where close to the cost of these rewards. doesn't it only choose rewards from the given lists which can add up to the point cost of the reward?
literally all the other ones work.
so I highly doubt even my max of like a stack of flint at 10 a piece and half a stack of rotten flesh at 25 points a piece can equate to 7500+. especially when there are other options for it to choose, unless theres some kind of bug going on here which is for some reason making it exclusively choose to offer all their rewards of 7500+ cost for a singular flint or flesh.
hunting_objs.json.txt
leatherer_objs.json.txt
all_villager_objs.json.txt
both the objectives they share from.

hunting_rews.json.txt
leatherer_rews.json.txt

their respective rewards. (I made them txt's cause github wouldn't take the jsons)

commented

This is odd. In the above bounty you posted, the total reward worth should be 7500 + 5000 = 12500. Yet the objective worth is 10 + 25 = 35.

Could you post your config file? In forge, this should be in [world folder]/serverdata/bountiful-server.toml or some such (it's been a while, but it's something like that). :)

commented

roger. one bountiful toml coming up.
bountiful-server.toml.txt

thats the one from default configs which would be the one that goes into the save afterwards. cause I have a modpack. so I've shipped a number of default config files for server side configs.

commented

Been doing some of my own custom bounties, and running into the same issue on 1.16, and even with less extreme numbers. Bountiful 3.3.1, Forge 36.2.22.
image
image

worthRatio is set to 1.0 in the serverconfig.
image

commented

I also have this issue while making my own data pack.
It seems like the 'worth' calculations might be messed up for command type rewards.

commented

Very weird. Sorry, I was very busy for a while so I'd never gotten around to looking more into this. I know that it's not much consolation, but anything related to this should have been fixed in v6.0.0 for Minecraft 1.19.4+. This unified the codebases for both Fabric and Forge, and uses a much more up-to-date algorithm for pairing pool entries.

Given that it's taken me this long to respond to this goes to show that while I do dedicate some time to work on this mod, I don't have an infinite amount. Because of that, I won't be hotfixing the 1.16.4 version - even if I were to do so, it would require a significant amount of work because the 1.19.4 version is not even a derivative of the 1.16.x version, it's a complete rewrite stemming from the Fabric version.

Also - creating new objectives and rewards should be much more flexible on the newest version. If you're still interested, you can check it out here:
https://kambrik.ejekta.io/mods/bountiful/

commented

oh... no 1.19.2? D: thats where a lot of the big mods kind of are... since I tried to make a pack recently and curseforge search was kinda barren for 1.19.3 and up. :<
Could the shorter distanced backport to 1.19.2 be possible?