Initial commit: OpenRA game engine
Some checks failed
Continuous Integration / Linux (.NET 8.0) (push) Has been cancelled
Continuous Integration / Windows (.NET 8.0) (push) Has been cancelled

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:
let5sne.win10
2026-01-10 21:46:54 +08:00
commit 9cf6ebb986
4065 changed files with 635973 additions and 0 deletions

Binary file not shown.

View File

@@ -0,0 +1,5 @@
## rules.yaml
briefing =
The Allied forces have intercepted and destroyed a convoy that carried parts for our secret weapon. One truck remains, but they have captured that last truck and its cargo.
This is not acceptable! You are to destroy that truck before the Allies leave the area with it.

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,120 @@
World:
LuaScript:
Scripts: campaign.lua, utils.lua, soviet09.lua, soviet09-AI.lua
MissionData:
BriefingVideo: soviet9.vqa
WinVideo: v2rocket.vqa
LossVideo: sfrozen.vqa
StartVideo: movingin.vqa
Briefing: briefing
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
SmudgeLayer@SCORCH:
InitialSmudges:
98,87: sc3,0
100,87: sc2,0
108,87: sc1,0
88,93: sc6,0
104,101: sc3,0
SmudgeLayer@CRATER:
InitialSmudges:
99,87: cr1,2
86,93: cr1,0
87,93: cr1,1
Player:
PlayerResources:
DefaultCash: 8000
AFLD:
AirstrikePower@parabombs:
Prerequisites: ~disabled
ATEK:
Buildable:
Prerequisites: ~disabled
HPAD:
Buildable:
Prerequisites: ~structures.allies
IRON:
Buildable:
Prerequisites: ~disabled
MSLO:
Buildable:
Prerequisites: ~disabled
TRUK:
-SpawnActorOnDeath:
FTRK:
Buildable:
Prerequisites: ~disabled
QTNK:
Buildable:
Prerequisites: ~disabled
MRJ:
Buildable:
Prerequisites: ~disabled
HELI:
Buildable:
Prerequisites: ~hpad
HIND:
Buildable:
Prerequisites: ~disabled
MIG:
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
SPY:
Buildable:
Prerequisites: ~disabled
E3:
Buildable:
Prerequisites: ~tent
CHAN:
-Wanders:

View File

