Jump to content


Photo

chaos upgrade problem


1 reply to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 03 February 2005 - 06:58 PM

While opening the console end game with chaos AI I get multiple

Cannot load get prerequisites :

Trying to build invalid research :

chaos_squad_cap_research_2


Don't know why but if its true chaos has a problem here. Bad research name here ?

#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 03 February 2005 - 09:17 PM

Sorry Larkin.. I fixed it a few days back based on your acknowledgement..

I think I should setup a common FTP site so those *with access* can download the latest build from the user who has an update. Logisitically, we'd have to watch for code revisions but a good way is to mention what .ai files were edited and, if possible, note changes. Yes it can be a nightmare to keep all changes intact but thank gawd for TOTAL COMMANDER! U all have this cool app? Damn helpful in spotting the tiny changes in text files.

Okie.. here are the changes for:

chaosbuildbasestrategy.ai

function ChaosBuildBaseStrategy:EvaluateSquadCap()

	if build_manager:GetSquadCapLeft() <= self.info.squad_cap_threshold then
  
  --research more squad cap (Thudmeizer: Fixed so it only researches two squad cap levels)
  local build_type = CpuBuildType()
  build_type.btype = CpuPrerequisites.BT_Research
  
  if not cpu_manager.cpu_player:IsResearchComplete( "chaos_squad_cap_research" ) then
  	build_type.name = "chaos_squad_cap_research"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "chaos_squad_cap_research_1" ) then
  	build_type.name = "chaos_squad_cap_research_1"
  	self:TryBuild( build_type )
  end
  
	end
	
	local check_support_cap = false
	for build_channel in build_manager:GetBuildChannelAIs() do
	
  if build_channel:GetBlueprintID() == self.vehicle_building_id then
  	check_support_cap = true
  	break
  end
	
	end
	
        --research for support cap (Thudmeizer: Now Updates to SupportCap Level 4)
	aitrace("support cap: "..build_manager:GetSupportCapLeft())
	aitrace("support thresh"..self.info.support_cap_threshold)
	if check_support_cap and build_manager:GetSupportCapLeft() <= self.info.support_cap_threshold then
	
  aitrace("trying to up support cap")
  --research more squad cap
  local build_type = CpuBuildType()
  build_type.btype = CpuPrerequisites.BT_Research
  
  if not cpu_manager.cpu_player:IsResearchComplete( "chaos_support_cap_research" ) then
  	build_type.name = "chaos_support_cap_research"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "chaos_support_cap_research_1" ) then
  	build_type.name = "chaos_support_cap_research_1"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "chaos_support_cap_research_2" ) then
  	build_type.name = "chaos_support_cap_research_2"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "chaos_support_cap_research_3" ) then
  	build_type.name = "chaos_support_cap_research_3"
  	self:TryBuild( build_type )

                                                         end

                                                    end
  end

and marinebuildbasestrategy.ai:

function MarineBuildBaseStrategy:EvaluateSquadCap()

	if build_manager:GetSquadCapLeft() <= self.info.squad_cap_threshold then
  
  --research more squad cap(Thudmeizer: Fixed so it researches only two Squad Caps)
  local build_type = CpuBuildType()
  build_type.btype = CpuPrerequisites.BT_Research
  
  if not cpu_manager.cpu_player:IsResearchComplete( "squad_cap_research" ) then
  	build_type.name = "squad_cap_research"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "squad_cap_research_1" ) then
  	build_type.name = "squad_cap_research_1"
  	self:TryBuild( build_type )

  end
  
	end
	
	local check_support_cap = false
	for build_channel in build_manager:GetBuildChannelAIs() do
	
  if build_channel:GetBlueprintID() == self.vehicle_building_id then
  	check_support_cap = true
  	break
  end
	end
	
	if check_support_cap and build_manager:GetSupportCapLeft() <= self.info.support_cap_threshold then
	
  --research more support cap(Thudmeizer: Fixed so it researches to Level 4)
  local build_type = CpuBuildType()
  build_type.btype = CpuPrerequisites.BT_Research
  
  if not cpu_manager.cpu_player:IsResearchComplete( "support_cap_research" ) then
  	build_type.name = "support_cap_research"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "support_cap_research_1" ) then
  	build_type.name = "support_cap_research_1"
  	self:TryBuild( build_type )
  elseif not cpu_manager.cpu_player:IsResearchComplete( "support_cap_research_2" ) then
  	build_type.name = "support_cap_research_2"
  	self:TryBuild( build_type )
                elseif not cpu_manager.cpu_player:IsResearchComplete( "support_cap_research_3" ) then
  	build_type.name = "support_cap_research_3"
  	self:TryBuild( build_type )

  end
  
	end
	
end

The correct research items are now present. As mentioned to Larkin, they were incorrect to start as in the LUA they showed more chaos squad/support cap research items for perhaps the SP campaign. All corrected now!

Btw, if your wondering where to verify the squad/support cap? Go to the HQ.lua of each of the command centers and you'll see the research items.

Edited by thudo, 03 February 2005 - 09:19 PM.

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