Jump to content

Game gets confused with too many conditions?


firepower02

Recommended Posts

I made an ability that uses a script to change outfits. I gave it conditions based on when I want them to wear it, and made another ability to switch back with opposite conditions. For example I want my follower to wear a certain outfit when it's raining and it's outside, or when swimming regardless whether indoor or outdoor. Change back, when it's not raining and not swimming, or when indoors even it's raining, but not swimming. Sometimes the follower does not follow the conditions. Maybe I made the condtions wrong?

 

To Change Outfit

IsRaining == 1 AND

IsInInterior != 1 OR

IsSwimming == 1 OR

 

To Change Back

IsRaining != 1 AND

IsSwimming != OR

IsInterior == 1 AND

IsSwimming != 1 OR

Link to comment
Share on other sites



By default, all Conditions are set to be run with an AND operator between themselves and the condition that follows them. The OR checkbox is used to override this behavior, and replace the operator following this condition with an OR instead. In the Condition List, consecutive ORs are treated like a single block when evaluating and have order precedence over AND.


For example, the condition items: A AND B OR C AND D are evaluated as ( A AND ( B OR C ) AND D ) and not as ( ( A AND B ) OR ( C AND D ) ).


HTH

Link to comment
Share on other sites

I get really confused with the conditioning.

 

With your suggestion, for changing outfit when wet. Does it work when inside and swimming? I'll try it on CK. I'm still trying to decide if snowing is considered getting wet or not. Also, is there condition when you're in shallow water, or underneath a waterfall?

 

edit: I tested the condtions, it won't work when indoors, and swimming.

Edited by firepower02
Link to comment
Share on other sites

Sorry I misunderstood what you wanted (and was busy)
For wet (including indoors)

IsSwimming == 1 OR

IsRaining == 1 AND

IsSwimming == 1 OR
IsInInterior != 1 AND

 

 

For dry

 

IsSwimming != 1 AND

IsRaining != 1 OR

IsInInterior == 1 AND

 

I don't know about the other variables, was just trying to help fathom out the logic :smile:

Link to comment
Share on other sites

Sorry I misunderstood what you wanted (and was busy)

For wet (including indoors)

 

IsSwimming == 1 OR

IsInInterior != 1 AND

IsRaining == 1 AND

 

For dry

 

IsSwimming != 1 AND

IsRaining != 1 OR

IsInInterior == 1 AND

 

I don't know about the other variables, was just trying to help fathom out the logic :smile:

 

If I understand it correctly, the game prioritizes the ORs, then the ANDs.

 

For your given conditions for the wet:

(swimming or outdoors) and raining

=

swimming and raining

or

outdoors and raining

 

Will change outfit only when it is both (swimming and raining), or it is both (outdoors and raining).

So what happens if it is only swimming, or only raining? Will it not take effect, since it has to be both swimming and raining at the same time?

 

 

For the dry:

not swimming and (not raining or indoors)

=

not swimming and not raining

or

not swimming and indoors

 

So it will change back only when it is both (not swimming and not raining), or if it is (not swimming and indoors). I don't see any problem here.

 

Is what I think about the conditions correct?

I don't understand why the game still changes back, even though it is still currently raining. Can't the game handle it, or I made an oversight.

Link to comment
Share on other sites

Very sorry, totally my bad but it does at least appear that you've understood the logic conditions that the game uses despite my error (or perhaps because of it).

For the wet change it should be :-

 

IsSwimming == 1 OR

IsRaining == 1 AND

IsSwimming == 1 OR
IsInInterior != 1 AND

 

It always irks me that you have to use an obsolete condition to force it to work.

Link to comment
Share on other sites

Don't worry, neither of us had the fault. I think the game has to wait like 2 in game days for it to use the newly edited conditions, or scripts or whatever. I tested it by using a different script, and the game still uses the old one.

Btw, for the wet outfit, I want it to happen when swimming, regardless of location, and when it's raining outside. So is it possible that I just add two of the same magic effects in one ability, the first one with the conditon is swimming, and the other one with the condtions is in exterior and is raining. To make it not so confusing.

Link to comment
Share on other sites

  • Recently Browsing   0 members

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