Post by Zensi on Aug 26, 2017 22:14:11 GMT
Been a while since I posted about new ai, so I figured it was a good time to add more.
This is a subtle difference and in most cases, it doesn't make a difference. However, could be troublesome in a few specific cases. One would be if you destroy a room before the shield goes down
vs
The first case you give the rooms order priority, in the second you give the shield order priority. So in the first case you are more interested in getting the rooms in a certain order, in the second you want to hit them giving more emphasis to the shield.
So taking the example of destroying a room before the shields of both ships go down, you would go onto the next room. However, if that room is put back online just before you lose full shields, the first example would target it again. In the second example, it might change to the next target.
This is something you won't experience very often since it is a rather rare condition, but it is good to keep in mind
This code is to rotate the target between different rooms of the same type
As long as one of the ships recover shields momentarily, it will lose the hold on Room B and refocus on A. Once the shield goes down again, it retargets Room B. I like Ship HP < 100 rather than None, or other conditions since it will target room A for a bit longer.
Also, I've seen people mixing the order of some conditions. You need to have the order from the most restrictive to the least. Here is an example
This would have the ai using the more restrictive case. If you use any other order, it might use the less restrictive case over the other. So putting the 50 or 100 above the 25, would prevent your ai from ever triggering the 25% condition. The same is for room HP or other conditions similar to this in concept
This is a subtle difference and in most cases, it doesn't make a difference. However, could be troublesome in a few specific cases. One would be if you destroy a room before the shield goes down
Your Ship Has Full Shield : Target Enemy Room A
Enemy Ship has Full Shield : Target Enemy Room A
Your Ship Has Full Shield : Target Enemy Room B
Enemy Ship has Full Shield : Target Enemy Room B
Your Ship Has Full Shield : Target Enemy Room C
Enemy Ship has Full Shield : Target Enemy Room C
vs
Enemy Ship has Full Shield : Target Enemy Room A
Enemy Ship has Full Shield : Target Enemy Room B
Enemy Ship has Full Shield : Target Enemy Room C
Your Ship Has Full Shield : Target Enemy Room A
Your Ship Has Full Shield : Target Enemy Room B
Your Ship Has Full Shield : Target Enemy Room C
The first case you give the rooms order priority, in the second you give the shield order priority. So in the first case you are more interested in getting the rooms in a certain order, in the second you want to hit them giving more emphasis to the shield.
So taking the example of destroying a room before the shields of both ships go down, you would go onto the next room. However, if that room is put back online just before you lose full shields, the first example would target it again. In the second example, it might change to the next target.
This is something you won't experience very often since it is a rather rare condition, but it is good to keep in mind
This code is to rotate the target between different rooms of the same type
Your Ship has Active Shield : Target Enemy Room A
Enemy Ship has Shield : Target Enemy Room A
Your Ship HP < 100% : Target Enemy Room B
As long as one of the ships recover shields momentarily, it will lose the hold on Room B and refocus on A. Once the shield goes down again, it retargets Room B. I like Ship HP < 100 rather than None, or other conditions since it will target room A for a bit longer.
Also, I've seen people mixing the order of some conditions. You need to have the order from the most restrictive to the least. Here is an example
Current HP < 25%
Current HP < 50%
Current HP < 100%
This would have the ai using the more restrictive case. If you use any other order, it might use the less restrictive case over the other. So putting the 50 or 100 above the 25, would prevent your ai from ever triggering the 25% condition. The same is for room HP or other conditions similar to this in concept