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

View File

@@ -0,0 +1,34 @@
--[[
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.
]]
AttackGroupSize =
{
easy = 6,
normal = 8,
hard = 10
}
AttackDelays =
{
easy = { DateTime.Seconds(4), DateTime.Seconds(9) },
normal = { DateTime.Seconds(2), DateTime.Seconds(7) },
hard = { DateTime.Seconds(1), DateTime.Seconds(5) }
}
AtreidesInfantryTypes = { "light_inf" }
ActivateAI = function()
IdlingUnits[Atreides] = { }
local delay = function() return Utils.RandomInteger(AttackDelays[Difficulty][1], AttackDelays[Difficulty][2] + 1) end
local toBuild = function() return AtreidesInfantryTypes end
local attackThresholdSize = AttackGroupSize[Difficulty] * 2.5
DefendAndRepairBase(Atreides, AtreidesBase, 0.75, AttackGroupSize[Difficulty])
ProduceUnits(Atreides, ABarracks, delay, toBuild, AttackGroupSize[Difficulty], attackThresholdSize)
end

View File

@@ -0,0 +1,95 @@
--[[
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.
]]
AtreidesBase = { AConyard, APower1, APower2, ABarracks, AOutpost }
AtreidesReinforcements =
{
easy =
{
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" }
},
normal =
{
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" },
{ "light_inf", "light_inf" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" }
},
hard =
{
{ "trike", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "trike" },
{ "light_inf", "light_inf", "light_inf", "trike", "trike" },
{ "light_inf", "light_inf" },
{ "trike", "trike" },
{ "light_inf", "light_inf", "light_inf" },
{ "light_inf", "trike" },
{ "trike", "trike" }
}
}
AtreidesAttackPaths =
{
{ AtreidesEntry1.Location, AtreidesRally1.Location },
{ AtreidesEntry1.Location, AtreidesRally4.Location },
{ AtreidesEntry2.Location, AtreidesRally2.Location },
{ AtreidesEntry2.Location, AtreidesRally3.Location }
}
AtreidesAttackDelay =
{
easy = DateTime.Minutes(5),
normal = DateTime.Minutes(2) + DateTime.Seconds(40),
hard = DateTime.Minutes(1) + DateTime.Seconds(20)
}
AtreidesAttackWaves =
{
easy = 3,
normal = 6,
hard = 9
}
Tick = function()
if Harkonnen.HasNoRequiredUnits() then
Atreides.MarkCompletedObjective(KillHarkonnen)
end
if Atreides.HasNoRequiredUnits() and not Harkonnen.IsObjectiveCompleted(KillAtreides) then
Media.DisplayMessage(UserInterface.GetFluentMessage("atreides-annihilated"), Mentat)
Harkonnen.MarkCompletedObjective(KillAtreides)
end
end
WorldLoaded = function()
Atreides = Player.GetPlayer("Atreides")
Harkonnen = Player.GetPlayer("Harkonnen")
InitObjectives(Harkonnen)
KillHarkonnen = AddPrimaryObjective(Atreides, "")
KillAtreides = AddPrimaryObjective(Harkonnen, "destroy-atreides-forces")
Camera.Position = HConyard.CenterPosition
Trigger.OnAllKilled(AtreidesBase, function()
Utils.Do(Atreides.GetGroundAttackers(), IdleHunt)
end)
local path = function() return Utils.Random(AtreidesAttackPaths) end
SendCarryallReinforcements(Atreides, 0, AtreidesAttackWaves[Difficulty], AtreidesAttackDelay[Difficulty], path, AtreidesReinforcements[Difficulty])
Trigger.AfterDelay(0, ActivateAI)
end

Binary file not shown.

View File

@@ -0,0 +1,5 @@
## rules.yaml
briefing =
Strengthen your forces at our mining camp in the Imperial Basin. The Atreides must be punished for their insolence. Teach them the consequences of opposing House Harkonnen.
Our radar will help you find your targets.

Binary file not shown.

After

Width:  |  Height:  |  Size: 140 KiB

View File

@@ -0,0 +1,168 @@
MapFormat: 12
RequiresMod: d2k
Title: Harkonnen 02a
Author: Westwood Studios
Tileset: ARRAKIS
MapSize: 52,52
Bounds: 2,2,48,48
Visibility: MissionSelector
Categories: Campaign
LockPreview: True
Players:
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
PlayerReference@Creeps:
Name: Creeps
NonCombatant: True
Enemies: Harkonnen, Atreides
PlayerReference@Harkonnen:
Name: Harkonnen
Playable: True
LockFaction: True
Faction: harkonnen
LockColor: True
Color: D64A42
Enemies: Atreides, Creeps
PlayerReference@Atreides:
Name: Atreides
LockFaction: True
Faction: atreides
LockColor: True
Color: 5A7394
Enemies: Harkonnen, Creeps
Bot: campaign
Actors:
Actor0: light_inf
Location: 39,2
Owner: Atreides
APower1: wind_trap
Location: 7,3
Owner: Atreides
Actor2: light_inf
Location: 9,3
Owner: Atreides
AConyard: construction_yard
Location: 3,4
Owner: Atreides
Actor4: spicebloom.spawnpoint
Location: 38,4
Owner: Neutral
Actor5: light_inf
Location: 11,5
Owner: Atreides
ABarracks: barracks
Location: 9,7
Owner: Atreides
Actor7: trike
Location: 12,7
Owner: Atreides
AOutpost: outpost
Location: 5,8
Owner: Atreides
Actor9: trike
Location: 8,9
Owner: Atreides
Actor10: light_inf
Location: 12,9
Owner: Atreides
APower2: wind_trap
Location: 2,10
Owner: Atreides
Actor12: trike
Location: 11,12
Owner: Atreides
Actor13: light_inf
Location: 42,13
Owner: Harkonnen
Actor14: trike
Location: 46,13
Owner: Harkonnen
Actor15: light_inf
Location: 8,14
Owner: Atreides
Actor16: light_inf
Location: 4,15
Owner: Atreides
Actor17: trike
Location: 6,15
Owner: Atreides
Actor18: light_inf
Location: 41,15
Owner: Harkonnen
HConyard: construction_yard
Location: 44,15
Owner: Harkonnen
Actor20: light_inf
Location: 49,15
Owner: Harkonnen
Actor21: trike
Location: 43,18
Owner: Harkonnen
Actor22: light_inf
Location: 47,18
Owner: Harkonnen
Actor23: light_inf
Location: 22,22
Owner: Atreides
Actor24: spicebloom.spawnpoint
Location: 44,22
Owner: Neutral
Actor25: light_inf
Location: 33,23
Owner: Atreides
Actor26: light_inf
Location: 8,32
Owner: Atreides
Actor27: spicebloom.spawnpoint
Location: 6,33
Owner: Neutral
Actor28: light_inf
Location: 21,33
Owner: Atreides
Actor29: wormspawner
Location: 29,34
Owner: Creeps
Actor30: spicebloom.spawnpoint
Location: 35,37
Owner: Neutral
Actor31: light_inf
Location: 46,40
Owner: Atreides
Actor32: light_inf
Location: 11,43
Owner: Atreides
AtreidesEntry1: waypoint
Owner: Neutral
Location: 25,2
AtreidesEntry2: waypoint
Owner: Neutral
Location: 25,49
AtreidesRally1: waypoint
Owner: Neutral
Location: 36,12
AtreidesRally2: waypoint
Owner: Neutral
Location: 46,21
AtreidesRally3: waypoint
Owner: Neutral
Location: 36,22
AtreidesRally4: waypoint
Owner: Neutral
Location: 47,4
Rules: d2k|rules/campaign-rules.yaml, d2k|rules/campaign-tooltips.yaml, d2k|rules/campaign-palettes.yaml, rules.yaml
FluentMessages: d2k|fluent/lua.ftl, d2k|fluent/campaign.ftl, map.ftl

View File

@@ -0,0 +1,61 @@
Player:
PlayerResources:
DefaultCash: 5000
World:
LuaScript:
Scripts: campaign.lua, utils.lua, harkonnen02a.lua, harkonnen02a-AI.lua
MissionData:
Briefing: briefing
BriefingVideo: H_BR02_E.VQA
MapOptions:
TechLevel: low
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: easy
carryall.reinforce:
Cargo:
MaxWeight: 10
upgrade.conyard:
Buildable:
Prerequisites: ~disabled
upgrade.barracks:
Buildable:
Prerequisites: ~disabled
upgrade.light:
Buildable:
Prerequisites: ~disabled
upgrade.heavy:
Buildable:
Prerequisites: ~disabled
concreteb:
Buildable:
Prerequisites: ~disabled
heavy_factory:
Buildable:
Prerequisites: ~disabled
medium_gun_turret:
Buildable:
Prerequisites: ~disabled
wall:
Buildable:
Prerequisites: ~disabled
outpost:
Buildable:
Prerequisites: barracks