[A17] Animal Armour Mod

MOD Desc
The much-improved Beta 18 version

Important This mod has been abandoned by me.

This is because its execution is way too hacky and flawed to really work smoothly with the game, and with prostheses such as A Dog Said or my very own solution, due to the way that body mechanics work in the game. Also, the removal of armour itself is extremely hacky requiring an object to do so, again owing to body mechanics.

If somebody else wants to pick this up and improve on it, you’re more than welcome to.

Thanks for reading, and I do apologise.

Overview As the title very much states, this mod adds armour for animals to RimWorld!

Disclaimers: the armour works through Hediffs, and it has to be installed via surgery since that’s the only XML-friendly way of actually making this mod happen – but there is an absence of the requirement for medicine, and the surgery success chance multiplier is ‘Infinity’, meaning that it’s impossible to fail installing armour on an animal. Similarly, animals will still be anaesthetised since that’s hardcoded in the surgery code, and I’m not a C# wizard so I can’t write custom stuff. Also, the installation of animal armour will completely reset the animal’s health for the rest of the body; this is most likely to do with the fact that the body is the main body part, so every sub-part gets reset. Since I’ve not got the skills yet to rectify some of the outstanding issues, consider this project deprecated.

Animal Armour adds three ‘tiers’ of animal armour to the game: makeshift, standard, and heavy. Similarly, these armour types are all split into five size categories: tiny, small, medium, large, and huge.

The only means of obtaining standard and heavy animal armour of any size is through trade, but makeshift armour however may be crafted. The further up the sizes you go, the more expensive the items are to purchase – or manufacture in the case of makeshift armour. All size categories are functionally identical, however, other than the animals that they be installed on. Furthermore, what size category an animal fits into depends on its body size as an adult since again, I’m no C# wizard.

Naturally, the ability to be able to handle animals plays a role as to the maximum size category that you can install armour on to; it won’t take much to armour up on a small critter, but it’ll take quite a lot more skill to armour up a lumbering beast. Fine craftsmanship is also necessary to make small animal armour, but also to make large animal armour that won’t simply fall apart.

To remove armour from an animal, you need to make an ‘animal armour remover’ at a crafting spot – this being because the hediff remover class is hardcoded to require medicine. Armour can also be removed by installing another type of armour.

Armour Types
Makeshift: 20% sharp protection, 8% blunt protection, -5% movement.
Standard: 27.5% sharp protection, 11% blunt protection, no movement penalty.
Heavy: 60% sharp protection, 20% blunt protection, -20% movement.

Size Category Info
Tiny: fits on animals with a mature body size of less than 0.3. Examples: cats, iguanas, and squirrels.
Small: fits on animals with a mature body size of 0.3 or greater, but less than 0.8. Examples: tortoises, monkeys, and foxes.
Medium: fits on animals with a mature body size of 0.8 or greater, but less than 1.3. Examples: wolves, huskies, and boars.
Large: fits on animals with a mature body size of 1.3 or greater, up to 2.4. Examples: muffalo, boomalopes, and bears.
Huge: fits on animals with a mature body size of greater than 2.4. Animals: Rhinoceroses, Elephants, Megatheria, and Thrumbos.

I’d much appreciate some feedback on the market value balance too, since I’m currently a little uncertain about how everything’s balanced in regards to that. It was a bit of a headache producing a formula which got sensible results for market values at various size points, and I even ended up slightly deriving from what the formula provided.

Compatibility This mod will work fine with spoonshortage’s A Dog Said. While this mod will also work with Combat Extended; it’s not balanced around Combat Extended’s changes to the armour system and protection values of certain armour types.

Animal mods currently made compatible with Animal Armour:
Dinosauria by spincrus (Pactch)
Megafauna by Spino (Patch)

As for compatibility with other animal mods, I’m not going to be taking responsibility for making patches; it’ll be up to other animal mods’ authors to make a patch for their mods with this.

Credits Marnador for the RimWorld style font
Canute and rambo for the ideas around armour removal

License You may include this mod in any mod pack, and you may derive from this mod too. I only ask that you inform me, and that you also provide a link to the forum post, with my name.

Thank you ๐Ÿ™‚

I feel you. XML isn’t easy. Try modding for Stellaris, and it can get fairly difficult, especially if you don’t know what each line of code does.See if you can get into contact with a code writer for Rimworld. Either that, or go to the Rimworld Modding Reddit/Discord. I’m currently part of the Alien Framework Discord, and they are incredibly friendly over there.

siege of herons Just noticed that I’ve forgotten to update the title or description, but I’ve decided to abandon this mod. Its execution is way too flawed and hacky, and some strange behaviours occur because of the way that body mechanics work in RimWorld, and I’ve not an idea of how to circumvent that. Maybe somebody else will pick this up, which is perfectly fine by me.TL;DR: I’ve abandoned this because it’s way above my skill level to get this to a polished standard. I do apologise.

Just tested this; you are right. Well, I’m not entirely sure what to do then, since I could barely cram this into XML and I won’t be able to write my own stuff.Might just leave this as a proof of concept, and that concept is that animal armour isn’t really viable unless you know C#.

Leave a Reply

Your email address will not be published. Required fields are marked *