Aller au contenu

Photo

Tactics: Use Current Condition for next tactic?


  • Veuillez vous connecter pour répondre
79 réponses à ce sujet

#1
Robberthooij

Robberthooij
  • Members
  • 10 messages
Would very much like to see a Bioware Dev, or anyone else ofc ;) give us some explanation of the 'Use condition for next Tactic' rule.

I've been trying it out in many ways but most fail. Is it currently working as intended? Or can we expect a fix or clarification on how it works exactly. The tactics system can go very deep and is one the most interesting aspects of the game to me. At the moment using the jump command creatively does the same trick but uses so many more lines.


Based on the assumption that when you use 'use current condition', the tactic system will automatically go to next line afterwards (instead of going back to top) This is where I think it fails at the moment:

01 if condition X --> use current condition for next tactic   (go to next line)
02 (if condition X in effect) --> if condition Y --> use: Ability 
03 next tactic

results:
- if condition Y and X are positive, rule02 ability will be used, back to top.
- if only condition X is positive, no ability usage, line 03 will be used
- if only condition Y is positive, rule 01 will be skipped, rule 02 abiltiy will be used

so, if any condition (in this case, condition X) is false, it will skip to next line (this rule is what tactic system is built upon) This basic rule kinda ruins the whole idea of current condition usage. IT WILL use this line02 anyway, regardless of condition X being true or false.

In my head it can not work without having a condition that tells u to jump over rule 02 if condition X is failed. Making it pretty redundant.

But I might be stuck in a brainloop or something atm not seeing the right application.. Can someone enlighten me with a good example of using 'Use current condition for next tactic' ? Or any explanation at all?

Would be most helpful!

Modifié par Robberthooij, 16 mars 2011 - 10:49 .


#2
Mark B

Mark B
  • Members
  • 461 messages
I used this to stop companions guzzling down stamina potions after the last guy was dead, which had happened a couple of times so I put;

At least one enemy left alive; use next
Stamina < 25%: Use item.

This seemed to work as I didn't see it reoccur after adding the first tactic to my original instruction.

#3
Tekman9

Tekman9
  • Members
  • 263 messages
hmmm good breakdown, never really read about the tactics system before

#4
Athelstan TW

Athelstan TW
  • Members
  • 5 messages
I suspect that "Use current condition for next tactic" is an AND IF condition for the following tactic. Making both 01 and 02 conditions must be met for 02's action to be taken, or it will ignore 01 & 02 and continue onto 03.

#5
Itkovian

Itkovian
  • Members
  • 970 messages

Athelstan TW wrote...

I suspect that "Use current condition for next tactic" is an AND IF condition for the following tactic. Making both 01 and 02 conditions must be met for 02's action to be taken, or it will ignore 01 & 02 and continue onto 03.


That is what I took it to mean as well. It seems to be working. For example, I'm got aveline using retaliation when:

- Surrounded by 4 or more enemies -> Use condition on next tactic
- Being attacked by melee attack -> Use Retaliation

That way she should only use retaliation when she is being attacked in melee AND is surrounded by 4 or more enemies.

It seems to be working for me, though it is admittedly difficult to test.

Itkovian

#6
Athelstan TW

Athelstan TW
  • Members
  • 5 messages
I just ran some tests, and it is indeed an AND, for connecting two IF statements.

#7
Tekman9

Tekman9
  • Members
  • 263 messages
i dont think you mean 2 if statements. i think you mean 1 if with 2 (and) conditions ?

#8
Athelstan TW

Athelstan TW
  • Members
  • 5 messages
Yes, you are correct. I have been so focus on thinking each tactic slot as one if statement. LOL~

#9
blueyedsoul

blueyedsoul
  • Members
  • 26 messages
Each tactic slot is an if statement. If you were writing it in pseudo-code it would look something like this:

If (condition 1) Then Execute A End
If (condition 2) Then Execute B End
.
.
.
If (condition X) Then Execute X' End

Whereas based on the logic above it looks like this nests an if statement like:

If (condition 1) Then
If (condition 2) Then Execute B End
End

Alternately, you could say:

If (condition 1 and condition 2) Then Execute B End

So either way of thinking about it is correct, but many programming languages do not have the AND statement for compound boolean logic.

#10
Ernie4711

Ernie4711
  • Members
  • 13 messages
I did not much testing about this but I have an idea how I WANT this to work.
Imaging the following tactics

01 if condition A is true -> use condition for next tactic
02 if condition B is true -> use condition for next tactic
03 if condition C is true -> use condition for next tactic
04 if condition D is true -> action X
05 if condition E is true -> action Y

I expect the game to behave like this:

