HomeUser Control Panel (unavailable in archive)ForumsTutorialsArt GalleryResourcesMaps

CaptainReadiness explanations?

12-29-2003, 10:08 PM#1
Tommi
Hi folks,

I'm wondering how CaptainReadiness functions work (I tried to search the forum but found no help). There are three of them, each returning an integer:
- CaptainReadiness
- CaptainReadinessHP
- CaptainReadinessMa (referring to mana?)

Some functions, such as CommonSleepUntilTargetDead, use these, e.g. exitwhen CaptainReadiness()<=40.

My question is how these three CaptainReadiness values are calculated?

And a related question: Are readiness functions the best way to assess the state of the attack group, or should I use custom functions?

Cheers,

Tommi
12-30-2003, 07:10 PM#2
Tommi
I checked CaptainReadiness a bit. CaptainReadiness appears to be the same as CaptainReadinessHP. ReadinessHP goes down as the attack group gets destroyed, but it seems to go up as well. I had one occasion when it jumped from 24 to 81 when the hero summoned Doom Guard through Doom spell.

I don't know but it appears pretty hard to assess the exact state of the attack group through ReadinessHP. :bgrun: Once I had 3 high level heros (6, 5, and 4) left in the group along with some other units, but ReadinessHP was some 12 or so.

Any comments on this?

Cheers,

Tommi
12-30-2003, 10:35 PM#3
Vidstige
Could it be worth scanning the attack group and list the hp values of the individual units?
12-30-2003, 10:49 PM#4
AIAndy
I did not check it much but my guess for CaptainReadinessHP was always that it takes the average HP percentage of the attack group meaning that 100 means all units have full HP and so on.
12-31-2003, 08:33 AM#5
Tommi
The key question is which units CaptainReadiness takes into account. Is there a way to check which units belong to the assault group? I'd be interested to see if summoned units get added to the assault group as such.

And do anybody know people who could check the native algorithms from the game code (disassembling the dlls etc.)? It would ease the work a bit, at least for details.

Cheers,

Tommi
01-02-2004, 01:22 PM#6
Tommi
Well, it seems that CaptainReadiness() is quite bad an estimate for the state of the attack group. As far as I can tell, it does not take into account how many units you have left. You know, 2 units with half health is better than 1 unit in full health, since they deal double damage but have the same hp. I had a situation when I had several units left with 5-15% hp left and CaptainReadiness() dropped so low that it quitted the attack, although these units would have caused serious damage on the target location. emote_confused And damaged units take up a lot of food supply, too.
01-02-2004, 02:42 PM#7
AIAndy
Thats why in AMAI I enumerate the units in a certain radius around the major hero (it specifies the location of the army for me) and count enemy and ally strength. That is a much better way to determine the current state of the attack group.
01-02-2004, 03:14 PM#8
Tommi
Could you share a handy function that others could use? (with documentation, of course) :ggani: