yeelp / Distinct-Damage-Descriptions

Adding physical D&D-style damage types to Minecraft to deepen the combat
MIT License
10 stars 4 forks source link

DDD drastically changing default shield mechanics & conflciting with certain mods #112

Open evilchin opened 1 month ago

evilchin commented 1 month ago

So I've been experimenting with a ton of features with this mod over the summer, and one thing I've noticed is that shields seem to behave pretty weird with this mod installed. Below I have noted everything that seems "off" with shield behavior with this mod.

  1. Shields do not take durability damage if blocking with them results in taking less than 1 point of damage. An example being is that if you block an arrow that does 4 piercing damage with a shield that has 80% piercing rating, your shield will NOT lose any durability. So essentially any shield has infinite durability as long as you take less than 1 damage while blocking.
  2. Shields do not prevent knock back, hurt noises, or damage tilt animations when fully blocking an instance of damage. This (and the previous point) are especially apparent if you use a shield with a default distribution, and you are using the config options S:"Default Shield Distribution"="EFFECTIVE_TO_REGULAR_TYPES" or "ALLOW_BYPASS_DAMAGE_TYPE" or "ALL_EFFECTIVENESS".
  3. Setting "S:"Default Shield Distribution" to "ALL_EFFECTIVENSSS" will prevent the game from loading. This isn't super important as you can fix this by just using "ALLOW_BYPASS_DAMAGE_TYPE", but I figured I'd mention it.
  4. Some shield id's from certain mods can't be defined correctly in the config. Putting "thermalfoundation:tool.shield_electrum;[(s, 0.8), (p, 0.5), (b, 0.2)]" as a shield definition causes that item to receive 100% resistance for every damage type. Can provide screenshots if needed. My guess is that the period in the item id is causing issues, but armor and weapon definition lists don't have this issue with the same type of id's. This isn't a super serious fix though as I personally just use the default distribution for most shields and I would assume other pack creators are in the same boat.
  5. The shield component of DDD seems to be incompatible with shield altering mods like shield break. This is something very minor and honestly expected, but I figured I'd bring up in case you're interested in resolving something like that.

I can provide any screenshots, logs, or example config files if needed. All of this was tested on fresh instances with nothing other than DDD and forge (except for the couple instances where I tested thermal foundation item id's). In my amateur opinion, the easiest fix might just be to provide a config option that acts as a kill switch for the shield related portions of the mod. Although I have zero clue what that would actually entail. Sorry for any possible troubles!

yeelp commented 1 month ago

Shields do not take durability damage if blocking with them results in taking less than 1 point of damage.

Okay, that's an easy fix. It should probably round to minimum one durability damage.

Shields do not prevent knock back, hurt noises, or damage tilt animations when fully blocking an instance of damage.

The damage tilt animation happens when taking damage, in theory I could try to stop it from happening but I'm not too sure if it'd be worth it. I'll have to look into the knockback issue though for sure.

Setting "S:"Default Shield Distribution" to "ALL_EFFECTIVENSSS" will prevent the game from loading.

Can I have a log of the game loading with this option set? Does the game crash, or does it just hang?

As for the incorrect shields, the log might show if it encountered an issue parsing the entry. The period shouldn't be causing that many issues.

I'm not sure exactly how I could get shield break to work with DDD, but I've heard of the incompatibility. That being said, a toggle to enable/disable shield distributions is actually already implemented for 1.7, works on the fly in game without requiring a restart, and an alpha build should be available soon (I'm hoping next week at the latest). It includes a large list of changes and additions

evilchin commented 1 month ago

Here is a crash report for the issue related to setting S:"Default Shield Distribution" as "ALL_EFFECTIVENESS".

Writing this ~30 minutes after I posted the log to pastebin: Actually I just figured out what the issue is. Apparently the config has 2 different versions of the option "ALL_EFFECTIVENESS". The guide in the cfg file has "ALL_EFFECTIVENeSS" and "ALL_EFFECTIVENsSS". The first option is stated everywhere in the config but one place. Apparently this issue actually stems from the setting S:"Default Armor Distribution" as it says to use "ALL_EFFECTIVENsSS". So S:"Default Shield Distribution" was causing the crash because I has copied and pasted the erroneous option from the armor guide (essentially I assumed they were both the same string). It all seems to just be a minor typo with S:"Default Armor Distribution".

The first topic to me is ideally the main issue as shields need to be able to lose durability for balance reasons IMO.

The damage tilt animation isn't that big of a deal in the long run. It's just that shields seem to keep your POV fairly "stable" in vanilla when blocking damage compared to using a fully effective one with DDD installed. The hurt noises and resulting knockback are far more annoying than the damage tilt animation.

I'll look into the fourth topic more later tomorrow, I'm not really sure why that is acting so strange. Also please don't worry or waste any dev time trying to make the mod compatible with shield break as I figured that task would probably be fairly monumental/difficult compared to the payout you'd get from fixing it. I only mentioned it for the sake of transparency, or if you intended for both mods to be able to coexist. But I know that second option was probably a long shot.

Hopefully this info helps! Let me know if you need anything else.

yeelp commented 1 month ago

This is interesting, checking the source code, the description of the config doesn't seem to have typos

https://github.com/yeelp/Distinct-Damage-Descriptions/blob/2886b4e5aef4e29cb737ed18e2e47cf4b40c0703/src/main/java/yeelp/distinctdamagedescriptions/config/resists/ResistanceCategory.java#L72

It seems to match perfectly fine. This is from the Default Armor Distribution config description. They should match and be the same string.

The hurt noise I may not be able to prevent as you do technically take damage, the knockback should be able to be stopped so that's definitely a bug.

evilchin commented 1 month ago

Ok thats strange that the config is differing from the source code. I uploaded a screenshot to show where the NSSS variant shows up (instead of NESS) on a fresh config file. It weird because you can notice in the config that it wants you to use ALL_EFFECTIVENESS at first, but the very next section uses ALL_EFFECTIVENSSS . And then afterwards it goes back to just being ALL_EFFECTIVENESS.

image

Being able to fix knockback and durability for shields is pretty much the two biggest issues to me. Although the hurt noise is annoying, it does provide some auditory feedback. Thanks for the help! I'll get that log file for you in roughly 6 hours.

Here is that log file for that bug with thermal foundation shields. I looked through It and I couldn't find anything that stood out at me. It seems to just be something to do with the shield entries and thermal foundation as I was able to define a weapon and armor piece without that weird quirk I mentioned earlier.

Thanks for the help!

yeelp commented 1 month ago

That's interesting, the typo appears in the section where Forge injects the valid values into the config file, which means either th typo is being caused in Forge or something somewhere is named incorrectly. I'll have to take another look.

Try editing the config in game through the mod options menu and see if the typo persists there too.

evilchin commented 1 month ago

It has the same spelling in the mod menu config. Below is a picture of what I see. I cycled through the options a bunch just to be thorough. image

yeelp commented 1 month ago

Okay there is a typo, the extra information helped me figure out where it was.