Initial commit
This commit is contained in:
BIN
DATA/ART/TEXTURES/MENUBACK_OVERLAY.DDS
Normal file
BIN
DATA/ART/TEXTURES/MENUBACK_OVERLAY.DDS
Normal file
Binary file not shown.
BIN
DATA/ART/TEXTURES/SPLASH.DDS
Normal file
BIN
DATA/ART/TEXTURES/SPLASH.DDS
Normal file
Binary file not shown.
BIN
DATA/HUTT_CAPITALS.TXT
Normal file
BIN
DATA/HUTT_CAPITALS.TXT
Normal file
Binary file not shown.
BIN
DATA/HUTT_SUPERCAPITALS.TXT
Normal file
BIN
DATA/HUTT_SUPERCAPITALS.TXT
Normal file
Binary file not shown.
BIN
DATA/IMPERIAL_CAPITALS.TXT
Normal file
BIN
DATA/IMPERIAL_CAPITALS.TXT
Normal file
Binary file not shown.
BIN
DATA/IMPERIAL_SUPERCAPITALS.TXT
Normal file
BIN
DATA/IMPERIAL_SUPERCAPITALS.TXT
Normal file
Binary file not shown.
BIN
DATA/PIRATE_CAPITALS.TXT
Normal file
BIN
DATA/PIRATE_CAPITALS.TXT
Normal file
Binary file not shown.
BIN
DATA/REBEL_CAPITALS.TXT
Normal file
BIN
DATA/REBEL_CAPITALS.TXT
Normal file
Binary file not shown.
BIN
DATA/REBEL_SUPERCAPITALS.TXT
Normal file
BIN
DATA/REBEL_SUPERCAPITALS.TXT
Normal file
Binary file not shown.
4541
DATA/RESOURCES/GUIDIALOG/GUIDIALOGS.RC
Normal file
4541
DATA/RESOURCES/GUIDIALOG/GUIDIALOGS.RC
Normal file
File diff suppressed because it is too large
Load Diff
2602
DATA/RESOURCES/GUIDIALOG/RESOURCE.H
Normal file
2602
DATA/RESOURCES/GUIDIALOG/RESOURCE.H
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,65 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_ExpansionGeneric_GenerateMagicCashDrop.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_ExpansionGeneric_GenerateMagicCashDrop.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Cash_Drop | Skirmish_Generate_Magic_Cash_Drop_Space | Skirmish_Generate_Magic_Cash_Drop_Land"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
PlayerObject.Give_Money(6000)
|
||||||
|
Sleep(120)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,61 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/AI_Plan_ExpansionGeneric_RemoveCorruption.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 25 October, 2020
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Remove_Corruption"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"DenyHeroAttach",
|
||||||
|
"Mon_Mothma_Team | Obi_Wan_Team | Yoda_Team | Luke_Skywalker_Jedi_Team | Emperor_Palpatine_Team | UEAW_Sate_Pestage_Team | Darth_Team | Admonitor_Star_Destroyer | Cuarson_Team | Pestelous_Team | Galyana_SSD_GC = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
AssembleForce(MainForce)
|
||||||
|
LaunchUnits(MainForce)
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
MainForce.Activate_Ability()
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
Sleep(300)
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_No_Units_Remaining(tf)
|
||||||
|
--No action
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
66
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_BLACKMARKET.LUA
Normal file
66
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_BLACKMARKET.LUA
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BlackMarket.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BlackMarket.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Black_Market_Purchase"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"DenyHeroAttach",
|
||||||
|
"Silri_Team | Tyber_Zann_Team | Urai_Fen_Team = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force(Target))
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target))
|
||||||
|
MainForce.Activate_Ability()
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldBarracks.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldBarracks.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Initial_Groundbase_Only | Build_Underworld_Barracks"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"U_Ground_Barracks = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldDroidWorks.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldDroidWorks.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Initial_Groundbase_Only | Build_Underworld_Droid_Works"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"U_Ground_Droid_Works = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
67
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_BUILDUNDERWORLDPALACE.LUA
Normal file
67
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_BUILDUNDERWORLDPALACE.LUA
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldPalace.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldPalace.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Initial_Groundbase_Only | Build_Underworld_Palace"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"U_Ground_Palace = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldVehicleFactory.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_BuildUnderworldVehicleFactory.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Initial_Groundbase_Only | Build_Underworld_Vehicle_Factory"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"U_Ground_Vehicle_Factory = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
78
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_DEPLOYSABOTEUR.LUA
Normal file
78
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_DEPLOYSABOTEUR.LUA
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_DeploySaboteur.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_DeploySaboteur.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
--The mechanisms for corrupting a planet and for sabotaging it are identical - which we perform depends on
|
||||||
|
--the current corruption state of the target. This is assessed at the perception level and by the time
|
||||||
|
--we execute the plan it makes no difference to our behavior
|
||||||
|
Category = "Corrupt_Planet | Sabotage_Planet"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"DenyHeroAttach",
|
||||||
|
"Underworld_Saboteur_Team = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
AssembleForce(MainForce)
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target))
|
||||||
|
MainForce.Activate_Ability()
|
||||||
|
|
||||||
|
Sleep(10)
|
||||||
|
|
||||||
|
if MainForce.Get_Goal_Type_Name() == "Corrupt_Planet" then
|
||||||
|
if Target.Is_Corrupted() then
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
--Always treat sabotage as failing so that we won't repeatedly perform it on the same planet (cost goes up)
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
66
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_HACKSUPERWEAPON.LUA
Normal file
66
DATA/SCRIPTS/AI/AI_PLAN_UNDERWORLD_HACKSUPERWEAPON.LUA
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_HackSuperWeapon.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/AI_Plan_Underworld_HackSuperWeapon.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Hack_Super_Weapon"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"DenyHeroAttach",
|
||||||
|
"IG88_Team = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force(Target))
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target))
|
||||||
|
BlockOnCommand(LandUnits(MainForce))
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
80
DATA/SCRIPTS/AI/BUILDBASECOMPONENTADVANCEDVEHICLEFACTORY.LUA
Normal file
80
DATA/SCRIPTS/AI/BUILDBASECOMPONENTADVANCEDVEHICLEFACTORY.LUA
Normal file
@@ -0,0 +1,80 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildBaseComponentAdvancedVehicleFactory.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildBaseComponentAdvancedVehicleFactory.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Component_Advanced_Vehicle_Factory"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Advanced_Vehicle_Factory = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
68
DATA/SCRIPTS/AI/BUILDBASECOMPONENTBARRACKS.LUA
Normal file
68
DATA/SCRIPTS/AI/BUILDBASECOMPONENTBARRACKS.LUA
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseComponentBarracks.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 28 Septembter, 2012
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Initial_Groundbase_Only | Build_Base_Component_Barracks"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Barracks | R_Ground_Barracks | H_Ground_Barracks = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
67
DATA/SCRIPTS/AI/BUILDBASECOMPONENTCOMMARRAY.LUA
Normal file
67
DATA/SCRIPTS/AI/BUILDBASECOMPONENTCOMMARRAY.LUA
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseComponentCommArray.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 10 May, 2014
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Component_Comm_Array"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Communications_Array | R_Ground_Communications_Array | H_Ground_Communications_Array = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
68
DATA/SCRIPTS/AI/BUILDBASECOMPONENTHEAVYVEHICLEFACTORY.LUA
Normal file
68
DATA/SCRIPTS/AI/BUILDBASECOMPONENTHEAVYVEHICLEFACTORY.LUA
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseComponentHeavyVehicleFactory.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 10 May, 2014
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Component_Heavy_Vehicle_Factory"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Heavy_Vehicle_Factory | R_Ground_Heavy_Vehicle_Factory = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
69
DATA/SCRIPTS/AI/BUILDBASECOMPONENTLIGHTVEHICLEFACTORY.LUA
Normal file
69
DATA/SCRIPTS/AI/BUILDBASECOMPONENTLIGHTVEHICLEFACTORY.LUA
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseComponentLightVehicleFactory.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 28 Septembter, 2012
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Component_Light_Vehicle_Factory | Build_Initial_Groundbase_Only"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Light_Vehicle_Factory | R_Ground_Light_Vehicle_Factory | H_Ground_Factory = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
68
DATA/SCRIPTS/AI/BUILDBASECOMPONENTOFFICERACADEMY.LUA
Normal file
68
DATA/SCRIPTS/AI/BUILDBASECOMPONENTOFFICERACADEMY.LUA
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseComponentOfficerAcademy.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 10 May, 2014
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Component_Officer_Academy"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Officer_Academy | R_Ground_Officer_Academy | H_Ground_Command_Center = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
69
DATA/SCRIPTS/AI/BUILDBASECOMPONENTRESEARCHFACILITY.LUA
Normal file
69
DATA/SCRIPTS/AI/BUILDBASECOMPONENTRESEARCHFACILITY.LUA
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseComponentResearchFacility.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 28 Septembter, 2012
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- This plan handles both the first research facility, built under the MajorItem purchase template scheme
|
||||||
|
-- and subsequent research facilities, built under Infrastructure, by other perceptions.
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Component_Research_Facility | Build_Base_Component_Research_Facility_2"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"BaseForce",
|
||||||
|
"E_Ground_Research_Facility | H_Ground_Advanced_Technologies_Facility = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Thread()
|
||||||
|
DebugMessage("%s -- In BaseForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
BaseForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(BaseForce)
|
||||||
|
|
||||||
|
BaseForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- BaseForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function BaseForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
70
DATA/SCRIPTS/AI/BUILDBASESHIELDPLAN.LUA
Normal file
70
DATA/SCRIPTS/AI/BUILDBASESHIELDPLAN.LUA
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildBaseShieldPlan.lua
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 7 March, 2015
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Base_Shield"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"E_Ground_Base_Shield_740 | R_Ground_Base_Shield_740 | H_Ground_Base_Shield_740 = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
78
DATA/SCRIPTS/AI/BUILDCANTINAPLAN.LUA
Normal file
78
DATA/SCRIPTS/AI/BUILDCANTINAPLAN.LUA
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildCantinaPlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildCantinaPlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Cantina"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"Ground_Cantina_E | Ground_Cantina_R = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
65
DATA/SCRIPTS/AI/BUILDECONOMICSTRUCTUREPLAN.LUA
Normal file
65
DATA/SCRIPTS/AI/BUILDECONOMICSTRUCTUREPLAN.LUA
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildEconomicStructurePlan.lua
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 3 March, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 3
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Economic_Structure"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"Rebel_Ground_Mining_Facility_GC | Rebel_Ground_Mining_Facility_GC_Unlim | Rebel_Mineral_Extractor_GC | Empire_Ground_Mining_Facility_GC | Empire_Ground_Mining_Facility_GC_Unlim | Empire_Mineral_Extractor_GC | Hutts_Ground_Mining_Facility_GC | Hutts_Ground_Mining_Facility_GC_Unlim | Hutt_Mineral_Extractor_GC = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
66
DATA/SCRIPTS/AI/BUILDGROUNDDEFENSIVESTRUCTUREPLAN.LUA
Normal file
66
DATA/SCRIPTS/AI/BUILDGROUNDDEFENSIVESTRUCTUREPLAN.LUA
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildGroundDefensiveStructurePlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 10 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
-- Category = "Build_Ground_Defensive_Structure"
|
||||||
|
Category = "AlwaysOff"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"E_Ground_Base_Shield_740 | R_Ground_Base_Shield_740 | H_Ground_Base_Shield_740 | E_Galactic_Turbolaser_Tower_Defenses | R_Galactic_Turbolaser_Tower_Defenses | H_Galactic_Turbolaser_Tower_Defenses | E_Ground_Magnepulse_Cannon_GC = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
61
DATA/SCRIPTS/AI/BUILDGROUNDFORCESPLAN.LUA
Normal file
61
DATA/SCRIPTS/AI/BUILDGROUNDFORCESPLAN.LUA
Normal file
@@ -0,0 +1,61 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildGroundForcesPlan.lua
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 25 October, 2017
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Build_Ground_Forces"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"Infantry = 0,2"
|
||||||
|
,"Vehicle = 0,2"
|
||||||
|
,"Air = 0,1"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-Hutt_SailBarge"
|
||||||
|
,"-Field_Com_Hutts_Team"
|
||||||
|
,"-Field_Com_Rebel_Team"
|
||||||
|
,"-Field_Com_Empire_Team"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = { "Vehicle" }
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force())
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
79
DATA/SCRIPTS/AI/BUILDHUTTPALACEPLAN.LUA
Normal file
79
DATA/SCRIPTS/AI/BUILDHUTTPALACEPLAN.LUA
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildHuttPalacePlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildHuttPalacePlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "AlwaysOff"
|
||||||
|
-- Category = "Build_Hutt_Palace"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
-- "Ground_Hutt_Palace_E | Ground_Hutt_Palace_R = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
79
DATA/SCRIPTS/AI/BUILDINFILTRATORFACILITY.LUA
Normal file
79
DATA/SCRIPTS/AI/BUILDINFILTRATORFACILITY.LUA
Normal file
@@ -0,0 +1,79 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildInfiltratorFacility.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/BuildInfiltratorFacility.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Infiltrator_Facility"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"Ground_Infiltrator_Facility = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
69
DATA/SCRIPTS/AI/BUILDJAMMINGSTATIONPLAN.LUA
Normal file
69
DATA/SCRIPTS/AI/BUILDJAMMINGSTATIONPLAN.LUA
Normal file
@@ -0,0 +1,69 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildJammingStationPlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 6 May, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Jamming_Station"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"R_Orbital_Jamming_Station | E_Orbital_Jamming_Station = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
67
DATA/SCRIPTS/AI/BUILDSCANNERPLAN.LUA
Normal file
67
DATA/SCRIPTS/AI/BUILDSCANNERPLAN.LUA
Normal file
@@ -0,0 +1,67 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildScannerPlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 6 May, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Scanner"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"Empire_Orbital_Long_Range_Scanner | Rebel_Orbital_Long_Range_Scanner = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
66
DATA/SCRIPTS/AI/BUILDSPACEDEFENSIVESTRUCTUREPLAN.LUA
Normal file
66
DATA/SCRIPTS/AI/BUILDSPACEDEFENSIVESTRUCTUREPLAN.LUA
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildSpaceDefensiveStructurePlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 6 May, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
-- Category = "Build_Space_Defensive_Structure"
|
||||||
|
Category = "AlwaysOff"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"E_Orbital_Jamming_Station | R_Orbital_Jamming_Station | Ground_Ion_Cannon | Ground_Empire_Hypervelocity_Gun | Ground_Hutts_Hypervelocity_Gun | Empire_Defense_Station_GC | Rebel_Defense_Station_GC | Hutt_Defense_Station_GC = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
60
DATA/SCRIPTS/AI/BUILDSPACEFORCESPLAN.LUA
Normal file
60
DATA/SCRIPTS/AI/BUILDSPACEFORCESPLAN.LUA
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildSpaceForcesPlan.lua
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 10 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 6
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Build_Space_Forces"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
--Fighters are omitted deliberately. Since they're cheap, build fast and are quickly killed it's typically better
|
||||||
|
--to build them as we need them to attack. For defensive purposes we'll rely on space station garrisons for our fighter
|
||||||
|
--needs
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Corvette = 0,5" --SoaFE: was 0,4
|
||||||
|
,"Frigate = 0,6" --SoaFE: was 0,4
|
||||||
|
,"Capital = 0,4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = { "Corvette | Frigate | Capital" }
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force())
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
59
DATA/SCRIPTS/AI/BUILDTURBOLASERS.LUA
Normal file
59
DATA/SCRIPTS/AI/BUILDTURBOLASERS.LUA
Normal file
@@ -0,0 +1,59 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildTurbolasers.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 28 Septembter, 2012
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Build_Turbolasers"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"E_Galactic_Turbolaser_Tower_Defenses | R_Galactic_Turbolaser_Tower_Defenses | H_Galactic_Turbolaser_Tower_Defenses = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
65
DATA/SCRIPTS/AI/BUILDWEAPONSTRUCTUREPLAN.LUA
Normal file
65
DATA/SCRIPTS/AI/BUILDWEAPONSTRUCTUREPLAN.LUA
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/BuildWeaponStructurePlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 10 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Build_Weapon"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"StructureForce",
|
||||||
|
"Ground_Ion_Cannon | Ground_Empire_Hypervelocity_Gun | E_Ground_Magnepulse_Cannon | E_Ground_Magnepulse_Cannon_GC | Ground_Hutts_Hypervelocity_Gun = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Thread()
|
||||||
|
DebugMessage("%s -- In StructureForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
StructureForce.Set_As_Goal_System_Removable(false)
|
||||||
|
AssembleForce(StructureForce)
|
||||||
|
|
||||||
|
StructureForce.Set_Plan_Result(true)
|
||||||
|
DebugMessage("%s -- StructureForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function StructureForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
231
DATA/SCRIPTS/AI/CONQUEROPPONENTPLAN.LUA
Normal file
231
DATA/SCRIPTS/AI/CONQUEROPPONENTPLAN.LUA
Normal file
@@ -0,0 +1,231 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/ConquerOpponentPlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/ConquerOpponentPlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Brian Hayes
|
||||||
|
--
|
||||||
|
-- $Author: Andre_Arsenault $
|
||||||
|
--
|
||||||
|
-- $Change: 37816 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/02/15 15:33:33 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 2
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Galactic Mode Contrast Script
|
||||||
|
--
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
MinContrastScale = 1.25
|
||||||
|
MaxContrastScale = 1.75
|
||||||
|
|
||||||
|
Category = "Conquer_Opponent"
|
||||||
|
TaskForce = {
|
||||||
|
-- First Task Force
|
||||||
|
{
|
||||||
|
"SpaceForce"
|
||||||
|
,"MinimumTotalSize = 8" -- SoaFE was 4
|
||||||
|
,"MinimumTotalForce = 5000" -- SoaFE was 2500
|
||||||
|
,"Frigate | Capital | Corvette | Bomber | Fighter = 100%"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroundForce"
|
||||||
|
,"MinimumTotalSize = 5" -- SoaFE was 4
|
||||||
|
,"MinimumTotalForce = 800" -- SoaFE was 750
|
||||||
|
,"Vehicle | Infantry | Air = 100%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = { "Infantry", "Corvette | Frigate | Capital | Super" } --Must have at least one ground unit, also make sure space force is reasonable
|
||||||
|
|
||||||
|
PerFailureContrastAdjust = 0.5
|
||||||
|
|
||||||
|
SpaceSecured = true
|
||||||
|
LandSecured = false
|
||||||
|
MovingGroundForceToTarget = false
|
||||||
|
WasConflict = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_Thread()
|
||||||
|
-- Since we're using plan failure to adjust contrast, we're
|
||||||
|
-- only concerned with failures in battle. Default the
|
||||||
|
-- plan to successful and then
|
||||||
|
-- only on the event of our task force being killed is the
|
||||||
|
-- plan set to a failed state.
|
||||||
|
SpaceForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
SpaceSecured = false
|
||||||
|
|
||||||
|
if SpaceForce.Are_All_Units_On_Free_Store() == true then
|
||||||
|
AssembleForce(SpaceForce)
|
||||||
|
else
|
||||||
|
BlockOnCommand(SpaceForce.Produce_Force());
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
if SpaceForce.Get_Force_Count() == 0 then
|
||||||
|
if EvaluatePerception("Is_Good_Ground_Grab_Target", PlayerObject, Target) == 0 then
|
||||||
|
ScriptExit()
|
||||||
|
else
|
||||||
|
SpaceSecured = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
BlockOnCommand(SpaceForce.Move_To(Target))
|
||||||
|
WasConflict = true
|
||||||
|
if SpaceForce.Get_Force_Count() == 0 then
|
||||||
|
SpaceForce.Set_Plan_Result(false)
|
||||||
|
Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
SpaceSecured = true
|
||||||
|
|
||||||
|
while not LandSecured do
|
||||||
|
Sleep(5)
|
||||||
|
end
|
||||||
|
|
||||||
|
SpaceForce.Release_Forces(1.0)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_Thread()
|
||||||
|
--Needs to be done by both taskforces - sometimes we may only create a ground force, and if we
|
||||||
|
--declare it a failure we'll just end up with crazy contrast escalation.
|
||||||
|
GroundForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
if GroundForce.Are_All_Units_On_Free_Store() == true then
|
||||||
|
AssembleForce(GroundForce)
|
||||||
|
else
|
||||||
|
BlockOnCommand(GroundForce.Produce_Force());
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
LandUnits(GroundForce)
|
||||||
|
|
||||||
|
while not SpaceSecured do
|
||||||
|
if WasConflict then
|
||||||
|
Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
Sleep(5)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not LaunchUnits(GroundForce) then
|
||||||
|
Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
if EvaluatePerception("Is_Good_Ground_Grab_Target", PlayerObject, Target) == 0 then
|
||||||
|
Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
MovingGroundForceToTarget = true
|
||||||
|
BlockOnCommand(GroundForce.Move_To(Target))
|
||||||
|
MovingGroundForceToTarget = false
|
||||||
|
WasConflict = true
|
||||||
|
if Invade(GroundForce) == false then
|
||||||
|
GroundForce.Set_Plan_Result(false)
|
||||||
|
Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This plan has all but succeeded; make sure AI systems don't remove it
|
||||||
|
GroundForce.Set_As_Goal_System_Removable(false)
|
||||||
|
GroundForce.Test_Target_Contrast(false)
|
||||||
|
|
||||||
|
LandSecured = true
|
||||||
|
|
||||||
|
GroundForce.Release_Forces(1.0)
|
||||||
|
|
||||||
|
FundBases(PlayerObject, Target)
|
||||||
|
|
||||||
|
Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Exit_Plan_With_Possible_Sleep()
|
||||||
|
difficulty = "Easy"
|
||||||
|
if PlayerObject then
|
||||||
|
difficulty = PlayerObject.Get_Difficulty()
|
||||||
|
end
|
||||||
|
sleep_duration = DifficultyBasedMinPause(difficulty)
|
||||||
|
|
||||||
|
if SpaceForce then
|
||||||
|
SpaceForce.Release_Forces(1.0)
|
||||||
|
end
|
||||||
|
GroundForce.Release_Forces(1.0)
|
||||||
|
|
||||||
|
if WasConflict and (not GalacticAttackAllowed(difficulty, 2)) then
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_Production_Failed(tf, failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Ignore changes to neutral - it might just be temporary on the way to
|
||||||
|
--passing into my control.
|
||||||
|
if new_owner ~= PlayerObject and new_owner.Is_Neutral() == false then
|
||||||
|
if (not LandSecured) or (PlayerObject.Get_Difficulty() == "Hard") then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Ignore changes to neutral - it might just be temporary on the way to
|
||||||
|
--passing into my control.
|
||||||
|
if new_owner ~= PlayerObject and new_owner.Is_Neutral() == false then
|
||||||
|
if (not LandSecured) or (PlayerObject.Get_Difficulty() == "Hard") then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_No_Units_Remaining()
|
||||||
|
if not LandSecured then
|
||||||
|
SpaceForce.Set_Plan_Result(false)
|
||||||
|
--Don't exit since we need to sleep to enforce delays between AI attacks (can't be done inside an event handler)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_No_Units_Remaining()
|
||||||
|
if not LandSecured then
|
||||||
|
GroundForce.Set_Plan_Result(false)
|
||||||
|
--Don't exit since we need to sleep to enforce delays between AI attacks (can't be done inside an event handler)
|
||||||
|
end
|
||||||
|
end
|
||||||
113
DATA/SCRIPTS/AI/CONQUERPIRATEPLAN.LUA
Normal file
113
DATA/SCRIPTS/AI/CONQUERPIRATEPLAN.LUA
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/ConquerPiratePlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/ConquerPiratePlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgtaskforce")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 4
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
MinContrastScale = 1.1
|
||||||
|
MaxContrastScale = 1.15
|
||||||
|
|
||||||
|
Category = "Conquer_Pirate"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
, "Infantry | Vehicle | Air | Fighter | Bomber | Corvette | Frigate | Super | Capital = 100%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = { "Air | Infantry | Vehicle" }
|
||||||
|
|
||||||
|
LandSecured = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
-- Since we're using plan failure to adjust contrast, we're
|
||||||
|
-- only concerned with failures in battle. Default the
|
||||||
|
-- plan to successful and then
|
||||||
|
-- only on the event of our task force being killed is the
|
||||||
|
-- plan set to a failed state.
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
if MainForce.Are_All_Units_On_Free_Store() == true then
|
||||||
|
AssembleForce(MainForce)
|
||||||
|
else
|
||||||
|
BlockOnCommand(MainForce.Produce_Force());
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target))
|
||||||
|
if MainForce.Get_Force_Count() == 0 then
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
if Invade(MainForce) == false then
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
LandSecured = true
|
||||||
|
MainForce.Release_Forces(1.0)
|
||||||
|
FundBases(PlayerObject, Target)
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Production_Failed(failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Ignore changes to neutral - it might just be temporary on the way to
|
||||||
|
--passing into my control.
|
||||||
|
if new_owner ~= PlayerObject and new_owner.Is_Neutral() == false then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_No_Units_Remaining()
|
||||||
|
if not LandSecured then
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
205
DATA/SCRIPTS/AI/CONTRASTTORECONNECT.LUA
Normal file
205
DATA/SCRIPTS/AI/CONTRASTTORECONNECT.LUA
Normal file
@@ -0,0 +1,205 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/ContrastToReconnect.lua
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 31 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Galactic Mode Contrast To Reconnect Islands of Nodes Script
|
||||||
|
--
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Conquer_To_Reconnect"
|
||||||
|
TaskForce = {
|
||||||
|
-- First Task Force
|
||||||
|
{
|
||||||
|
"SpaceForce"
|
||||||
|
,"MinimumTotalSize = 6" --SoaFE was 4
|
||||||
|
,"MinimumTotalForce = 3000" --SoaFE was 2500
|
||||||
|
,"Frigate | Capital | Corvette | Bomber | Fighter = 100%"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GroundForce"
|
||||||
|
,"MinimumTotalSize = 4"
|
||||||
|
,"MinimumTotalForce = 600" --SoaFE was 750
|
||||||
|
,"Vehicle | Infantry | Air = 100%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = { "Infantry", "Corvette | Frigate | Capital | Super" } --Must have at least one ground unit, also make sure space force is reasonable
|
||||||
|
|
||||||
|
PerFailureContrastAdjust = 0.5
|
||||||
|
|
||||||
|
SpaceSecured = true
|
||||||
|
LandSecured = false
|
||||||
|
InSpaceConflict = false
|
||||||
|
WasConflict = false
|
||||||
|
|
||||||
|
sleep_duration = 150
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_Thread()
|
||||||
|
DebugMessage("%s -- In SpaceForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
-- Since we're using plan failure to adjust contrast, we're
|
||||||
|
-- only concerned with failures in battle. Default the
|
||||||
|
-- plan to successful and then
|
||||||
|
-- only on the event of our task force being killed is the
|
||||||
|
-- plan set to a failed state.
|
||||||
|
SpaceForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
SpaceSecured = false
|
||||||
|
|
||||||
|
if SpaceForce.Are_All_Units_On_Free_Store() == true then
|
||||||
|
DebugMessage("SpaceForce converged on target (disconnecting node)")
|
||||||
|
SynchronizedAssemble(SpaceForce)
|
||||||
|
WasConflict = true
|
||||||
|
else
|
||||||
|
DebugMessage("%s -- Can't freestore allocate all our units, so just allocating build tasks.", tostring(Script))
|
||||||
|
BlockOnCommand(SpaceForce.Produce_Force());
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
if SpaceForce.Get_Force_Count() == 0 then
|
||||||
|
if EvaluatePerception("Is_Good_Ground_Grab_Target", PlayerObject, Target) == 0 then
|
||||||
|
DebugMessage("%s -- No SpaceForce at target and enemies still present in space. Abandonning plan.", tostring(Script))
|
||||||
|
SpaceForce.Set_Plan_Result(false)
|
||||||
|
--Exit_Plan_With_Possible_Sleep()
|
||||||
|
else
|
||||||
|
DebugMessage("%s -- No SpaceForce, but Space at target appears clear anyway.", tostring(Script))
|
||||||
|
SpaceSecured = true
|
||||||
|
end
|
||||||
|
else
|
||||||
|
SpaceSecured = true
|
||||||
|
|
||||||
|
while not LandSecured do
|
||||||
|
Sleep(5)
|
||||||
|
end
|
||||||
|
|
||||||
|
SpaceForce.Release_Forces(1.0)
|
||||||
|
DebugMessage("%s -- SpaceForce Done! Exiting Script!", tostring(Script))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_Thread()
|
||||||
|
DebugMessage("%s -- In GroundForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
GroundForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
if GroundForce.Are_All_Units_On_Free_Store() == true then
|
||||||
|
|
||||||
|
DebugMessage("%s -- GroundForce waiting for the space force to succede.", tostring(Script))
|
||||||
|
while not SpaceSecured do
|
||||||
|
-- if WasConflict then
|
||||||
|
-- Exit_Plan_With_Possible_Sleep()
|
||||||
|
-- end
|
||||||
|
Sleep(5)
|
||||||
|
end
|
||||||
|
DebugMessage("%s -- converging ground units on the target.", tostring(Script))
|
||||||
|
SynchronizedAssemble(GroundForce)
|
||||||
|
else
|
||||||
|
DebugMessage("%s -- Can't freestore allocate all our units, so just allocating build tasks.", tostring(Script))
|
||||||
|
BlockOnCommand(GroundForce.Produce_Force());
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
WasConflict = true
|
||||||
|
if Invade(GroundForce) == false then
|
||||||
|
DebugMessage("%s -- Curses...The invasion failed! Exiting Script!", tostring(Script))
|
||||||
|
-- Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
DebugMessage("%s -- Political control changed building Ground and Starbase.", tostring(Script))
|
||||||
|
LandSecured = true
|
||||||
|
GroundForce.Release_Forces(1.0)
|
||||||
|
GroundForce.Set_Plan_Result(true)
|
||||||
|
FundBases(PlayerObject, Target)
|
||||||
|
-- Exit_Plan_With_Possible_Sleep()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Exit_Plan_With_Possible_Sleep()
|
||||||
|
if SpaceForce then
|
||||||
|
SpaceForce.Release_Forces(1.0)
|
||||||
|
end
|
||||||
|
GroundForce.Release_Forces(1.0)
|
||||||
|
if WasConflict then
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Ignore changes to neutral - it might just be temporary on the way to
|
||||||
|
--passing into my control.
|
||||||
|
if new_owner ~= PlayerObject and new_owner.Is_Neutral() == false then
|
||||||
|
if (not LandSecured) or (PlayerObject.Get_Difficulty() == "Hard") then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Ignore changes to neutral - it might just be temporary on the way to
|
||||||
|
--passing into my control.
|
||||||
|
if new_owner ~= PlayerObject and new_owner.Is_Neutral() == false then
|
||||||
|
if (not LandSecured) or (PlayerObject.Get_Difficulty() == "Hard") then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function SpaceForce_No_Units_Remaining()
|
||||||
|
if not LandSecured then
|
||||||
|
DebugMessage("%s -- All units dead or non-buildable. Abandonning plan.", tostring(Script))
|
||||||
|
SpaceForce.Set_Plan_Result(false)
|
||||||
|
--Don't exit since we need to sleep to enforce delays between AI attacks (can't be done inside an event handler)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function GroundForce_No_Units_Remaining()
|
||||||
|
if not LandSecured then
|
||||||
|
DebugMessage("%s -- All units dead or non-buildable. Abandonning plan.", tostring(Script))
|
||||||
|
GroundForce.Set_Plan_Result(false)
|
||||||
|
--Don't exit since we need to sleep to enforce delays between AI attacks (can't be done inside an event handler)
|
||||||
|
end
|
||||||
|
end
|
||||||
145
DATA/SCRIPTS/AI/CRUSHPLAN.LUA
Normal file
145
DATA/SCRIPTS/AI/CRUSHPLAN.LUA
Normal file
@@ -0,0 +1,145 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/CrushPlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/CrushPlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Andre_Arsenault $
|
||||||
|
--
|
||||||
|
-- $Change: 37816 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/02/15 15:33:33 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("PGTaskForce")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 2
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
GlobalContrastScale = 3.0
|
||||||
|
PerFailureContrastAdjust = 0.5
|
||||||
|
|
||||||
|
Category = "Conquer_Opponent"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"MinimumTotalSize = 15" --SoaFE was 10
|
||||||
|
,"MinimumTotalForce = 12000" --SoaFE was 8000
|
||||||
|
, "Infantry | Vehicle | Air | Fighter | Bomber | Corvette | Frigate | Super | Capital = 100%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = {
|
||||||
|
"Infantry",
|
||||||
|
"Corvette | Frigate | Capital | Super"
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
|
||||||
|
LandSecured = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
difficulty = "Easy"
|
||||||
|
if PlayerObject then
|
||||||
|
difficulty = PlayerObject.Get_Difficulty()
|
||||||
|
end
|
||||||
|
sleep_duration = DifficultyBasedMinPause(difficulty)
|
||||||
|
|
||||||
|
--Let's not even do this on easy: the AI force can just be too overwhelming
|
||||||
|
if not difficulty == "Hard" then ScriptExit() end
|
||||||
|
|
||||||
|
-- Since we're using plan failure to adjust contrast, we're
|
||||||
|
-- only concerned with failures in battle. Default the
|
||||||
|
-- plan to successful and then
|
||||||
|
-- only on the event of our task force being killed is the
|
||||||
|
-- plan set to a failed state.
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
if MainForce.Are_All_Units_On_Free_Store() == true then
|
||||||
|
AssembleForce(MainForce)
|
||||||
|
else
|
||||||
|
BlockOnCommand(MainForce.Produce_Force());
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target))
|
||||||
|
|
||||||
|
if MainForce.Get_Force_Count() == 0 then
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
if Invade(MainForce) == false then
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This plan has all but succeeded; make sure AI systems don't remove it
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
MainForce.Test_Target_Contrast(false)
|
||||||
|
|
||||||
|
FundBases(PlayerObject, Target)
|
||||||
|
|
||||||
|
LandSecured = true
|
||||||
|
MainForce.Release_Forces(1.0)
|
||||||
|
if (not GalacticAttackAllowed(difficulty, 2)) then
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Production_Failed(failed_object_type)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Ignore changes to neutral - it might just be temporary on the way to
|
||||||
|
--passing into my control.
|
||||||
|
if new_owner ~= PlayerObject and new_owner.Is_Neutral() == false then
|
||||||
|
if (not LandSecured) or (PlayerObject.Get_Difficulty() == "Hard") then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_No_Units_Remaining()
|
||||||
|
if not LandSecured then
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
--Don't exit since we need to sleep to enforce delays between AI attacks (can't be done inside an event handler)
|
||||||
|
end
|
||||||
|
end
|
||||||
99
DATA/SCRIPTS/AI/DEATHSTARUSEPLAN.LUA
Normal file
99
DATA/SCRIPTS/AI/DEATHSTARUSEPLAN.LUA
Normal file
@@ -0,0 +1,99 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/DeathStarUsePlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/DeathStarUsePlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Andre_Arsenault $
|
||||||
|
--
|
||||||
|
-- $Change: 37816 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/02/15 15:33:33 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Death Star Usage
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Death_Star_Use"
|
||||||
|
MinContrastScale = 0.75
|
||||||
|
MaxContrastScale = 1.75
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"DeathStarForce"
|
||||||
|
,"Frigate | Capital | Corvette | Bomber | Fighter | Super = 100%"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RequiredCategories = { "Super" }
|
||||||
|
end
|
||||||
|
|
||||||
|
function DeathStarForce_Thread()
|
||||||
|
|
||||||
|
AssembleForce(DeathStarForce)
|
||||||
|
BlockOnCommand(DeathStarForce.Move_To(Target))
|
||||||
|
|
||||||
|
difficulty = "Easy"
|
||||||
|
if PlayerObject then
|
||||||
|
difficulty = PlayerObject.Get_Difficulty()
|
||||||
|
end
|
||||||
|
sleep_duration = DifficultyBasedMinPause(difficulty)
|
||||||
|
|
||||||
|
if DeathStarForce.Get_Force_Count() == 0 then
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Landing a hero deploys it, removing it from the game and killing the script. So,
|
||||||
|
-- we have to indicate success before we land the unit, even though it hasn't deployed.
|
||||||
|
-- If a hero killer gets her before she deploys, the plan should die before setting itself successful.
|
||||||
|
DeathStarForce.Set_Plan_Result(true)
|
||||||
|
BlockOnCommand(LandUnits(DeathStarForce))
|
||||||
|
|
||||||
|
-- This plan has all but succeeded; make sure AI systems don't remove it
|
||||||
|
DeathStarForce.Set_As_Goal_System_Removable(false)
|
||||||
|
DeathStarForce.Test_Target_Contrast(false)
|
||||||
|
|
||||||
|
if (not GalacticAttackAllowed(difficulty, 2)) then
|
||||||
|
Sleep(sleep_duration)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function DeathStarForce_No_Units_Remaining(tf)
|
||||||
|
--Do nothing
|
||||||
|
end
|
||||||
|
|
||||||
|
function DeathStarForce_Original_Target_Owner_Changed(tf, old_owner, new_owner)
|
||||||
|
--Do nothing
|
||||||
|
end
|
||||||
74
DATA/SCRIPTS/AI/DEPLOYUNITONTARGET.LUA
Normal file
74
DATA/SCRIPTS/AI/DEPLOYUNITONTARGET.LUA
Normal file
@@ -0,0 +1,74 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/DeployUnitOnTarget.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/DeployUnitOnTarget.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Remove_Smuggler"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"DenyHeroAttach",
|
||||||
|
"Bounty_Hunter_Team_E | Bounty_Hunter_Team_R = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
DebugMessage("%s -- In MainForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force(AITarget))
|
||||||
|
|
||||||
|
-- Landing a hero deploys it, removing it from the game and killing the script. So,
|
||||||
|
-- we have to indicate success before we land the unit, even though she hasn't deployed.
|
||||||
|
-- If a hero killer gets her before she deploys, the plan should die before setting itself successful.
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
BlockOnCommand(LandUnits(MainForce))
|
||||||
|
|
||||||
|
DebugMessage("%s -- Finished MainForce_Thread.", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
70
DATA/SCRIPTS/AI/EMPIREADVANCETECHPLAN.LUA
Normal file
70
DATA/SCRIPTS/AI/EMPIREADVANCETECHPLAN.LUA
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/EmpireAdvanceTechPlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 31 May, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 1
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Advance_Tech_Empire"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"TechForce",
|
||||||
|
"DS_Primary_Hyperdrive | DS_Shield_Gen | DS_Superlaser_Core | DS_Durasteel | Death_Star_II = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function TechForce_Thread()
|
||||||
|
DebugMessage("%s -- In TechForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
-- Ensure that all goal feasability will be reevaluated based on the new production budgetting conditions
|
||||||
|
-- (production underway that is already paid for and remains affordable under new budgets should continue)
|
||||||
|
Purge_Goals(PlayerObject)
|
||||||
|
|
||||||
|
TechForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
BlockOnCommand(TechForce.Produce_Force())
|
||||||
|
TechForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
DebugMessage("%s -- TechForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function TechForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
71
DATA/SCRIPTS/AI/FLUSHMAJORITEMBUDGET.LUA
Normal file
71
DATA/SCRIPTS/AI/FLUSHMAJORITEMBUDGET.LUA
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/FlushMajorItemBudget.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/FlushMajorItemBudget.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Galactic Flush MajorItem Budget Script
|
||||||
|
--
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Flush_MajorItem_Budget | Reclaim_Excess_MajorItem_Budget"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
-- First Task Force
|
||||||
|
{
|
||||||
|
"MainForce" -- Name of the MainForce, Variable and thread function.
|
||||||
|
, "TaskForceRequired"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
DebugMessage("%s -- In MainForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
Budget.Flush_Category("MajorItem")
|
||||||
|
|
||||||
|
DebugMessage("%s -- MainForce Done! Exiting Script!", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
78
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDDEFENSE.LUA
Normal file
78
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDDEFENSE.LUA
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundDefense.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundDefense.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Ground_Defense"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry = 3"
|
||||||
|
,"Vehicle = 1"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
LandUnits(ReserveForce)
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
Sleep(20)
|
||||||
|
wait_start_time = GetCurrentTime()
|
||||||
|
wait_duration = Determine_Magic_Wait_Duration()
|
||||||
|
while (GetCurrentTime() - wait_start_time < wait_duration) and
|
||||||
|
(EvaluatePerception("Needs_Magic_Ground_Defense", PlayerObject, Target) == 0.0) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
78
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDDEFENSEEASY.LUA
Normal file
78
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDDEFENSEEASY.LUA
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundDefenseEasy.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundDefenseEasy.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Ground_Defense_Easy"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry = 3"
|
||||||
|
,"Vehicle = 1"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
LandUnits(ReserveForce)
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
Sleep(20)
|
||||||
|
wait_start_time = GetCurrentTime()
|
||||||
|
wait_duration = Determine_Magic_Wait_Duration()
|
||||||
|
while (GetCurrentTime() - wait_start_time < wait_duration) and
|
||||||
|
(EvaluatePerception("Needs_Magic_Ground_Defense_Easy", PlayerObject, Target) == 0.0) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
78
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDDEFENSEHARD.LUA
Normal file
78
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDDEFENSEHARD.LUA
Normal file
@@ -0,0 +1,78 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundDefenseHard.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundDefenseHard.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Ground_Defense_Hard"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry = 2"
|
||||||
|
,"Vehicle = 4"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
LandUnits(ReserveForce)
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
Sleep(20)
|
||||||
|
wait_start_time = GetCurrentTime()
|
||||||
|
wait_duration = Determine_Magic_Wait_Duration()
|
||||||
|
while (GetCurrentTime() - wait_start_time < wait_duration) and
|
||||||
|
(EvaluatePerception("Needs_Magic_Ground_Defense_Hard", PlayerObject, Target) == 0.0) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
66
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDSTRUCTURE.LUA
Normal file
66
DATA/SCRIPTS/AI/GENERATEMAGICGROUNDSTRUCTURE.LUA
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundStructure.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicGroundStructure.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Ground_Structure"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"E_Galactic_Turbolaser_Tower_Defenses | R_Galactic_Turbolaser_Tower_Defenses | E_Ground_Advanced_Vehicle_Factory | E_Ground_Heavy_Vehicle_Factory | R_Ground_Heavy_Vehicle_Factory | E_Ground_Light_Vehicle_Factory | R_Ground_Light_Vehicle_Factory | U_Ground_Vehicle_Factory | U_Ground_Droid_Works | U_Ground_Barracks | U_Ground_Palace = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
Sleep(40)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
77
DATA/SCRIPTS/AI/GENERATEMAGICSPACEDEFENSE.LUA
Normal file
77
DATA/SCRIPTS/AI/GENERATEMAGICSPACEDEFENSE.LUA
Normal file
@@ -0,0 +1,77 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefense.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefense.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Space_Defense"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Fighter | Bomber = 6"
|
||||||
|
,"Corvette | Frigate = 4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
Sleep(20)
|
||||||
|
|
||||||
|
--Use the Easy version of Needs_Magic_Space_Defense (just in case the units we spawned don't pull us past the
|
||||||
|
--Normal threshold)
|
||||||
|
wait_start_time = GetCurrentTime()
|
||||||
|
wait_duration = Determine_Magic_Wait_Duration()
|
||||||
|
while (GetCurrentTime() - wait_start_time < wait_duration) and
|
||||||
|
(EvaluatePerception("Needs_Magic_Space_Defense_Easy", PlayerObject, Target) == 0.0) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
75
DATA/SCRIPTS/AI/GENERATEMAGICSPACEDEFENSEEASY.LUA
Normal file
75
DATA/SCRIPTS/AI/GENERATEMAGICSPACEDEFENSEEASY.LUA
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefenseEasy.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefenseEasy.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Space_Defense_Easy"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Fighter | Bomber = 4"
|
||||||
|
,"Corvette | Frigate = 2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
--Sleep forever on easy so that we can't repeat the spawn
|
||||||
|
wait_start_time = GetCurrentTime()
|
||||||
|
wait_duration = Determine_Magic_Wait_Duration()
|
||||||
|
while (GetCurrentTime() - wait_start_time < wait_duration) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
76
DATA/SCRIPTS/AI/GENERATEMAGICSPACEDEFENSEHARD.LUA
Normal file
76
DATA/SCRIPTS/AI/GENERATEMAGICSPACEDEFENSEHARD.LUA
Normal file
@@ -0,0 +1,76 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefenseHard.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/GenerateMagicSpaceDefenseHard.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Generate_Magic_Space_Defense_Hard"
|
||||||
|
IgnoreTarget = true
|
||||||
|
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Fighter | Bomber = 10"
|
||||||
|
,"Corvette | Frigate | Capital = 6"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
MagicPlan = true
|
||||||
|
MagicPlanStealing = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force(Target))
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
Sleep(20)
|
||||||
|
--Use the Normal version of Needs_Magic_Space_Defense (just in case the units we spawned don't pull us past the
|
||||||
|
--Hard threshold)
|
||||||
|
wait_start_time = GetCurrentTime()
|
||||||
|
wait_duration = Determine_Magic_Wait_Duration()
|
||||||
|
while (GetCurrentTime() - wait_start_time < wait_duration) and
|
||||||
|
(EvaluatePerception("Needs_Magic_Space_Defense", PlayerObject, Target) == 0.0) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
70
DATA/SCRIPTS/AI/HUTTSADVANCETECHPLAN.LUA
Normal file
70
DATA/SCRIPTS/AI/HUTTSADVANCETECHPLAN.LUA
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/HuttsAdvanceTechPlan.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 31 May, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Advance_Tech_Hutts"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"TechForce",
|
||||||
|
"Hutt_Tech_2 | Hutt_Tech_3 | Hutt_Tech_4 | Hutt_Tech_5 = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function TechForce_Thread()
|
||||||
|
DebugMessage("%s -- In TechForce_Thread.", tostring(Script))
|
||||||
|
|
||||||
|
-- Ensure that all goal feasability will be reevaluated based on the new production budgetting conditions
|
||||||
|
-- (production underway that is already paid for and remains affordable under new budgets should continue)
|
||||||
|
Purge_Goals(PlayerObject)
|
||||||
|
|
||||||
|
TechForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
BlockOnCommand(TechForce.Produce_Force())
|
||||||
|
TechForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
DebugMessage("%s -- TechForce done!", tostring(Script));
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function TechForce_Production_Failed(tf, failed_object_type)
|
||||||
|
DebugMessage("%s -- Abandonning plan owing to production failure.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
94
DATA/SCRIPTS/AI/LANDMODE/AIRSTRIKE.LUA
Normal file
94
DATA/SCRIPTS/AI/LANDMODE/AIRSTRIKE.LUA
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/Airstrike.lua#3 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/Airstrike.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: James_Yarrow $
|
||||||
|
--
|
||||||
|
-- $Change: 54633 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/09/14 17:46:53 $
|
||||||
|
--
|
||||||
|
-- $Revision: #3 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Space Mode Test Script
|
||||||
|
--
|
||||||
|
|
||||||
|
ScriptPoolCount = 3
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Airstrike"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Air = 1, 5"
|
||||||
|
,"-Gallofree_HTT_Transport"
|
||||||
|
,"-Fanblade_Fighter"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
start_loc = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
-- See if any units have landed
|
||||||
|
if MainForce.Get_Force_Count() ~= 0 then
|
||||||
|
|
||||||
|
-- Land the remainder nearby.
|
||||||
|
WaitForAllReinforcements(MainForce, MainForce)
|
||||||
|
else
|
||||||
|
|
||||||
|
-- Land near the default starting point.
|
||||||
|
start_loc = FindTarget(MainForce, "Is_Friendly_Start", "Tactical_Location", 1.0)
|
||||||
|
if start_loc then
|
||||||
|
WaitForAllReinforcements(MainForce, start_loc)
|
||||||
|
else
|
||||||
|
WaitForAllReinforcements(MainForce, AITarget)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
MainForce.Set_Targeting_Priorities("Air_Attack_Move")
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,64 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_BuildBunker.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 6 May, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a bunker
|
||||||
|
-- Disabling: | FCU_UC_Empire_Bunker | FCU_UC_Rebel_Bunker | FCU_UC_Underworld_Bunker | FCU_UC_Hutts_Bunker | FCU_UC_Empire_Bunker_Pad | FCU_UC_Rebel_Bunker_Pad | FCU_UC_Underworld_Bunker_Pad | FCU_UC_Hutts_Bunker_Pad
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Bunker"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
,"UC_Empire_Bunker_Pad | UC_Rebel_Bunker_Pad | UC_Underworld_Bunker_Pad | UC_Hutts_Bunker_Pad | UC_Pirates_Bunker_Pad = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
-- Make sure we've ended up with a build location that's reasonably close to our original target
|
||||||
|
pad_table = MainForce.Get_Reserved_Build_Pads()
|
||||||
|
for i,pad in pad_table do
|
||||||
|
if pad.Get_Distance(AITarget) > 120 then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Build the task force
|
||||||
|
-- Blocking shouldn't be necessary, but we'll use it to ease watching the script
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,110 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_BuildMDUItem.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 4 June, 2018
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a single turret.
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Ysalamiri_Cage | Build_Sensor_Scrambler | Build_Rocket_Pod | Build_EM_Field_Generator | Build_Grenade_Mortar | Build_Offensive_Sensor_Node | Build_MDU_Repair_Facility | Build_Mobile_Shield_Generator | Build_Rapid_Fire_Laser | Build_Obelisk_Tower | Build_Guard_Tower | Build_Landing_Pad"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Underworld_Mobile_Defense_Unit | Empire_Mobile_Defense_Unit | Rebel_Mobile_Defense_Unit | Hutt_Mobile_Defense_Unit = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
goal_name = MainForce.Get_Goal_Type_Name()
|
||||||
|
if goal_name == "Build_Ysalamiri_Cage" then
|
||||||
|
build_item_name = "UC_Underworld_Buildable_Ysalamiri_Cage"
|
||||||
|
elseif goal_name == "Build_Sensor_Scrambler" then
|
||||||
|
build_item_name = "UC_Underworld_Buildable_Sensor_Scrambler"
|
||||||
|
elseif goal_name == "Build_Rocket_Pod" then
|
||||||
|
build_item_name = "UC_Underworld_Buildable_Rocket_Pod"
|
||||||
|
elseif goal_name == "Build_EM_Field_Generator" then
|
||||||
|
build_item_name = "UC_Empire_Buildable_EM_Field_Generator"
|
||||||
|
elseif goal_name == "Build_Grenade_Mortar" then
|
||||||
|
build_item_name = "UC_Empire_Buildable_Grenade_Mortar"
|
||||||
|
elseif goal_name == "Build_Offensive_Sensor_Node" then
|
||||||
|
build_item_name = "UC_Empire_Buildable_Offensive_Sensor_Node"
|
||||||
|
elseif goal_name == "Build_MDU_Repair_Facility" then
|
||||||
|
build_item_name = "UC_Rebel_Buildable_Repair_Facility_MDU"
|
||||||
|
elseif goal_name == "Build_Mobile_Shield_Generator" then
|
||||||
|
build_item_name = "UC_Rebel_Buildable_Shield_Generator_185"
|
||||||
|
elseif goal_name == "Build_Rapid_Fire_Laser" then
|
||||||
|
build_item_name = "UC_Rebel_Buildable_Rapid_Fire_Laser_Turret"
|
||||||
|
elseif goal_name == "Build_Obelisk_Tower" then
|
||||||
|
build_item_name = "UC_Hutt_Buildable_Obelisk_Tower"
|
||||||
|
elseif goal_name == "Build_Guard_Tower" then
|
||||||
|
build_item_name = "UC_Hutt_Buildable_Guard_Tower"
|
||||||
|
elseif goal_name == "Build_Landing_Pad" then
|
||||||
|
build_item_name = "UC_H_Ground_Landing_Pad"
|
||||||
|
end
|
||||||
|
|
||||||
|
if not build_item_name then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target, MainForce.Get_Self_Threat_Max()))
|
||||||
|
build_started = true
|
||||||
|
BlockOnCommand(MainForce.Activate_Ability("DEPLOY", true))
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
Sleep(2)
|
||||||
|
|
||||||
|
mdu = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(mdu) then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
mdu.Build(build_item_name)
|
||||||
|
|
||||||
|
while TestValid(mdu) and not TestValid(mdu.Get_Build_Pad_Contents()) do
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Unit_Damaged(tf, unit, attacker, deliberate)
|
||||||
|
if not build_started then
|
||||||
|
Default_Unit_Damaged(tf, unit, attacker, deliberate)
|
||||||
|
end
|
||||||
|
end
|
||||||
@@ -0,0 +1,67 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_DeployTroopTransports.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 28 Septembter, 2012
|
||||||
|
--
|
||||||
|
-- Revisions: 0
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
--Get transport units landed and move them towards high concentrations of friendly infantry
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Deploy_Troop_Transports"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"HAV_Juggernaut | F9TZ_Cloaking_Transport | Gallofree_HTT_Transport | Hutt_SailBarge = 1,5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce, nil)
|
||||||
|
|
||||||
|
unit_table = MainForce.Get_Unit_Table()
|
||||||
|
for i,unit in pairs(unit_table) do
|
||||||
|
if unit.Has_Garrison() then
|
||||||
|
MainForce.Release_Unit(unit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
BlockOnCommand(MainForce.Move_To(AITarget))
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,117 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_GarrisonTarget.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_GarrisonTarget.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Garrison_Bunker | Garrison_Transport"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"Infantry = 1,5"
|
||||||
|
,"-Vornskr_Wolf"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce, nil)
|
||||||
|
|
||||||
|
if not MainForce.Can_Garrison(AITarget) then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Activate_Ability("SPREAD_OUT", false)
|
||||||
|
|
||||||
|
difficulty = PlayerObject.Get_Difficulty()
|
||||||
|
if difficulty == "Easy" then
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(Target.Get_Position(), MainForce.Get_Self_Threat_Max()))
|
||||||
|
else
|
||||||
|
BlockOnCommand(MainForce.Move_To(Target.Get_Position(), MainForce.Get_Self_Threat_Max()))
|
||||||
|
end
|
||||||
|
|
||||||
|
Sleep(5)
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Override default handling, which will kill the plan
|
||||||
|
function MainForce_Original_Target_Owner_Changed(tf, old_player, new_player)
|
||||||
|
|
||||||
|
--If someone else captures the bunker then I need to assault it with anti-structure
|
||||||
|
--units rather than capture it with infantry
|
||||||
|
if new_player ~= PlayerObject and new_player.Is_Neutral() == false then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
Create_Thread("Finalize_Garrison", unit)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function Finalize_Garrison(unit)
|
||||||
|
|
||||||
|
unit.Guard_Target(Target)
|
||||||
|
while TestValid(Target) and (not Target.Has_Garrison()) and (Target.Get_Owner() ~= PlayerObject) do
|
||||||
|
Sleep(2)
|
||||||
|
unit.Guard_Target(Target)
|
||||||
|
end
|
||||||
|
|
||||||
|
if TestValid(Target) and unit.Can_Garrison(Target) then
|
||||||
|
unit.Garrison(Target)
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Release_Unit(unit)
|
||||||
|
|
||||||
|
end
|
||||||
@@ -0,0 +1,63 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_OrbitalBombardment.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_ExpansionGeneric_OrbitalBombardment.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Orbital_Bombardment"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
MainForce.Fire_Orbital_Bombardment(Target)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,91 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_Underworld_MineStructure.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_Underworld_MineStructure.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 1
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Mine_Structure"
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Underworld_Merc_Team = 1,2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
unit_table = MainForce.Get_Unit_Table()
|
||||||
|
for i,unit in pairs(unit_table) do
|
||||||
|
if not unit.Is_Ability_Ready("PROXIMITY_MINES") then
|
||||||
|
MainForce.Release_Unit(unit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget))
|
||||||
|
|
||||||
|
enemy = FindDeadlyEnemy(AITarget)
|
||||||
|
if not TestValid(enemy) then
|
||||||
|
enemy = Find_Nearest(AITarget, PlayerObject, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
if not TestValid(enemy) then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Move_To(enemy)
|
||||||
|
Sleep(5)
|
||||||
|
MainForce.Activate_Ability("PROXIMITY_MINES", MainForce)
|
||||||
|
|
||||||
|
--We treat all instances as failures so as not to repeatedly attempt to mine the same location
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
@@ -0,0 +1,82 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_Underworld_RemoteBombFriendlyUnit.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_Underworld_RemoteBombFriendlyUnit.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 3
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Remote_Bomb_Friendly_Unit"
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Underworld_Saboteur = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
unit_table = MainForce.Get_Unit_Table()
|
||||||
|
for i,unit in pairs(unit_table) do
|
||||||
|
if not unit.Is_Ability_Ready("PLACE_REMOTE_BOMB") then
|
||||||
|
MainForce.Release_Unit(unit)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Activate_Ability("PLACE_REMOTE_BOMB", Target))
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
if TestValid(Target) then
|
||||||
|
rush_target = Find_Nearest(Target, PlayerObject, false)
|
||||||
|
if TestValid(rush_target) then
|
||||||
|
Target.Move_To(rush_target)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
152
DATA/SCRIPTS/AI/LANDMODE/AI_PLAN_UNDERWORLD_TYBERMANAGERLAND.LUA
Normal file
152
DATA/SCRIPTS/AI/LANDMODE/AI_PLAN_UNDERWORLD_TYBERMANAGERLAND.LUA
Normal file
@@ -0,0 +1,152 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_Underworld_TyberManagerLand.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/AI_Plan_Underworld_TyberManagerLand.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Tyber_Manager_Land"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Tyber_Zann = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
|
||||||
|
attack_attention_span = 30
|
||||||
|
defend_attention_span = 30
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
tyber = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(tyber) then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
tyber.Set_Single_Ability_Autofire("TACTICAL_BRIBE", false)
|
||||||
|
|
||||||
|
-- Continuously try to attack, assist the most significant nearby unit, and heal up
|
||||||
|
while true do
|
||||||
|
|
||||||
|
threat_threshold = "Any_Threat"
|
||||||
|
if tyber.Get_Hull() < 0.5 then
|
||||||
|
threat_threshold = "Low_Threat"
|
||||||
|
end
|
||||||
|
|
||||||
|
if not ConsiderHeal(tyber) then
|
||||||
|
if not Try_Bribe(tyber, threat_threshold) then
|
||||||
|
if not Try_Defend(tyber, threat_threshold) then
|
||||||
|
if not Try_Attack(tyber, threat_threshold) then
|
||||||
|
Try_Ability(tyber, "STEALTH")
|
||||||
|
Sleep(5)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure the loop always yields
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function Try_Bribe(tyber, threat_threshold)
|
||||||
|
|
||||||
|
if tyber.Is_Ability_Ready("TACTICAL_BRIBE") then
|
||||||
|
|
||||||
|
bribe_target = FindTarget.Reachable_Target(PlayerObject, "Bribe_Target_Score", "Enemy_Unit", threat_threshold, 1.0, tyber)
|
||||||
|
|
||||||
|
if TestValid(bribe_target) then
|
||||||
|
bribe_cost = bribe_target.Get_Game_Object().Get_Type().Get_Bribe_Cost(tyber)
|
||||||
|
if bribe_cost > 0.0 and bribe_cost < PlayerObject.Get_Credits() then
|
||||||
|
tyber.Activate_Ability("STEALTH", true)
|
||||||
|
BlockOnCommand(tyber.Activate_Ability("TACTICAL_BRIBE", bribe_target))
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function Try_Defend(tyber, threat_threshold)
|
||||||
|
|
||||||
|
if EvaluatePerception("Allowed_As_Defender_Land", PlayerObject) <= 0.0 then
|
||||||
|
|
||||||
|
structure_to_defend = FindTarget.Reachable_Target(PlayerObject, "Need_To_Defend_Structure", "Friendly_Structure", threat_threshold, 1.0, tyber)
|
||||||
|
|
||||||
|
if TestValid(structure_to_defend) then
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(structure_to_defend), defend_attention_span)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
end
|
||||||
|
|
||||||
|
function Try_Attack(tyber, threat_threshold)
|
||||||
|
|
||||||
|
enemy = FindDeadlyEnemy(tyber)
|
||||||
|
if not TestValid(enemy) then
|
||||||
|
enemy = Find_Nearest(tyber, PlayerObject, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
if TestValid(enemy) then
|
||||||
|
BlockOnCommand(tyber.Attack_Move(enemy), attack_attention_span)
|
||||||
|
return true
|
||||||
|
end
|
||||||
|
|
||||||
|
return false
|
||||||
|
|
||||||
|
end
|
||||||
208
DATA/SCRIPTS/AI/LANDMODE/BOBAFETTFLAMEINFANTRY.LUA
Normal file
208
DATA/SCRIPTS/AI/LANDMODE/BOBAFETTFLAMEINFANTRY.LUA
Normal file
@@ -0,0 +1,208 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/BobaFettFlameInfantry.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/BobaFettFlameInfantry.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Flame_Infantry"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Boba_Fett = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
time_to_transition_reinforcement_point = 10
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
fett = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(fett) then
|
||||||
|
MessageBox("unexpected state; fett unavailable")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure he doesn't autonomousely use his flamethrower
|
||||||
|
--fett.Set_Single_Ability_Autofire("FLAME_THROWER", false)
|
||||||
|
|
||||||
|
--MessageBox("Start")
|
||||||
|
|
||||||
|
-- Don't let Fett waste the landing party on Easy or Normal difficlties
|
||||||
|
difficulty = PlayerObject.Get_Difficulty()
|
||||||
|
if (EvaluatePerception("Is_Skirmish_Mode", PlayerObject) == 0)
|
||||||
|
and (difficulty == "Normal" or difficulty == "Easy") then
|
||||||
|
friendly_structure = Find_Nearest(MainForce, "Structure", PlayerObject, true)
|
||||||
|
if TestValid(friendly_structure) then
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(friendly_structure), 80)
|
||||||
|
else
|
||||||
|
Sleep(80)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
while true do
|
||||||
|
|
||||||
|
ConsiderFettHeal()
|
||||||
|
|
||||||
|
-- Capture a reinforcement point
|
||||||
|
lz_table = PruneFriendlyObjects(Find_All_Objects_Of_Type("IsRushTarget"))
|
||||||
|
--DebugPrintTable(lz_table)
|
||||||
|
if TestValid(lz_table[1]) then
|
||||||
|
FettMove(lz_table[1])
|
||||||
|
BlockOnCommand(fett.Guard_Target(lz_table[1]), time_to_transition_reinforcement_point)
|
||||||
|
end
|
||||||
|
|
||||||
|
ConsiderFettHeal()
|
||||||
|
|
||||||
|
-- Chase down infantry and flame them
|
||||||
|
closest_infantry = Find_Nearest(fett, "Infantry", PlayerObject, false)
|
||||||
|
if TestValid(closest_infantry) then
|
||||||
|
FettMove(closest_infantry, true)
|
||||||
|
|
||||||
|
-- Walk the last bit so we can attack more appropriately
|
||||||
|
if TestValid(closest_infantry) then
|
||||||
|
DebugMessage("%s-- finally attack moving on %s", tostring(Script), tostring(closest_infantry))
|
||||||
|
BlockOnCommand(fett.Attack_Move(closest_infantry))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
-- Make sure the loop always yields
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function ConsiderFettHeal()
|
||||||
|
if fett.Get_Hull() < 0.4 then
|
||||||
|
bacta = Find_Nearest(fett, "HealsInfantry", PlayerObject, true)
|
||||||
|
if TestValid(bacta) then
|
||||||
|
FettMove(bacta)
|
||||||
|
while fett.Get_Hull() < 0.9 do
|
||||||
|
DebugMessage("%s-- Waiting to heal", tostring(Script))
|
||||||
|
BlockOnCommand(fett.Guard_Target(bacta), 2)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Try to use the jet pack to get around, but run if we have to while the ability is recharging.
|
||||||
|
function FettMove(target, use_attack_move)
|
||||||
|
DebugMessage("%s-- starting FettMove", tostring(Script))
|
||||||
|
|
||||||
|
if use_attack_move then
|
||||||
|
change_up_duration = 4
|
||||||
|
else
|
||||||
|
change_up_duration = 30
|
||||||
|
end
|
||||||
|
|
||||||
|
if TestValid(target) and fett.Get_Distance(target) > 150 then
|
||||||
|
if JetPackReady() then
|
||||||
|
BlockOnCommand(fett.Activate_Ability("JET_PACK", target), change_up_duration)
|
||||||
|
MoveUntilDone(target, change_up_duration)
|
||||||
|
else
|
||||||
|
|
||||||
|
if use_attack_move then
|
||||||
|
BlockOnCommand(fett.Attack_Move(target, -1, JetPackReady))
|
||||||
|
else
|
||||||
|
BlockOnCommand(fett.Move_To(target.Get_Position(), -1, JetPackReady))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Apparently needed so that the following jet pack usage will detect that the ability is ready
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
if TestValid(target) then
|
||||||
|
DebugMessage("%s-- activating jet pack because it came on line", tostring(Script))
|
||||||
|
BlockOnCommand(fett.Activate_Ability("JET_PACK", target), change_up_duration)
|
||||||
|
MoveUntilDone(target, change_up_duration)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
else
|
||||||
|
end
|
||||||
|
|
||||||
|
DebugMessage("%s-- finished FettMove", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This moves fett, periodically reissuing the order, while allowing to finish if we get close
|
||||||
|
-- enough or the block naturally finishes (because we've collided with the structure or whatever)
|
||||||
|
-- This is to fix a bug where Fett would get stuck trying to move to the center of a building, and
|
||||||
|
-- still think he's not close enough. The block should finish when we hit the building.
|
||||||
|
function MoveUntilDone(target, max_duration)
|
||||||
|
DebugMessage("%s-- starting MoveUntilDone", tostring(Script))
|
||||||
|
|
||||||
|
if not TestValid(target) then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
ThreadValue.Set("BlockStartFettMove", GetCurrentTime())
|
||||||
|
block = fett.Move_To(target)
|
||||||
|
while TestValid(target) and fett.Get_Distance(target) > 30 and block and (block.IsFinished() ~= true) do
|
||||||
|
DebugMessage("%s-- servicing MoveUntilDone", tostring(Script))
|
||||||
|
PumpEvents()
|
||||||
|
if (GetCurrentTime() - ThreadValue("BlockStartFettMove") > max_duration) then
|
||||||
|
DebugMessage("%s-- reissuing move order", tostring(Script))
|
||||||
|
block = fett.Move_To(target)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
DebugMessage("%s-- finished MoveUntilDone", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function JetPackReady()
|
||||||
|
return fett.Is_Ability_Ready("JET_PACK")
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
56
DATA/SCRIPTS/AI/LANDMODE/BUILDANTIAIRTURRET.LUA
Normal file
56
DATA/SCRIPTS/AI/LANDMODE/BUILDANTIAIRTURRET.LUA
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildAntiAirTurret.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 27 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 4
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a single turret.
|
||||||
|
-- Disabling: | FCU_UC_Empire_Buildable_Anti_Aircraft_Turret | FCU_UC_Rebel_Buildable_Anti_Aircraft_Turret | FCU_UC_Underworld_Buildable_Flak_Turret | FCU_UC_Hutt_Buildable_Anti_Aircraft_Turret
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_AntiAir_Turret"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
,"UC_Empire_Buildable_Anti_Aircraft_Turret | UC_Rebel_Buildable_Anti_Aircraft_Turret | UC_Pirate_Buildable_Anti_Aircraft_Turret | UC_Underworld_Buildable_Flak_Turret | UC_Hutt_Buildable_Anti_Aircraft_Turret = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
DebugMessage("%s -- Building a turret.", tostring(Script))
|
||||||
|
|
||||||
|
-- Build the task force
|
||||||
|
-- Blocking shouldn't be necessary, but we'll use it to ease watching the script
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
65
DATA/SCRIPTS/AI/LANDMODE/BUILDANTIINFANTRYTURRET.LUA
Normal file
65
DATA/SCRIPTS/AI/LANDMODE/BUILDANTIINFANTRYTURRET.LUA
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildAntiInfantryTurret.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 27 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 4
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a single turret.
|
||||||
|
-- Disabling: | FCU_UC_Empire_Buildable_Anti_Infantry_Turret | FCU_UC_Rebel_Buildable_Anti_Infantry_Turret | FCU_UC_Underworld_Buildable_Mass_Driver_Turret | FCU_UC_Hutt_Buildable_Rapid_Fire_Laser_Turret
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_AntiInfantry_Turret"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
,"UC_Empire_Buildable_Anti_Infantry_Turret | UC_Rebel_Buildable_Anti_Infantry_Turret | UC_Pirate_Buildable_Anti_Infantry_Turret | UC_Underworld_Buildable_Mass_Driver_Turret | UC_Hutt_Buildable_Rapid_Fire_Laser_Turret = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
--MessageBox("%s -- Building a turret.", tostring(Script))
|
||||||
|
|
||||||
|
-- Make sure we've ended up with a build location that's reasonably close to our original target
|
||||||
|
pad_table = MainForce.Get_Reserved_Build_Pads()
|
||||||
|
for i,pad in pad_table do
|
||||||
|
if pad.Get_Distance(AITarget) > 120 then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Build the task force
|
||||||
|
-- Blocking shouldn't be necessary, but we'll use it to ease watching the script
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
65
DATA/SCRIPTS/AI/LANDMODE/BUILDANTIVEHICLETURRET.LUA
Normal file
65
DATA/SCRIPTS/AI/LANDMODE/BUILDANTIVEHICLETURRET.LUA
Normal file
@@ -0,0 +1,65 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildAntiVehicleTurret.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 27 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 4
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a single turret.
|
||||||
|
-- Disabling: | FCU_UC_Empire_Buildable_Anti_Vehicle_Turret | FCU_UC_Rebel_Buildable_Anti_Vehicle_Turret | FCU_UC_Underworld_Buildable_Torpedo_Turret | FCU_UC_Hutt_Buildable_Rocket_Turret
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_AntiVehicle_Turret"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
,"UC_Empire_Buildable_Anti_Vehicle_Turret | UC_Rebel_Buildable_Anti_Vehicle_Turret | UC_Pirate_Buildable_Anti_Vehicle_Turret | UC_Underworld_Buildable_Torpedo_Turret | UC_Hutt_Buildable_Rocket_Turret = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
--MessageBox("%s -- Building a turret.", tostring(Script))
|
||||||
|
|
||||||
|
-- Make sure we've ended up with a build location that's reasonably close to our original target
|
||||||
|
pad_table = MainForce.Get_Reserved_Build_Pads()
|
||||||
|
for i,pad in pad_table do
|
||||||
|
if pad.Get_Distance(AITarget) > 120 then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Build the task force
|
||||||
|
-- Blocking shouldn't be necessary, but we'll use it to ease watching the script
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
56
DATA/SCRIPTS/AI/LANDMODE/BUILDBACTATANK.LUA
Normal file
56
DATA/SCRIPTS/AI/LANDMODE/BUILDBACTATANK.LUA
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildBactaTank.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 27 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a single structure.
|
||||||
|
-- Disabling: | FCU_UC_Empire_Buildable_Bacta_Tank | FCU_UC_Rebel_Buildable_Bacta_Tank | FCU_UC_Underworld_Buildable_Bacta_Tank | FCU_UC_Hutt_Buildable_Bacta_Tank
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Bacta_Tank"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
,"UC_Empire_Buildable_Bacta_Tank | UC_Rebel_Buildable_Bacta_Tank | UC_Pirate_Buildable_Bacta_Tank | UC_Underworld_Buildable_Bacta_Tank | UC_Hutt_Buildable_Bacta_Tank = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
DebugMessage("%s -- Building a turret.", tostring(Script))
|
||||||
|
|
||||||
|
-- Build the task force
|
||||||
|
-- Blocking shouldn't be necessary, but we'll use it to ease watching the script
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
53
DATA/SCRIPTS/AI/LANDMODE/BUILDBARRACKSLAND.LUA
Normal file
53
DATA/SCRIPTS/AI/LANDMODE/BUILDBARRACKSLAND.LUA
Normal file
@@ -0,0 +1,53 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildBarracksLand.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 9 April, 2023
|
||||||
|
--
|
||||||
|
-- Revisions: 4
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Tactical_Multiplayer_Build_Barracks"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"UC_E_Ground_Barracks | UC_R_Ground_Barracks | UC_U_Ground_Barracks | UC_H_Ground_Barracks | UC_P_Ground_Outpost = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
54
DATA/SCRIPTS/AI/LANDMODE/BUILDCOMMANDCENTERLAND.LUA
Normal file
54
DATA/SCRIPTS/AI/LANDMODE/BUILDCOMMANDCENTERLAND.LUA
Normal file
@@ -0,0 +1,54 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildCommandCenterLand.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 2 October, 2022
|
||||||
|
--
|
||||||
|
-- Revisions: 3
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- Disabling: | FCU_UC_E_Ground_Command_Center | FCU_UC_R_Ground_Command_Center | FCU_UC_U_Ground_Palace | FCU_UC_H_Ground_Command_Center
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Tactical_Multiplayer_Build_Command_Center"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"UC_E_Ground_Command_Center | UC_R_Ground_Command_Center | UC_U_Ground_Palace | UC_H_Ground_Command_Center | UC_P_Ground_Command_Center = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
63
DATA/SCRIPTS/AI/LANDMODE/BUILDECONSTRUCTURE.LUA
Normal file
63
DATA/SCRIPTS/AI/LANDMODE/BUILDECONSTRUCTURE.LUA
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildEconStructure.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 2 October, 2022
|
||||||
|
--
|
||||||
|
-- Revisions: 4
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- Disabling for now
|
||||||
|
-- | FCU_UC_Rebel_Farm | FCU_UC_Rebel_Mineral_Processor | FCU_UC_Rebel_Surface_Mine | FCU_UC_Rebel_Refinery | FCU_UC_Rebel_Casino | FCU_UC_Rebel_Ground_Mining_Facility
|
||||||
|
-- | FCU_UC_Empire_Farm | FCU_UC_Empire_Mineral_Processor | FCU_UC_Empire_Surface_Mine | FCU_UC_Empire_Refinery | FCU_UC_Empire_Casino | FCU_UC_Empire_Ground_Mining_Facility
|
||||||
|
-- | FCU_UC_Underworld_Farm | FCU_UC_Underworld_Mineral_Processor | FCU_UC_Underworld_Surface_Mine | FCU_UC_Underworld_Refinery | FCU_UC_Underworld_Casino | FCU_UC_Underworld_Ground_Mining_Facility
|
||||||
|
-- | FCU_UC_Hutts_Farm | FCU_UC_Hutts_Mineral_Processor | FCU_UC_Hutts_Advanced_Mineral_Processor | FCU_UC_Hutts_Surface_Mine | FCU_UC_Hutts_Refinery | FCU_UC_Hutts_Casino | FCU_UC_Hutts_Ground_Mining_Facility
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Econ_Structure"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"UC_Rebel_Mineral_Processor | UC_Rebel_Ground_Mining_Facility = 0,1"
|
||||||
|
,"UC_Empire_Mineral_Processor | UC_Empire_Ground_Mining_Facility = 0,1"
|
||||||
|
,"UC_Underworld_Mineral_Processor | UC_Underworld_Ground_Mining_Facility = 0,1"
|
||||||
|
,"UC_Hutts_Mineral_Processor | UC_Hutts_Ground_Mining_Facility = 0,1"
|
||||||
|
,"UC_Pirate_Mineral_Processor | UC_Pirate_Ground_Mining_Facility = 0,1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = {"Structure"}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
71
DATA/SCRIPTS/AI/LANDMODE/BUILDINFANTRYEMERGENCY.LUA
Normal file
71
DATA/SCRIPTS/AI/LANDMODE/BUILDINFANTRYEMERGENCY.LUA
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/BuildInfantryEmergency.lua#3 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/BuildInfantryEmergency.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: James_Yarrow $
|
||||||
|
--
|
||||||
|
-- $Change: 53121 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/08/30 16:32:34 $
|
||||||
|
--
|
||||||
|
-- $Revision: #3 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Tactical_Multiplayer_Build_Infantry_Emergency"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce",
|
||||||
|
"Infantry | LandHero = 1",
|
||||||
|
"-Vornskr_Wolf",
|
||||||
|
"-Veers_AT_AT_Walker",
|
||||||
|
"-Gargantuan_Battle_Platform",
|
||||||
|
"-Tactical_R2_3PO_Team",
|
||||||
|
"-Droids_Team"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force())
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
ReserveForce.Set_As_Goal_System_Removable(false)
|
||||||
|
Sleep(15)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
56
DATA/SCRIPTS/AI/LANDMODE/BUILDREPAIRFACILITY.LUA
Normal file
56
DATA/SCRIPTS/AI/LANDMODE/BUILDREPAIRFACILITY.LUA
Normal file
@@ -0,0 +1,56 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildRepairFacility.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 27 January, 2019
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Build a single structure.
|
||||||
|
-- Disabling: | FCU_UC_Empire_Buildable_Repair_Facility | FCU_UC_Rebel_Buildable_Repair_Facility | FCU_UC_Underworld_Buildable_Repair_Facility | FCU_UC_Hutt_Buildable_Repair_Facility
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Build_Repair_Bay"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
,"UC_Empire_Buildable_Repair_Facility | UC_Rebel_Buildable_Repair_Facility | UC_Pirate_Buildable_Repair_Facility | UC_Underworld_Buildable_Repair_Facility | UC_Hutt_Buildable_Repair_Facility = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
DebugMessage("%s -- Building a turret.", tostring(Script))
|
||||||
|
|
||||||
|
-- Build the task force
|
||||||
|
-- Blocking shouldn't be necessary, but we'll use it to ease watching the script
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
60
DATA/SCRIPTS/AI/LANDMODE/BUILDSTRUCTURELAND.LUA
Normal file
60
DATA/SCRIPTS/AI/LANDMODE/BUILDSTRUCTURELAND.LUA
Normal file
@@ -0,0 +1,60 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/BuildStructureLand.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 26 April, 2023
|
||||||
|
--
|
||||||
|
-- Revisions: 7
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--BuildEconStructure.lua covers these
|
||||||
|
--UC_Rebel_Mineral_Processor | UC_Rebel_Ground_Mining_Facility
|
||||||
|
--UC_Empire_Mineral_Processor | UC_Empire_Ground_Mining_Facility
|
||||||
|
--UC_Underworld_Mineral_Processor | UC_Underworld_Ground_Mining_Facility
|
||||||
|
--UC_Hutts_Mineral_Processor | UC_Hutts_Ground_Mining_Facility
|
||||||
|
--UC_Pirate_Mineral_Processor | UC_Pirate_Ground_Mining_Facility
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
Category = "Tactical_Multiplayer_Build_Basic_Structure"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"UC_R_Ground_Power_Generator | UC_R_Ground_Base_Shield_740 | UC_R_Ground_Base_Shield_370 | UC_R_Ground_Base_Shield_740_Pad | UC_R_Ground_Base_Shield_370_Pad | UC_R_Ground_Turbolaser_Tower | UC_R_Ground_Turbolaser_Tower_N | UC_R_Ground_Light_Vehicle_Factory | UC_R_Ground_Heavy_Vehicle_Factory | UC_R_Ground_Communications_Array | UC_R_Ground_Research_Facility | UC_R_Ground_Hutt_Palace | UC_R_Ground_Uplink_Station | UC_Rebel_Ground_Refinery = 0,1"
|
||||||
|
,"UC_E_Ground_Power_Generator | UC_E_Ground_Base_Shield_740 | UC_E_Ground_Base_Shield_370 | UC_E_Ground_Base_Shield_740_Pad | UC_E_Ground_Base_Shield_370_Pad | UC_E_Ground_Turbolaser_Tower | UC_E_Ground_Turbolaser_Tower_N | UC_E_Ground_Light_Vehicle_Factory | UC_E_Ground_Heavy_Vehicle_Factory | UC_E_Ground_Communications_Array | UC_E_Ground_Research_Facility | UC_E_Ground_Hutt_Palace | UC_E_Ground_Magnepulse_Cannon | UC_Empire_Ground_Refinery = 0,1"
|
||||||
|
,"UC_U_Ground_Power_Generator | UC_U_Ground_Shutter_Shield | UC_U_Ground_Shutter_Shield_Small | UC_U_Ground_Base_Shield_740_Pad | UC_U_Ground_Base_Shield_370_Pad | UC_U_Ground_Turbolaser_Tower | UC_U_Ground_Turbolaser_Tower_N | UC_U_Ground_Droid_Works | UC_U_Ground_Vehicle_Factory | UC_U_Ground_Hutt_Palace | UC_U_Ground_Gravity_Generator | UC_Underworld_Ground_Refinery = 0,1"
|
||||||
|
,"UC_H_Ground_Power_Generator | UC_H_Ground_Base_Shield_740 | UC_H_Ground_Base_Shield_370 | UC_H_Ground_Base_Shield_740_Pad | UC_H_Ground_Base_Shield_370_Pad | UC_H_Ground_Heavy_Beam_Tower | UC_H_Ground_Heavy_Beam_Tower_N | UC_H_Ground_Factory | UC_H_Ground_Communications_Array | UC_H_Ground_Advanced_Technologies_Facility | UC_H_Ground_Hutt_Palace | UC_H_Ground_Shutter_Shield | UC_Hutts_Ground_Refinery = 0,1"
|
||||||
|
,"UC_P_Ground_Power_Generator | UC_P_Ground_Base_Shield_740 | UC_P_Ground_Base_Shield_400 | UC_P_Ground_Base_Shield_740_Pad | UC_P_Ground_Base_Shield_400_Pad | UC_P_Ground_Turbolaser_Tower_N = 0,1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = {"Structure"}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Build_All())
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
132
DATA/SCRIPTS/AI/LANDMODE/BURNUNITSLAND.LUA
Normal file
132
DATA/SCRIPTS/AI/LANDMODE/BURNUNITSLAND.LUA
Normal file
@@ -0,0 +1,132 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/BurnUnitsLand.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/BurnUnitsLand.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
IgnoreTarget = true
|
||||||
|
Category = "Burn_Units_Land"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
, "TaskForceRequired"
|
||||||
|
, "DenySpecialWeaponAttach"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
-- Cheat to wrap the game up if this is a firesale
|
||||||
|
if (EvaluatePerception("Should_Firesale_Land", PlayerObject) > 0) then
|
||||||
|
reveal_ai = FogOfWar.Reveal_All(PlayerObject)
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
-- We're now also revealing FOW here for the human player (was previously handled by a hard-coded system)
|
||||||
|
-- Make sure that there isn't a scripted scenario underway that doesn't want automatic FOW reveals
|
||||||
|
if Is_Multiplayer_Mode() == false and ((EvaluatePerception("Is_Skirmish_Mode", PlayerObject) == 1) or
|
||||||
|
(GlobalValue.Get("Allow_AI_Controlled_Fog_Reveal") == 1)) then
|
||||||
|
reveal_human = FogOfWar.Reveal_All(Find_Player("local"))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Do this at least once (it may just be an attempt to burn off extra units, rather than a firesale)
|
||||||
|
repeat
|
||||||
|
-- Cancel all goals
|
||||||
|
Purge_Goals(PlayerObject)
|
||||||
|
|
||||||
|
--Eject garrisons from structures so they can be burned along with everything else.
|
||||||
|
garrison_table = Find_All_Objects_Of_Type("CanContainGarrison", PlayerObject)
|
||||||
|
if garrison_table then
|
||||||
|
for i,unit in pairs(garrison_table) do
|
||||||
|
if not unit.Is_Category("Vehicle") then
|
||||||
|
unit.Eject_Garrison()
|
||||||
|
end
|
||||||
|
end
|
||||||
|
Sleep(1)
|
||||||
|
end
|
||||||
|
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
-- Use all idle units, mapwide
|
||||||
|
MainForce.Collect_All_Free_Units()
|
||||||
|
|
||||||
|
-- form up any spread out infantry
|
||||||
|
MainForce.Activate_Ability("SPREAD_OUT", false)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- Have each unit attack its nearest enemy structure until success or death
|
||||||
|
nearest_enemy = Find_Nearest(MainForce, "InBase", PlayerObject, false)
|
||||||
|
if not TestValid(nearest_enemy) then
|
||||||
|
nearest_enemy = Find_Nearest(MainForce, PlayerObject, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
while TestValid(nearest_enemy) do
|
||||||
|
MainForce.Collect_All_Free_Units()
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(nearest_enemy), 20)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Only let this happen every so often
|
||||||
|
Sleep(5)
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
-- If this is a firesale condition, continue to burn off units
|
||||||
|
-- This must be done within the same plan because we don't want to destroy the
|
||||||
|
-- reveal objects turning FOW back on (which would result in the FOW being toggled repeatedly).
|
||||||
|
until (EvaluatePerception("Should_Firesale_Land", PlayerObject) == 0)
|
||||||
|
|
||||||
|
MainForce.Release_Forces(1.0)
|
||||||
|
|
||||||
|
Sleep(30)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Override default event to prevent plan from ending under firesale conditions
|
||||||
|
-- We want the fog of war reveal for the player to persist.
|
||||||
|
function MainForce_No_Units_Remaining()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Unit_Damaged(tf, unit, attacker, deliberate)
|
||||||
|
--Override self preservation behavior - the whole purpose of this plan is to kill or be killed
|
||||||
|
end
|
||||||
103
DATA/SCRIPTS/AI/LANDMODE/CLEANUPDUMB.LUA
Normal file
103
DATA/SCRIPTS/AI/LANDMODE/CLEANUPDUMB.LUA
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/CleanUpDumb.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/CleanUpDumb.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
--
|
||||||
|
-- This should be a low desirability plan, to engage otherwise idle units after all enemies are being handled.
|
||||||
|
-- This plan does not consider much and should only be enacted once the tactical outcome is obvious.
|
||||||
|
--
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Clean_Up"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry | Vehicle | Air = 1,50"
|
||||||
|
,"LandHero = 0,10"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
closest_enemy = nil
|
||||||
|
kill_target = nil
|
||||||
|
start_loc = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- This is a global plan, so we must find our own target
|
||||||
|
closest_enemy = Find_Nearest(MainForce, PlayerObject, false)
|
||||||
|
|
||||||
|
if TestValid(closest_enemy) then
|
||||||
|
-- Assign appropriate targeting priorities here, once we get the ability to do this per unit type
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(closest_enemy))
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
Default_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
-- We want this unit to release and attack something, whatever is attacking us or just something close
|
||||||
|
kill_target = FindDeadlyEnemy(tf)
|
||||||
|
if not TestValid(kill_target) then
|
||||||
|
kill_target = Find_Nearest(unit, PlayerObject, false)
|
||||||
|
end
|
||||||
|
if TestValid(kill_target) then
|
||||||
|
unit.Attack_Move(kill_target)
|
||||||
|
tf.Release_Unit(unit)
|
||||||
|
DebugMessage("%s-- Unit %s only Attack_Move to %s", tostring(Script), tostring(unit), tostring(kill_target))
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
111
DATA/SCRIPTS/AI/LANDMODE/CLEARINFANTRY.LUA
Normal file
111
DATA/SCRIPTS/AI/LANDMODE/CLEARINFANTRY.LUA
Normal file
@@ -0,0 +1,111 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/ClearInfantry.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/ClearInfantry.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 6
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Clear_Infantry"
|
||||||
|
MinContrastScale = 0.2
|
||||||
|
MaxContrastScale = 3.0
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry | Vehicle | Air = 1,5"
|
||||||
|
,"LandHero = 0,2"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
start_loc = nil
|
||||||
|
closest_infantry = nil
|
||||||
|
kill_target = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
--BlockOnCommand(MainForce.Move_To(MainForce.Get_Stage(), false)) -- true = wait for entire taskforce at intermediate zone points
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
|
||||||
|
-- If the original goal on this target is still valid, keep hunting
|
||||||
|
while (EvaluatePerception("Should_Clear_Infantry", PlayerObject, AITarget) > 0) do
|
||||||
|
|
||||||
|
closest_infantry = Find_Nearest(MainForce, "Infantry", PlayerObject, false)
|
||||||
|
if TestValid(closest_infantry) then
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(closest_infantry))
|
||||||
|
else
|
||||||
|
-- Prevent endless loops in case of an unexpected condition
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
Default_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
-- Assist the tf with whatever is holding it up
|
||||||
|
kill_target = FindDeadlyEnemy(tf)
|
||||||
|
if TestValid(kill_target) then
|
||||||
|
unit.Attack_Move(kill_target)
|
||||||
|
else
|
||||||
|
unit.Attack_Move(tf)
|
||||||
|
end
|
||||||
|
end
|
||||||
113
DATA/SCRIPTS/AI/LANDMODE/CLEARVEHICLES.LUA
Normal file
113
DATA/SCRIPTS/AI/LANDMODE/CLEARVEHICLES.LUA
Normal file
@@ -0,0 +1,113 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/ClearVehicles.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/ClearVehicles.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Tell the script pooling system to pre-cache this number of scripts.
|
||||||
|
ScriptPoolCount = 6
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Clear_Vehicles"
|
||||||
|
MinContrastScale = 0.2
|
||||||
|
MaxContrastScale = 3.0
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry = 0,5"
|
||||||
|
,"Vehicle | Air = 0,5"
|
||||||
|
,"LandHero = 0,3"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-AT_AA_Walker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
start_loc = nil
|
||||||
|
closest_vehicle = nil
|
||||||
|
kill_target = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
--BlockOnCommand(MainForce.Move_To(MainForce.Get_Stage(), false)) -- true = wait for entire taskforce at intermediate zone points
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
|
||||||
|
-- If the original goal on this target is still valid, keep hunting
|
||||||
|
while (EvaluatePerception("Should_Clear_Vehicles", PlayerObject, AITarget) > 0) do
|
||||||
|
|
||||||
|
closest_vehicle = Find_Nearest(MainForce, "Vehicle", PlayerObject, false)
|
||||||
|
if TestValid(closest_vehicle) then
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(closest_vehicle))
|
||||||
|
else
|
||||||
|
-- Prevent endless loops in case of an unexpected condition
|
||||||
|
break
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
DebugMessage("%s -- %s reached end of move, giving new order", tostring(Script), tostring(unit))
|
||||||
|
|
||||||
|
-- Assist the tf with whatever is holding it up
|
||||||
|
kill_target = FindDeadlyEnemy(tf)
|
||||||
|
if TestValid(kill_target) then
|
||||||
|
unit.Attack_Move(kill_target)
|
||||||
|
else
|
||||||
|
unit.Attack_Move(tf)
|
||||||
|
end
|
||||||
|
end
|
||||||
108
DATA/SCRIPTS/AI/LANDMODE/DEFENDSTRUCTURE.LUA
Normal file
108
DATA/SCRIPTS/AI/LANDMODE/DEFENDSTRUCTURE.LUA
Normal file
@@ -0,0 +1,108 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DefendStructure.lua#5 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DefendStructure.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: James_Yarrow $
|
||||||
|
--
|
||||||
|
-- $Change: 56734 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/10/24 14:15:48 $
|
||||||
|
--
|
||||||
|
-- $Revision: #5 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 16
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Defend_Structure"
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
MinContrastScale = 1.2
|
||||||
|
MaxContrastScale = 1.8
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"EscortForce" -- This should force a good RPS match for the enemies in our target's zone
|
||||||
|
,"Infantry = 0,20"
|
||||||
|
,"Vehicle | Air = 0,20"
|
||||||
|
,"LandHero = 0,3"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-Hutt_SailBarge_Company"
|
||||||
|
,"-Fanblade_Fighter"
|
||||||
|
,"-AALL6"
|
||||||
|
,"-AT_AA_Walker"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = {"Infantry | Vehicle | Air"}
|
||||||
|
|
||||||
|
structure = nil
|
||||||
|
kill_target = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- form up any spread out infantry
|
||||||
|
MainForce.Activate_Ability("SPREAD_OUT", false)
|
||||||
|
|
||||||
|
structure = AITarget.Get_Game_Object()
|
||||||
|
DebugMessage("%s -- Found structure: %s.", tostring(Script), tostring(structure))
|
||||||
|
if TestValid(structure) then
|
||||||
|
kill_target = FindDeadlyEnemy(structure)
|
||||||
|
DebugMessage("%s -- Found deadly enemy: %s.", tostring(Script), tostring(kill_target))
|
||||||
|
if TestValid(kill_target) and (kill_target.Get_Distance(AITarget) < 500) then
|
||||||
|
BlockOnCommand(MainForce.Attack_Target(kill_target, MainForce.Get_Self_Threat_Sum()))
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget))
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(AITarget))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
Default_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
if TestValid(AITarget) then
|
||||||
|
-- As each unit arrives, guard the structure
|
||||||
|
unit.Guard_Target(AITarget)
|
||||||
|
end
|
||||||
|
end
|
||||||
97
DATA/SCRIPTS/AI/LANDMODE/DEFENSIVERUSH.LUA
Normal file
97
DATA/SCRIPTS/AI/LANDMODE/DEFENSIVERUSH.LUA
Normal file
@@ -0,0 +1,97 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/DefensiveRush.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/DefensiveRush.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
-- This plan is to send a limited amount of force to try to initially push the attacker off a planet.
|
||||||
|
-- It should only be invoked if the defender can spare some units and still have a strong base defense.
|
||||||
|
-- This is to provide a middle ground between the all out rush (when the AI decides that it has overwhelming
|
||||||
|
-- force) and the total defensive posture (when AI doesn't clearly have overwhelming force).
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 16
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Defensive_Rush"
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry | Vehicle | Air = 5,12"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
guard_duration = 20
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- Rush the LZ
|
||||||
|
lz_table = PruneFriendlyObjects(Find_All_Objects_Of_Type("IsRushTarget"))
|
||||||
|
if TestValid(lz_table[1]) then
|
||||||
|
--MessageBox("guarding the LZ")
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(lz_table[1]))
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(lz_table[1]), guard_duration)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Rush any attackers that we might be able to see
|
||||||
|
nearest_enemy = Find_Nearest(MainForce, PlayerObject, false)
|
||||||
|
while TestValid(nearest_enemy) do
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(nearest_enemy))
|
||||||
|
nearest_enemy = Find_Nearest(MainForce, PlayerObject, false)
|
||||||
|
end
|
||||||
|
|
||||||
|
-- This plan should only be allowed to occur once
|
||||||
|
while true do
|
||||||
|
Sleep(200)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
102
DATA/SCRIPTS/AI/LANDMODE/DESTROYLANDUNIT.LUA
Normal file
102
DATA/SCRIPTS/AI/LANDMODE/DESTROYLANDUNIT.LUA
Normal file
@@ -0,0 +1,102 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DestroyLandUnit.lua#5 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DestroyLandUnit.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: James_Yarrow $
|
||||||
|
--
|
||||||
|
-- $Change: 56734 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/10/24 14:15:48 $
|
||||||
|
--
|
||||||
|
-- $Revision: #5 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 5
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Destroy_Land_Unit"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Vehicle | Air = 1,8"
|
||||||
|
,"LandHero = 0,1"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-Hutt_SailBarge_Company"
|
||||||
|
,"-Fanblade_Fighter"
|
||||||
|
,"-AALL6"
|
||||||
|
,"-AT_AA_Walker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GuardForce"
|
||||||
|
,"EscortForce"
|
||||||
|
,"Infantry = 0,4"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
start_loc = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce, GuardForce)
|
||||||
|
|
||||||
|
--BlockOnCommand(MainForce.Move_To(MainForce.Get_Stage(), false)) -- true = wait for entire taskforce at intermediate zone points
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- Assign appropriate targeting priorities here, once we get the ability to do this per unit type
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GuardForce_Thread()
|
||||||
|
BlockOnCommand(GuardForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, GuardForce, MainForce)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(GuardForce)
|
||||||
|
-- Give an initial order to put the escorts in a state that the Escort function expects
|
||||||
|
GuardForce.Guard_Target(MainForce)
|
||||||
|
|
||||||
|
while true do
|
||||||
|
Escort(GuardForce, MainForce)
|
||||||
|
end
|
||||||
|
end
|
||||||
101
DATA/SCRIPTS/AI/LANDMODE/DESTROYSTRUCTURE.LUA
Normal file
101
DATA/SCRIPTS/AI/LANDMODE/DESTROYSTRUCTURE.LUA
Normal file
@@ -0,0 +1,101 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DestroyStructure.lua#5 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DestroyStructure.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: James_Yarrow $
|
||||||
|
--
|
||||||
|
-- $Change: 56734 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/10/24 14:15:48 $
|
||||||
|
--
|
||||||
|
-- $Revision: #5 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 16
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Destroy_Structure"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry | Vehicle | Air = 1,10"
|
||||||
|
,"LandHero = 0,2"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-Hutt_SailBarge_Company"
|
||||||
|
,"-Fanblade_Fighter"
|
||||||
|
,"-AALL6"
|
||||||
|
,"-AT_AA_Walker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GuardForce"
|
||||||
|
,"EscortForce"
|
||||||
|
,"Squad_Rebel_Trooper | Squad_Stormtrooper = 0,2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
start_loc = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce, GuardForce)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- Assign appropriate targeting priorities here, once we get the ability to do this per unit type
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GuardForce_Thread()
|
||||||
|
BlockOnCommand(GuardForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, GuardForce, MainForce)
|
||||||
|
|
||||||
|
-- Give an initial order to put the escorts in a state that the Escort function expects
|
||||||
|
GuardForce.Guard_Target(MainForce)
|
||||||
|
|
||||||
|
-- Make sure these guys will shoot at structures autonomously
|
||||||
|
GuardForce.Set_Targeting_Priorities("Infantry_Attack_Move")
|
||||||
|
|
||||||
|
while true do
|
||||||
|
Escort(GuardForce, MainForce)
|
||||||
|
end
|
||||||
|
end
|
||||||
103
DATA/SCRIPTS/AI/LANDMODE/DESTROYTURBOLASER.LUA
Normal file
103
DATA/SCRIPTS/AI/LANDMODE/DESTROYTURBOLASER.LUA
Normal file
@@ -0,0 +1,103 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DestroyTurbolaser.lua#4 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Expansion/Run/Data/Scripts/AI/LandMode/DestroyTurbolaser.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: James_Yarrow $
|
||||||
|
--
|
||||||
|
-- $Change: 56734 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2006/10/24 14:15:48 $
|
||||||
|
--
|
||||||
|
-- $Revision: #4 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 16
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Destroy_Turbolaser"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry | Air | LandHero = 3,10"
|
||||||
|
,"-Gallofree_HTT_Company"
|
||||||
|
,"-HAV_Juggernaut_Company"
|
||||||
|
,"-F9TZ_Cloaking_Transport_Company"
|
||||||
|
,"-Hutt_SailBarge_Company"
|
||||||
|
,"-Fanblade_Fighter"
|
||||||
|
,"-AALL6"
|
||||||
|
,"-AT_AA_Walker"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GuardForce"
|
||||||
|
,"EscortForce"
|
||||||
|
,"Squad_Rebel_Trooper | Squad_Stormtrooper = 0,2"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
start_loc = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce, GuardForce)
|
||||||
|
|
||||||
|
Try_Ability(MainForce, "FORCE_CLOAK")
|
||||||
|
Try_Ability(MainForce, "STEALTH")
|
||||||
|
|
||||||
|
-- Try to get under the min attack range, then attack
|
||||||
|
BlockOnCommand(MainForce.Move_To(AITarget, MainForce.Get_Self_Threat_Sum()))
|
||||||
|
BlockOnCommand(MainForce.Attack_Target(AITarget))
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GuardForce_Thread()
|
||||||
|
BlockOnCommand(GuardForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, GuardForce, MainForce)
|
||||||
|
|
||||||
|
-- Give an initial order to put the escorts in a state that the Escort function expects
|
||||||
|
GuardForce.Guard_Target(MainForce)
|
||||||
|
|
||||||
|
-- Make sure these guys will shoot at structures autonomously
|
||||||
|
GuardForce.Set_Targeting_Priorities("Infantry_Attack_Move")
|
||||||
|
|
||||||
|
while true do
|
||||||
|
Escort(GuardForce, MainForce)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
134
DATA/SCRIPTS/AI/LANDMODE/DROIDS.LUA
Normal file
134
DATA/SCRIPTS/AI/LANDMODE/DROIDS.LUA
Normal file
@@ -0,0 +1,134 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/Droids.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/Droids.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Droids"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Tactical_R2_3PO_Team = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
|
||||||
|
turret_seek_range = 500
|
||||||
|
repair_seek_range = 500
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
droids = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(droids) then
|
||||||
|
MessageBox("unexpected state; droids unavailable")
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Continuously try to use abilities and recharge or heal
|
||||||
|
while true do
|
||||||
|
|
||||||
|
ConsiderRepair(droids)
|
||||||
|
|
||||||
|
-- If we're ready and there is a turret nearby, hack it
|
||||||
|
if droids.Is_Ability_Ready("TARGETED_HACK") then
|
||||||
|
nearest_turret = Find_Nearest(MainForce, "Turret", PlayerObject, false)
|
||||||
|
if TestValid(nearest_turret) and MainForce.Get_Distance(nearest_turret) < turret_seek_range then
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Activate_Ability("TARGETED_HACK", nearest_turret))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
ConsiderRepair(droids)
|
||||||
|
|
||||||
|
|
||||||
|
-- Are we ready to find a vehicle to repair?
|
||||||
|
if droids.Is_Ability_Ready("TARGETED_REPAIR") then
|
||||||
|
|
||||||
|
-- Try a nearby one first
|
||||||
|
repair_target = FindTarget(MainForce, "Needs_Repair", "Friendly_Unit", 1.0, repair_seek_range)
|
||||||
|
if TestValid(repair_target) then
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Activate_Ability("TARGETED_REPAIR", repair_target))
|
||||||
|
|
||||||
|
else
|
||||||
|
|
||||||
|
-- Find any vehicle to repair
|
||||||
|
repair_target = FindTarget(MainForce, "Needs_Repair", "Friendly_Unit", 1.0)
|
||||||
|
if TestValid(repair_target) then
|
||||||
|
BlockOnCommand(MainForce.Activate_Ability("TARGETED_REPAIR", repair_target))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
ConsiderRepair(droids)
|
||||||
|
|
||||||
|
-- Generally move toward the most significant friendly vehicle
|
||||||
|
big_vehicle = FindTarget(MainForce, "Vehicle_Needs_Escort", "Friendly_Unit", 1.0)
|
||||||
|
if TestValid(big_vehicle) then
|
||||||
|
|
||||||
|
-- Time out frequently, so that we can acquire other targets
|
||||||
|
BlockOnCommand(MainForce.Move_To(big_vehicle), 5)
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
-- Make sure that they have at least some non-offensive orders (because the above may cause no behavior)
|
||||||
|
flee_loc = FindTarget(MainForce, "Space_Area_Is_Hidden", "Tactical_Location", 1.0, 5000.0)
|
||||||
|
if flee_loc then
|
||||||
|
BlockOnCommand(MainForce.Move_To(flee_loc))
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure the loop always yields
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
121
DATA/SCRIPTS/AI/LANDMODE/EWOKHUNTPLAN.LUA
Normal file
121
DATA/SCRIPTS/AI/LANDMODE/EWOKHUNTPLAN.LUA
Normal file
@@ -0,0 +1,121 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/EwokHuntPlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/EwokHuntPlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
--
|
||||||
|
-- One basic plan, since there are only infantry units and probably not many of them.
|
||||||
|
-- They will attack with very low contrast ratio, but learn and eventually rally troops to escalate the attack.
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Ewok_Hunt"
|
||||||
|
MinContrastScale = 0.0001
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry= 1,50"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
--IgnoreTarget = false
|
||||||
|
PerFailureContrastAdjust = 0.2
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
|
||||||
|
closest_enemy = nil
|
||||||
|
kill_target = nil
|
||||||
|
start_loc = nil
|
||||||
|
|
||||||
|
staging = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
-- Don't seem to be getting an effective stage
|
||||||
|
--DebugMessage("%s -- Got Stage: %s", tostring(Script), tostring(MainForce.Get_Stage()))
|
||||||
|
--BlockOnCommand(MainForce.Move_To(MainForce.Get_Stage()), 10)
|
||||||
|
|
||||||
|
-- Just stage at the spawner nearest the plan's target, if there is one.
|
||||||
|
spawner = Find_Nearest(AITarget, "Ewok_Spawn_House")
|
||||||
|
if TestValid(spawner) then
|
||||||
|
staging = true
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(spawner), 10)
|
||||||
|
staging = false
|
||||||
|
end
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget))
|
||||||
|
|
||||||
|
-- Give the Unit_Move_Finished a chance to find further targets near the AITarget zone
|
||||||
|
Sleep(10)
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others to let the BlockOn finish
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
-- Only perform attack move fix-up behavior if we're not trying to stage units.
|
||||||
|
if staging then
|
||||||
|
return
|
||||||
|
end
|
||||||
|
|
||||||
|
DebugMessage("%s -- %s reached end of move, giving new order", tostring(Script), tostring(unit))
|
||||||
|
|
||||||
|
-- We want this unit to release and attack something, whatever is attacking us or just something close
|
||||||
|
kill_target = FindDeadlyEnemy(tf)
|
||||||
|
if not TestValid(kill_target) then
|
||||||
|
kill_target = Find_Nearest(unit, PlayerObject, false)
|
||||||
|
end
|
||||||
|
if TestValid(kill_target) then
|
||||||
|
unit.Attack_Move(kill_target)
|
||||||
|
tf.Release_Unit(unit)
|
||||||
|
DebugMessage("%s-- Unit %s only Attack_Move to %s", tostring(Script), tostring(unit), tostring(kill_target))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_No_Units_Remaining()
|
||||||
|
--MessageBox("%s -- All units dead or non-buildable. RAISING CONTRAST. Abandonning plan.", tostring(Script))
|
||||||
|
MainForce.Set_Plan_Result(false)
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
68
DATA/SCRIPTS/AI/LANDMODE/FIREMAGNEPULSE.LUA
Normal file
68
DATA/SCRIPTS/AI/LANDMODE/FIREMAGNEPULSE.LUA
Normal file
@@ -0,0 +1,68 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/FireMagnepulse.lua
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 9 April, 2023
|
||||||
|
--
|
||||||
|
-- Revisions: 2
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
-- Self-attachment script for the Magnepulse Cannon, but currently a custom goal is the best tactic
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
DebugMessage("%s -- In Definitions", tostring(Script))
|
||||||
|
|
||||||
|
Category = "Fire_Magnepulse"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenySpecialWeaponAttach"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"E_Ground_Magnepulse_Cannon | E_Ground_Magnepulse_Cannon_GC = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
DebugMessage("%s -- Done Definitions", tostring(Script))
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
-- Keep firing at the bigger (and probably slowest) enemies
|
||||||
|
-- Add some variance, so that we can spread the effect around
|
||||||
|
AITarget = FindTarget(MainForce, "Needs_Magnepulse_Shot", "Enemy_Unit", 0.8)
|
||||||
|
DebugMessage("%s -- Found Target %s", tostring(Script), tostring(AITarget))
|
||||||
|
|
||||||
|
-- Just fire once, because the effect isn't that useful to hit the same target in rapid succession
|
||||||
|
if TestValid(AITarget) then
|
||||||
|
MainForce.Fire_Special_Weapon("E_Ground_Magnepulse_Cannon", AITarget)
|
||||||
|
MainForce.Fire_Special_Weapon("E_Ground_Magnepulse_Cannon_GC", AITarget)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
91
DATA/SCRIPTS/AI/LANDMODE/FUNDTACTICALSTRUCTURES.LUA
Normal file
91
DATA/SCRIPTS/AI/LANDMODE/FUNDTACTICALSTRUCTURES.LUA
Normal file
@@ -0,0 +1,91 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/FundTacticalStructures.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/FundTacticalStructures.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- Provide nominal funding for tactical structure building from galactic cash. Note that
|
||||||
|
-- additional cash may still be provided for by unspent cash in various budgets as defined
|
||||||
|
-- in the player template.
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Fund_Tactical_Structures"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
-- Never remove this plan
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
if PlayerObject.Get_Credits() == 0 then
|
||||||
|
|
||||||
|
-- Pirates work as individual cells and have no galactic coordination of cash.
|
||||||
|
-- Also, they always have a level one base, so they get a fixed amount of free cash for structures.
|
||||||
|
-- if EvaluatePerception("Is_Pirate", PlayerObject, Target) then
|
||||||
|
if PlayerObject.Get_Faction_Name() == "PIRATES" or PlayerObject.Get_Faction_Name() == "HUTTS" then
|
||||||
|
cash_amount = 15000
|
||||||
|
PlayerObject.Give_Money(cash_amount)
|
||||||
|
DebugMessage("%s -- Tactical funding (free for Pirates) %.2f", tostring(Script), cash_amount)
|
||||||
|
|
||||||
|
-- Other factions pull a calculated amount of funds from their galactic pool.
|
||||||
|
else
|
||||||
|
cash_amount = Evaluate_In_Galactic_Context("Land_Tactical_Budget_Clamped", PlayerObject)
|
||||||
|
--cash_amount = Evaluate_In_Galactic_Context("Land_Tactical_Budget", PlayerObject)
|
||||||
|
PlayerObject.Release_Credits_For_Tactical(cash_amount)
|
||||||
|
DebugMessage("%s -- Tactical funding %.2f", tostring(Script), cash_amount)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Don't let this script exit, so that each instance of land tactical will only be funded once
|
||||||
|
while true do
|
||||||
|
Sleep(20)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
116
DATA/SCRIPTS/AI/LANDMODE/HANSOLOASSISTS.LUA
Normal file
116
DATA/SCRIPTS/AI/LANDMODE/HANSOLOASSISTS.LUA
Normal file
@@ -0,0 +1,116 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/HanSoloAssists.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/HanSoloAssists.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
-- This plan simply puts Han in the right places.
|
||||||
|
-- It relies on the object script HanSolo.lua to activate abilities.
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "HanSoloAssists"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Han_Solo = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
|
||||||
|
duration_to_fight = 60
|
||||||
|
time_to_transition_reinforcement_point = 5
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
han = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(han) then
|
||||||
|
MessageBox("unexpected state; han unavailable")
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Continuously try to attack, assist the most significant nearby unit, and heal up
|
||||||
|
while true do
|
||||||
|
|
||||||
|
-- Make sure the loop always yields
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
ConsiderHeal(han)
|
||||||
|
|
||||||
|
-- Grab a reinforcement point
|
||||||
|
lz_table = PruneFriendlyObjects(Find_All_Objects_Of_Type("IsRushTarget"))
|
||||||
|
if TestValid(lz_table[1]) then
|
||||||
|
|
||||||
|
Try_Ability(han, "SPRINT")
|
||||||
|
BlockOnCommand(han.Move_To(lz_table[1]))
|
||||||
|
BlockOnCommand(han.Guard_Target(lz_table[1]), time_to_transition_reinforcement_point)
|
||||||
|
end
|
||||||
|
|
||||||
|
ConsiderHeal(han)
|
||||||
|
|
||||||
|
-- Try to get near a good EMP stun target
|
||||||
|
enemy_location = FindTarget.Reachable_Target(PlayerObject, "Area_Needs_Han_Solo_Assist", "Tactical_Location", "Any_Threat", 0.5)
|
||||||
|
if TestValid(enemy_location) then
|
||||||
|
DebugMessage("%s-- moving toward enemy concentration", tostring(Script))
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(enemy_location))
|
||||||
|
if han.Is_Ability_Ready("AREA_EFFECT_STUN") then
|
||||||
|
enemy_vehicle = Find_Nearest(han, "Vehicle", PlayerObject, false)
|
||||||
|
if TestValid(enemy_vehicle) then
|
||||||
|
BlockOnCommand(MainForce.Move_To(enemy_vehicle))
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
73
DATA/SCRIPTS/AI/LANDMODE/HOLDPOSITION.LUA
Normal file
73
DATA/SCRIPTS/AI/LANDMODE/HOLDPOSITION.LUA
Normal file
@@ -0,0 +1,73 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/HoldPosition.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/HoldPosition.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Hold_Position"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"Vehicle = 0,2"
|
||||||
|
,"Infantry = 0,2"
|
||||||
|
},
|
||||||
|
}
|
||||||
|
|
||||||
|
RequiredCategories = { "Infantry | Vehicle " }
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
WaitForAllReinforcements(MainForce, AITarget)
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(AITarget))
|
||||||
|
|
||||||
|
WaitForever()
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_No_Units_Remaining()
|
||||||
|
DebugMessage("%s -- All units dead or non-buildable. Abandonning plan.", tostring(Script))
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
71
DATA/SCRIPTS/AI/LANDMODE/LANDBOMBING.LUA
Normal file
71
DATA/SCRIPTS/AI/LANDMODE/LANDBOMBING.LUA
Normal file
@@ -0,0 +1,71 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandBombing.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandBombing.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Land_Bombing_Run"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"TaskForceRequired"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
result = nil
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
result = BlockOnCommand(MainForce.Bombing_Run(AITarget))
|
||||||
|
|
||||||
|
if result and result > 0.65 then
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
75
DATA/SCRIPTS/AI/LANDMODE/LANDESCORTPLAN.LUA
Normal file
75
DATA/SCRIPTS/AI/LANDMODE/LANDESCORTPLAN.LUA
Normal file
@@ -0,0 +1,75 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandEscortPlan.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandEscortPlan.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Brian Hayes
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
--
|
||||||
|
-- Land Mode Escort
|
||||||
|
--
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Land_Escort"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry = 1"
|
||||||
|
,"LandHero = 0,1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force());
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
DebugMessage("Taskforce %s following object %s.", tostring(MainForce), tostring(Target))
|
||||||
|
|
||||||
|
-- Give an initial order to put the escorts in a state that the Escort function expects
|
||||||
|
MainForce.Guard_Target(AITarget)
|
||||||
|
|
||||||
|
while true do
|
||||||
|
Escort(MainForce, AITarget)
|
||||||
|
end
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
85
DATA/SCRIPTS/AI/LANDMODE/LANDHEROES.LUA
Normal file
85
DATA/SCRIPTS/AI/LANDMODE/LANDHEROES.LUA
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandHeroes.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandHeroes.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
-- This plan just tries to land any purchased heroes for skirmish (they don't count toward unit cap)
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Land_Heroes"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"LandHero = 1,5"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
--Immediately release anybody that was already landed
|
||||||
|
MainForce.Release_Forces(1.0)
|
||||||
|
|
||||||
|
-- find something to reinforce near
|
||||||
|
friendly_loc = FindTarget(MainForce, "Space_Area_Is_Hidden", "Tactical_Location", 1.0)
|
||||||
|
if not TestValid(friendly_loc) then
|
||||||
|
friendly_loc = FindTarget(MainForce, "Is_Friendly_Start", "Tactical_Location", 1.0)
|
||||||
|
end
|
||||||
|
if not TestValid(friendly_loc) then
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
WaitForAllReinforcements(MainForce, friendly_loc)
|
||||||
|
|
||||||
|
MainForce.Release_Forces(1)
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
Sleep(15)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
85
DATA/SCRIPTS/AI/LANDMODE/LANDSCOUT.LUA
Normal file
85
DATA/SCRIPTS/AI/LANDMODE/LANDSCOUT.LUA
Normal file
@@ -0,0 +1,85 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandScout.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/LandScout.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Land_Scout_Area"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"Infantry | Air | LandHero = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
-- Do it once without interruption
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
Try_Ability(MainForce, "FORCE_CLOAK")
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
BlockOnCommand(MainForce.Explore_Area(AITarget), 10)
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
-- MainForce.Set_As_Goal_System_Removable(true)
|
||||||
|
|
||||||
|
-- Removing this loop to give other plans a chance. If the AI still wants to scout, the plan will be proposed again.
|
||||||
|
-- while true do
|
||||||
|
-- AITarget = FindTarget(MainForce, "Land_Area_Needs_Scouting", "Tactical_Location", 0.8, 1000.0)
|
||||||
|
|
||||||
|
-- if not TestValid(AITarget) then
|
||||||
|
-- DebugMessage("%s -- Unable to find a target for MainForce.", tostring(Script))
|
||||||
|
-- ScriptExit()
|
||||||
|
-- end
|
||||||
|
|
||||||
|
-- BlockOnCommand(MainForce.Move_To(AITarget, MainForce.Get_Self_Threat_Max()))
|
||||||
|
-- BlockOnCommand(MainForce.Explore_Area(AITarget), 10)
|
||||||
|
-- Sleep(1)
|
||||||
|
-- end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
115
DATA/SCRIPTS/AI/LANDMODE/OBIWANASSISTS.LUA
Normal file
115
DATA/SCRIPTS/AI/LANDMODE/OBIWANASSISTS.LUA
Normal file
@@ -0,0 +1,115 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/ObiWanAssists.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/ObiWanAssists.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
-- This plan simply puts ObiWan in the right places.
|
||||||
|
-- It relies on the object script obiwanplan.lua to activate abilities.
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "ObiWanAssists"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Obi_Wan_Kenobi = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
|
||||||
|
duration_to_assist = 20
|
||||||
|
duration_to_fight = 30
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
obiwan = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(obiwan) then
|
||||||
|
MessageBox("unexpected state; obiwan unavailable")
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Continuously try to attack, assist the most significant nearby unit, and heal up
|
||||||
|
while true do
|
||||||
|
|
||||||
|
ConsiderHeal(obiwan)
|
||||||
|
|
||||||
|
enemy_location = FindTarget.Reachable_Target(PlayerObject, "Current_Enemy_Location", "Tactical_Location", "Any_Threat", 0.5)
|
||||||
|
if TestValid(enemy_location) then
|
||||||
|
DebugMessage("%s-- moving toward enemy concentration", tostring(Script))
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(enemy_location), duration_to_fight)
|
||||||
|
end
|
||||||
|
|
||||||
|
ConsiderHeal(obiwan)
|
||||||
|
|
||||||
|
best_ally = FindTarget(MainForce, "Needs_ObiWan_Assist", "Friendly_Unit", 1.0, 1500)
|
||||||
|
if TestValid(best_ally) then
|
||||||
|
DebugMessage("%s-- assisting %s", tostring(Script), tostring(best_ally))
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(best_ally), duration_to_assist)
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
-- Make sure the loop always yields
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
-- He really tries to preserve himself
|
||||||
|
function MainForce_Unit_Damaged(tf, unit, attacker, deliberate)
|
||||||
|
|
||||||
|
if unit.Get_Hull() < 0.5 or unit.Get_Time_Till_Dead() < 30 then
|
||||||
|
Try_Ability(unit, "TARGETED_INVULNERABILITY", unit)
|
||||||
|
end
|
||||||
|
|
||||||
|
Default_Unit_Damaged(tf, unit, attacker, deliberate)
|
||||||
|
end
|
||||||
147
DATA/SCRIPTS/AI/LANDMODE/PALPATINEMANAGER.LUA
Normal file
147
DATA/SCRIPTS/AI/LANDMODE/PALPATINEMANAGER.LUA
Normal file
@@ -0,0 +1,147 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/PalpatineManager.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/PalpatineManager.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: Steve_Copeland
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
-- This plan simply puts palpatine in the right places.
|
||||||
|
-- It relies on the object script darthpalpatine.lua to activate abilities.
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "PalpatineManager"
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Emperor_Palpatine = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
|
||||||
|
attack_attention_span = 30
|
||||||
|
defend_attention_span = 60
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
MainForce.Set_As_Goal_System_Removable(false)
|
||||||
|
|
||||||
|
palpatine = MainForce.Get_Unit_Table()[1]
|
||||||
|
if not TestValid(palpatine) then
|
||||||
|
MessageBox("unexpected state; palpatine unavailable")
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Don't let Palpatine waste the landing party on Easy or Normal difficlties
|
||||||
|
difficulty = PlayerObject.Get_Difficulty()
|
||||||
|
if (EvaluatePerception("Is_Skirmish_Mode", PlayerObject) == 0)
|
||||||
|
and (difficulty == "Normal" or difficulty == "Easy") then
|
||||||
|
friendly_structure = Find_Nearest(MainForce, "Structure", PlayerObject, true)
|
||||||
|
if TestValid(friendly_structure) then
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(friendly_structure), 40)
|
||||||
|
else
|
||||||
|
Sleep(40)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Continuously try to attack, assist the most significant nearby unit, and heal up
|
||||||
|
while true do
|
||||||
|
|
||||||
|
ConsiderHeal(palpatine)
|
||||||
|
|
||||||
|
-- Occasionally, Palpatine will join the front line battle on harder difficulties
|
||||||
|
if difficulty == "Hard" or (difficulty == "Normal" and GameRandom.Get_Float() < 0.5) then
|
||||||
|
|
||||||
|
if not palpatine.Has_Attack_Target() then
|
||||||
|
enemy_location = FindTarget.Reachable_Target(PlayerObject, "Current_Enemy_Location", "Tactical_Location", "Any_Threat", 0.5)
|
||||||
|
if TestValid(enemy_location) then
|
||||||
|
DebugMessage("%s-- moving toward enemy concentration", tostring(Script))
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(enemy_location), attack_attention_span)
|
||||||
|
end
|
||||||
|
nearest_enemy = Find_Nearest(MainForce, PlayerObject, false)
|
||||||
|
if TestValid(nearest_enemy) then
|
||||||
|
DebugMessage("%s-- attack_moving to nearest enemy %s", tostring(Script), tostring(nearest_enemy))
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(nearest_enemy), attack_attention_span)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
ConsiderHeal(palpatine)
|
||||||
|
|
||||||
|
-- Palpatine spends most of his time defending structures needing help
|
||||||
|
structure_to_defend = FindTarget(MainForce, "Need_To_Defend_Structure", "Friendly_Structure", 1.0)
|
||||||
|
while TestValid(structure_to_defend) and structure_to_defend.Is_Category("Structure") and (structure_to_defend.Get_Hull() < 0.9) do
|
||||||
|
DebugMessage("%s-- guarding %s", tostring(Script), tostring(structure_to_defend))
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(structure_to_defend), defend_attention_span, Defended_Structure_Is_Gone)
|
||||||
|
structure_to_defend = FindTarget(MainForce, "Need_To_Defend_Structure", "Friendly_Unit", 1.0)
|
||||||
|
end
|
||||||
|
|
||||||
|
MainForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
-- Make sure the loop always yields
|
||||||
|
Sleep(1)
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
function ConsiderDefending()
|
||||||
|
end
|
||||||
|
|
||||||
|
function Defended_Structure_Is_Gone()
|
||||||
|
|
||||||
|
-- DELME
|
||||||
|
-- if TestValid(structure_to_defend) then
|
||||||
|
-- DebugMessage("%s-- structure %s is still alive", tostring(String), tostring(structure_to_defend))
|
||||||
|
-- end
|
||||||
|
|
||||||
|
return not TestValid(structure_to_defend)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
84
DATA/SCRIPTS/AI/LANDMODE/PATROL.LUA
Normal file
84
DATA/SCRIPTS/AI/LANDMODE/PATROL.LUA
Normal file
@@ -0,0 +1,84 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/Patrol.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/Patrol.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 5
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Patrol"
|
||||||
|
IgnoreTarget = true
|
||||||
|
AllowEngagedUnits = false
|
||||||
|
TaskForce =
|
||||||
|
{
|
||||||
|
{
|
||||||
|
"MainForce",
|
||||||
|
"Infantry | Air | Vehicle | LandHero = 1, 3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce)
|
||||||
|
|
||||||
|
Try_Ability(MainForce, "FORCE_CLOAK")
|
||||||
|
Try_Ability(MainForce, "STEALTH")
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(AITarget))
|
||||||
|
|
||||||
|
-- Guard the area until a higher desire goal pulls us away
|
||||||
|
BlockOnCommand(MainForce.Guard_Target(AITarget))
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
DebugMessage("%s -- Unit move finished: %s.", tostring(Script), tostring(unit))
|
||||||
|
unit.Guard_Target(AITarget)
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
151
DATA/SCRIPTS/AI/LANDMODE/PREDEFENDSTRUCTURE.LUA
Normal file
151
DATA/SCRIPTS/AI/LANDMODE/PREDEFENDSTRUCTURE.LUA
Normal file
@@ -0,0 +1,151 @@
|
|||||||
|
-- $Id: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/PreDefendStructure.lua#1 $
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- (C) Petroglyph Games, Inc.
|
||||||
|
--
|
||||||
|
--
|
||||||
|
-- ***** ** * *
|
||||||
|
-- * ** * * *
|
||||||
|
-- * * * * *
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * *** ****** * ** **** *** * * * ***** * ***
|
||||||
|
-- * ** * * * ** * ** ** * * * * ** ** ** *
|
||||||
|
-- *** ***** * * * * * * * * ** * * * *
|
||||||
|
-- * * * * * * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * * ** * * * *
|
||||||
|
-- * ** * * ** * ** * * ** * * * *
|
||||||
|
-- ** **** ** * **** ***** * ** *** * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * *
|
||||||
|
-- * * * *
|
||||||
|
-- **** * *
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- $File: //depot/Projects/StarWars_Steam/FOC/Run/Data/Scripts/AI/LandMode/PreDefendStructure.lua $
|
||||||
|
--
|
||||||
|
-- Original Author: James Yarrow
|
||||||
|
--
|
||||||
|
-- $Author: Brian_Hayes $
|
||||||
|
--
|
||||||
|
-- $Change: 637819 $
|
||||||
|
--
|
||||||
|
-- $DateTime: 2017/03/22 10:16:16 $
|
||||||
|
--
|
||||||
|
-- $Revision: #1 $
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
|
||||||
|
-- This plan serves to head off the main attacking force by placing an RPS appropriate forces
|
||||||
|
-- in the vicinity of the main base structure that will receive the enemy first.
|
||||||
|
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
ScriptPoolCount = 5
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "PreDefend_Structure"
|
||||||
|
AllowEngagedUnits = true
|
||||||
|
MinContrastScale = 0.5
|
||||||
|
MaxContrastScale = 1.2
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"MainForce"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
,"Infantry = 0,10"
|
||||||
|
,"Vehicle | Air = 0,10"
|
||||||
|
,"LandHero = 0,3"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"GuardForce"
|
||||||
|
,"EscortForce" -- This should force a good RPS match for the enemies in our target's zone
|
||||||
|
,"Infantry = 0,10"
|
||||||
|
,"Vehicle | Air = 0,10"
|
||||||
|
,"LandHero = 0,3"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
RequiredCategories = {"Infantry | Vehicle | Air"}
|
||||||
|
|
||||||
|
structure = nil
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Thread()
|
||||||
|
|
||||||
|
-- We don't actually want the forces for contrast to AITarget, this plan
|
||||||
|
-- is only concerned with the forces surrounding the AITarget. We have
|
||||||
|
-- to produce and release them to get them back on the freestore, however.
|
||||||
|
BlockOnCommand(MainForce.Produce_Force())
|
||||||
|
--MainForce.Release_Forces(1.0)
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, MainForce, GuardForce)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(MainForce)
|
||||||
|
|
||||||
|
-- Find our structure nearest the enemy
|
||||||
|
structure = Find_Nearest(AITarget, "Structure", PlayerObject, true)
|
||||||
|
|
||||||
|
DebugMessage("%s -- PreDefending structure: %s.", tostring(Script), tostring(structure))
|
||||||
|
if TestValid(structure) then
|
||||||
|
BlockOnCommand(MainForce.Attack_Move(structure), 20)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function MainForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
Default_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
-- As each unit arrives, guard the structure
|
||||||
|
if TestValid(structure) then
|
||||||
|
unit.Guard_Target(structure)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
function GuardForce_Thread()
|
||||||
|
BlockOnCommand(GuardForce.Produce_Force())
|
||||||
|
|
||||||
|
QuickReinforce(PlayerObject, AITarget, GuardForce, MainForce)
|
||||||
|
|
||||||
|
Set_Land_AI_Targeting_Priorities(GuardForce)
|
||||||
|
|
||||||
|
-- Find our structure nearest the enemy
|
||||||
|
structure = Find_Nearest(AITarget, "Structure", PlayerObject, true)
|
||||||
|
|
||||||
|
DebugMessage("%s -- PreDefending structure: %s.", tostring(Script), tostring(structure))
|
||||||
|
if TestValid(structure) then
|
||||||
|
BlockOnCommand(GuardForce.Attack_Move(structure), 20)
|
||||||
|
end
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
-- Make sure that units don't sit idle at the end of their move order, waiting for others
|
||||||
|
function GuardForce_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
Default_Unit_Move_Finished(tf, unit)
|
||||||
|
|
||||||
|
-- As each unit arrives, guard the structure
|
||||||
|
if TestValid(structure) then
|
||||||
|
unit.Guard_Target(structure)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
function MainForce_Original_Target_Destroyed()
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
function GuardForce_Original_Target_Destroyed()
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
63
DATA/SCRIPTS/AI/LANDMODE/PURCHASEEARLYLANDUPGRADES.LUA
Normal file
63
DATA/SCRIPTS/AI/LANDMODE/PURCHASEEARLYLANDUPGRADES.LUA
Normal file
@@ -0,0 +1,63 @@
|
|||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- (c) Galyana's Ultimate Empire at War Modifications
|
||||||
|
--
|
||||||
|
-- ****** *** *** ************ *** ***
|
||||||
|
-- * * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * * *
|
||||||
|
-- * * * * * **** * * *
|
||||||
|
-- * * * ****** * * * *
|
||||||
|
-- * **** * * * * * * * *** *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * * * *
|
||||||
|
-- * * * * * * * ** * * *
|
||||||
|
-- ****** ****** ************ **** ** *******
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
-- C O N F I D E N T I A L S O U R C E C O D E -- D O N O T D I S T R I B U T E
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
--
|
||||||
|
-- File: GUEaW/Data/Scripts/AI/LandMode/PurchaseEarlyLandUpgrades.LUA
|
||||||
|
--
|
||||||
|
-- Original Editor: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Final Edit By: Giovanni Galyana
|
||||||
|
--
|
||||||
|
-- Date: 17 December, 2023
|
||||||
|
--
|
||||||
|
-- Revisions: 4
|
||||||
|
--
|
||||||
|
--/////////////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
require("pgevents")
|
||||||
|
|
||||||
|
|
||||||
|
function Definitions()
|
||||||
|
|
||||||
|
Category = "Purchase_Early_Land_Upgrades"
|
||||||
|
IgnoreTarget = true
|
||||||
|
TaskForce = {
|
||||||
|
{
|
||||||
|
"ReserveForce"
|
||||||
|
,"DenySpecialWeaponAttach"
|
||||||
|
,"DenyHeroAttach"
|
||||||
|
|
||||||
|
-- Buy some early game relative upgrades for infantry
|
||||||
|
,"RL_Combat_Armor_L1_Upgrade | RL_Combat_Armor_L2_Upgrade | RL_Upgraded_Scopes_L1_Upgrade | RL_Weatherproof_Upgrade | EL_Increased_Mobility_Upgrade | EL_Scout_Snipers_Upgrade | EL_Weatherproof_Upgrade | UL_Ability_Recharge_L1_Upgrade | UL_Smuggled_Droid_Systems_L1_Upgrade | UL_Bounty_Upgrade | HL_Combat_Training_L1_Upgrade | HL_Combat_Training_L2_Upgrade | PL_More_Garrisons_L1_Upgrade | PL_Bacta_Pack_L1_Upgrade | PL_Reinforced_Structures_L1_Upgrade = 1"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
RequiredCategories = {"Upgrade"}
|
||||||
|
AllowFreeStoreUnits = false
|
||||||
|
|
||||||
|
end
|
||||||
|
|
||||||
|
function ReserveForce_Thread()
|
||||||
|
|
||||||
|
BlockOnCommand(ReserveForce.Produce_Force())
|
||||||
|
ReserveForce.Set_Plan_Result(true)
|
||||||
|
|
||||||
|
ScriptExit()
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user