Skip to content

Conversation

@MowFord
Copy link
Contributor

@MowFord MowFord commented Sep 27, 2025

I affirm:

  • I understand that if I do not agree to the following points by completing the checkboxes my PR will be ignored.
  • I understand I should leave resolving conversations to the LandSandBoat team so that reviewers won't miss what was said.
  • I have read and understood the Contributing Guide and the Code of Conduct.
  • I have tested my code and the things my code has changed since the last commit in the PR and will test after any later commits.

What does this pull request do?

Continues the work from here. Updates another itemUtil to create a lootTable of a single lootGroup and use the util from the previous PR

I would also like to move the lootTable util utils.selectFromLootGroups over to itemUtils, but didn't want to do that unless i got confirmation that is wanted (it would make more sense to rename it xi.itemUtils.selectFromLootGroups, I would think?)

I also was going to update nyzul item appraisals, but i'll leave that for another PR as it's also a ton of find/replace to add itemId/weight keys

For now, this PR

  • updates the itemUtil helper and squashes a few more bespoke "sum weights and loop over the table of items" functions
    • casket_loot.lua was updated with the following sed, then used the new LLS editorconfig to autoformat
    • sed -E 's/\{\s*(xi\.item\.[^,]+)(,\s*)([0-9]+)/{ itemId = \1\2weight = \3/' casket_loot.lua -i
  • removes the splitZones set as the casket_loot having a Hi/Low table indicates if it's a split zone already
  • streamlines some table[math.random(#table)] calls to use utils.randomEntry

Steps to test these changes

  • !additem 26955
    • equip and use it to get meat
    • image
  • caskets
    • change settings CASKET_DROP_RATE = 1
    • go killin mobs, spawn chests, see they drop items all the same
    • image
    • image

@MowFord MowFord changed the title [lua] Item util lootgroup organize [lua] xi.itemUtils.pickItemRandom tidy Sep 27, 2025
@MowFord MowFord force-pushed the itemUtil_lootgroup_organize branch 2 times, most recently from 9bd066e to 16728e8 Compare September 29, 2025 13:47
@Xaver-DaRed
Copy link
Contributor

Rebase please

@MowFord MowFord force-pushed the itemUtil_lootgroup_organize branch from 16728e8 to 2bd1fa7 Compare September 30, 2025 14:09
@MowFord MowFord force-pushed the itemUtil_lootgroup_organize branch 2 times, most recently from 31216cf to 29ae07b Compare October 8, 2025 12:48
@MowFord MowFord force-pushed the itemUtil_lootgroup_organize branch from 29ae07b to 9ffaa29 Compare October 8, 2025 13:13
@Xaver-DaRed Xaver-DaRed merged commit 35b9ccd into LandSandBoat:base Oct 12, 2025
28 of 29 checks passed
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