@@ -0,0 +1,189 @@
--[[
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.
]]
AttackGroup = { }
AttackGroupSize = 12
AlliedInfantry = { "e1", "e3" }
AlliedVehicles = { "jeep", "1tnk", "2tnk", "2tnk" }
AlliedAircraftType = { "heli" }
Longbows = { }
ProductionInterval =
{
easy = DateTime.Seconds(25),
normal = DateTime.Seconds(15),
hard = DateTime.Seconds(5)
}
AttackPaths =
{
{ SouthAttack1.Location, SouthAttack2.Location, DefaultCameraPosition.Location },
{ TruckStop2.Location, TruckStop1.Location, DefaultCameraPosition.Location }
}
WTransUnits = { { "2tnk", "1tnk", "1tnk", "e3", "e3" }, { "2tnk", "2tnk", "2tnk" } }
WTransDelays =
{
easy = DateTime.Minutes(5),
normal = DateTime.Minutes(3),
hard = DateTime.Minutes(1)
}
WTransWays =
{
{ SeaEntryEast.Location, SeaEastLZ.Location },
{ SeaEntryWest1.Location, SeaWestLZ1.Location },
{ SeaEntryWest1.Location, SeaWestPath1.Location, SeaWestLZ2.Location },
{ SeaEntryWest2.Location, SeaWestPath2.Location, SeaWestPath3.Location, SeaWestLZ3.Location },
{ SeaEntryWest2.Location, SeaWestPath2.Location, SeaWestPath3.Location, SeaWestLZ4.Location }
}
ChinookChalk = { "e1", "e1", "e1", "e1", "e3", "e3", "e3", "e3" }
ChinookPaths =
{
{ SeaEntryEast.Location, LZ1.Location },
{ TruckEscapeEast.Location, LZ2.Location },
{ ChinookEntrySouth.Location, LZ3.Location },
{ SeaEntryWest2.Location, LZ4.Location }
}
ChinookDelay =
{
easy = { DateTime.Minutes(1), DateTime.Seconds(90) },
normal = { DateTime.Seconds(45), DateTime.Seconds(75) },
hard = { DateTime.Seconds(30), DateTime.Minutes(1) }
}
ChinookWaves =
{
easy = 4,
normal = 8,
hard = 12
}
ChinookAttacks = 0
ChinookAttack = function()
Trigger.AfterDelay(Utils.RandomInteger(ChinookDelay[1], ChinookDelay[2]), function()
local way = Utils.Random(ChinookPaths)
local units = ChinookChalk
local chalk = Reinforcements.ReinforceWithTransport(Greece, "tran", units , way, { way[2], way[1] })[2]
Utils.Do(chalk, function(unit)
Trigger.OnAddedToWorld(unit, IdleHunt)
end)
ChinookAttacks = ChinookAttacks + 1
if ChinookAttacks <= ChinookWaves[Difficulty] then
ChinookAttack()
end
end)
end
ProduceInfantry = function()
if GermanyTent.IsDead or GermanyTent.Owner ~= Germany then
return
end
Germany.Build({ Utils.Random(AlliedInfantry) }, function(units)
table.insert(AttackGroup, units[1])
SendAttackGroup()
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceInfantry)
end)
end
ProduceVehicles = function()
if GermanyWarFactory.IsDead or GermanyWarFactory.Owner ~= Germany then
return
end
Germany.Build({ Utils.Random(AlliedVehicles) }, function(units)
table.insert(AttackGroup, units[1])
SendAttackGroup()
Trigger.AfterDelay(ProductionInterval[Difficulty], ProduceVehicles)
end)
end
SendAttackGroup = function()
if #AttackGroup < AttackGroupSize then
return
end
Utils.Do(AttackGroup, IdleHunt)
AttackGroup = { }
end
GreeceAircraft = function()
if (GreeceHpad1.IsDead or GreeceHpad1.Owner ~= Greece) and (GreeceHpad2.IsDead or GreeceHpad2.Owner ~= Greece) then
return
end
Greece.Build(AlliedAircraftType, function(units)
local longbow = units[1]
Longbows[#Longbows + 1] = longbow
Trigger.OnKilled(longbow, GreeceAircraft)
local alive = Utils.Where(Longbows, function(y) return not y.IsDead end)
if #alive < 2 then
Trigger.AfterDelay(DateTime.Seconds(90), GreeceAircraft)
end
InitializeAttackAircraft(longbow, USSR)
end)
end
GermanAircraft = function()
if (GermanyHpad1.IsDead or GermanyHpad1.Owner ~= Germany) and (GermanyHpad2.IsDead or GermanyHpad2.Owner ~= Germany) then
return
end
Germany.Build(AlliedAircraftType, function(units)
local longbow = units[1]
Longbows[#Longbows + 1] = longbow
Trigger.OnKilled(longbow, GermanAircraft)
local alive = Utils.Where(Longbows, function(y) return not y.IsDead end)
if #alive < 2 then
Trigger.AfterDelay(DateTime.Seconds(ProductionInterval[Difficulty] / 2), GermanAircraft)
end
InitializeAttackAircraft(longbow, USSR)
end)
end
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(DefaultCameraPosition.Location)
IdleHunt(a)
end)
end)
Trigger.AfterDelay(WTransDelays, WTransWaves)
end
ActivateAI = function()
WTransDelays = WTransDelays[Difficulty]
ChinookDelay = ChinookDelay[Difficulty]
local buildings = Utils.Where(Map.ActorsInWorld, function(self) return self.Owner ~= USSR and self.HasProperty("StartBuildingRepairs") end)
Utils.Do(buildings, function(actor)
Trigger.OnDamaged(actor, function(building)
if building.Owner ~= USSR and building.Health < building.MaxHealth * 3/4 then
building.StartBuildingRepairs()
end
end)
end)
Trigger.AfterDelay(DateTime.Minutes(3), WTransWaves)
ChinookAttack()
ProduceInfantry()
ProduceVehicles()
GreeceAircraft()
GermanAircraft()
end

