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,168 @@
--[[
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.
]]
BhndTrigger = { CPos.New(39, 21), CPos.New(40, 21), CPos.New(41, 21) }
Atk1Trigger = { CPos.New(35, 37) }
Atk2Trigger = { CPos.New(9, 44), CPos.New(10, 44), CPos.New(11, 44), CPos.New(12, 44), CPos.New(13, 44) }
AutoTrigger = { CPos.New(5, 30), CPos.New(6, 30), CPos.New(7, 30), CPos.New(8, 30), CPos.New(9, 30), CPos.New(10, 30), CPos.New(11, 30), CPos.New(12, 30), CPos.New(13, 30) }
GDIHeliTrigger = { CPos.New(11, 11), CPos.New(11, 12), CPos.New(11, 13), CPos.New(11, 14), CPos.New(11, 15), CPos.New(12, 15), CPos.New(13, 15), CPos.New(14, 15), CPos.New(15, 15), CPos.New(16, 15) }
Hunters = { Hunter1, Hunter2, Hunter3, Hunter4, Hunter5 }
NodxUnits = { "e1", "e1", "e3", "e3" }
AutoUnits = { "e1", "e1", "e1", "e3", "e3" }
KillsUntilReinforcements = 12
GDIReinforcements = { "e2", "e2", "e2", "e2", "e2" }
GDIReinforcementsWaypoints = { GDIReinforcementsEntry.Location, GDIReinforcementsWP1.Location }
GDIReinforcementsLeft = 3
NodHeli = { { HeliEntry.Location, NodHeliLZ.Location }, { "e1", "e1", "e3", "e3" } }
Kills = 0
NodUnitKilled = function()
Kills = Kills + 1
if Kills == KillsUntilReinforcements then
GDI.MarkCompletedObjective(ReinforcementsObjective)
SendGDIReinforcements()
end
end
SendHeli = function(heli)
local units = Reinforcements.ReinforceWithTransport(Nod, "tran", heli[2], heli[1], { heli[1][1] })
Utils.Do(units[2], function(actor)
IdleHunt(actor)
Trigger.OnKilled(actor, NodUnitKilled)
end)
end
SendGDIReinforcements = function()
Media.PlaySpeechNotification(GDI, "Reinforce")
Reinforcements.ReinforceWithTransport(GDI, "apc", GDIReinforcements, GDIReinforcementsWaypoints, nil, function(apc, team)
table.insert(team, apc)
Trigger.OnAllKilled(team, function()
if GDIReinforcementsLeft > 0 then
GDIReinforcementsLeft = GDIReinforcementsLeft - 1
Trigger.AfterDelay(DateTime.Seconds(5), function()
Media.DisplayMessage(UserInterface.GetFluentMessage("apcs-left", { ["apcs"] = GDIReinforcementsLeft }), UserInterface.GetFluentMessage("battlefield-control"))
SendGDIReinforcements()
end)
end
end)
end)
end
Build = function(unitTypes, repeats, func)
if HandOfNod.IsDead then
return
end
local after = function(units)
Utils.Do(units, func)
if repeats then
Trigger.OnAllKilled(units, function()
Build(unitTypes, repeats, func)
end)
end
end
if not HandOfNod.Build(unitTypes, after) then
Trigger.AfterDelay(DateTime.Seconds(5), function()
Build(unitTypes, repeats, func)
end)
end
end
Tick = function()
Nod.Cash = 1000
if (GDIReinforcementsLeft == 0 or not GDI.IsObjectiveCompleted(ReinforcementsObjective)) and GDI.HasNoRequiredUnits() then
GDI.MarkFailedObjective(GDIObjective)
end
end
SetupWorld = function()
Utils.Do(Nod.GetGroundAttackers(), function(unit)
Trigger.OnKilled(unit, NodUnitKilled)
end)
Utils.Do(Hunters, IdleHunt)
Trigger.OnRemovedFromWorld(crate, function() GDI.MarkCompletedObjective(GDIObjective) end)
end
WorldLoaded = function()
GDI = Player.GetPlayer("GDI")
Nod = Player.GetPlayer("Nod")
InitObjectives(GDI)
GDIObjective = AddPrimaryObjective(GDI, "retrieve-rods")
local eliminateReinforcements = UserInterface.GetFluentMessage("eliminate-reinforcements", { ["kills"] = KillsUntilReinforcements })
ReinforcementsObjective = AddSecondaryObjective(GDI, eliminateReinforcements)
SetupWorld()
Trigger.OnExitedFootprint(BhndTrigger, function(a, id)
if not BhndTriggered and a.Owner == GDI then
BhndTriggered = true
Trigger.RemoveFootprintTrigger(id)
SendHeli(NodHeli)
end
end)
Trigger.OnExitedFootprint(Atk1Trigger, function(a, id)
if not Atk1Triggered and a.Owner == GDI then
Atk1Triggered = true
Trigger.RemoveFootprintTrigger(id)
Build(NodxUnits, false, function(actor)
Trigger.OnKilled(actor, NodUnitKilled)
actor.Patrol({ NodPatrol1.Location, NodPatrol2.Location, NodPatrol3.Location, NodPatrol4.Location }, false)
Trigger.OnIdle(actor, actor.Hunt)
end)
end
end)
Trigger.OnEnteredFootprint(Atk2Trigger, function(a, id)
if not Atk2Triggered and a.Owner == GDI then
Atk2Triggered = true
Trigger.RemoveFootprintTrigger(id)
Build(NodxUnits, false, function(actor)
Trigger.OnKilled(actor, NodUnitKilled)
actor.Patrol({ NodPatrol1.Location, NodPatrol2.Location }, false)
IdleHunt(actor)
end)
end
end)
Trigger.OnEnteredFootprint(AutoTrigger, function(a, id)
if not AutoTriggered and a.Owner == GDI then
AutoTriggered = true
Trigger.RemoveFootprintTrigger(id)
Build(AutoUnits, true, function(actor)
Trigger.OnKilled(actor, NodUnitKilled)
IdleHunt(actor)
end)
end
end)
Trigger.OnEnteredFootprint(GDIHeliTrigger, function(a, id)
if not GDIHeliTriggered and a.Owner == GDI then
GDIHeliTriggered = true
Trigger.RemoveFootprintTrigger(id)
Reinforcements.ReinforceWithTransport(GDI, "tran", nil, { HeliEntry.Location, GDIHeliLZ.Location })
end
end)
Camera.Position = GDIReinforcementsWP1.CenterPosition
end

