Jump to content

Recommended Posts

Hey, everyone! Im trying to make a mod adding the character "Father" from Kid's Next Door to the game, and i've already got the character himself almost done, and the scripting for him and such. (I literally had no prior experience to scripting, and most of it is just cut and paste from other files XD)

Well, its all pretty much done as I said, and i'm modding for my own fun after I get home from school. I noticed he seemed pretty overpowered, and I thought maybe to make him first pretty weak "Benedict Uno/Wigglestien" and that you unlock the "Father" form by crafting his pipe.(not to mention, Wigglestien fits with the "W" theme.)

Getting to the point, is there a way to change his appearance, powers and statistics once he equips the pipe at the cost of sanity? How would I go about doing it?

Thanks for listening...reading...um... Thanks!

 

  • Developer

Hey, everyone! Im trying to make a mod adding the character "Father" from Kid's Next Door to the game, and i've already got the character himself almost done, and the scripting for him and such. (I literally had no prior experience to scripting, and most of it is just cut and paste from other files XD)

Well, its all pretty much done as I said, and i'm modding for my own fun after I get home from school. I noticed he seemed pretty overpowered, and I thought maybe to make him first pretty weak "Benedict Uno/Wigglestien" and that you unlock the "Father" form by crafting his pipe.(not to mention, Wigglestien fits with the "W" theme.)

Getting to the point, is there a way to change his appearance, powers and statistics once he equips the pipe at the cost of sanity? How would I go about doing it?

Thanks for listening...reading...um... Thanks!

Looking at the 'inventory' component found in 'inventory.lua', it looks like it pushed an event called 'equip'.  You should be able to listen for that event using the 'ListenForEvent' function.  At that point you can do whatever you want with the player.

 

As far as changing the appearance, if you look at the 'MakePlayerCharacter' function in 'player_common.lua', it shows how the name of the player is used to set it's build.  A build is basically the set of images and offsets that make up a character so if you loaded a seperate character build and changed the build after equipping the pipe, I think you can achieve what you want.  You might also want to change the transition with some kind of smoke effect :).

  • Developer

Since you are making the pipe item from scratch, you might as well put the transformation in the equip function for the pipe instead of listening for the equip event (that's just an extra step to take).

That's an  even better suggestion :).

Actually, check out my Link mod - it swaps anim build on Tunic equip - I didn't think of it before, but you could use the exact same method to swap to a very different model, and change the stats at the same time; changing the model and stats back on unequip.

 

And if you need more help, check out my guide to making characters/items in the pinned 'getting started' thread, assuming you haven't already.

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...