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

Adding LootDrop section with modifiers for loot amount and chance #772

Open
wants to merge 1 commit into
base: development
Choose a base branch
from

Conversation

Grantapher
Copy link

This adds a configuration which will change the amount of loot dropped by creatures/monsters when they are slain.

@Grantapher
Copy link
Author

Related: #659

I'm not certain CharacterDrop.DropItems is the correct place to do this. Ragdoll may be better, but I did see there was issue taken in #175. I'm open to suggestions on this.

I couldn't attach dnSpy to debug, so I couldn't dive very deep into how Valheim drops items. I think the mono-2.0-bdwgc.dll may be out of date, or I made a mistake (from searching the discord, seems like other people have had issues with this recently as well).

It would be nice to break this down by category of creature/monster dropping the items, but I think in the meantime an overall drop modifier is good to have. Drop rate could also possibly be added, but I'm not sure the usefulness of that, nor where to start.

@Grantapher
Copy link
Author

I ended up exporting the dnSpy assemblies to a visual studio solution and that made it much easier to trace usages of the code. With that, I found a better spot to inject changes to drop amount as well as the drop chance.

I don't see any good way to categorize creatures that aren't overly broad nor requiring a ton of configuration, so I left it as a global loot modifier.

@Grantapher Grantapher changed the title Adding LootDrop section with lootDropAmountMultiplier Adding LootDrop section with modifiers for loot amount and chance Jan 27, 2023
@Grantapher
Copy link
Author

One thing that I ran into with these changes (not sure 100% if related to loot drop or some other config), is that Oozers also "dropped" a multiplied amount of blobs when killed. I also have all Gathering and Pickables drop rates boosted, but it seems likely due to LootDrop. I'll have to test this some more.

@Grantapher
Copy link
Author

Added to https://github.com/Grantapher/ValheimPlus/releases/tag/0.9.9.15-alpha6

The oozers dropping extra blobs issue is fixed there.

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.

None yet

1 participant