Auto Keep something wrong?

If you have any problems or issues, post them here
Post Reply
Fwooshers
Posts: 17
Joined: Mon Sep 20, 2010 3:27 am

Auto Keep something wrong?

Post by Fwooshers »

Issit just me or does the auto keep get a little wonky now?

Ever since the v5.0 update. if my chars run too far away they stop attacking. same applies to knockback.

But only sometimes!

Anyone know the reason why?
Fwooshers
Posts: 17
Joined: Mon Sep 20, 2010 3:27 am

Re: Auto Keep something wrong?

Post by Fwooshers »

bump, anyone else having this problem, or just me? o_o
Bionic
Posts: 107
Joined: Mon Jun 28, 2010 1:17 am

Re: Auto Keep something wrong?

Post by Bionic »

Below is info taken from another AI site.
There was added new function called "SCR_ATTACKER_TS_MOVE_PREVTS", introduced with changes to original AI, IMC tweak keep mode to don't turn off so quickly when
melee character run to far away. The trouble is that game also use it when you use Call() function (F4) and you chars move to far from each other (this is hard coded behavior)
in earlier versions there was only "SCR_ATTACKER_TS_MOVE" function, older modified AIs don't have it, this cause your chars stuck in non-exist function.

Funny thing is that ai.ipf in v5.0 sGE client contains older AI, to get new one you have to get it directly from executable file.

You could wait for new AI or edit existing one. Basicly you only need to copy paste "SCR_ATTACKER_TS_MOVE" function inside attacker, healer and puppet scp files and
change it name to "SCR_ATTACKER_TS_MOVE_PREVTS".
To solve the issue, some AI author change TS_Keep function to TS_Assault on the AI but it does not solve the root cause.

FYI
Filou
Posts: 15
Joined: Fri Jun 11, 2010 2:14 am

Re: Auto Keep something wrong?

Post by Filou »

Same issue, Keep mode work bad now
PKO88
Posts: 8
Joined: Fri Dec 04, 2009 4:38 pm

Re: Auto Keep something wrong?

Post by PKO88 »

Bionic wrote:Below is info taken from another AI site.

To solve the issue, some AI author change TS_Keep function to TS_Assault on the AI but it does not solve the root cause.
I feel so proud, that my words are cited by others :). One thing to clarify, "SCR_ATTACKER_TS_MOVE_PREVTS" refer to only one function there are two others for healer and puppet. Also [...]_PREVTS have some side effect (hardcoded, beyond lua part of AI) causing AI having trouble with IsNearFromKeepDestPosition() & KeepDestMoveTo() functions, that can break your AI if you using first of these two. It is most noticable when leading char run far away and two others run to him (because game automaticly change tactic to [...]_PREVTS) in mean time leader move beyond keep range and go back to keep position and these to chars run to his old position and after reaching it go back to keep position also. Best to use ShowInfo() to see this behavior. In the end KeepDestMoveTo() work good but IsNearFromKeepDestPosition() don't recognize right keep position, insteaded it use position when [...]_PREVTS meets arrival check (with is in leader position when this function was triggered). This don't happens always i'm still not sure how this works exacly. I now trying to fix it by arrivals check and new command KeepAlone().
Post Reply