Jump to content

Recommended Posts

I need help coding traits for my custom character.

As an either or situation, I need him to be able to have more movement speed if his health falls to 30 or below if he doesn't have a weapon wielded at the cost of sanity or he can receive a damage boost when his health falls to 30 or below (with a defense bonus if that's possible) and I also would like for him to do more damage to all boss monsters (not much more than normal, but just a bit more).

The main problem is that I don't know the coding for any of these traits and I also don't know where to put the coding.

Any help is appreciated.

On an unrelated note to the topic, I also need help with adding custom dialogue. Not the descriptions of items, but the battle cry speech or announcing incoming hounds or crafting failure as some examples. Just like my original post, I don't know what the coding is or where to put it.

Like I said before, any help is appreciated.

inst:ListenForEvent("healthdelta",function(inst,data)
    if data and data.newpercent and data.newpercent < 0.2 then
--Insert Buffs
    else
--Undo Buffs
    end
end

You can attach a speech file using "require", check other character mods for examples.

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