IF A is true AND B is true AND C is true AND D is true THEN TRY action X
IF E is true TRY action Y

I could write up the rules in ANY order and I expect them to get the same results.
The game has to check ANY target if it matches all conditions. It must not stop the search for the right target if one target matches condition A and B but not C when there is another target that matches all. I doubt that the game implements this correctly at the moment...

Modifié par Ernie4711, 19 mars 2011 - 12:50 .


#11
MachDelta

MachDelta
  • Members
  • 432 messages

Ernie4711 wrote...

I did not much testing about this but I have an idea how I WANT this to work.
Imaging the following tactics

01 if condition A is true -> use condition for next tactic
02 if condition B is true -> use condition for next tactic
03 if condition C is true -> use condition for next tactic
04 if condition D is true -> action X
05 if condition E is true -> action Y

I expect the game to behave like this:

IF A is true AND B is true AND C is true AND D is true THEN TRY action X
IF E is true TRY action Y

I could write up the rules in ANY order and I expect them to get the same results.
The game has to check ANY target if it matches all conditions. It must not stop the search for the right target if one target matches condition A and B but not C when there is another target that matches all. I doubt that the game implements this correctly at the moment...



I'm pretty sure the game iterates through the tactics list until it finds a valid tactic, does that, and then starts at the top again. At least that's how I understood it.

#12
Ernie4711

Ernie4711
  • Members
  • 13 messages
I think a found a flaw in my previous post. I think now that the order of the conditions matter.
The reason is the hidden target selection which applies in every rule.

As described in the DAO wiki under http://dragonage.wik...ctics_Mechanics
we learn that there are conditions which select a new target and some which don't. While DA2 has added some conditions compared to DAO I assume most of the target selection logic of DAO apply also here while the new one's need documentation :)

:quote

# The enemy target is set using tactics from the Enemy condition tiers that result in an attempted attack. The following tactic conditions should be used to set or change a target.

* Enemy:Status
* Enemy:Lowest/Highest Health
* Enemy:Clustered
* Enemy:Nearest Visible
* Enemy:Nearest Visible class
* Enemy:Attacking Party Member
* Enemy:Target of Party Member
* Enemy:Rank

# The following will not change the enemy target but are used for conditions on the existing target. These conditions will be false if there is no target for the character

* Enemy:Any
* Enemy:Health
* Enemy:Has Armour Type
* Enemy:Target At Range
* Enemy:Target Using Attack Type

:end quote

Suppose we have the following tactics

01: Enemy:Health < 50% -> use condition for next target
02: Enemy:Rank is Elite -> Use Spirit Bolt

In this case the current target (if any) will be hit with Spirit Bolt if it's health is below 50% and it's rank is Elite.
If there is no current target nothing will happen. Not want we want in most cases.

Suppose we change the order of those rules

01: Enemy:Rank is Elite -> use condition for next target
02: Enemy:Health < 50% -> Use Spirit Bolt

In this case the game will look for any Elite and will then check if it's health is below 50% and than hit it with Spirit Bolt.
If the first Elite found has more than 50% health I expect the game to look for another Elite which has below 50% Health.
Only if no Elite can be found which has below 50% health the rule won't match. This is more like it.

So if you want a rule which ensures that the Elites go down as fast as possible you want to focus damage on one elite at a time

01: Enemy:Rank is Elite -> use condition for next target
02: Enemy:Lowest Health -> Use Spirit Bolt
03: Enemy:Rank is Elite -> use condition for next target
04: Enemy:Lowest Health -> Use Winter's Grasp
...

It would be nice if this could be simplified by saving lines but I don't think this works atm because the "jump to" action doesn't seem to save the target.

01: Enemy:Rank is Elite -> use condition for next target
02: Enemy:Lowest Health -> jump to 10
...
10: Enemy:Any -> Use Spirit Bolt
11: Enemy:Any -> Use Winter's Grasp

#13
Zan Mura

Zan Mura
  • Members
  • 476 messages

Robberthooij wrote...


01 if condition X --> use current condition for next tactic   (go to next line)
02 (if condition X in effect) --> if condition Y --> use: Ability 
03 next tactic

results:
- if condition Y and X are positive, rule02 ability will be used, back to top.
- if only condition X is positive, no ability usage, line 03 will be used
- if only condition Y is positive, rule 01 will be skipped, rule 02 abiltiy will be used


I don't use tactics myself, but by your admission if that's how it works, then you just need to insert a rule between 1 and 2 that states the tactic must move to rule 0. Like so, with multiple such conditions:

