KingEnderBrine / -RoR2-ProperSave

MIT License
23 stars 13 forks source link

Config to not delete save #34

Closed Kyllingene closed 2 years ago

Kyllingene commented 2 years ago

I play ROR2 on a regular basis, and love ProperSave since I often have to go do other things; however, it really is annoying to die to something like my dog jumping on me or computer issues (I have those a lot) and lose my progress. Therefore, it would be really handy to have a config file that lets you turn off save deletion on death that would be on by default. That way, I wouldn't need to worry about stuff like that (I just had a huntress godrun end because I lost input and died to a random couple of elite beetles, so kinda salty rn).

KingEnderBrine commented 2 years ago

Hello. I'm sorry, but I won't do that. The point of the mod is to allow you to make a pause or not to lose your run because of a game crash. Having the ability to load the game after you died is against the point of roguelike games in general, death is part of gameplay.

Kyllingene commented 2 years ago

I respect your views on the matter, although I believe that allowing an option such as this that takes conscious effort to enable in a singleplayer game isn't very harmful; you could argue that it could affect multiplayer, but you could just leave if you find that the host is clearly using the save mod. Ultimately, it's such a simple change that it would require almost no effort to implement (I think, I'm admittedly not a modder though I am a programmer), and would only affect the people who have full control over it. It's like those who are against modding in general; it's a single-player game, as long as it doesn't break copyright it's totally fine.

Since it should be a simple add, I might try it myself; in the meantime, this issue has served its purpose and will be closed.

Kyllingene commented 2 years ago

I've been looking through the source to try and find where the death detection is, but I can't locate it; could you help me?

KingEnderBrine commented 2 years ago

Removing these 2 lines should do be enough: https://github.com/KingEnderBrine/-RoR2-ProperSave/blob/8c5f3d85598f26b19f05fb643a66bfb0fff9d0a8/ProperSave/Saving.cs#L23 https://github.com/KingEnderBrine/-RoR2-ProperSave/blob/8c5f3d85598f26b19f05fb643a66bfb0fff9d0a8/ProperSave/Saving.cs#L35

Kyllingene commented 2 years ago

Thanks! I'll do that for now, and in the meantime I'll try to attach it to a config file.

Kyllingene commented 2 years ago

Ok, so I was trying to build the edited mod, and I ran into a problem: you try to access Loadout.BodyLoadoutManager.BodyLoadout, but that property isn't defined in my version of the DLL. Did the DLL get updated, or is it an issue I need to resolve (maybe I grabbed the wrong DLL or something)?

KingEnderBrine commented 2 years ago

I'm using publicized ror assembly, which means I can access any private fields/methods as if they were public. You can get one in r2api repository https://github.com/risk-of-thunder/R2API/blob/master/R2API/libs/Assembly-CSharp.dll

Kyllingene commented 2 years ago

Ah, thanks!