Jump to content

Please help in modding the character!!!!


Recommended Posts

Hi, everybody. This is my first post on this forum and I had a few problems modding my character's abilities...I'm generally a noob in this whole modding topic.

Okay, here are a few points I need:

1. how Do I make my character lose his mind in the morning, and in the evening and at night he is not lost ?(I saw several answers about this question, but for some reason I got an error....I don't understand what I'm doing wrong. ((((()

2. how do I give the ability to use Maxwell's book?

3. I need my character to take damage from sweet food.(by the type of honey, toffee. dishes made from honey and so on. except berries.)

Where should I write scripts at all ? in modmain or to a file of your character..?

I hope these questions are not very difficult.... I also apologize for my English

Link to comment
Share on other sites

This will be your main character if you're not making yours from scratch,

tags in characters are usually for crafting or special abilities, so check Maxwell's code for clues.
for food's that deal damage check the component for edible see if you can gleen any code that can help
 

image.thumb.png.e59517fe61ada330b7411620e6af9176.png
image.png.376ff9bff091049610cd190056a12684.png
All the code you need to find are in these 2 files/folders

If you're getting into coding, than you should read through the code and see how it works before trying anything.

Link to comment
Share on other sites

I'm pretty sure I know of a way to make them take damage from eating certain foods and food types, if you're still working on the mod let me know and I could look into it, but I'd advise looking at WX78's prefab as he uses an OnEat() function which is called every time he eats to check for gears, if you did something like this for your character and instead checked for "sweeteners" then you changed the function to inst.components.health:dodelta(-damagevalue) it should work, just not you might have to make it so the healing of the item also gets negated somehow. I've done something similar with individual foods but I haven't looked into how food types work yet so it might require more investigating.

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