Jump to content


Photo

question about squad tactics


3 replies to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 19 January 2005 - 03:04 PM

From cpu_manager.ai

 if squad_name == "ork_squad_stormboy" then
 	 tactic = StormBoyzTactic( squad_ai )
  elseif squad_name == "chaos_squad_cultist" then
 	 tactic = CultistTactic( squad_ai )
  elseif squad_name == "ork_squad_bad_dok" then
 	 tactic = BadDokTactic( squad_ai )
  else
 	 tactic = InfantryTactic( squad_ai )
  end

Class InfantryTactic( ) is detailed with UpgradeAndReinforce() and lots of other functions whereas StormBoyzTactic() is as empty as this

class 'StormBoyzTactic' (InfantryTactic)

function StormBoyzTactic:__init( squad_ai ) super( squad_ai )

end

function StormBoyzTactic:GetName()
        return "StormBoyz Tactic"
end

So what do StormBoyz with UpgradeAndReinforce() ? I guess its some OO stuff but my skillz are low in this department.

Same goes for CultistTactic(). I don't understand the changes of Thudo which look like this

function CultistTactic:UpgradeAndReinforce()

        --Upgrade/reinforce cultists -- they're useful meatshields!
        return true

end

According to my understanding return true (which was only 'return' in the original) will do nothing as the real upgrade/reinforce stuff in InfantryTactic:UpgradeAndReinforce() is never used.

So how is it working. Is it

A) All functions of InfantryTactic() are used for every squad but are replaced by special functions of the same name like UpgradeAndReinforce() if there is a special file for a certain squad type (cultists) including them.

B) Either ALL the functions of InfantryTactic() OR ONLY those in special files are used.

C) completly different

Edited by LarkinVB, 19 January 2005 - 03:06 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 19 January 2005 - 11:06 PM

Yea the StormBoyz Tactic was a little odd. Actually, many of the scripts seem odd (ie. both SM/CSM have a requirement that when max_weapon_research is finished then start researching the tech tree found in buildbasestrategyinfo.ai and yet both Eldar/Ork don't need this). Both squad and support_cap_research is also odd as I could just place it in the tech tree as well and have it researched there just as fine although its there I gather when troop quantity gets high that needs a higher cap - similar to both Eldar/Ork which need Webgate/Banners respectively to increase pop levels.

As for the Cultists - I probably should just comment out the "return true" line or just leave the whole text file empty as I figured the cultists are great meatshields so I kept them able to reinforce (their cheap anyway). :ohmy:
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#3 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 20 January 2005 - 11:04 AM

Did you test the cultists reinforcement ? According to my understanding your changes shouldn't work properly but I may be wrong.

#4 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 January 2005 - 10:04 PM

Yea they are not working although I remember they were. I'll fix it. We've got a major snow storm here so we're currently dealing with it. heheh... SNOW ! ! ! !
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