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

[FEATURE] add cow armors #60806

Merged
merged 7 commits into from
Sep 11, 2022
Merged

Conversation

leoCottret
Copy link
Contributor

Summary

Content "Adds cow armors"

Purpose of change

Cows can be killed in a few turns by a weak monster because they don't have armors. Especially when transporting cows in a truck, monsters can phase diagonally through the car body and leave little times for the player to react.

Describe the solution

The solution I choose is to add cow armors. I used the horse armors as a template, compared the difference in weight between a horse and a cow corpse (~20%), and modified the components required, weight, price, material thickness and crafting time accordingly.

Describe alternatives you've considered

Adding the ability for cows to wear horse armor could have been a solution, although they don't really have the same dimensions.

Testing

I spawned all armors and was able to equip the cow with them.
I crafted one of the armors too, they all appear in the crafting menu.
I could still ride/milk/butcher/lead/tie the cow.
I got a cow killed by 1 Zombie with and without armor and saw that the armor was working as intended.

The one change that could add regression is the modification of the bodytype from dog to cow. I don't know what it is used for. I couldn't equip dog armor on the cow but changing the bodytype to cow allowed me to create working armors for this bodytype.
Also this is my first PR so I guess you should be extra careful.

Additional context

Equipping an armor
image

2 tied cows with a zombie brute, cow without armor on the right is dead while the cow with steel armor on the left has 80% health
image

@leoCottret leoCottret requested a review from LyleSY as a code owner September 6, 2022 12:24
@github-actions github-actions bot added [JSON] Changes (can be) made in JSON Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Armor / Clothing Armor and clothing Mods Issues related to mods or modding Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Monsters Monsters both friendly and unfriendly. labels Sep 6, 2022
Copy link
Contributor

@LyleSY LyleSY left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure it makes sense to define a new bodytype "cow" redundant with dog. If it is it should be documented. Instead I'd suggest keeping it pretty similar but using the description to make it clear that it's for cows and not dogs, just make it big dog armor on the backend.

@Zireael07
Copy link
Contributor

Can't we just have a 'quadruped' body type, it'd fit cows/dogs/horses/Exodii quadrupeds/whatevers else

@leoCottret
Copy link
Contributor Author

leoCottret commented Sep 6, 2022

I can indeed set the bodytype as dog, I didn't realised that the important fields are min_pet_vol and max_pet_vol. Should I include the calf in the dog armors, cow armors, or neither?
Edit: Well the cow armors are too heavy for the calf anyway, which does make sense

@leoCottret
Copy link
Contributor Author

Can't we just have a 'quadruped' body type, it'd fit cows/dogs/horses/Exodii quadrupeds/whatevers else

We could do this.
Example an elephant (dinomod), a horse or a cow could wear a quadruped armor, that would reduce the animals armor crafting menu clutter.

@Sevaaas1
Copy link
Contributor

Sevaaas1 commented Sep 6, 2022

would it be possible instead, to make a vehicle part that prevents the cow from moving, and prevents the cow from taking damage until the part breaks?

@leoCottret
Copy link
Contributor Author

Although thinking about it, it wouldn't make much sense to have an armor that would fit a cow/horse/elephant... so I think we can stay like that, a cow being of "dog" bodytype -> "a four legged animal with a short neck elevating the head above the line of the body" (that fits I think). If one day we create a huge, tameable dog, it would fit in a cow's armor, which seems possible I guess. About the craft menu clutter you just have to write "cow", "dog" etc. to have the correct results anyway.

@leoCottret
Copy link
Contributor Author

would it be possible instead, to make a vehicle part that prevents the cow from moving, and prevents the cow from taking damage until the part breaks?

That wouldn't fix the issue of cow needing an armor in general, I personnaly only use mobile bases but you could use a cow to transport your bags, or just have a cow as a pet (some people do that IRL) and want it protected.

@github-actions
Copy link
Contributor

github-actions bot commented Sep 6, 2022

Spell checker encountered unrecognized words in the in-game text added in this pull request. See below for details.

Click to expand
  • A heavy covering of chainmail, suitably made for cows as protection. You could put this on a friendly cow.
  • Kevlar-lined cow petos
  • boiled leather cow bardings with bones
  • boiled leather cow bardings with caprison
  • chainmail cow armor
  • chainmail cow armors

This alert is automatically generated. You can simply disregard if this is inaccurate, or (optionally) you can also add the new words to tools/spell_checker/dictionary.txt so they will not trigger an alert next time.

@github-actions github-actions bot added the astyled astyled PR, label is assigned by github actions label Sep 6, 2022
@LyleSY
Copy link
Contributor

LyleSY commented Sep 6, 2022

I think this is mostly there now. I'd recommend using the existing CSC_ANIMALS_CANINE ARMOR instead of defining a new subcategory. I like the idea of creating a simpler "quadraped" category that is more clearly inclusive but I'm not sure this PR needs to take that on

@leoCottret
Copy link
Contributor Author

I think this is mostly there now. I'd recommend using the existing CSC_ANIMALS_CANINE ARMOR instead of defining a new subcategory. I like the idea of creating a simpler "quadraped" category that is more clearly inclusive but I'm not sure this PR needs to take that on

Yes I find it a bit out of scope, also it seems to me that the only check for whether or not a "monster" can wear an armor is the min_pet_vol/max_pet_vol and the bodytype of this armor. If several tammable monsters used the quadruped body type, we would have to be very precise with the min_pet_vol/max_pet_vol values of the armor, otherwise 2 different monsters with roughly the same size could wear each other armor.

For example, currently if the elephant, horse and cow were all marked as quadruped, and their armor too, they could wear each other armors.

@github-actions github-actions bot added json-styled JSON lint passed, label assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions labels Sep 7, 2022
@ZhilkinSerg ZhilkinSerg merged commit abf8d29 into CleverRaven:master Sep 11, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
astyled astyled PR, label is assigned by github actions BasicBuildPassed This PR builds correctly, label assigned by github actions Crafting / Construction / Recipes Includes: Uncrafting / Disassembling Items: Armor / Clothing Armor and clothing [JSON] Changes (can be) made in JSON json-styled JSON lint passed, label assigned by github actions Mods: Dinomod Anything to do with the Dinoclysm mod (DinoMod) Mods Issues related to mods or modding Monsters Monsters both friendly and unfriendly.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants