Ive not edited that file or even looked at it long enough to remember it.
Your right.
Before i start i should explain my AI is too good right now. I have to slow the dam thing down because the extra speed means its out there very early on and so gets extra resources much earlier too. It also doesnt wait as long as it used too.
The only way to possibly beat it is to get to the resources before it does. You have a fighting chance if you do this but you cannot possibly defend all the posts you capture this early on so its right old battle right from the start of the game.
Lets start with my test setup.
The difficulty files.
You can more or less see what needs changing in this, its a matter of personaly preference and the army list sections are pretty straight forward so i'll leave those to you to explore unless you really want me to post mine in which case i will.
BTW Larkin: the infantry AI is actually better than any of the other AIs. Tested it properly last night and its way to strong.
First off 2 initial build queue examples.
My rusher AI first.
space_marine_race = { Â { "flag_capture" }, { "post_builder" }, Â { "flag_capture" }, { "post_builder" }, Â { "flag_capture" }, { "post_builder" }, Â { "squad", "space_marine_squad_scout" }, Â { "squad", "space_marine_squad_scout" }, Â { "squad", "space_marine_squad_servitor" }, Â { "building", "space_marine_barracks" }, Â { "building", "space_marine_armoury" }, Â { "squad", "space_marine_squad_scout" }, Â { "squad", "space_marine_squad_scout" }, Â { "building", "space_marine_armoury" }, },
Now the assault AI.
 { "flag_capture" }, { "post_builder" },  { "flag_capture" }, { "post_builder" },  { "squad", "space_marine_squad_scout" },  { "squad", "space_marine_squad_servitor" },  { "squad", "space_marine_squad_servitor" },  { "building", "space_marine_barracks" },  { "building", "space_marine_armoury" },  { "squad", "space_marine_squad_assault" },  { "squad", "space_marine_squad_assault" },  { "flag_capture" }, { "post_builder" },  { "squad", "space_marine_squad_force_commander", true }, },
The addition scouts in the rusher AI is the thing that makes rusher AI and the infantry AI so strong early on. Remove a few and it slows down the AI a lot.
However thats not the whole story.
Lets move on to my current CPU Manager file entries. Again only hard is being tested so check out the hard entry.
function CpuManager:LoadStrategyInfo(setstrategychoice) local settings = self.cpu_player:GetDifficultyLevel() setstrategychoice = math.random(1,5)     -- Test settings to allow testing of each AI personality one at a time, choices 1 to 5.     --setstrategychoice = 5 if settings == CpuPlayer.AD_Easy then  import( "Strategies/Easy/BuildBaseStrategyInfo.ai" )  import( "Strategies/Easy/AttackStrategyInfo.ai" )  import( "Strategies/Easy/BuildOrderStrategyInfo.ai" )  print( "loading easy AI" ) elseif settings == CpuPlayer.AD_Standard then  import( "Strategies/Standard/BuildBaseStrategyInfo.ai" )  import( "Strategies/Standard/AttackStrategyInfo.ai" )  import( "Strategies/Standard/BuildOrderStrategyInfo.ai" )  print( "loading standard AI" ) elseif settings == CpuPlayer.AD_Hard then    if setstrategychoice == 1 then  import( "Strategies/Hard/BuildBaseStrategyInfo.ai" )  import( "Strategies/Hard/AttackStrategyInfo.ai" )  import( "Strategies/Hard/BuildOrderStrategyInfo.ai" )  print( "loading hard AI" )    elseif  setstrategychoice == 2 then  import( "Strategies/Hardrusher/BuildBaseStrategyInfo.ai" )  import( "Strategies/Hardrusher/AttackStrategyInfo.ai" )  import( "Strategies/Hardrusher/BuildOrderStrategyInfo.ai" )  print( "loading Hardrusher AI" )    elseif  setstrategychoice == 3 then  import( "Strategies/HardVehicle/BuildBaseStrategyInfo.ai" )  import( "Strategies/HardVehicle/AttackStrategyInfo.ai" )  import( "Strategies/HardVehicle/BuildOrderStrategyInfo.ai" )  print( "loading HardVehicle AI" )    elseif  setstrategychoice == 4 then  import( "Strategies/HardAssault/BuildBaseStrategyInfo.ai" )  import( "Strategies/HardAssault/AttackStrategyInfo.ai" )  import( "Strategies/HardAssault/BuildOrderStrategyInfo.ai" )  print( "loading HardAssault AI" )    elseif  setstrategychoice == 5 then  import( "Strategies/HardInfantry/BuildBaseStrategyInfo.ai" )  import( "Strategies/HardInfantry/AttackStrategyInfo.ai" )  import( "Strategies/HardInfantry/BuildOrderStrategyInfo.ai" )  print( "loading HardInfantry AI" )    end elseif settings == CpuPlayer.AD_Advanced then  import( "Strategies/Advanced/BuildBaseStrategyInfo.ai" )  import( "Strategies/Advanced/AttackStrategyInfo.ai" )  import( "Strategies/Advanced/BuildOrderStrategyInfo.ai" )  print( "loading advanced AI" ) elseif settings == CpuPlayer.AD_Insane then  --still uses advanced logic  import( "Strategies/Advanced/BuildBaseStrategyInfo.ai" )  import( "Strategies/Advanced/AttackStrategyInfo.ai" )  import( "Strategies/Advanced/BuildOrderStrategyInfo.ai" )  print( "loading insane AI" ) else  dbBreak() end end
It does the choosing and loads my custom AI difficulty files. But thats not what has the biggest effect on the AIs speed and effectiveness.
This is = BuildBaseStrategy file.
First the Un-nerfing.
In the BuildbaseStrategy file look for the function ...
function BuildBaseStrategy:DoBuildUnits()
Then look for this section, You cans see in the example below what lines ive commented out. Its a quick and dirty solution but works. The AI no longer Cares. It still reinforces and it doesnt get restricted.
Its basically always true so ive effectively disable the original code.
 --don't build units if I'm doing too well  --must have at least 400 worth of army, though  if army_cost > 400 and army_cost >= enemy_army_cost*self.info.max_army_percentage then  aitrace("too strong: don't build stuff")  --Tactic.Options.can_reinforce = false  Tactic.Options.can_reinforce = true   --global used to check if I can build anything  --cpu_manager:SetRestrictMilitary( true )  cpu_manager:SetRestrictMilitary( false )  return  else  Tactic.Options.can_reinforce = true  cpu_manager:SetRestrictMilitary( false )  end end
