War3map.wai
From Source Peek Wiki
File for the "Frozen Throne expansion pack beta" only
int: wai file format version: 2 string: AI name int: race: 0=Custom, 1=Human, 2=Orc, 3=Undead, 4=Night Elf int: options Unless otherwise noted all of the options are contained in HiWord of options integer. Check for the presence of options by using a mask with following values:
SetPlayerName: 0x2000 Melee: 0x0001 DefendUsers: 0x8000 RandomPaths: 0x4000 TargetHeroes: 0x0002 RepairStructures: 0x0004 HeroesFlee: 0x0008 UnitsFlee: 0x0010 GroupsFlee: 0x0020 HaveNoMercy: 0x0040 IgnoreInjured: 0x0080 RemoveInjuries: 0x1000 TakeItems: 0x0100 BuyItems: 0x0001 LoWord SlowHarvesting: 0x0200 AllowHomeChanges: 0x0400 SmartAltillery: 0x0800
int: number of following workers and buildings. If there are less than 4 workers and buildings specified, WorldEdit will choose default values. Should be: 4. char[4]: gold worker char[4]: wood worker char[4]: base building char[4]: mine building (If none, use the same identifer as base building)
int: number "a" of conditions int: ???: 7 "a" times a conditions definition structure* char[4]: First Hero Used (if none set these values to null otherwise set it to Unit ID) char[4]: Second Hero Used (if none set these values to null otherwise set it to Unit ID) char[4]: Third Hero Used (if none set these values to null otherwise set it to Unit ID) int: Training Order % Chance(1.FirstHero,2.SecondHero,3.ThirdHero) int: Training Order % Chance(1.FirstHero,2.ThirdHero,3.SecondHero) int: Training Order % Chance(1.SecondHero,2.FirstHero,3.ThirdHero) int: Training Order % Chance(1.SecondHero,2.ThirdHero,3.FirstHero) int: Training Order % Chance(1.ThirdHero,2.FirstHero,3.SecondHero) int: Training Order % Chance(1.ThirdHero,2.SecondHero,3.FirstHero)
Skill Selection Order: char[4*10]: Ten Skill IDs for First Hero(as first hero) char[4*10]: Ten Skill IDs for First Hero(as second hero) char[4*10]: Ten Skill IDs for First Hero(as third hero) char[4*10]: Ten Skill IDs for Second Hero(as first hero) char[4*10]: Ten Skill IDs for Second Hero(as second hero) char[4*10]: Ten Skill IDs for Second Hero(as third hero) char[4*10]: Ten Skill IDs for Third Hero(as first hero) char[4*10]: Ten Skill IDs for Third Hero(as second hero) char[4*10]: Ten Skill IDs for Third Hero(as third hero) int: number "c" of Build Priorities "c" times build priorities structure*** int: number "d" of Harvest Priorities "d" times harvest priorities structure *(4) int: number "e" of Target Priorities "e" times target priorities structure *(5) int: repeats waves int: minimum forces: attack group index(for First Hero Only set this value to char[4]:HAIA) int: initial delay int: number "f" of Attack Groups "f" times attack groups structure *(6) int: number "g" of Attack Waves "g" times attack waves structure *(8) int: ???: 1 int: game options Unless otherwise noted all of the options are contained in HiWord of options integer. Check for the presence of options by using a mask with following values:
Disable Fog Of War: 0x0001 Disable Victory/Defeat Conditions: 0x0002
int: regular game speed string: path to map file int: number "h" of Players (0-2) "h" times players structure *(9) int: ???
- Condition Definition Structure:
int: condition index String: condition name int: number "b": 0=none(empty condition), 1=condition if number "b" = 1 String: operator function name int: begin function: 1 "x" times a Parameters Structure**. x depends on the function and is hardcoded. int: end function: 0
- Parameters Structure:
int: type: 0=preset, 1=operator function, 2=function, 3=string String: parameter value (if it is function and this value is empty, begin function means '(' and end function means ')' ) int: begin function (if it is function or operator function it should be set to 1 otherwise to 0) if it is function and parameter value is not empty: int: type: 3 String: the same as parameter value int: begin function: 1 "x" times a Parameters Structure**. x depends on the function and is hardcoded. int: end function: 0 if it is operator function: int: begin function: 1 "x" times a Parameters Structure**. x depends on the function and is hardcoded. int: end function int: end function: 0
- Build Priorities Structure:
int: priorities type: 0 int: type: 0=unit, 1=upgrade, 2=expansion town char[4]: Unit/Upgrade ID(if it is expansion town this value should be set to: XEIA) int: town: 0=main, 1-9=Expansion #1-9, 0xFFFFFFFD-0xFFFFFFF5=current mine #1-9, 0xFFFFFFFF=any int: condition index(if none set this value to 0xFFFFFFFF, if custom set this value to 0xFFFFFFFE) 1 time condition definition structure*(without condition index!)
- (4)Harvest Priorities Structure:
int: priorities type: 1 int: harvest type: 0=gold, 1=lumber int: town: 0=main, 1-9=Expansion #1-9, 0xFFFFFFFD-0xFFFFFFF5=current mine #1-9, 0xFFFFFFFF=any int: workers: 0-90=fixed value #0-90, 0xFFFFFFFF=all, 0xFFFFFFFE=all not attacking int: condition index(if none, set this value to 0xFFFFFFFF, if custom, set this value to 0xFFFFFFFE) 1 time condition definition structure*(without condition index!)
- (5)Target Priorities Structure
int: priorities type: 2 int: target: 0=common alliance target, 1=new expansion location, 2=enemy major assault, 3=enemy expansion, 4=enemy any town, 5=creep camp, 6=purchase goblin zeppelin int: creep min strength(if target is other than 5 set this value to 0xFFFFFFFF)
if target = 5
int: creep max strength
int: allow flyers: 0=no, 1=yes
int: condition index(if none, set this value to 0xFFFFFFFF, if custom, set this value to 0xFFFFFFFE) 1 time condition definition structure*(without condition index!)
- (6)Attack Groups Structure
int: attack group index string: attack group name int: number "g" of Current Group "g" times current group structure *(7)
- (7)Current Group Structure
char[4]: Unit ID (FirstHero: 1HIA, SecondHero: 2HIA, ThirdHero: 3HIA) int: quantity value: 0-90=quantity #0-90, 0xFFFFFFFF=All int: maximum quantity: 0-90=quantity #0-90, 0xFFFFFFFF=All(if quantity value is 0xFFFFFFFF, maximum quantity means all except #0-90) int: condition index(if none, set this value to 0xFFFFFFFF, if custom, set this value to 0xFFFFFFFE) 1 time condition definition structure*(without condition index!)
- (8)Attack Waves Structure
int: attack group index int: delay
- (9)Players Structure
int: player index int: team number int: race: 1=human, 2=orc, 8=undead, 4=night elf, 20=random int: color: 0=red, 1=blue, 2=teal, 3=purple, 4=yellow, 5=orange, 6=green, 7=pink, 8=gray, 9=light blue, 10=dark green, 11=brown int: handicap (0-100) int: ai: 0=standard, 1=user, 4=custom, 12=current int: ai difficulty: 0=easy, 1=normal, 2=insane string: path to custom ai script
Credits
Thanks to Ziutek
