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

Incorrect maker cost calculation #289

Open
P0nk opened this issue Feb 8, 2025 · 0 comments
Open

Incorrect maker cost calculation #289

P0nk opened this issue Feb 8, 2025 · 0 comments

Comments

@P0nk
Copy link
Owner

P0nk commented Feb 8, 2025

Describe the bug
The maker cost calculation in server.MakerItemFactory is wrong.

Reported by "i hate c++" on Discord #bug-report:

i don't have a github account, but the maker cost estimation is extremely wrong. this is the real formula present in CUIItemMaker::GetTotalCostToMake

MakerItemFactory.getItemCreateEntry
// THEY DECIDED FOR SOME BIZARRE PATTERN ON THE FEE THING, ALMOST RANDOMIZED.
//  Turns out, it isn't random at all, and very simple. - ihatecpp
int cost_multiplier = 1;
if (stimulantid != -1)  cost_multiplier += 5;
if (!reagentids.isEmpty()) {
    int total_gem_levels = 0;
    for (Entry<Integer, Short> r : reagentids.entrySet()) {
        total_gem_levels += (r.getKey() % 10) + 1;
    }
    cost_multiplier += 3 * total_gem_levels;
}
int additional_cost = (int) makerEntry.cost / 10 * cost_multiplier;
if (additional_cost > 0)  makerEntry.addCost(additional_cost);

Image

it's 110% of the cost from ItemMake.img, plus 10% per "crafting multiplier" where a catalyst/stimulator is 5, and each gem level is 3

To Reproduce
Steps to reproduce the behavior:

  1. Get maker skill
  2. Make something with the maker skill
  3. The mesos shown in the maker UI will not match the mesos that were actually deducted.

Expected behavior
The mesos shown in the maker UI should equal what is deducted.

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

1 participant