-
Notifications
You must be signed in to change notification settings - Fork 42
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
Divide armor wear amongst number of pieces worn #34
Comments
I did push this issue onto the 3d_armor thread on the minetest forums (https://forum.minetest.net/viewtopic.php?f=11&t=4654&start=850) Fairly sure the regulars would have seen it and flagged any major concerns. I'll move onto the next step for this for me which is a more intense testing step involving mobs and PVP. I've also been running the shield fix #30 and haven't noticed any issues, crashes, odd errors etc. So I think I'll just do a single pull request for this and #30 I hope I'm not setting a direction here for 3d_armor that was never intended, I'd hate to be standing on anyone's toes. I'm very much just trying to add functionality/fix issues I'm currently stumbling over that i need in a mod Im working on. I could add this functionality to just my mod but in most cases to me it would appear to be better placed in 3d_armor than in my mod alone. |
Tested so far, with this and #30 in place The below in Singleplayer and Server, for the attacks full diamond armor with shield and gloves to push lvl over 100
Inside Protection area PVP off
Inside Protection area PVP on
Outside Protection area
Mixed armor use testing
Other than one bug I should have picked up when testing #13 with mobs which I've fixed and will note and bundle with this pull request when I do it (sorry about that). I haven't picked up any other issues. Armor does damage slower when wearing multiple pieces vs single piece but thats to be expected. I would not want to watch PVP of two people in diamond armor, using shields and gloves.....I'm not sure who would win or if they would just quit from sheer bordem...not sure if thats an issue given the multiplier can be adjusted up and down as you like in settings for PVP servers, I also view that as more of a limitation of the currrent armor/damage mechanic.
I'll see if I can think of any other tests to run and add them to the above as I think of them over the enxt few days |
Picked up while testing minetest-mods#34 and minetest-mods#30 that this needed to be adjusted from hitter name to hitter is player. Hitter name was resolving to true even when mob was attacking...nil being counted as a value. I should have picked this up before and not sure how I missed this.
See Details contained in minetest-mods#34 Note1: I split out the fix for Issue 13 and it had been applied Note2: I will also do a seperate pull request for Issue 30 From what I udnerstand smaller specific pull requests allow for reversion of specific additions and features much more easily. Please do correct me if I have the wrong end of the stick on this.
2 line update so that shields when used no longer affects the base armor.config.level_multiplier and hard sets this to 0.9 and overriding whatever value maybe set under the UI for this seeting. Tested in combination with minetest-mods#34 but no issues detected
See Details contained in #34 Note1: I split out the fix for Issue 13 and it had been applied Note2: I will also do a seperate pull request for Issue 30 From what I udnerstand smaller specific pull requests allow for reversion of specific additions and features much more easily. Please do correct me if I have the wrong end of the stick on this.
fixed by 3ddcbae thanks again @sirrobzeroone 👍 |
* backported fox for minetest-mods#34 * backported minetest-mods@3ddcbae
* backported fox for minetest-mods#34 * backported minetest-mods@3ddcbae
The partial fix for issue #24 exposed that when armor recieves wear, whether you wear 1 piece or 5 pieces the armor pieces all take the same amount of wear/damage.
My suggestion; Is that as you wear more pieces of armor the damage/use is spread as a fraction across all armor pieces. Given that damage/use is already set by the armor piece type this would simply involve dividing the use/damage for that armor piece by the number of armor pieces worn.
I have developed a small change to api.lua>>armor.damage which makes the above change, I have tested this and can't detect any issues - basically replace the current armor.damage starting at ~= line 417 with the below :
Testing and outcomes all as expected - short-hand test cases:
One
Wearing just Wooden Chestplate - Recieved full 2000 use/damage
Two
Wearing Wooden Chestplate and Wooden Boots - Each Recieved 1000 use/damage
Three
Wearing Diamond Chestplate and Wooden Boots - Chestplate 100 use/damage, Boots 1000 use/damage
Four
Full Wooden armor Chest, Boots, Leggings, Helmet - Each recieved 500 use/damage
Five
Wood Helmet, Diamond Chest, Bronze Leggings, Steel Boots:
Helmet 500 use/damage, Chestplate 50 use/damage, Leggings 100 use/damage, boots 200 use/damage.
I did contemplate making Chestplate take a larger proportion (say 2/6 when wearing 5 pieces ie have chestplate count as "2" not 1) but that makes the fix significantly more complex and I thought for an initial enhancement simple might be best? I'm very happy to take suggestions and ideas and code imporvements etc and even roll in that chestplate fix although I was worried ppl might then not wear chestplates.....
The text was updated successfully, but these errors were encountered: