Jump to content


Photo

SSPro AI


5 replies to this topic

#1 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 09 March 2009 - 10:11 PM

Kobah is in need of getting the AI fixed for SSPro. Can you help him, Thudo ? I don't have SS/DC any more.

#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 10 March 2009 - 02:58 PM

Hrrmm.. If I have some free cycles I could. He hasn't asked me officially.
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 18 March 2009 - 08:18 PM

Hrrmm.. If I have some free cycles I could. He hasn't asked me officially.


Hi Thudo I bought SS for 10 Euro and doing SSPro AI. Can you tell me the differences between skirmish mod 3.0 and 3.1 which do need attention. I'm noticed something about CpuPrerequisites2.ai.

#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 18 March 2009 - 08:30 PM

Hrrmm.. off hand I have no clue but if you had a file comparison app like Total Commander or Beyond Compare you could easily spot the differences. CpuPrerequisites2.ai is highly interesting as Dark40k allows the full use of dynamic addons (which SSpro like uses as it was used in final DCpro). If you need explanation and code examples let me know. I have successfully implemented these in HHMP and other "high value" mod projects and its a huge breakthrough for DoW AI and addons that are very dynamic in nature.
Advanced Skirmish AI Team Lead for the coolest Warhammer40k PC RTS out there:

Dawn of War Advanced AI Headquarters

Latest DoW Advanced AI Download!

#5 LarkinVB

LarkinVB

    title available

  • Members
  • 1,488 posts

Posted 18 March 2009 - 08:46 PM

I'm thrilled by total commanders file comparison function with edit mode. Sooo much more easy to update the AI. I updated core logic in less than an hour. Wish I had edit mode way back when AI coding consumed half of my life :-).

I watched some battles based on 3.1 skirmish mod and wish the AI would do less running around and do more fighting. Perhaps I will have a look once SSPro AI is finished. Since DOW2 is a complete failure in my eyes, DOW is worth some more attention.

A code example for dynamic addons is welcome if something changed from DCPro AI.

Edited by LarkinVB, 18 March 2009 - 08:47 PM.


#6 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 March 2009 - 02:26 AM

Very straightforward..

In your faction's buildbasestrategy.ai file under the first function section add all units and addons that the AI must know are dynamic like this:

-- dark40k - set items that need bypass for CpuPrerequisites
	CpuPrerequisites2.AddSpecialItem("legion_barracks_addon_low", CpuPrerequisites.BT_AddOn)
	CpuPrerequisites2.AddSpecialItem("legion_barracks_addon_med", CpuPrerequisites.BT_AddOn)
	CpuPrerequisites2.AddSpecialItem("legion_barracks_addon_adv", CpuPrerequisites.BT_AddOn)
	
	CpuPrerequisites2.AddSpecialItem("legion_squad_recon_mk2", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_tactical_mk2", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_assault_mk2", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_support_mk2", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_veteran_mk2", CpuPrerequisites.BT_Squad)

	CpuPrerequisites2.AddSpecialItem("legion_squad_recon_mk3", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_tactical_mk3", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_assault_mk3", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_support_mk3", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_veteran_mk3", CpuPrerequisites.BT_Squad)

	CpuPrerequisites2.AddSpecialItem("legion_squad_recon_mk4", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_tactical_mk4", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_assault_mk4", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_support_mk4", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_veteran_mk4", CpuPrerequisites.BT_Squad)

	CpuPrerequisites2.AddSpecialItem("legion_squad_recon_mk5", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_tactical_mk5", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_assault_mk5", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_support_mk5", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_veteran_mk5", CpuPrerequisites.BT_Squad)

	CpuPrerequisites2.AddSpecialItem("legion_squad_recon_mk6", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_tactical_mk6", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_assault_mk6", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_support_mk6", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_veteran_mk6", CpuPrerequisites.BT_Squad)

	CpuPrerequisites2.AddSpecialItem("legion_squad_recon_mk7", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_tactical_mk7", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_assault_mk7", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_support_mk7", CpuPrerequisites.BT_Squad)
	CpuPrerequisites2.AddSpecialItem("legion_squad_veteran_mk7", CpuPrerequisites.BT_Squad)
So what we have here is in the past, when the DoW AI came across a building that gave the player a choice of, say, 3 building addons which you could ONLY choose one would then give you certain unit types. Problem was, the AI code was not smart enough to understand that did not have access to those OTHER units opened up by those other two addons which you could not build. This changes all this so now we can have massive branching factions using ADDONS and not just researches anymore. Kresjah/Lleman's HHMP faction mod since last mid-Oct now was able to be fully realized.
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