Binary file not shown.

View File

@@ -0,0 +1,9 @@
## rules.yaml
briefing =
Nod has captured classified GDI property.
You must find and retrieve the stolen equipment.
It is being transported in a shipping crate.
Use the new APC to safely transport infantry through Nod forces.

Binary file not shown.

After

Width:  |  Height:  |  Size: 46 KiB

View File

@@ -0,0 +1,532 @@
MapFormat: 12
RequiresMod: cnc
Title: 04b: Get the Rods back
Author: Westwood Studios
Tileset: TEMPERAT
MapSize: 64,64
Bounds: 5,11,50,38
Visibility: MissionSelector
Categories: Campaign
LockPreview: True
Players:
PlayerReference@Nod:
Name: Nod
Faction: nod
Color: FE1100
Allies: Nod
Enemies: GDI
Bot: campaign
PlayerReference@GDI:
Name: GDI
Playable: True
AllowBots: False
Required: True
LockFaction: True
Faction: gdi
LockColor: True
Color: F5D378
LockSpawn: True
LockTeam: True
Allies: GDI
Enemies: Nod
PlayerReference@Neutral:
Name: Neutral
OwnsWorld: True
NonCombatant: True
Faction: gdi
Actors:
Actor0: sbag
Location: 10,18
Owner: Nod
Actor1: sbag
Location: 9,18
Owner: Nod
Actor2: sbag
Location: 8,18
Owner: Nod
Actor3: sbag
Location: 7,18
Owner: Nod
Actor4: sbag
Location: 7,17
Owner: Nod
Actor5: sbag
Location: 6,17
Owner: Nod
Actor6: sbag
Location: 6,16
Owner: Nod
Actor7: sbag
Location: 6,15
Owner: Nod
Actor8: sbag
Location: 6,14
Owner: Nod
Actor9: cycl
Location: 15,13
Owner: Neutral
Actor10: cycl
Location: 13,13
Owner: Neutral
Actor11: sbag
Location: 6,13
Owner: Nod
Actor12: cycl
Location: 15,12
Owner: Neutral
Actor13: cycl
Location: 14,12
Owner: Neutral
Actor14: cycl
Location: 13,12
Owner: Neutral
Actor15: sbag
Location: 6,12
Owner: Nod
Actor16: sbag
Location: 15,11
Owner: Nod
Actor17: sbag
Location: 14,11
Owner: Nod
Actor18: sbag
Location: 13,11
Owner: Nod
Actor19: sbag
Location: 12,11
Owner: Nod
Actor20: sbag
Location: 11,11
Owner: Nod
Actor21: sbag
Location: 10,11
Owner: Nod
Actor22: sbag
Location: 9,11
Owner: Nod
Actor23: sbag
Location: 8,11
Owner: Nod
Actor24: sbag
Location: 7,11
Owner: Nod
Actor25: sbag
Location: 6,11
Owner: Nod
Actor26: t05
Location: 18,42
Owner: Neutral
Actor27: t03
Location: 17,39
Owner: Neutral
Actor28: t02
Location: 16,40
Owner: Neutral
Actor29: t01
Location: 16,39
Owner: Neutral
Actor30: t03
Location: 24,22
Owner: Neutral
Actor31: t02
Location: 24,21
Owner: Neutral
Actor32: t08
Location: 6,43
Owner: Neutral
Actor33: t02
Location: 28,15
Owner: Neutral
Actor34: t06
Location: 32,14
Owner: Neutral
Actor35: t01
Location: 29,15
Owner: Neutral
Actor36: t06
Location: 48,38
Owner: Neutral
Actor37: t07
Location: 48,39
Owner: Neutral
Actor38: tc01
Location: 37,40
Owner: Neutral
Actor39: tc04
Location: 43,44
Owner: Neutral
Actor40: tc05
Location: 43,46
Owner: Neutral
Actor41: t08
Location: 25,28
Owner: Neutral
Actor42: tc03
Location: 29,33
Owner: Neutral
Actor43: t07
Location: 25,34
Owner: Neutral
Actor44: t08
Location: 22,33
Owner: Neutral
Actor45: t08
Location: 9,36
Owner: Neutral
Actor46: t16
Location: 10,35
Owner: Neutral
Actor47: tc04
Location: 8,31
Owner: Neutral
Actor48: tc04
Location: 23,33
Owner: Neutral
Actor49: tc04
Location: 31,37
Owner: Neutral
Actor50: t16
Location: 32,38
Owner: Neutral
Actor51: tc05
Location: 28,38
Owner: Neutral
Actor52: tc01
Location: 48,14
Owner: Neutral
Actor53: tc04
Location: 44,11
Owner: Neutral
Actor54: tc05
Location: 49,13
Owner: Neutral
Actor55: tc03
Location: 31,40
Owner: Neutral
Actor56: tc04
Location: 28,44
Owner: Neutral
Actor57: t03
Location: 33,39
Owner: Neutral
Actor58: t05
Location: 33,38
Owner: Neutral
Actor59: t05
Location: 25,43
Owner: Neutral
Actor60: tc01
Location: 23,43
Owner: Neutral
Actor61: tc02
Location: 17,44
Owner: Neutral
Actor62: t08
Location: 22,44
Owner: Neutral
Actor63: tc02
Location: 19,25
Owner: Neutral
Actor64: tc05
Location: 32,27
Owner: Neutral
Actor65: t07
Location: 36,21
Owner: Neutral
Actor66: t11
Location: 37,20
Owner: Neutral
Actor67: tc04
Location: 7,45
Owner: Neutral
Actor68: t08
Location: 15,32
Owner: Neutral
Actor69: t07
Location: 9,20
Owner: Neutral
Actor70: t08
Location: 48,41
Owner: Neutral
Actor71: t11
Location: 46,40
Owner: Neutral
Actor72: tc02
Location: 48,30
Owner: Neutral
Actor73: tc04
Location: 50,29
Owner: Neutral
Actor74: tc05
Location: 49,31
Owner: Neutral
Actor75: t07
Location: 49,32
Owner: Neutral
Actor76: t06
Location: 33,29
Owner: Neutral
Actor77: t06
Location: 37,39
Owner: Neutral
Actor78: t07
Location: 42,35
Owner: Neutral
Actor79: t08
Location: 39,42
Owner: Neutral
Actor80: tc04
Location: 7,11
Owner: Neutral
Actor81: tc01
Location: 29,24
Owner: Neutral
Actor82: t01
Location: 28,24
Owner: Neutral
Actor83: t01
Location: 25,22
Owner: Neutral
Actor84: t02
Location: 26,23
Owner: Neutral
Actor85: t03
Location: 34,23
Owner: Neutral
Actor86: t05
Location: 35,23
Owner: Neutral
Actor88: nuke
Location: 11,12
Owner: Nod
Actor89: hq
Location: 10,14
Owner: Nod
Actor92: jeep
Location: 49,45
Owner: GDI
Facing: 896
Actor93: bggy
Location: 10,23
Owner: Nod
Facing: 384
Actor94: apc
Location: 48,46
Owner: GDI
Facing: 896
Actor95: apc
Location: 51,45
Owner: GDI
Facing: 896
Actor96: bggy
Location: 34,18
Owner: Nod
Facing: 256
Actor97: bggy
Location: 53,26
Owner: Nod
Facing: 512
Actor99: e3
Location: 8,45
Owner: Nod
SubCell: 3
Actor100: e3
Location: 9,45
Owner: Nod
SubCell: 3
Actor101: e2
Location: 51,46
Owner: GDI
Facing: 896
SubCell: 1
Actor102: e3
Location: 36,15
Owner: Nod
Facing: 512
SubCell: 2
Actor103: e1
Location: 50,47
Owner: GDI
Facing: 896
SubCell: 1
Actor104: e3
Location: 25,33
Owner: Nod
SubCell: 3
Actor105: e1
Location: 11,46
Owner: Nod
Facing: 512
SubCell: 3
Actor106: e1
Location: 30,37
Owner: Nod
Facing: 128
SubCell: 3
Actor107: e3
Location: 17,44
Owner: Nod
Facing: 256
SubCell: 0
Actor108: e1
Location: 23,33
Owner: Nod
Facing: 512
SubCell: 0
Actor109: e1
Location: 28,31
Owner: Nod
Facing: 384
SubCell: 1
Actor110: e1
Location: 10,31
Owner: Nod
Facing: 640
SubCell: 0
Actor111: e3
Location: 33,20
Owner: Nod
SubCell: 2
Actor112: e3
Location: 25,18
Owner: Nod
Facing: 384
SubCell: 0
Actor113: e1
Location: 49,46
Owner: GDI
SubCell: 4
Actor114: e1
Location: 49,46
Owner: GDI
Facing: 896
SubCell: 3
Actor115: e1
Location: 49,47
Owner: GDI
Facing: 896
SubCell: 2
Actor116: e2
Location: 51,46
Owner: GDI
Facing: 896
SubCell: 2
Actor117: e2
Location: 51,46
Owner: GDI
Facing: 896
SubCell: 4
Actor118: e2
Location: 52,46
Owner: GDI
Facing: 896
SubCell: 3
Actor119: e3
Location: 39,32
Owner: Nod
Facing: 384
SubCell: 4
Actor120: e3
Location: 12,16
Owner: Nod
Facing: 384
SubCell: 2
Actor121: e1
Location: 10,35
Owner: Nod
Facing: 256
SubCell: 4
Actor122: e1
Location: 12,20
Owner: Nod
Facing: 512
SubCell: 4
Actor123: e1
Location: 14,20
Owner: Nod
Facing: 512
SubCell: 4
Actor124: e3
Location: 52,29
Owner: Nod
Facing: 256
SubCell: 3
Actor125: e3
Location: 8,31
Owner: Nod
SubCell: 0
Actor126: e3
Location: 19,25
Owner: Nod
SubCell: 4
tank: ltnk
Location: 8,17
Owner: Nod
Facing: 384
HandOfNod: hand
Location: 15,15
Owner: Nod
Hunter1: bggy
Location: 27,37
Owner: Nod
Hunter2: bggy
Location: 41,29
Owner: Nod
Facing: 512
Hunter3: e3
Location: 37,36
Owner: Nod
SubCell: 1
Hunter4: e3
Location: 38,35
Owner: Nod
SubCell: 1
Hunter5: e3
Location: 38,35
Owner: Nod
SubCell: 4
crate: CRATE.plain
Location: 14,13
Owner: Neutral
HeliEntry: waypoint
Location: 5,26
Owner: Neutral
GDIHeliLZ: waypoint
Location: 8,14
Owner: Neutral
NodHeliLZ: waypoint
Location: 40,30
Owner: Neutral
NodPatrol1: waypoint
Location: 13,19
Owner: Neutral
NodPatrol2: waypoint
Location: 12,28
Owner: Neutral
NodPatrol3: waypoint
Location: 11,42
Owner: Neutral
NodPatrol4: waypoint
Location: 18,47
Owner: Neutral
GDIReinforcementsEntry: waypoint
Location: 54,45
Owner: Neutral
GDIReinforcementsWP1: waypoint
Location: 50,45
Owner: Neutral
Rules: cnc|rules/campaign-maprules.yaml, cnc|rules/campaign-tooltips.yaml, cnc|rules/campaign-palettes.yaml, rules.yaml
FluentMessages: cnc|fluent/lua.ftl, cnc|fluent/campaign.ftl, map.ftl

View File

@@ -0,0 +1,20 @@
World:
LuaScript:
Scripts: campaign.lua, utils.lua, gdi04b.lua
MusicPlaylist:
StartingMusic: fist226m
MissionData:
Briefing: briefing
BackgroundVideo: bkground.vqa
BriefingVideo: gdi4b.vqa
StartVideo: nitejump.vqa
WinVideo: burdet1.vqa
LossVideo: gameover.vqa
Player:
PlayerResources:
DefaultCash: 0
E3:
AutoTarget:
ScanRadius: 5