In the same file and in the same function look for this next.
See the two lines that say "if ticks_passed < 30*8 then" ?
They originally said 60.
Ive tried 45 too but that had some unwelcome side effects, 60 works, 30 works but 45 had my AI building 2 of everything. Well one of them anyway. The others seemed ok.
This change alone is what speeds yup my AI to the point where its too fast. Im currently looking for a way to slow it down.
Please remember im still testing this, so consider it unsafe until youve tested it your self.
BTW This little edit can cause some serious system lag on slower computers. I tested it in an 8 way game on my Athlon 2000+ and i experienced some none responsive moments during battles. But it was under some extreme conditions.
 --figure out ticks passed  local ticks_passed = game_time - self.build_now_timer  aitrace( tostring(ticks_passed) )   --call alternately every one minute  if ticks_passed < 30*8 then  aitrace("building stuff for NOW")  self:BuildNow()  else  Tactic.ResourceFloor.requisition = 600  aitrace("building stuff for LATER")  self:BuildLater()  if ticks_passed >= 30*8*2 then   self.build_now_timer = 0  end  end  end
Also since the self.info.var stuff never worked when i added a new var to the difficulty files i was thinking of looking up a default var and using that to check what AI is being used.
For example. Heres a line from Strategy base info thats different at every difficulty level.
 --reserve this amount for building units/buildings (not for use in upgrading/ reinforcing)  req_reserve = 150,[/code Now suppose i edited that line in each personality so it starts at 150 for the default AI and goes up to 155 for the last AI personality. Then did the same thing at all difficulty levels. Eg increase the number by 1 for each personality. If i did that id be able to do a cpu manager lookup of the value and it should work because the CPU manager ready knows about that var. So id just need a new function called get personality. Then do an if difficulty = hard and req_reserver = 154 then the AI is the Assault AI. This var could then be used to setup the update build queue too. Thats my theory anyway. So far every attempt ive made has ment when a none responsive AI or worse yet and AI failure. So im hoping by reusing the standard vars i can sneak one past the game code and get it to accept my idea for the update queue. Though i dont see me getting away with not editing the update section of buildbasestrategy. I think im going to have to completely replace it with the above check and then call another function to do the updating for each personality. In fact it may be better doing it from the buildbasestrategy file rather than the cpumanager anyway. Finally, for Larkin. Heres my build order for the Default Eldar AI. The one that builds the Warp Spiders. Notice there is no Warp Spider entries. It really is a case of fixing that Aspect Stone Research and correcting the army lists which i'll show you below. One of them anyway. [code] eldar_race = {  { "building", "eldar_webway_gate" },  { "building", "eldar_aspect_portal" },  { "flag_capture" }, { "post_builder" },  { "flag_capture" }, { "post_builder" },  { "squad", "eldar_guardian_squad" },  { "squad", "eldar_guardian_squad" },  { "squad", "eldar_squad_bonesinger" },  { "squad", "eldar_squad_farseer", true }, }
My Default AI Army List for the Eldar from Buildbasestrategyinfo. Editing these is a must really. The AIs stupid without a list like this at every difficulty level. You can add as many as you want. Call them any name since it does a count of how many entries exist and choses them by their position on the list of armies it can build rather than by name.
Its just an array call basically.
standard = Â { Â Â eldar_squad_farseer = 1, Â Â eldar_squad_seer_council = 1, Â Â eldar_squad_bonesinger = 0, Â Â eldar_squad_rangers = 1, Â Â eldar_guardian_squad = 3, Â Â eldar_squad_banshees = 2, Â Â eldar_squad_warp_spider = 3, Â Â eldar_squad_dark_reapers = 3, Â Â eldar_squad_grav_platform = 3, Â Â eldar_squad_grav_platform_brightlance = 3, Â Â eldar_squad_vypers = 2, Â Â eldar_squad_falcon_grav_tank = 2, Â Â eldar_squad_wraithlord = 4, Â Â Â Â Â Â Â Â Â eldar_squad_fire_prism = 3, Â Â Â Â Â Â Â Â Â eldar_squad_avatar = 1, Â },
Please note that ive increased the squad cap in my mod so it can build a lot more troops before it maxes out. The new Cap is about 35 for Eldar troops. I forget exactly but thats roughtly right.
Having said that, if all you do is copy the entry above and paste it back under the name bigarmy or anything you like and just change the avatar from 1 to a 0, then when ever the Eldar play it will have a 50/50 chance of the Avatar appearing instead of a 100% change of it appearing.
A Simple trick but it works.
Giskard
Edited by giskard, 23 February 2005 - 08:05 AM.