Rule | Action
00 | -
01 | IF case 1: Jump to rule 5
02 | IF case 2: Jump to rule 7
03 | IF case 3: Jump to rule 9
04 | Jump to rule 00
05 | IF case 1.1: Do X
06 | Jump to rule 00
07 | IF case 2.1: Do Y
08 | Jump to rule 00
09 | IF case 3.1: Do Z

Edited for a brain fart.

Modifié par Zan Mura, 19 mars 2011 - 11:45 .


#14
Robberthooij

Robberthooij
  • Members
  • 10 messages
Thanks everyone for the useful replies :)

After reading all this, i think there was a flaw in my thinking here:

01 if condition X --> use current condition for next tactic (go to next line)
02 (if condition X in effect) --> if condition Y --> use: Ability
03 next tactics (ending with a 'standard attack' -- this is an auto-back to rule01)

I falsely assumed that if condition X fails, that rule 02 will be used anyway.

I think the proper way it works is as follows:

The 'use next tactic', also inherits that next rule. so if rule01 fails, rule02 will fail with it, and it will properly run to rule03.

So what really happens:
if only condition Y is positive --> rule01 AND rule02 fail, rule 03 applies , attack, back to start.

Hope this is the case, shall give it a testing run :)

@ernie

/quote
It would be nice if this could be simplified by saving lines but I don't
think this works atm because the "jump to" action doesn't seem to save
the target.

01: Enemy:Rank is Elite -> use condition for next target
02: Enemy:Lowest Health -> jump to 10
...
10: Enemy:Any -> Use Spirit Bolt
11: Enemy:Any -> Use Winter's Grasp
/quote

Try this:

01: Enemy Rank is Elite -> jump to 10
...
09: Enemy: Any -> Attack
10: Enemy: Lowest health -> use Spirit bolt
11: Enemy: Lowest health -> use winters grasp
12: Enemy: Lowest health -> attack

I think this works as u want it to work. I use these tactics on most chars to give it an 'elite' and a 'normal' sequence.

Also, keep in mind the DA:O rules from the wiki are for DA:O, some things 'may' have changed in DA2.

Modifié par Robberthooij, 20 mars 2011 - 07:32 .


#15
Ernie4711

Ernie4711
  • Members
  • 13 messages
@Robberthooij

if you relook at the list above you will see that enemy:rank was a "select target" condition in DAO as well. I did notice as well that a few conditions were added in DA2. Most were inspired by a popular mod (advances tactics http://www.dragonage...file.php?id=181) which I was using as well so I'm not completely lost with the new tactic additions. I don't think much is changed but it would be really useful if we just knew :)

Considering your sample I fear that it would not work because the jump does not save the target.
It will jump correctly to 10 when the target's rank is elite. But then it selects a new target by the condition Lowest health and unloads those skills on those. At least if "Lowest health" is a selecting condition as I think it is.

#16
Skyorange

Skyorange
  • Members
  • 3 messages
So it doesn't seem like this question was resolved. I'm having a similar problem where for instance

1. Enemy: Target rank is Elite or higher > Use current condition for next tactic
2. Enemy: Target of Hawke > Horror

Rule two is being applied despite rule 1 not being in effect. Essentially my Horror is being burnt on ANYTHING Hawke is targeting whether its elite or not.

If this was resolved could someone tell me what I should fix?

#17
Waltzingbear

Waltzingbear
  • Members
  • 577 messages
Try to switch positions and see if it works.
Why would you even want such a tactic? can't you just use Horror on any Elite?

#18
Skyorange

Skyorange
  • Members
  • 3 messages
Switching positions just makes any target get horror cast I'm afraid.
And I don't have that tactic in use it was an example

#19
Zan Mura

Zan Mura
  • Members
  • 476 messages
Oh right, this topic. Had a good laugh about my post there, sound theory but obviously I was completely clueless to what this actually means in the game. Always happy to be useless though! :)

#20
OhoniX

OhoniX
  • Members
  • 508 messages
Great topic guys, I first found this feature the other day and have been trying to figure out how it works. Since we're talking tactics here, can anyone help me figure out a tactic for the following two outcomes:
1. A tactic that automatically turns OFF modes after combat has ended (but not before), for example Blood of the First, which serves no purpose outside of combat and only means that you enter combat at half-mana.

2. A tactic that, when an NPC is targeting an enemy also targeted by the controlled character, it stops that and targets anything else instead. Specifically my other characters keep kill-stealing from warrior Hawke, and since that's how he builds stamina, I'd prefer if he were fighting something, they'd aim for something else instead. I know there's a condition for "Enemy: Target of Controlled player" or something like that, but I can't figure out how to apply a result like I want, because "target something else" doesn't appear to be an option.

#21
Lumikki

Lumikki
  • Members
  • 4 239 messages
