Jump to content

[Help] Modded Character issue


Recommended Posts

Greetings,

I've been developing a lot of custom modded characters lately.
The one i'm currently doing requires for nightmare creatures to ignore them, That's pretty much it.

I've tried adding tags : "monster", "shadow" & "shadowdominance" or well I've forgotten the 3rd name.

Any Ideas on how to make this work? I'd greatly appreciate new information.

Link to comment
Share on other sites

2 minutes ago, Lumina said:

There is a/an helmet doing this, the bone helmet maybe ? Try looking at the code. Also, copying here your code could be helpful for people wanting to help.

Shadowdominance is that specific tag.

My code is simply the entire extended character template.

I just want it to be so that shadow creatures ignore my character..

Not sure to why shadowdominance didn't work though.

Link to comment
Share on other sites

There is a component shadowsubmissive.lua


function ShadowSubmissive:TargetHasDominance(target)
    return target ~= nil
        and target.components.inventory ~= nil
        and target:IsValid()
        and target.components.inventory:EquipHasTag("shadowdominance")
end

So maybe it's only if your equipment has the related tag, not your character ?

Link to comment
Share on other sites

1 minute ago, Lumina said:

There is a component shadowsubmissive.lua


function ShadowSubmissive:TargetHasDominance(target)
    return target ~= nil
        and target.components.inventory ~= nil
        and target:IsValid()
        and target.components.inventory:EquipHasTag("shadowdominance")
end

So maybe it's only if your equipment has the related tag, not your character ?

ah, I could then modify that and give my character a custom tag like "shadowfriend" then update the current shadowsubmissive code.

Not too entirely sure how I'd do that last part though?... remove the inventory part? and just have as HasTag?

 

Link to comment
Share on other sites

1 minute ago, Lumina said:

I don't know what is the way to do it but you should keep things compatible with base game and ensure that people using the hat will not lose the effect. So maybe just add a check for your custom tag ?

That's what I mean... like instead of


        and target.components.inventory:EquipHasTag("shadowdominance")

It'd be this V

        and target.components.inventory:EquipHasTag("shadowdominance") or target:HasTag("shadowfriend")
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...