FunkFrog / ShareSuite

Risk of Rain 2 Item, Money, & Equipment sharing mod build upon BepInEx
https://thunderstore.io/package/FunkFrog-and-Sipondo/ShareSuite/
GNU General Public License v3.0
39 stars 27 forks source link

Patch Sacrifice not dropping nearly enough items with 3-4 players #117

Closed raeon closed 3 years ago

raeon commented 3 years ago

Hi there!

As I also stated in issue #109, I ran into lots of problems playing with any amount of players over 2 as I got way too few item drops. I locally tested out my hypothesized solution that I mentioned. After playtesting I can confirm it works perfectly! Playing with 3 or 4 players has brought no issues at all anymore.

I saw that in issue #109 we were probably talking a bit about different problems: 3-4 players isn't a "very high" player count. Therefore, I included your original patch to virtually "cap" the player count at 4. Unfortunately, I'm not capable of testing this mod with over four players, but I would encourage you to do so. The original fix you uploaded unfortunately did not make it playable with 3-4 players.

I hope you'll accept my pull request!

raeon commented 3 years ago

Quick note: This pull request requires including 0Harmony.dll in your project dependencies. It can be found alongside the other BepInEx DLLs here: Risk of Rain 2/BepInEx/core/0Harmony.dll.

FunkFrog commented 3 years ago

Understood. We stopped using Harmony a long time ago, but I'll take a look at your patch and may re-implement it without Harmony (or you could, if you're feeling up to the task!) Thank you for the PR!

As far as the fix I released, it was more of a temporary solution so that people playing in groups of 6 or 7 wouldn't receive a single item every 3 stages (or more). I was planning on revisiting it soon, and this looks like what I was planning on doing.

raeon commented 3 years ago

Woah! Godlike reaction speed!

I understand using manual patches is (generally speaking) undesirable. I did a quick glance at R2API but honestly I found it a lot easier to dig through the game's internals myself and just patch what I needed rather than hoping that someone else has done it for me. (Not to mention there seems to be very little in the way of documentation? Maybe I'm just blind.. But I digress.).

As far as "manual patching" goes, what does that mean here? How would one go about implementing this without Harmony? I haven't read about anything like that in the guides I found on RoR2 modding.

As far as the currently live temp fix vs. my temp fix goes, pleaaaase release this patch as the new temp fix! I tried playing with three players last night and it was downright impossible to do. We played from start to finish a 25 minute game and we only got two items! 😅

FunkFrog commented 3 years ago

R2API probably doesn't contain a hook for what you're trying to do, what we would more likely then not end up using would be an IL/ON hook as it would probably only be 4-5 lines for the entire thing.

Absolutely feel free to build your version and distribute it to your friends! This project is open source for a reason! Just be sure to tell them it's your build and not the official version.

I'll take a look at what it would take to implement this without Harmony later today, and I'll get back to you here :)

raeon commented 3 years ago

That sounds like I'd definitely be in over my head. I do recall spying at some mod(s) yesterday in trusty ol' dnSpy, and seeing the IL modification gibberish really made me go "Yeaaah... naaah" 😝. I'd love to see what that would look like if and when you make it happen!

I have to ask though, what is the reason from staying away from Harmony? I've used it in two mods of my own (not published I might add) and it seemed to do a fantastic job.

FunkFrog commented 3 years ago

For the most part just consistency throughout the whole mod. We'd rather not have a single change use a library and everything else use this other library, and we found a lot of our changes worked better using monomod's hooks.

raeon commented 3 years ago

Oh, I think I see now. On.RoR2.Util.GetExpAdjustedDropChancePercent += ...; is what we're talking about, correct? If so, I'll whip up a patch shortly and get that in ;-)

raeon commented 3 years ago

There we go! How does that look?

Looks like I don't have enough players on hand to test for now, so I suggest we keep this open until we have it tested. I removed the original fix you put in since I highly suspect it will be unnecessary after this. I also removed it here because I want to make sure that when this is playtested, the test results are clean and not obscured by two overlapping fixes. Unfortunately I'm not capable of testing it with 6+ players, so I'll have to leave that up to you.

And thank you! I see what monomod does now.. and I finally understand why people use R2API ;-)

FunkFrog commented 3 years ago

Haha, yeah, it's pretty great. Just make sure that whatever you set doesn't get overridden by the game code. Let me know how it works out, if you're able to test with < 6! I'll make sure we get a test in for the high player counts :)

raeon commented 3 years ago

It really is! I spent so much time in comparison reading up on the Harmony docs whereas this is just "Ah yes, just type out the function name along with a '+=' and you're set!" So much easier.

And will do! It'll probably be two days from now. Expect to hear from me :-) Thanks for being a good sport (and replying so fast)!

FunkFrog commented 3 years ago

Oh, also, if you'd like to join the discord server I can throw you a contributor role for sending in a PR :)

raeon commented 3 years ago

Hey there, I did the test run yesterday with 3 and 4 players and it seemed to play fine!

I did run into some poor balancing on the game's part when playing with the Artifact of Honor (eliltes only). The artifact causes a lot less monsters to spawn and the Artifact of Sacrifice doesn't seem to compensate for that at all, as it is just a flat chance roll on every monster death. This is why there's a lot of items when there's a lot of monsters, and hardly any on (for example) stage 1 when playing with Elites only. I see an opportunity here to improve the gameplay in such scenarios, although I'm not sure if I myself am quite thát motivated ;-).

I joined the Discord and set my nickname to Raeon, my Discord tag is Red Mushroom#9295.

Draeken commented 3 years ago

Thanks for this PR!