Sometimes the rule works, but not allways. Maybe it does depend of what the rules are or what order they are. Could be that some conditions can't be connected, because they don't define something right?

Example if I do this idiotic rule, it works.

1. Enemy: Rank boss: Use current condition for next tactic
2. Self: Health > 10% : Drink health potion

Basicly means if there is boss in battle field, that charcater should drink all health potions. *grins* How ever , it doesn't seem to drink potions when there is no boss. So, the rule checks does jump over the second one.

Modifié par Lumikki, 05 avril 2011 - 06:52 .


#22
OhoniX

OhoniX
  • Members
  • 508 messages
Ok, so I spent some time fiddling with the tactics. I figured out how to get the "no kill stealing" command in, like so:

1. Enemy: Target of Hawke (or Player, either works): Jump to Tactic 12
2-10 various other basic tactics
11. Self: Any : jump to tactic 17
12. Enemy: Highest Health: Attack

Now, what this does is, if the enemy they're targeting is also the one Hawke is targeting, they automatically seek out the highest HP enemy they can find. That means if the enemy is near death they tend to leave them alone, but it doesn't stop them from helping finish off the last enemy, or a high level boss with plenty of HP left.

There were some things I just couldn't get to work though. My understanding is that if you enter the command:
Self: Any : Jump to Tactic 17 (or the end of the list),
Then as soon as that entry is hit, they should automatically, no matter what, jump to the last entry, and then either fulfill it or if they can't, it cycles back to the start. Isn't that how it's meant to work? It doesn't seem to always work. On some commands it does seem to work, because they don't fire when I use that type of command to skip them, but some activate anyways.

Namely I'm having an issue with Merrill's Stone's Throw. I tried this command:
3. Self: Health<10 : Jump to Tactic 12
11. Self: Any : jump to tactic 17
12. Ally: Nearest : Stone's Throw

Now, to my mind, that means that 12 should NEVER get hit unless the condition of 3 is fulfilled, because it should automatically skip the back of the list if it reaches 11, right? Instead, she uses it ASAP, as soon as combat is started and the ability is available, even with full HP, she will use Stone's Throw as often as possible. I've tried troubleshooting it. I replaced Stone's Throw with Tempest, and it has the same effect, she'll cast Tempest at every opportunity. I tried removing the "3" condition entirely, but it still somehow pops up in here queue, even though it should be skipped entirely without its refferer. I also tried messing with the Ally options and the Health conditions, they all gave the same response. I'm not sure what the issue is.

#23
feldamir

feldamir
  • Members
  • 2 messages

OhoniX wrote...

Namely I'm having an issue with Merrill's Stone's Throw. I tried this command:
3. Self: Health<10 : Jump to Tactic 12
11. Self: Any : jump to tactic 17
12. Ally: Nearest : Stone's Throw


I think if you put a "self:health>10% : skip tactics" above stone's throw, then it shouldn't trigger when you don't want it to, since it is doing so because the entire list gets read through however often. However, I have no idea if skip tactics skips everything below, or just the next.

#24
OhoniX

OhoniX
  • Members
  • 508 messages
Yeah, it would really help if Bioware would release definitions for what each clause is meant to do, as some of them are quite vague. I tried putting a "wait" clause at the bottom of the list once, but that causes the character to you stop dead and stare into space at the end of combat. ;)

#25
nickan1022

nickan1022
  • Members
  • 73 messages

OhoniX wrote...

Ok, so I spent some time fiddling with the tactics. I figured out how to get the "no kill stealing" command in, like so:

1. Enemy: Target of Hawke (or Player, either works): Jump to Tactic 12
2-10 various other basic tactics
11. Self: Any : jump to tactic 17
12. Enemy: Highest Health: Attack

Now, what this does is, if the enemy they're targeting is also the one Hawke is targeting, they automatically seek out the highest HP enemy they can find. That means if the enemy is near death they tend to leave them alone, but it doesn't stop them from helping finish off the last enemy, or a high level boss with plenty of HP left.


Based on the way I understand "Enemy: Target of Hawke" works, I'm not sure how 2-10 are ever getting evaluated unless your Hawke doesn't have a target.  That condition appears to be a "target setter", not a "current target evaluator".  Reading your script then, it would work like this:

1. Take Hawke's target, and then jump to tactic 12
12. Take the enemy with the highest health as a new target, and attack it

Functionally it does what you want, but you could also just put in "Enemy: Any" for line one and get the same result.


With the Merrill tactics, have you tried playing with the health value?  I know the < 25% health works fine, as does < 10% mana...  I don't use < 10% health for very much nor have I tested it deeply to see if it works.  I'm going to think about your Merrill problem and put in a separate response for that issue.