diff --git a/LuaIntro/Addons/bg_logo.lua b/LuaIntro/Addons/bg_logo.lua index 3378c4066..394904bc0 100644 --- a/LuaIntro/Addons/bg_logo.lua +++ b/LuaIntro/Addons/bg_logo.lua @@ -118,7 +118,7 @@ local shader = gl.CreateShader({ ]], }) -Spring.Echo(gl.GetShaderLog()) +--Spring.Echo(gl.GetShaderLog()) diff --git a/LuaIntro/main.lua b/LuaIntro/main.lua index a48e40ffe..10f074ff0 100644 --- a/LuaIntro/main.lua +++ b/LuaIntro/main.lua @@ -35,7 +35,7 @@ else Spring.Log = function(name, level, ...) if (type(level) == "string")and(level == "info") then - Spring.Echo(("[%s]"):format(name), ...) + --Spring.Echo(("[%s]"):format(name), ...) else origSpringLog(name, level, ...) end diff --git a/LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Constructor/placeholder.lua b/LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Constructor/placeholder.lua new file mode 100644 index 000000000..2a27ef8b6 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Constructor/placeholder.lua @@ -0,0 +1,71 @@ + +-- table.insert(ScavengerBlueprintsT0,FunctionName) +-- table.insert(ScavengerBlueprintsT1,FunctionName) +-- table.insert(ScavengerBlueprintsT2,FunctionName) +-- table.insert(ScavengerBlueprintsT3,FunctionName) + +-- example blueprint: +-- local function a(posx, posy, posz, GaiaTeamID, radiusCheck) +-- local posradius = 120 + -- if radiusCheck then + -- return posradius + -- else + -- Spring.CreateUnit("unitname", posx, posy, posz, math.random(0,3),GaiaTeamID) + -- Spring.CreateUnit("unitname", posx-100, posy, posz, math.random(0,3),GaiaTeamID) + -- Spring.CreateUnit("unitname", posx+100, posy, posz, math.random(0,3),GaiaTeamID) + -- Spring.CreateUnit("unitname", posx, posy, posz-100, math.random(0,3),GaiaTeamID) + -- Spring.CreateUnit("unitname", posx, posy, posz+100, math.random(0,3),GaiaTeamID) + -- end +-- end +-- table.insert(ScavengerBlueprintsT1,a) + +local UDN = UnitDefNames + +local function placeholderradar1(scav, posx, posy, posz, GaiaTeamID, radiusCheck) +local posradius = 150 + if radiusCheck then + return posradius + else + Spring.GiveOrderToUnit(scav, -(UDN.eradar2.id), {posx, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.elightturret2.id), {posx-200, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.elightturret2.id), {posx+200, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.elightturret2.id), {posx, posy, posz-200, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.elightturret2.id), {posx, posy, posz+200, 0}, {"shift"}) + end +end +table.insert(ScavengerConstructorBlueprintsT0,placeholderradar1) +table.insert(ScavengerConstructorBlueprintsT1,placeholderradar1) +table.insert(ScavengerConstructorBlueprintsT2,placeholderradar1) +table.insert(ScavengerConstructorBlueprintsT3,placeholderradar1) + +local function placeholderradar2(scav, posx, posy, posz, GaiaTeamID, radiusCheck) +local posradius = 150 + if radiusCheck then + return posradius + else + Spring.GiveOrderToUnit(scav, -(UDN.eradar2.id), {posx, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.eheavyturret2.id), {posx-200, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.eheavyturret2.id), {posx+200, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.eheavyturret2.id), {posx, posy, posz-200, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.eheavyturret2.id), {posx, posy, posz+200, 0}, {"shift"}) + end +end +table.insert(ScavengerConstructorBlueprintsT2,placeholderradar2) +table.insert(ScavengerConstructorBlueprintsT3,placeholderradar2) + +local function placeholderradar1(scav, posx, posy, posz, GaiaTeamID, radiusCheck) +local posradius = 150 + if radiusCheck then + return posradius + else + Spring.GiveOrderToUnit(scav, -(UDN.emine.id), {posx, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.emine.id), {posx-100, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.emine.id), {posx+100, posy, posz, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.emine.id), {posx, posy, posz-100, 0}, {"shift"}) + Spring.GiveOrderToUnit(scav, -(UDN.emine.id), {posx, posy, posz+100, 0}, {"shift"}) + end +end +table.insert(ScavengerConstructorBlueprintsT0,placeholderradar1) +table.insert(ScavengerConstructorBlueprintsT1,placeholderradar1) +table.insert(ScavengerConstructorBlueprintsT2,placeholderradar1) +table.insert(ScavengerConstructorBlueprintsT3,placeholderradar1) \ No newline at end of file diff --git a/LuaRules/Configs/ScavengerBlueprints/placeholder.lua b/LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Spawner/placeholder.lua similarity index 100% rename from LuaRules/Configs/ScavengerBlueprints/placeholder.lua rename to LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Spawner/placeholder.lua diff --git a/LuaRules/Configs/ScavengerBlueprints/simblebases.lua b/LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Spawner/simblebases.lua similarity index 100% rename from LuaRules/Configs/ScavengerBlueprints/simblebases.lua rename to LuaRules/Gadgets/scavengers/Blueprints/EvoRTS/Spawner/simblebases.lua diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/air.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/air.lua new file mode 100644 index 000000000..05c3e6221 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/air.lua @@ -0,0 +1,27 @@ +T0AirUnits = { + "escoutdrone", + "zairscout", +} + +T1AirUnits = { + "efighter", + "zairtoairfighter", +} + +T2AirUnits = { + "egunship2", + "ebomber", + "zairtogroundfighter", + "zairbomber", +} + +T3AirUnits = { + "egunship2", + "ebomber", + "zairbomber", +} + +T4AirUnits = { + "ekrow", + "ekrow", +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/constructors.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/constructors.lua new file mode 100644 index 000000000..953b21a37 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/constructors.lua @@ -0,0 +1,40 @@ +ConstructorsList = { + "ecommander", + "ecommanderbuild", + "ecommandercloak", + "ecommandershield", + "ehbotengineer", +} + +-- put ALL commander units from your game here +CommandersList = { + "ecommander", + "ecommanderbattle", + "ecommanderbuild", + "ecommandercloak", + "ecommanderfactory", + "ecommandermeteor", + "ecommandershield", +} + +ConstructorsCounter = { + UDN.ecommander.id, + UDN.ecommanderbuild.id, + UDN.ecommandercloak.id, + UDN.ecommandershield.id, + UDN.ehbotengineer.id, +} + +AssistUnits = { + "eorb", + "zconstructor", +} + +Resurrectors = { +} + +ResurrectorsSea = { +} + +Collectors = { +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/factories.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/factories.lua new file mode 100644 index 000000000..8a33c2552 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/factories.lua @@ -0,0 +1,11 @@ +Factories = { + "ebasefactory", + "eminifac", + "eamphibfac", + "ehbotfac", + "eairplant", + "zhatch", +} + +FactoriesExcludedUnits = { +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/land.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/land.lua new file mode 100644 index 000000000..b82074008 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/land.lua @@ -0,0 +1,64 @@ +T0LandUnits = { + "eallterrlight", + "eamphibbuggy", + "ehbotpeewee", + "elighttank3", + "zlightswarm", +} + +T1LandUnits = { + "eallterrlight", + "eamphibbuggy", + "ehbotpeewee", + "elighttank3", + "zlightswarm", + "eallterrriot", + "eallterrriot_shotgun", + "eallterrmed", + "eamphibneedle", + "eamphibriot", + "eamphibriot_shotgun", + "ehbotthud", + "eriottank2", + "eriottank2_shotgun", + "eallterrassault", + "eamphibarty", + "eartytank", + "eartytank_saturation", + "zmedswarm", + "zpyro", +} + +T2LandUnits = { + "eallterrheavy", + "eallterrshield", + "eamphibmedtank", + "eamphibrock", + "ehbotrocko", + "ehbotsniper", + "eheavytank3", + "emissiletank", + "zskirmisher", + "zassault", +} + +T3LandUnits = { + "eallterrheavy", + "eallterrshield", + "eamphibmedtank", + "eamphibrock", + "ehbotrocko", + "ehbotsniper", + "eheavytank3", + "emissiletank", + "zskirmisher", + "zassault", +} + +T4LandUnits = { + "eallterranarchid", + "eamphibleveler", + "ehbotkarganneth", + "elacerator", + "zqueen", +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/reinforcements.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/reinforcements.lua new file mode 100644 index 000000000..9f6df4f8e --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/reinforcements.lua @@ -0,0 +1,136 @@ +T1ReinforcementLandUnits = { + "eallterrlight", + "eamphibbuggy", + "ehbotpeewee", + "elighttank3", + "zlightswarm", + "eallterrriot", + "eallterrriot_shotgun", + "eallterrmed", + "eamphibneedle", + "eamphibriot", + "eamphibriot_shotgun", + "ehbotthud", + "eriottank2", + "eriottank2_shotgun", + "eallterrassault", + "eamphibarty", + "eartytank", + "eartytank_saturation", + "zmedswarm", + "zpyro", +} + +T2ReinforcementLandUnits = { + "eallterrheavy", + "eallterrshield", + "eamphibmedtank", + "eamphibrock", + "ehbotrocko", + "ehbotsniper", + "eheavytank3", + "emissiletank", + "zskirmisher", + "zassault", +} + +T3ReinforcementLandUnits = { + "eallterrheavy", + "eallterrshield", + "eamphibmedtank", + "eamphibrock", + "ehbotrocko", + "ehbotsniper", + "eheavytank3", + "emissiletank", + "zskirmisher", + "zassault", +} + +T4ReinforcementLandUnits = { + "eallterranarchid", + "eamphibleveler", + "ehbotkarganneth", + "elacerator", + "zqueen", +} + +T1ReinforcementAirUnits = { + "efighter", + "zairtoairfighter", +} + +T2ReinforcementAirUnits = { + "egunship2", + "ebomber", + "zairtogroundfighter", + "zairbomber", +} + +T3ReinforcementAirUnits = { + "egunship2", + "ebomber", + "zairbomber", +} + +T4ReinforcementAirUnits = { + "ekrow", + "ekrow", +} + +T1ReinforcementSeaUnits = { + "eallterrlight", + "eamphibbuggy", + "ehbotpeewee", + "elighttank3", + "zlightswarm", + "eallterrriot", + "eallterrriot_shotgun", + "eallterrmed", + "eamphibneedle", + "eamphibriot", + "eamphibriot_shotgun", + "ehbotthud", + "eriottank2", + "eriottank2_shotgun", + "eallterrassault", + "eamphibarty", + "eartytank", + "eartytank_saturation", + "zmedswarm", + "zpyro", +} + +T2ReinforcementSeaUnits = { + "eallterrheavy", + "eallterrshield", + "eamphibmedtank", + "eamphibrock", + "ehbotrocko", + "ehbotsniper", + "eheavytank3", + "emissiletank", + "zskirmisher", + "zassault", +} + +T3ReinforcementSeaUnits = { + "eallterrheavy", + "eallterrshield", + "eamphibmedtank", + "eamphibrock", + "ehbotrocko", + "ehbotsniper", + "eheavytank3", + "emissiletank", + "zskirmisher", + "zassault", +} + +T4ReinforcementSeaUnits = { + "eallterranarchid", + "eamphibleveler", + "ehbotkarganneth", + "elacerator", + "zqueen", +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/sea.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/sea.lua new file mode 100644 index 000000000..a71c39397 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/sea.lua @@ -0,0 +1,14 @@ +T0SeaUnits = { +} + +T1SeaUnits = { +} + +T2SeaUnits = { +} + +T3SeaUnits = { +} + +T4SeaUnits = { +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/staticunits.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/staticunits.lua new file mode 100644 index 000000000..b90a12393 --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/UnitLists/staticunits.lua @@ -0,0 +1,86 @@ +NoSelfdList = { +} + +StockpilingUnitNames = { +} + +NukingUnitNames = { + "esilo", +} + +BeaconCaptureExcludedUnits = { +} + +BeaconDefenceStructuresT0 = { + "elightturret2", + "elightturret2", +} + +BeaconDefenceStructuresT1 = { + "eheavyturret2", + "eheavyturret2", +} + +BeaconDefenceStructuresT2 = { + "eheavyturret2", + "elaserbattery", +} + +BeaconDefenceStructuresT3 = { + "eartyturret", + "eartyturret", +} + + + +StartboxDefenceStructuresT0 = { + "elightturret2", + "elightturret2", +} + +StartboxDefenceStructuresT1 = { + "elightturret2", + "elightturret2", +} + +StartboxDefenceStructuresT2 = { + "eheavyturret2", + "elaserbattery", +} + +StartboxDefenceStructuresT3 = { + "eheavyturret2", + "eartyturret", +} + +StartboxDefenceStructuresT4 = { + "eartyturret", + "eartyturret", +} + + +StartboxDefenceStructuresT0Sea = { + "elightturret2", + "elightturret2", +} + +StartboxDefenceStructuresT1Sea = { + "elightturret2", + "elightturret2", +} + +StartboxDefenceStructuresT2Sea = { + "elightturret2", + "eheavyturret2", + "elaserbattery", +} + +StartboxDefenceStructuresT3Sea = { + "eheavyturret2", + "eartyturret", +} + +StartboxDefenceStructuresT4Sea = { + "eartyturret", + "eartyturret", +} diff --git a/LuaRules/Gadgets/scavengers/Configs/EvoRTS/config.lua b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/config.lua new file mode 100644 index 000000000..aa1ca9fdb --- /dev/null +++ b/LuaRules/Gadgets/scavengers/Configs/EvoRTS/config.lua @@ -0,0 +1,487 @@ +Spring.Echo("[Scavengers] Config initialized") + +-- Config for Scavengers Survival AI +if scavengersAIEnabled then + scavconfig = { + difficulty = { + easy = 1, + medium = 2, + hard = 3, + brutal = 5, + }, + unitnamesuffix = "", + messenger = false, -- BYAR specific thing, don't enable otherwise (or get gui_messages.lua from BYAR) + modules = { + buildingSpawnerModule = true, --building spawner spawns random blueprints around map + constructorControllerModule = true, --constructor controller is for units that build blueprints + factoryControllerModule = true, --factory controller is to give orders to factories + unitSpawnerModule = true, --spawns units + startBoxProtection = true, --spawns turrets around the startboxes (if you are using startboxes) and damages units inside of it + reinforcementsModule = true, --reinforcements adds beacon capturing and friendly drops + stockpilers = false, --stockpilers adds controller for units with stockpile mechanic + nukes = true, --nukes gives orders to nuke units + }, + timers = { + -- globalScore values + T0start = 1, + T1start = 600, + T1low = 900, + T1med = 1200, + T1high = 1500, + T1top = 1800, + T2start = 2250, + T2low = 3000, + T2med = 3750, + T2high = 4500, + T2top = 6000, + T3start = 7500, + T3low = 9000, + T3med = 10500, + T3high = 12000, + T3top = 13500, + T4start = 15000, + T4low = 18000, + T4med = 21000, + T4high = 24000, + T4top = 28000, + BossFight = 28001, + -- don't delete + NoRadar = 1200, + }, + other = { + heighttolerance = 30, -- higher = allow higher height diffrences + noheightchecksforwater = true, + } + } + + + -- Modules configs + buildingSpawnerModuleConfig = { + spawnchance = 90, + } + + unitSpawnerModuleConfig = { + bossFightEnabled = true, + BossWaveTimeLeft = 900, + aircraftchance = 20, -- higher number = lower chance + globalscoreperoneunit = 900, + spawnchance = 120, + beaconspawnchance = 120, + minimumspawnbeacons = 2, + landmultiplier = 0.75, + airmultiplier = 2, + seamultiplier = 0.2, + chanceforaircraftonsea = 2, -- higher number = lower chance + + t0multiplier = 3, + t1multiplier = 2.5, + t2multiplier = 0.8, + t3multiplier = 0.1, + t4multiplier = 0.05, + } + + constructorControllerModuleConfig = { + constructortimerstart = 120, -- ammount of seconds it skips from constructortimer for the first spawn (make first spawn earlier - this timer starts on timer-Timer1) + constructortimer = 220, -- time in seconds between commander/constructor spawns + constructortimerreductionframes = 36000, + minimumconstructors = 5, + useresurrectors = false, + searesurrectors = false, + useconstructors = true, + usecollectors = false, + } + + unitControllerModuleConfig = { + minimumrangeforfight = 650, + } + + spawnProtectionConfig = { + spread = 192, + } + + + + -- Functions which you can configure + function CountScavConstructors() + return UDC(GaiaTeamID, UDN.corcom_scav.id) + UDC(GaiaTeamID, UDN.armcom_scav.id) + end + + function UpdateTierChances(n) + -- Must be 100 in total + if globalScore > scavconfig.timers.T4top then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 10 + TierSpawnChances.T3 = 30 + TierSpawnChances.T4 = 60 + elseif globalScore > scavconfig.timers.T4high then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 20 + TierSpawnChances.T3 = 50 + TierSpawnChances.T4 = 30 + elseif globalScore > scavconfig.timers.T4med then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 30 + TierSpawnChances.T3 = 50 + TierSpawnChances.T4 = 20 + elseif globalScore > scavconfig.timers.T4low then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 40 + TierSpawnChances.T3 = 50 + TierSpawnChances.T4 = 10 + elseif globalScore > scavconfig.timers.T4start then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 40 + TierSpawnChances.T3 = 55 + TierSpawnChances.T4 = 5 + elseif globalScore > scavconfig.timers.T3top then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 20 + TierSpawnChances.T3 = 70 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3high then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 50 + TierSpawnChances.T3 = 40 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3med then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 60 + TierSpawnChances.T3 = 30 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3low then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 65 + TierSpawnChances.T3 = 25 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3start then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 70 + TierSpawnChances.T3 = 10 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2top then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 80 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2high then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 30 + TierSpawnChances.T2 = 60 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2med then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 40 + TierSpawnChances.T2 = 50 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2low then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 60 + TierSpawnChances.T2 = 30 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2start then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 70 + TierSpawnChances.T2 = 20 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1top then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 90 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1high then + TierSpawnChances.T0 = 40 + TierSpawnChances.T1 = 60 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1med then + TierSpawnChances.T0 = 60 + TierSpawnChances.T1 = 40 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1low then + TierSpawnChances.T0 = 80 + TierSpawnChances.T1 = 20 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1start then + TierSpawnChances.T0 = 90 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + else + TierSpawnChances.T0 = 100 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + end + end + + + + + + + + + + + +-- Config for PvP (Gaia) Scavengers +else + scavconfig = { + difficulty = { + easy = 1, + medium = 2, + hard = 3, + brutal = 5, + }, + unitnamesuffix = "_scav", + messenger = true, -- BYAR specific thing, don't enable otherwise (or get gui_messages.lua from BYAR) + modules = { + buildingSpawnerModule = false, + constructorControllerModule = true, + factoryControllerModule = true, + unitSpawnerModule = true, + startBoxProtection = false, + reinforcementsModule = false, + stockpilers = true, + nukes = true, + }, + timers = { + -- globalScore values + T0start = 1, + T1start = 600, + T1low = 900, + T1med = 1200, + T1high = 1500, + T1top = 1800, + T2start = 2250, + T2low = 3000, + T2med = 3750, + T2high = 4500, + T2top = 6000, + T3start = 7500, + T3low = 9000, + T3med = 10500, + T3high = 12000, + T3top = 13500, + T4start = 15000, + T4low = 18000, + T4med = 21000, + T4high = 24000, + T4top = 28000, + BossFight = 28001, + -- don't delete + NoRadar = 1200, + }, + other = { + heighttolerance = 30, -- higher = allow higher height diffrences + noheightchecksforwater = true, + } + } + + + -- Modules configs + buildingSpawnerModuleConfig = { + spawnchance = 90, + } + + unitSpawnerModuleConfig = { + bossFightEnabled = false, + BossWaveTimeLeft = 900, + aircraftchance = 5, -- higher number = lower chance + globalscoreperoneunit = 800, + spawnchance = 120, + beaconspawnchance = 360, + minimumspawnbeacons = 2, + landmultiplier = 0.75, + airmultiplier = 1.5, + seamultiplier = 0.2, + chanceforaircraftonsea = 2, -- higher number = lower chance + + t0multiplier = 1.5, + t1multiplier = 1.0, + t2multiplier = 0.3, + t3multiplier = 0.05, + t4multiplier = 0.01, + } + + constructorControllerModuleConfig = { + constructortimerstart = 120, -- ammount of seconds it skips from constructortimer for the first spawn (make first spawn earlier - this timer starts on timer-Timer1) + constructortimer = 220, -- time in seconds between commander/constructor spawns + constructortimerreductionframes = 36000, + minimumconstructors = 1, + useresurrectors = true, + searesurrectors = false, + useconstructors = true, + usecollectors = true, + + } + + unitControllerModuleConfig = { + minimumrangeforfight = 650, + } + + spawnProtectionConfig = { + spread = 128, + } + + + -- Functions which you can configure + function CountScavConstructors() + return UDC(GaiaTeamID, UDN.corcom_scav.id) + UDC(GaiaTeamID, UDN.armcom_scav.id) + end + + function UpdateTierChances(n) + -- Must be 100 in total + + if globalScore > scavconfig.timers.T4top then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 10 + TierSpawnChances.T3 = 30 + TierSpawnChances.T4 = 60 + elseif globalScore > scavconfig.timers.T4high then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 20 + TierSpawnChances.T3 = 50 + TierSpawnChances.T4 = 30 + elseif globalScore > scavconfig.timers.T4med then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 30 + TierSpawnChances.T3 = 50 + TierSpawnChances.T4 = 20 + elseif globalScore > scavconfig.timers.T4low then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 40 + TierSpawnChances.T3 = 50 + TierSpawnChances.T4 = 10 + elseif globalScore > scavconfig.timers.T4start then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 40 + TierSpawnChances.T3 = 55 + TierSpawnChances.T4 = 5 + elseif globalScore > scavconfig.timers.T3top then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 20 + TierSpawnChances.T3 = 70 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3high then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 50 + TierSpawnChances.T3 = 40 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3med then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 60 + TierSpawnChances.T3 = 30 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3low then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 65 + TierSpawnChances.T3 = 25 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T3start then + TierSpawnChances.T0 = 0 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 70 + TierSpawnChances.T3 = 20 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2top then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 80 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2high then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 30 + TierSpawnChances.T2 = 60 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2med then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 40 + TierSpawnChances.T2 = 50 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2low then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 60 + TierSpawnChances.T2 = 30 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T2start then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 70 + TierSpawnChances.T2 = 20 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1top then + TierSpawnChances.T0 = 10 + TierSpawnChances.T1 = 90 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1high then + TierSpawnChances.T0 = 40 + TierSpawnChances.T1 = 60 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1med then + TierSpawnChances.T0 = 60 + TierSpawnChances.T1 = 40 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1low then + TierSpawnChances.T0 = 80 + TierSpawnChances.T1 = 20 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + elseif globalScore > scavconfig.timers.T1start then + TierSpawnChances.T0 = 90 + TierSpawnChances.T1 = 10 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + else + TierSpawnChances.T0 = 100 + TierSpawnChances.T1 = 0 + TierSpawnChances.T2 = 0 + TierSpawnChances.T3 = 0 + TierSpawnChances.T4 = 0 + end + end +end diff --git a/LuaUI/Widgets_Evo/snd_ambientSoundPlayer.lua b/LuaUI/Widgets_Evo/snd_ambientSoundPlayer.lua index f474a12dd..242fdad80 100644 --- a/LuaUI/Widgets_Evo/snd_ambientSoundPlayer.lua +++ b/LuaUI/Widgets_Evo/snd_ambientSoundPlayer.lua @@ -46,25 +46,19 @@ function widget:GameFrame(n) if myFaction == "ateran" then if n == 1 then Spring.PlaySoundFile("LuaUI/Sounds/ambient/ambient-stereo-short.wav", 0.33, 'ui') - end - - if (n % 50) == 4 then + elseif (n % 50) == 4 then Spring.PlaySoundFile("LuaUI/Sounds/ambient/ambient-stereo-short.wav", 0.33, 'ui') end elseif myFaction == "zaal" then if n == 1 then Spring.PlaySoundFile("LuaUI/Sounds/ambient/zaalambient.wav", 0.33, 'ui') - end - - if (n % 50) == 4 then + elseif (n % 50) == 4 then Spring.PlaySoundFile("LuaUI/Sounds/ambient/zaalambient.wav", 0.33, 'ui') end elseif myFaction == "pattern" then if n == 1 then Spring.PlaySoundFile("LuaUI/Sounds/ambient/ambient-stereo-short.wav", 0.33, 'ui') - end - - if (n % 50) == 4 then + elseif (n % 50) == 4 then Spring.PlaySoundFile("LuaUI/Sounds/ambient/ambient-stereo-short.wav", 0.33, 'ui') end end diff --git a/Objects3D/scavs/scavbeacon.s3o b/Objects3D/scavs/scavbeacon.s3o index 729928faa..a691d07d5 100644 Binary files a/Objects3D/scavs/scavbeacon.s3o and b/Objects3D/scavs/scavbeacon.s3o differ diff --git a/Objects3D/scavs/scavbeacondroppod.s3o b/Objects3D/scavs/scavbeacondroppod.s3o new file mode 100644 index 000000000..e18a2ff3d Binary files /dev/null and b/Objects3D/scavs/scavbeacondroppod.s3o differ diff --git a/Objects3D/scavs/scavbeacondroppodbyar.s3o b/Objects3D/scavs/scavbeacondroppodbyar.s3o deleted file mode 100644 index 49de9c564..000000000 Binary files a/Objects3D/scavs/scavbeacondroppodbyar.s3o and /dev/null differ diff --git a/Objects3D/scavs/scavcrate.s3o b/Objects3D/scavs/scavcrate.s3o index bcc2833cf..50082876f 100644 Binary files a/Objects3D/scavs/scavcrate.s3o and b/Objects3D/scavs/scavcrate.s3o differ diff --git a/UnitTextures/scavbeacon.dds b/UnitTextures/scavbeacon.dds new file mode 100644 index 000000000..f47bf4dc0 Binary files /dev/null and b/UnitTextures/scavbeacon.dds differ diff --git a/UnitTextures/scavbeacon2.dds b/UnitTextures/scavbeacon2.dds new file mode 100644 index 000000000..eb8c973a1 Binary files /dev/null and b/UnitTextures/scavbeacon2.dds differ diff --git a/UnitTextures/scavbeacondropped.png b/UnitTextures/scavbeacondropped.png new file mode 100644 index 000000000..3b229e8fe Binary files /dev/null and b/UnitTextures/scavbeacondropped.png differ diff --git a/UnitTextures/scavbeacondropped2.png b/UnitTextures/scavbeacondropped2.png new file mode 100644 index 000000000..d4ee0d7ec Binary files /dev/null and b/UnitTextures/scavbeacondropped2.png differ diff --git a/UnitTextures/scavcrate.png b/UnitTextures/scavcrate.png new file mode 100644 index 000000000..93fffa315 Binary files /dev/null and b/UnitTextures/scavcrate.png differ diff --git a/UnitTextures/scavcrate2.png b/UnitTextures/scavcrate2.png new file mode 100644 index 000000000..200a72c50 Binary files /dev/null and b/UnitTextures/scavcrate2.png differ diff --git a/Units-Configs-Basedefs/basedefs/zaal/zconstructor_basedef.lua b/Units-Configs-Basedefs/basedefs/zaal/zconstructor_basedef.lua index 5bc2f032f..af81c66cc 100644 --- a/Units-Configs-Basedefs/basedefs/zaal/zconstructor_basedef.lua +++ b/Units-Configs-Basedefs/basedefs/zaal/zconstructor_basedef.lua @@ -60,7 +60,7 @@ unitDef = { -- turnrate = 350, unitname = unitName, upright = true, - workerTime = 0.25, + workerTime = 0.5, TerraformSpeed = 2147000, sfxtypes = { pieceExplosionGenerators = { diff --git a/Units/other/Scavengers/scavengerdroppod_scav.lua b/Units/other/Scavengers/scavengerdroppod_scav.lua index 6fb3ebf77..3ed291abd 100644 --- a/Units/other/Scavengers/scavengerdroppod_scav.lua +++ b/Units/other/Scavengers/scavengerdroppod_scav.lua @@ -76,7 +76,7 @@ return { impulsefactor = 0.1, interceptedbyshieldtype = 4, metalpershot = 0, - model = "scavs/scavbeacondroppodbyar.s3o", + model = "scavs/scavbeacondroppod.s3o", name = "Droppod", range = 29999, reloadtime = 5, diff --git a/Units/other/Scavengers/scavengerdroppodbeacon_scav.lua b/Units/other/Scavengers/scavengerdroppodbeacon_scav.lua index 7171351de..bdc337069 100644 --- a/Units/other/Scavengers/scavengerdroppodbeacon_scav.lua +++ b/Units/other/Scavengers/scavengerdroppodbeacon_scav.lua @@ -33,7 +33,7 @@ return { maxvelocity = 0, name = "Scavenger Spawn Beacon", noautofire = false, - objectname = "scavs/scavbeaconbyar.s3o", + objectname = "scavs/scavbeacon.s3o", radardistance = 900, script = "scavs/beaconbyar.cob", seismicsignature = 4, @@ -79,7 +79,7 @@ return { impulsefactor = 0.1, interceptedbyshieldtype = 4, metalpershot = 0, - model = "scavs/scavbeacondroppodbyar.s3o", + model = "scavs/scavbeacondroppod.s3o", name = "Droppod", range = 256, reloadtime = 5, diff --git a/Units/other/Scavengers/scavengerdroppodfriendly.lua b/Units/other/Scavengers/scavengerdroppodfriendly.lua index 3fa4ee534..041437357 100644 --- a/Units/other/Scavengers/scavengerdroppodfriendly.lua +++ b/Units/other/Scavengers/scavengerdroppodfriendly.lua @@ -74,7 +74,7 @@ return { impulsefactor = 0.1, interceptedbyshieldtype = 4, metalpershot = 0, - model = "scavs/scavbeacondroppodbyar.s3o", + model = "scavs/scavbeacondroppod.s3o", name = "Droppod", range = 29999, reloadtime = 5, diff --git a/Units/scavengers/scavcommanderateran.lua b/Units/scavengers/scavcommanderateran.lua deleted file mode 100644 index 7c50eb862..000000000 --- a/Units/scavengers/scavcommanderateran.lua +++ /dev/null @@ -1,284 +0,0 @@ --- UNITDEF -- scavcommanderateran -- --------------------------------------------------------------------------------- - -local unitName = "scavcommanderateran" - --------------------------------------------------------------------------------- - -local armortype = [[light]] -local supplyGiven = [[0]] -local techprovided = [[tech0,tech1,tech2,tech3]] -local techrequired = [[0 overseer]] - -local weapon1Damage = 200 -local weapon1AOE = 250 -local energycosttofire = 0 --weapon1Damage / 10 * ((weapon1AOE / 1000) + 1) - - -local unitDef = { - - --mobileunit - transportbyenemy = false; - - --** - - acceleration = 0.2, - brakeRate = 1, - buildCostEnergy = 0, - buildCostMetal = 1000, - buildDistance = 1000, - builder = true, - buildTime = 2.5, - capturable = false, - CanAttack = true, - CanAssist = true, - canBeAssisted = true, - CanCapture = false, - CanRepair = true, - canRestore = false, - - canGuard = true, - canMove = true, - canPatrol = true, - canreclaim = false, - canstop = true, - category = "NOTAIR SUPPORT LIGHT", - description = [[Builds Units]], - energyMake = 0, - energyStorage = 0, - energyUse = 0, - explodeAs = "commnuke", - footprintX = 4, - footprintZ = 4, - hideDamage = true, - iconType = "commander", - idleAutoHeal = .5, - idleTime = 2200, - levelground = true, - maxDamage = 5000, - maxSlope = 180, - maxVelocity = 3, - maxReverseVelocity = 1, - maxWaterDepth = 5000, - metalmake = 0, - metalStorage = 0, - movementClass = "COMMANDERTANK4", - moveState = "0", - name = "Scavenger Overseer", - noChaseCategories = "NOTAIR SUPPORT VTOL AMPHIB", - objectName = "ecommander4.s3o", - script = "ecommander3.cob", - radarDistance = 0, - repairable = false, - selfDestructAs = "commnuke", - showPlayerName = true, - showNanoSpray = true, - sightDistance = 500, - smoothAnim = true, - stealth = true, - seismicSignature = 2, - turnInPlace = true, - turnRate = 5000, - unitname = unitName, - upright = false, - workerTime = 1, - capturespeed = 0.25, - TerraformSpeed = 2147000, - ReclaimSpeed = 0, - -- 0.03125 = 1 hp per second - repairspeed = 0.5, - sfxtypes = { - pieceExplosionGenerators = { - "deathceg3", - "deathceg4", - }, - - explosiongenerators = { - "custom:nanoorb", - "custom:dirt", - "custom:blacksmoke", - }, - }, - buildoptions = Shared.buildList, - sounds = { - build = "miscfx/buildstart.wav", - underattack = "other/unitsunderattack1", - ok = { - "ack", - }, - select = { - "unitselect", - }, - }, - weapons = { - [1] = { - def = "riottankempweapon", - }, - }, - customParams = { - unittype = "mobile", - area_mex_def = "emetalextractor", - ProvideTech = techprovided, - RequireTech = techrequired, - canbetransported = "true", - iscommander = false, - needed_cover = 2, - supply_granted = supplyGiven, - death_sounds = "generic", - - armortype = armortype, - nofriendlyfire = "1", - normaltex = "unittextures/lego2skin_explorernormal.dds", - buckettex = "unittextures/lego2skin_explorerbucket.dds", - factionname = "ateran", - }, -} - --------------------------------------------------------------------------------- - -local weaponDefs = { - - riottankempweapon = { - - AreaOfEffect = weapon1AOE, - avoidFeature = false, - avoidFriendly = false, - avoidGround = false, - collideFeature = false, - collideFriendly = false, - coreThickness = 0.6, - -- cegTag = "mediumcannonweapon3", - duration = 0.05, - edgeeffectiveness = 0.1, - energypershot = energycosttofire, - explosionGenerator = "custom:genericshellexplosion-medium-lightning", - fallOffRate = 1, - fireStarter = 100, - impulseFactor = 0, - - minintensity = 1, - name = "EMP Blast Wave", - noexplode = true, - paralyzer = true, - paralyzetime = 2.5, - range = 500, - reloadtime = 1, - WeaponType = "LaserCannon", - rgbColor = "0 0.2 1", - rgbColor2 = "1 1 1", - soundTrigger = true, - soundstart = "weapons/fnubeamfire.wav", - soundHit = "explosions/phasegun1hit.wav", - texture1 = "wave", - texture2 = "empty", - thickness = 40, - tolerance = 1000, - turret = true, - weaponVelocity = 1000, - customparams = { - damagetype = "eriottank2", - nofriendlyfire = 1, - nocosttofire = true, - - --Upgrades-- - upgradeClass = "groundweapons", - }, - damage = { - default = weapon1Damage, - }, - }, - - emp = { - AreaOfEffect = 500, - avoidFriendly = false, - avoidFeature = false, - collideFriendly = false, - collideFeature = false, - explosionGenerator = "custom:genericshellexplosion-large-blue-emp", - tolerance = 1000, - energypershot = 0, - explosionScar = false, - impulseFactor = 0, - name = "Emp Blast Weapon", - noSelfDamage = true, - paralyzer = true, - paralyzetime = 5, - range = 500, - reloadtime = 10, - weaponType = "Cannon", - soundhit = "explosions/emp.wav", - size = 0, - turret = true, - weaponVelocity = 10000, - customparams = { - damagetype = "default", - nofriendlyfire = 1, - nocosttofire = true, - - --Upgrades-- - upgradeClass = "groundweapons", - }, - damage = { - default = 1000, - }, - }, - commnuke = { - AreaOfEffect = 500, - avoidFriendly = false, - avoidFeature = false, - cegTag = "NUKETRAIL", - collideFriendly = false, - collideFeature = false, - commandfire = true, - craterBoost = 0, - craterMult = 0, - edgeeffectiveness = 0.1, - energypershot = 0, - explosionGenerator = "custom:NUKEDATBEWMSMALL", - fireStarter = 100, - flightTime = 400, - - id = 124, - impulseBoost = 0, - impulseFactor = 0, - interceptedByShieldType = 4, - - metalpershot = 0, - model = "enuke.s3o", - name = "Nuke", - range = 32000, - reloadtime = 60, - weaponType = "MissileLauncher", - - - smokeTrail = false, - soundHit = "explosions/explosion_enormous.wav", - soundStart = "weapons/nukelaunch.wav", - --- stockpile = true, --- stockpileTime = stockpiletime, - startVelocity = 10, - tracks = true, - turnRate = 3000, - targetable = 1, - - weaponAcceleration = 30, - weaponTimer = 15, - weaponType = "StarburstLauncher", - weaponVelocity = 1000, - customparams = { - damagetype = "default", - death_sounds = "nuke", - nocosttofire = true, - }, - damage = { - default = 1000, - }, - }, -} -unitDef.weaponDefs = weaponDefs --------------------------------------------------------------------------------- - -return lowerkeys({ [unitName] = unitDef }) - --------------------------------------------------------------------------------- diff --git a/Units/zaal/units/land/zconstructor.lua b/Units/zaal/units/land/zconstructor.lua index 58f3499dc..41980f97c 100644 --- a/Units/zaal/units/land/zconstructor.lua +++ b/Units/zaal/units/land/zconstructor.lua @@ -7,7 +7,7 @@ unitName = "zconstructor" isUpgraded = [[0]] -buildDistance = 300 +buildDistance = 400 humanName = "Worker Drone"