HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

A couple of issues

11-02-2004, 10:51 PM#1
Quitch
My GF has played a few games with AMAI 2.40 and in one of them I noticed a couple of things. I've attached the replays (maps were stored in an AMAI folder under Maps)

1. Her ally in the 2v2v2 didn't build a hero until the 7th minute. It sent one of its first ghouls to the Tavern in the centre, but did not purchase a hero, rather moved the ghoul up north to harass an enemy base. It was not until several minutes later (after quickly teching to necros and statues) that it finally built a lich at the same time as it bought a neutral hero.

2. At about 14 minutes Orange attacks and is attacked in the centre. Orange then proceeds to flip-flop between attacking and retreating and ends up losing its entire army while doing almost no damage in return.
11-03-2004, 01:06 AM#2
Zalamander
Most of this is pretty much irrelevant, 2.41 is now released with plenty of bugs fixed.

I think the buying ghoul going to harass instead is a bug we can fix, for next version, it should rarely occure.
11-25-2004, 06:40 PM#3
Guest
Well I see still see this bug happening so I guess you didnt fixed it yet, but afaik this one happens if the ai wants a specific hero which has already been chosen so it just proceeds to the next action in the queue. I at least think it might be one of the situations which causes this bug. :/
12-13-2004, 09:04 AM#4
Quitch
This flip flop behaviour still occurs. The AI will let its units strike a blow, then fall back slightly, then strike another blow, then fall back a bit. I can't tell if it's trying to retreat, or if it's trying to regroup its troops as a mass or beyond my troops. Either way, it's a massacre, I hit its units the whole time, while it only strikes the odd blow. Whole armies fall in this fashion.
12-13-2004, 05:24 PM#5
peon
Quote:
Originally Posted by Dreadstomp
Well I see still see this bug happening so I guess you didnt fixed it yet, but afaik this one happens if the ai wants a specific hero which has already been chosen so it just proceeds to the next action in the queue. I at least think it might be one of the situations which causes this bug. :/

I had this problem too (ie not buying neutral heroes). The other possibility could be the lagging game. When the game lags while the ghoul arrived the traven, it might skip the buying procedure and jump to other things...

All I did was:

Search for "function BuyNeutral" in common.ai

Change:

if dist < buy_distance then
call IssueImmediateOrder(neutral_sent[nn], "stop")
call IssueNeutralImmediateOrderById(ai_player, buy_place, old_id[id])
if buy_time_small[nn] < 0 then
set buy_time_small[nn] = current_time
endif

To:

if dist < buy_distance then
call IssueImmediateOrder(neutral_sent[nn], "stop")
call Sleep(0.2)
call IssueNeutralImmediateOrderById(ai_player, buy_place, old_id[id])
call Sleep(0.3)
if buy_time_small[nn] < 0 then
set buy_time_small[nn] = current_time
endif

2 call Sleep() functions added to make sure the ghoul arrives and stops at the traven.

I don't guarantee, but have a try ^_^
12-14-2004, 11:28 AM#6
AIAndy
Sleeps are not allowed in there (it belongs to the job thread and with sleeps in there you prevent other jobs from running).
I will check if it can happen that the ghoul is chosen for harassing.
12-14-2004, 10:01 PM#7
peon
Quote:
Originally Posted by AIAndy
Sleeps are not allowed in there (it belongs to the job thread and with sleeps in there you prevent other jobs from running).
I will check if it can happen that the ghoul is chosen for harassing.

Oh! Sorry Quitch and AIAndy!

I have to correct it too!

:b
12-15-2004, 10:30 PM#8
AIAndy
I actually found the bug that allowed a unit to be chosen for buying and then still added to the attack group or harassing.
Fixed.
I hope that will prevent the hero not bought or army without hero problems.
12-16-2004, 07:33 PM#9
peon
Quote:
Originally Posted by AIAndy
I actually found the bug that allowed a unit to be chosen for buying and then still added to the attack group or harassing.
Fixed.
I hope that will prevent the hero not bought or army without hero problems.

You saved the day. Thanks!

^_^
12-17-2004, 08:13 AM#10
Quitch
Quote:
Originally Posted by AIAndy
I actually found the bug that allowed a unit to be chosen for buying and then still added to the attack group or harassing.
Fixed.
I hope that will prevent the hero not bought or army without hero problems.

One down, flip-flop issue to go :)