Jump to content

Trouble with Conditions in Enchant


Worsin

Recommended Posts

I'm having trouble with some conditions in my Fallout 4 mod...perhaps someone here can point out what i may be doing wrong.


In the image below i have a series of Magic Effects being loaded by an Enchant. The first one in the list works fine when i have the attached globals set to the right numbers in game using the console. The second in the list however does not work using Cogsworth as a test subject. Basically, it seems as if the GetIsRace will not work. Cogsworth is indeed of the MrHandy race but when setting the global values to use Effect #1 it fails to apply the effect. If i remove the GetIsRace it works fine. Its only when i use GetIsRace that it fails.


I've also tried HasKeyword using the ActorTypeRobot and it does not apply the effect to Cogsworth, the strange thing is that if i use ActorTypeHuman it actually does show on Cogsworth which should not be the case since he is not a human.


9I2pCur.png

Link to comment
Share on other sites

If subject.getisid is player can not be handyrace. So I guess you should use target instead of subject.

But I don't know... to be honest, your post seems to lack some basic information, no offense...

Link to comment
Share on other sites

If subject.getisid is player can not be handyrace. So I guess you should use target instead of subject.

But I don't know... to be honest, your post seems to lack some basic information, no offense...

 

I tried removing the player condition but still does not work.

 

Exactly what "Basic Information" do you think I am lacking. I posted the entire set of conditions showing 1 set that works and another that does not work. Not sure what else one would need to offer advice.

 

I appreciate the input though.

Link to comment
Share on other sites

Indeed the post has a lot of detail, but when it comes to conditions it is important to know who have the enchantment, is it attached to Codsworth or to the player? If the player has the enchantment then subject is player and target is Codsworth, subject can not be player and Codsworth at the same time, so I guess that, if you remove the GetIsRace condition and then it works, it should be target.GetIsRace instead of subject.GetIsRace. That's what I mean, you didn't tell where the enchantment is attached, so we can't know if Codsworth is the target or the subject. On the other hand, if you explain what you are willing to achieve it would help to figure out the problem.

Link to comment
Share on other sites

Indeed the post has a lot of detail, but when it comes to conditions it is important to know who have the enchantment, is it attached to Codsworth or to the player? If the player has the enchantment then subject is player and target is Codsworth, subject can not be player and Codsworth at the same time, so I guess that, if you remove the GetIsRace condition and then it works, it should be target.GetIsRace instead of subject.GetIsRace. That's what I mean, you didn't tell where the enchantment is attached, so we can't know if Codsworth is the target or the subject. On the other hand, if you explain what you are willing to achieve it would help to figure out the problem.

 

Ok allow me to back up a bit and explain my goal..perhaps this will help more. I apologize if i have not been clear, I don't usually post for help lol.

 

The enchant essentially casts an Effect Shader on NPC's to highlight them. Right now i have it set up where its highlighting either friendly, enemy or corpses successfully. These work perfect so far. The next goal is to provide a way to highlight ONLY a certain type of NPC like Robots or Synth.

 

The enchant is currently attached to an Object Modification (Pair of Sunglasses) and i've figured out that the enchant is being cast on me the player. The trick now is how do i get the effect that is cast on myself to only highlight a certain actor type.

 

The enchant is set up like this

 

Object Effect >> Magic Effect >> Spell >> Magic Effect containing the Effect Shader

 

So in summary the effect is attached to player and the target is Cogsworth (or any NPC filtered by a keyword or race)

Link to comment
Share on other sites

I think the problem could be that the condition should be in the magic effect (or somewhere lower in the chain, maybe in the script if the MGEF has a script attached) somehow, because this enchantment is set to "Target type => Self", so the target and the subject are the same.

Edited by DieFeM
Link to comment
Share on other sites

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...