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

Declarative chest loot #4454

Open
wants to merge 17 commits into
base: 1.4.4
Choose a base branch
from

Conversation

Tyfyter
Copy link
Contributor

@Tyfyter Tyfyter commented Nov 26, 2024

What is the new feature?

Chest loot will now be declarative.

Why should this be part of tModLoader?

Currently mods can't even add loot to "rare" pools in chests with a constant weight relative to the other items, due to load order affecting chest loot; Many other issues exist.

Are there alternative designs?

Certainly, but none come to mind and none have yet been proposed.

Porting Notes

This implementation should allow all existing chest loot should retain its current functionality, but it is highly recommended to replace it with code that adds to a loot pool or item pool.

The included mod file can be used to view loot pools, though it may display some chances incorrectly
ItemSourceHelper.zip

@Tyfyter Tyfyter marked this pull request as ready for review November 27, 2024 23:19
@Tyfyter
Copy link
Contributor Author

Tyfyter commented Nov 28, 2024

Mod solely for testing this & updated ISH
Testing Mods.zip

@Tyfyter
Copy link
Contributor Author

Tyfyter commented Nov 28, 2024

Source code for the former in case anyone wants to verify its accuracy
DeclChestLootTests.zip

@Chicken-Bones
Copy link
Member

Toss the source code for the mod in test/Test Local/Mod Sources?

@Tyfyter
Copy link
Contributor Author

Tyfyter commented Dec 1, 2024

Toss the source code for the mod in test/Test Local/Mod Sources?

added

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