Initial commit: OpenRA game engine
Fork from OpenRA/OpenRA with one-click launch script (start-ra.cmd) Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
BIN
mods/ra/maps/soviet-08a/map.bin
Normal file
BIN
mods/ra/maps/soviet-08a/map.bin
Normal file
Binary file not shown.
7
mods/ra/maps/soviet-08a/map.ftl
Normal file
7
mods/ra/maps/soviet-08a/map.ftl
Normal file
@@ -0,0 +1,7 @@
|
||||
## rules.yaml
|
||||
briefing =
|
||||
We have detected Allied activity on Elba island. The Allies plan to use this island to stage an attack on the Soviet Empire.
|
||||
|
||||
You must ensure that the island ceases to be under Allied control. Destroy all Allied units on and around the island.
|
||||
|
||||
The local population has been aiding the Allies as well. There is only one punishment for helping the enemy - Death.
|
||||
BIN
mods/ra/maps/soviet-08a/map.png
Normal file
BIN
mods/ra/maps/soviet-08a/map.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 23 KiB |
1072
mods/ra/maps/soviet-08a/map.yaml
Normal file
1072
mods/ra/maps/soviet-08a/map.yaml
Normal file
File diff suppressed because it is too large
Load Diff
130
mods/ra/maps/soviet-08a/rules.yaml
Normal file
130
mods/ra/maps/soviet-08a/rules.yaml
Normal file
@@ -0,0 +1,130 @@
|
||||
World:
|
||||
LuaScript:
|
||||
Scripts: campaign.lua, utils.lua, soviet08a.lua, soviet08a-AI.lua
|
||||
MissionData:
|
||||
Briefing: briefing
|
||||
BriefingVideo: soviet8.vqa
|
||||
StartVideo: slntsrvc.vqa
|
||||
WinVideo: bombrun.vqa
|
||||
LossVideo: allymorf.vqa
|
||||
ScriptLobbyDropdown@difficulty:
|
||||
ID: difficulty
|
||||
Label: dropdown-difficulty.label
|
||||
Description: dropdown-difficulty.description
|
||||
Values:
|
||||
easy: options-difficulty.easy
|
||||
normal: options-difficulty.normal
|
||||
hard: options-difficulty.hard
|
||||
Default: normal
|
||||
|
||||
Player:
|
||||
PlayerResources:
|
||||
DefaultCash: 5000
|
||||
|
||||
CAMERA:
|
||||
RevealsShroud:
|
||||
Range: 6c0
|
||||
|
||||
LST.Reinforcement:
|
||||
Inherits: LST
|
||||
RejectsOrders:
|
||||
-Buildable:
|
||||
-Selectable:
|
||||
RenderSprites:
|
||||
Image: lst
|
||||
Interactable:
|
||||
|
||||
SCRIPTEDDROP:
|
||||
ParatroopersPower:
|
||||
DisplayBeacon: False
|
||||
DropItems: E1,E1,E4,E4,E4
|
||||
|
||||
AFLD:
|
||||
AirstrikePower@parabombs:
|
||||
Prerequisites: aircraft.soviet
|
||||
ParatroopersPower@paratroopers:
|
||||
DropItems: E1,E1,E1,E2,E2
|
||||
|
||||
MONEYCRATE:
|
||||
GiveCashCrateAction:
|
||||
Amount: 2000
|
||||
|
||||
STEK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
ATEK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
HPAD:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
SAM:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
IRON:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MSLO:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
FTRK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
4TNK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
QTNK:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MRJ:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MIG:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
HELI:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MSUB:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
CA:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
THF:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
GAP:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
PDOX:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
E7:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
MECH:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
E3:
|
||||
Buildable:
|
||||
Prerequisites: ~tent
|
||||
153
mods/ra/maps/soviet-08a/soviet08a-AI.lua
Normal file
153
mods/ra/maps/soviet-08a/soviet08a-AI.lua
Normal file
@@ -0,0 +1,153 @@
|
||||
--[[
|
||||
Copyright (c) The OpenRA Developers and Contributors
|
||||
This file is part of OpenRA, which is free software. It is made
|
||||
available to you under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version. For more
|
||||
information, see COPYING.
|
||||
]]
|
||||
IdlingUnits = { }
|
||||
|
||||
DDPatrol = { "dd", "dd" }
|
||||
DDPatrol1Path = { DDPatrol1Point1.Location, DDPatrol1Point2.Location, DDPatrol1Point3.Location, DDPatrol1Point4.Location, DDPatrol1Point5.Location, DDPatrol1Point6.Location }
|
||||
DDPatrol2Path = { DDPatrol2Point1.Location, DDPatrol2Point2.Location, DDPatrol2Point3.Location, DDPatrol2Point4.Location, DDPatrol2Point5.Location, DDPatrol2Point6.Location, DDPatrol2Point7.Location }
|
||||
ShipArrivePath = { DDEntry.Location, DDEntryStop.Location }
|
||||
|
||||
WTransWays =
|
||||
{
|
||||
{ WaterUnloadEntry1.Location, WaterUnload1.Location },
|
||||
{ WaterUnloadEntry2.Location, WaterUnload2.Location },
|
||||
{ WaterUnloadEntry3.Location, WaterUnload3.Location },
|
||||
{ WaterUnloadEntry4.Location, WaterUnload4.Location },
|
||||
{ WaterUnloadEntry5.Location, WaterUnload5.Location },
|
||||
{ WaterUnloadEntry6.Location, WaterUnload6.Location }
|
||||
}
|
||||
|
||||
WTransUnits =
|
||||
{
|
||||
hard = { { "2tnk", "1tnk", "e1", "e3", "e3" }, { "2tnk", "2tnk", "2tnk" } },
|
||||
normal = { { "1tnk", "1tnk", "e3", "e3", "jeep" }, { "2tnk", "e3", "e3", "jeep" } },
|
||||
easy = { { "1tnk", "e1", "e1", "e3", "e3" }, { "e3", "e3", "jeep", "jeep" } }
|
||||
}
|
||||
|
||||
WTransDelays =
|
||||
{
|
||||
easy = DateTime.Minutes(5),
|
||||
normal = DateTime.Minutes(3),
|
||||
hard = DateTime.Minutes(2)
|
||||
}
|
||||
|
||||
AttackGroup = { }
|
||||
AttackGroupSize = 8
|
||||
|
||||
ProductionInterval =
|
||||
{
|
||||
easy = DateTime.Seconds(30),
|
||||
normal = DateTime.Seconds(20),
|
||||
hard = DateTime.Seconds(10)
|
||||
}
|
||||
|
||||
AlliedInfantry = { "e1", "e3" }
|
||||
AlliedVehiclesUpgradeDelay = DateTime.Minutes(15)
|
||||
AlliedVehicleType = "Normal"
|
||||
AlliedVehicles =
|
||||
{
|
||||
Normal = { "jeep", "1tnk", "1tnk" },
|
||||
Upgraded = { "2tnk", "arty" }
|
||||
}
|
||||
|
||||
WTransWaves = function()
|
||||
local way = Utils.Random(WTransWays)
|
||||
local units = Utils.Random(WTransUnits)
|
||||
local attackUnits = Reinforcements.ReinforceWithTransport(Greece, "lst", units , way, { way[2], way[1] })[2]
|
||||
Utils.Do(attackUnits, function(a)
|
||||
Trigger.OnAddedToWorld(a, function()
|
||||
a.AttackMove(SovietStart.Location)
|
||||
IdleHunt(a)
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(WTransDelays, WTransWaves)
|
||||
end
|
||||
|
||||
SendAttackGroup = function()
|
||||
if #AttackGroup < AttackGroupSize then
|
||||
return
|
||||
end
|
||||
|
||||
Utils.Do(AttackGroup, function(unit)
|
||||
if not unit.IsDead then
|
||||
Trigger.OnIdle(unit, unit.Hunt)
|
||||
end
|
||||
end)
|
||||
|
||||
AttackGroup = { }
|
||||
end
|
||||
|
||||
ProduceInfantry = function()
|
||||
if (GreeceTent1.IsDead or GreeceTent1.Owner ~= Greece) and (GreeceTent2.IsDead or GreeceTent2.Owner ~= Greece) then
|
||||
return
|
||||
end
|
||||
|
||||
Greece.Build({ Utils.Random(AlliedInfantry) }, function(units)
|
||||
table.insert(AttackGroup, units[1])
|
||||
SendAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
|
||||
end)
|
||||
end
|
||||
|
||||
ProduceVehicles = function()
|
||||
if GreeceWarFactory.IsDead or GreeceWarFactory.Owner ~= Greece then
|
||||
return
|
||||
end
|
||||
|
||||
Greece.Build({ Utils.Random(AlliedVehicles[AlliedVehicleType]) }, function(units)
|
||||
table.insert(AttackGroup, units[1])
|
||||
SendAttackGroup()
|
||||
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
|
||||
end)
|
||||
end
|
||||
|
||||
BringDDPatrol = function(patrolPath)
|
||||
local units = Reinforcements.Reinforce(Greece, DDPatrol, ShipArrivePath)
|
||||
Utils.Do(units, function(unit)
|
||||
Trigger.OnIdle(unit, function(patrols)
|
||||
patrols.Patrol(patrolPath, true, 200)
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.OnAllKilled(units, function()
|
||||
if GreeceNavalYard.IsDead then
|
||||
return
|
||||
else
|
||||
if Difficulty == "easy" then
|
||||
Trigger.AfterDelay(DateTime.Minutes(7), function() BringDDPatrol(patrolPath) end)
|
||||
else
|
||||
Trigger.AfterDelay(DateTime.Minutes(4), function() BringDDPatrol(patrolPath) end)
|
||||
end
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
ActivateAI = function()
|
||||
WTransUnits = WTransUnits[Difficulty]
|
||||
WTransDelays = WTransDelays[Difficulty]
|
||||
|
||||
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner == Greece and self.HasProperty("StartBuildingRepairs") end)
|
||||
Utils.Do(buildings, function(actor)
|
||||
Trigger.OnDamaged(actor, function(building)
|
||||
if building.Owner == Greece and building.Health < building.MaxHealth * 3/4 then
|
||||
building.StartBuildingRepairs()
|
||||
end
|
||||
end)
|
||||
end)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Minutes(3), WTransWaves)
|
||||
|
||||
Trigger.AfterDelay(AlliedVehiclesUpgradeDelay, function() AlliedVehicleType = "Upgraded" end)
|
||||
|
||||
ProduceInfantry()
|
||||
ProduceVehicles()
|
||||
BringDDPatrol(DDPatrol1Path)
|
||||
Trigger.AfterDelay(DateTime.Minutes(1), function() BringDDPatrol(DDPatrol2Path) end)
|
||||
end
|
||||
149
mods/ra/maps/soviet-08a/soviet08a.lua
Normal file
149
mods/ra/maps/soviet-08a/soviet08a.lua
Normal file
@@ -0,0 +1,149 @@
|
||||
--[[
|
||||
Copyright (c) The OpenRA Developers and Contributors
|
||||
This file is part of OpenRA, which is free software. It is made
|
||||
available to you under the terms of the GNU General Public License
|
||||
as published by the Free Software Foundation, either version 3 of
|
||||
the License, or (at your option) any later version. For more
|
||||
information, see COPYING.
|
||||
]]
|
||||
AlliedScouts = { Actor189, Actor216, Actor217, Actor218, Actor219 }
|
||||
|
||||
SovReinforcements =
|
||||
{
|
||||
east =
|
||||
{
|
||||
actors = { "e1", "e1", "e1", "e1", "e1" },
|
||||
entryPath = { EastEntry.Location, EastUnload.Location + CVec.New(1, 0) },
|
||||
exitPath = { EastEntry.Location },
|
||||
},
|
||||
south =
|
||||
{
|
||||
actors = { "e4", "e4", "e1", "e1", "e1" },
|
||||
entryPath = { SouthEntry.Location, SouthUnload.Location + CVec.New(0, 1) },
|
||||
exitPath = { SouthEntry.Location }
|
||||
},
|
||||
mammoth =
|
||||
{
|
||||
actors = { "4tnk" },
|
||||
entryPath = { SouthEntry.Location, SouthUnload.Location + CVec.New(0, 1) },
|
||||
exitPath = { SouthEntry.Location }
|
||||
}
|
||||
}
|
||||
|
||||
Village = { Church, Actor147, Actor148, Actor149, Actor150, Actor151, Actor152, Actor153 }
|
||||
|
||||
ActivateAIDelay = DateTime.Seconds(45)
|
||||
|
||||
AddEastReinforcementTrigger = function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(30), function()
|
||||
Media.PlaySpeechNotification(USSR, "ReinforcementsArrived")
|
||||
local reinforcement = SovReinforcements.east
|
||||
Reinforcements.ReinforceWithTransport(USSR, "lst.reinforcement", reinforcement.actors, reinforcement.entryPath, reinforcement.exitPath)
|
||||
end)
|
||||
end
|
||||
|
||||
AddSouthReinforcementTrigger = function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(60), function()
|
||||
Media.PlaySpeechNotification(USSR, "ReinforcementsArrived")
|
||||
local reinforcement = SovReinforcements.south
|
||||
Reinforcements.ReinforceWithTransport(USSR, "lst.reinforcement", reinforcement.actors, reinforcement.entryPath, reinforcement.exitPath)
|
||||
end)
|
||||
end
|
||||
|
||||
AddParadropReinforcementTrigger = function()
|
||||
Trigger.AfterDelay(DateTime.Seconds(90), function()
|
||||
Media.PlaySpeechNotification(USSR, "ReinforcementsArrived")
|
||||
ScriptedDrop.TargetParatroopers(ScriptedParadrop.CenterPosition, Angle.New(40))
|
||||
end)
|
||||
end
|
||||
|
||||
ChurchAmbushTrigger = function()
|
||||
if not AmbushSwitch then
|
||||
local hiding = Reinforcements.Reinforce(Germany, { 'e1', 'e1', 'e1', 'e1', 'e1', 'e1', 'e1', 'e3', 'e3', 'e3' }, { ChurchAmbush.Location, AmbushMove.Location }, 0)
|
||||
Utils.Do(hiding, IdleHunt)
|
||||
end
|
||||
AmbushSwitch = true
|
||||
end
|
||||
|
||||
Trigger.OnKilled(Church, function()
|
||||
Actor.Create("moneycrate", true, { Owner = USSR, Location = ChurchAmbush.Location })
|
||||
end)
|
||||
|
||||
DestroyVillage = function()
|
||||
Media.PlaySpeechNotification(USSR, "ReinforcementsArrived")
|
||||
USSR.MarkCompletedObjective(DestroyVillageObjective)
|
||||
local reinforcement = SovReinforcements.mammoth
|
||||
Reinforcements.ReinforceWithTransport(USSR, "lst.reinforcement", reinforcement.actors, reinforcement.entryPath, reinforcement.exitPath)
|
||||
end
|
||||
|
||||
AddRetreatTrigger = function()
|
||||
Trigger.OnEnteredProximityTrigger(Actor222.CenterPosition, WDist.FromCells(12), function(actor, id)
|
||||
if actor.Owner == USSR and actor.Type == "barr" then
|
||||
AlliedScouts = Utils.Where(AlliedScouts, function(scout) return not scout.IsDead end)
|
||||
local removed
|
||||
Utils.Do(AlliedScouts, function(scout)
|
||||
if scout.Type == "e1" and not removed then
|
||||
removed = true
|
||||
else
|
||||
scout.Stop()
|
||||
scout.Move(ScoutRetreat.Location, 1)
|
||||
end
|
||||
end)
|
||||
Trigger.RemoveProximityTrigger(id)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
BoatAttack = function(boat)
|
||||
if boat.IsDead then
|
||||
return
|
||||
else
|
||||
boat.AttackMove(BoatRally.Location)
|
||||
end
|
||||
end
|
||||
|
||||
Tick = function()
|
||||
Greece.Cash = 1000
|
||||
|
||||
if Greece.HasNoRequiredUnits() and Germany.HasNoRequiredUnits() then
|
||||
USSR.MarkCompletedObjective(KillAll)
|
||||
end
|
||||
|
||||
if USSR.HasNoRequiredUnits() then
|
||||
Greece.MarkCompletedObjective(BeatUSSR)
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
USSR = Player.GetPlayer("USSR")
|
||||
Germany = Player.GetPlayer("Germany")
|
||||
Greece = Player.GetPlayer("Greece")
|
||||
|
||||
InitObjectives(USSR)
|
||||
|
||||
KillAll = AddPrimaryObjective(USSR, "destroy-allied-units-structures")
|
||||
DestroyVillageObjective = AddSecondaryObjective(USSR, "destroy-allied-sympathizers-village")
|
||||
BeatUSSR = AddPrimaryObjective(Greece, "")
|
||||
|
||||
AddEastReinforcementTrigger()
|
||||
AddSouthReinforcementTrigger()
|
||||
AddParadropReinforcementTrigger()
|
||||
AddRetreatTrigger()
|
||||
|
||||
ScriptedDrop = Actor.Create("scripteddrop", false, { Owner = USSR })
|
||||
|
||||
OnAnyDamaged(Village, ChurchAmbushTrigger)
|
||||
|
||||
Trigger.OnAllRemovedFromWorld(Village, DestroyVillage)
|
||||
|
||||
Camera.Position = SovietBase.CenterPosition
|
||||
|
||||
Trigger.AfterDelay(ActivateAIDelay, ActivateAI)
|
||||
Trigger.AfterDelay(DateTime.Minutes(2), function() BoatAttack(Boat1) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(5), function() BoatAttack(Boat2) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(7), function() BoatAttack(Boat3) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(10), function() BoatAttack(Boat4) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(12), function() BoatAttack(Boat5) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(14), function() BoatAttack(Boat6) end)
|
||||
Trigger.AfterDelay(DateTime.Minutes(15), function() BoatAttack(Boat7) end)
|
||||
end
|
||||
Reference in New Issue
Block a user