Jump to content

Recommended Posts

4 hours ago, Monti18 said:

It's possible, have a look at the Playable Pets mod to see how they did it.

https://steamcommunity.com/sharedfiles/filedetails/?id=622471256

Thank you for sharing this awesome mod! After a search through the files though, I've realized this may be out of my modding capabilities lol

Haha don't say that! :D

I just had a look, it seems like this mod is more complicated than I thought, so to make it easier for you:

It calls PlayablePets.SetCommonStats, which in turns sets

inst.AnimState:SetBank(mob.bank)
inst.AnimState:SetBuild(mob.build)
inst:SetStateGraph(mob.stategraph)

for the pigman.

In this case, this would be 

inst.AnimState:SetBank("pigman")
inst.AnimState:SetBuild("pig_build")
inst:SetStateGraph("SGpigmanp")

You would need to add this to the master_postinit of your character prefab.

This mod added an own stategraph for the pigman player, if you want to use it only for yourself, you can take it, otherwise ask the mod creator if you can use it or use the normal stategraph of the pig, SGpigman, which could make some problems as I'm not sure if everything a player can do is defined there.

  • Like 1

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
×
  • Create New...