Jump to content

Excluding races from a damage effect.


jkruse05

Recommended Posts

No DLC race conditions were ever added, only ever vanilla, which is why I uninstalled Automatron, for more accurate testing.

 

The save I run from is set up specifically for testing, it is pure vanilla except for a single mod (Cheat_Engine) and DLC. I use the console to give myself the needed equipment every time I test. The only way I could test with a cleaner save would be to start a completely new game. (although removing Automatron may have messed with something, but it already wasn't working on vanilla races, like synths and workshop turrets, before I decided to remove it.)

 

What I'm trying to do is make so the standard laser guns will always apply a fire effect, similar to the one on certain receivers, but I want to make it only happen on organic enemies. There are way too many organics to use them as INclusive conditions (== 1), so I'm trying to EXclude the mechanical races instead (== 0 or != 1).

I've done something similar before, with Institute Electrolasers. That works perfectly fine, except the conditions are INclusive, to have a sort of EMP effect only on mechanical enemies. What I'm trying to set up for the regular lasers is nearly identical except it uses the fire shader instead of electrical, and I'm trying to invert the conditions. The image in my original post is the effect from Institute Electrolasers that works.

Right now the conditions simply do nothing if set to EXclude (== 0 or != 1) the mechanical races, the fire damage applies on every enemy. If I set them to be INclusive (== 1) then they apply ONLY to the mechanical races, just like in Institute Electrolasers.

Edited by jkruse05
Link to comment
Share on other sites

That's very interesting. Well, if you don't hurry, I might try to test it in my game when have some time to tinker with it.

I also suggest you trying to use HasKeyword conditions instead of races. The ones you can use are :

HasKeyword ActorTypeRobot and ActorTypeTurret . They are used by all DLCs for all mechanical races. And you can further define them by checking the Institute Faction Rank or something else.

This allows to reduce the number of conditions and make the gun universal for any DLC.

 

And akiras404 has pointed at an interesting thing. When you set conditions "==1" it strictly checks if the race is the one you used in the condition. With "==0" or "!=1", it checks if the race is just not the same from the condition. So , probably, when you use "or" , it checks the first condition, and if the race is not the same as the race in the condition, it just applies the effect and does not check other conditions at all because they are "or".

I'm surprised no one of us including myself ever thought of this :D

Edited by kitcat81
Link to comment
Share on other sites

Isn't it "and" you want to do?

Not(a or b or c) means (not a)and(not b)and(not c).

From my understanding using 'and' would mean that a subject must be 'a and b and c' all at once in order to be excluded. At least, that's how it works with being INcluded (== 1) in an effect. I'll give it a try though.

 

Also, I'll dig through the ActorType Keywords. If they cover everything I want it to that will make both this mod and Electrolasers much more efficient.

Edited by jkruse05
Link to comment
Share on other sites

 

Isn't it "and" you want to do?

Not(a or b or c) means (not a)and(not b)and(not c).

From my understanding using 'and' would mean that a subject must be 'a and b and c' all at once in order to be excluded. At least, that's how it works with being INcluded (== 1) in an effect. I'll give it a try though.

 

Also, I'll dig through the ActorType Keywords. If they cover everything I want it to that will make both this mod and Electrolasers much more efficient.

 

 

Yes, it works like this with "==1", but with "!= 1" or " ==0" it 's not the same. Set it to "and", it will actually mean exactly what you need. Akiras404 is right .

The Actor is HandyRace and RobobrainRace and EyebotRace - this is impossible and will not work properly.

The actor is not HandyRace and not RobobrainRace and not EyebotRace - this is exactly what you want.

 

If you do it with "or" it thinks like this :

The actor is not HandyRace or - here it checks and the actor is not HandyRace. So the conditions are met even if the actor is RobobrainRace and the effect is applied.That 's because for a group of "or" conditions it's enough if only one of them matches.

Edited by kitcat81
Link to comment
Share on other sites

 

The actor is not HandyRace and not RobobrainRace and not EyebotRace - this is exactly what you want.

Ahhhh, now that makes sense. Trying it now. If that works I'll test with Actor Keywords.

 

Update: Everything is working beautifully now, swapped as many conditions as possible over to HasKeyword and now there are only about 6, instead of 15-20, and one version should cover any combo of DLC. Thanks for all your help, should see a release tonight or tomorrow.

Edited by jkruse05
Link to comment
Share on other sites

  • Recently Browsing   0 members

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