Jump to content


Photo

What to disable while weaker as opponent


1 reply to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 21 February 2005 - 07:44 PM

Thudo disabled this in buildbasestrategy.ai :

function BuildBaseStrategy:DoUpgradesAndAddons()

	--look at my enemies. If I am weaker than any of them, don't upgrade (thudmeizer: disabled!)
   for enemy in cpu_manager.stats:GetPlayerStats() do
  if cpu_manager.player_stats:IsEnemy( enemy ) then
  	if cpu_manager:RateAgainstPlayer( enemy ) < 0 then

    --aitrace("too weak to do research")
    --return
  	end	
  end
	end

so the AI will continue to research even while weaker in pro rated numbers.
I find this problematic wasting resources while it desperatly needs squads.

Its perhaps more clever to tweak it like this

if cpu_manager:RateAgainstPlayer( enemy ) < -250 then

so it won't reseach while much behind. It should really start building units then.
I'd suggest using the same code to prevent building more turrets while behind too but I guess this won't happen :huh: .

Edited by LarkinVB, 21 February 2005 - 09:01 PM.


#2 thudo

thudo

    Wacko AI Guy!

  • Division Leaders
  • 12,164 posts
  • Location:Lemonville North, Canada
  • Projects:DoW AI Scripting Project
  • Division:DoW
  • Job:Division Leader

Posted 22 February 2005 - 05:30 AM

Made changes.. Excellent suggestion!
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!



Reply to this topic



  


0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users