Jump to content

[Unfinished] Equipping pigs with armor, backpacks, tools & weapons


Recommended Posts

I'll begin by saying that I am posting this for someone else to take up the mantle and finish the mod. Between real life obligations and the desire to play the game more than mod it, I don't really have the time to be hacking video games right now. But based on the work I've done so far on this, I think someone more talented or industrious than me might be able to figure out the bugs that I can't.

What I have so far:

pigman.lua has been edited to make pigs receptive to body-equip and hands-equip items (copy + paste + slight modification of the receiving hats code)

various equipment files edited to have the 'tradable' attribute, making them valid gifts (simple one line addition)

The pigs will equip armor, and I tested it multiple times to ensure that their damage was being mitigated. Upon death, the pigs will drop any items given, and backpacks will retain their inventory.

All these files go into the /prefabs directory.

These are the bugs:

Pigs do not correctly swap out body equip items as they do with hats.

Tools/Weapons still default to 'Attack' when mousing over a pig.

Equipped items are not actually visible on the pig (not sure if this is fixable, as I believe it would require creating animations for the pigs)

I've included the pigman.lua file and the backpack.lua file. I added comments to indicate the modified code. The changes and how they work should be obvious to anyone who knows how to read/modify code, but if you have any questions on the work I did don't hesitate to ask me.

Good luck, and thanks, to anyone who wants to finish this up!

Download: [ATTACH]3596[/ATTACH]

Posted Image

pigmod.zip

Edited by WrathOf
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
  • Create New...