View File

@@ -0,0 +1,89 @@
--[[
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.
]]
TruckStops = { TruckStop1, TruckStop2, TruckStop3, TruckStop4, TruckStop5, TruckStop6, TruckStop7, TruckStop8 }
MissionStartAttackUnits = { StartAttack1tnk1, StartAttack1tnk2, StartAttackArty1, StartAttackArty2, StartAttackArty3 }
TruckEscape = { TruckEscape1, TruckEscape2, TruckEscape3, TruckEscape4, TruckEscape5, TruckEscapeWest }
BackupRoute = { TruckEscape2, TruckEscape1, TruckEscapeEast }
MissionStart = function()
Utils.Do(TruckStops, function(waypoint)
StolenTruck.Move(waypoint.Location)
end)
Trigger.AfterDelay(DateTime.Seconds(5), function()
Utils.Do(MissionStartAttackUnits, function(actor)
actor.AttackMove(DefaultCameraPosition.Location)
end)
end)
Trigger.AfterDelay(DateTime.Seconds(45), function()
Media.DisplayMessage(UserInterface.GetFluentMessage("truck-stopped-near-allied-base"))
end)
Trigger.OnKilled(StolenTruck, function()
USSR.MarkCompletedObjective(DestroyTruck)
USSR.MarkCompletedObjective(DefendCommand)
end)
Trigger.OnKilled(CommandCenter, function()
USSR.MarkFailedObjective(DefendCommand)
end)
end
Trigger.OnEnteredProximityTrigger(TruckAlarm.CenterPosition, WDist.FromCells(11), function(actor, triggerflee)
if actor.Owner == USSR and actor.Type ~= "badr" and actor.Type ~= "u2" and actor.Type ~= "camera.spyplane" then
Trigger.RemoveProximityTrigger(triggerflee)
Media.DisplayMessage(UserInterface.GetFluentMessage("convoy-truck-escaping"))
EscapeCamera = Actor.Create("camera", true, { Owner = USSR, Location = TruckAlarm.Location })
Media.PlaySoundNotification(USSR, "AlertBleep")
Utils.Do(TruckEscape, function(waypoint)
StolenTruck.Move(waypoint.Location)
end)
Trigger.AfterDelay(DateTime.Seconds(5), function()
EscapeCamera.Destroy()
end)
Trigger.OnIdle(StolenTruck, function()
Utils.Do(BackupRoute, function(waypoint)
StolenTruck.Move(waypoint.Location)
end)
end)
end
end)
Trigger.OnEnteredFootprint(({ TruckEscapeWest.Location } or { TruckEscapeEast.Location }), function(actor, triggerlose)
if actor.Owner == Greece and actor.Type == "truk" then
Trigger.RemoveFootprintTrigger(triggerlose)
actor.Destroy()
USSR.MarkFailedObjective(DestroyTruck)
end
end)
Tick = function()
Greece.Cash = 50000
Germany.Cash = 50000
end
WorldLoaded = function()
USSR = Player.GetPlayer("USSR")
Germany = Player.GetPlayer("Germany")
Greece = Player.GetPlayer("Greece")
InitObjectives(USSR)
DestroyTruck = AddPrimaryObjective(USSR, "destroy-stolen-convoy-truck")
DefendCommand = AddPrimaryObjective(USSR, "defend-forward-command-center")
Camera.Position = DefaultCameraPosition.CenterPosition
MissionStart()
ActivateAI()
end