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/d2k/maps/ordos-01b/map.bin
Normal file
BIN
mods/d2k/maps/ordos-01b/map.bin
Normal file
Binary file not shown.
5
mods/d2k/maps/ordos-01b/map.ftl
Normal file
5
mods/d2k/maps/ordos-01b/map.ftl
Normal file
@@ -0,0 +1,5 @@
|
||||
## rules.yaml
|
||||
briefing =
|
||||
Spice is wealth. Serve the Ordos by harvesting Spice in the Imperial Basin. If Harkonnen forces attempt to interrupt the flow of the Spice - neutralize them.
|
||||
|
||||
Efficiency dictates that Silos must be built to avoid loss of Spice. Build concrete foundations to avoid unnecessary damage from the elements. To do otherwise is wasteful.
|
||||
BIN
mods/d2k/maps/ordos-01b/map.png
Normal file
BIN
mods/d2k/maps/ordos-01b/map.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 128 KiB |
107
mods/d2k/maps/ordos-01b/map.yaml
Normal file
107
mods/d2k/maps/ordos-01b/map.yaml
Normal file
@@ -0,0 +1,107 @@
|
||||
MapFormat: 12
|
||||
|
||||
RequiresMod: d2k
|
||||
|
||||
Title: Ordos 01b
|
||||
|
||||
Author: Westwood Studios
|
||||
|
||||
Tileset: ARRAKIS
|
||||
|
||||
MapSize: 32,28
|
||||
|
||||
Bounds: 2,2,28,24
|
||||
|
||||
Visibility: MissionSelector
|
||||
|
||||
Categories: Campaign
|
||||
|
||||
LockPreview: True
|
||||
|
||||
Players:
|
||||
PlayerReference@Neutral:
|
||||
Name: Neutral
|
||||
OwnsWorld: True
|
||||
NonCombatant: True
|
||||
Faction: Random
|
||||
PlayerReference@Creeps:
|
||||
Name: Creeps
|
||||
NonCombatant: True
|
||||
Faction: Random
|
||||
Enemies: Ordos, Harkonnen
|
||||
PlayerReference@Ordos:
|
||||
Name: Ordos
|
||||
Playable: True
|
||||
LockFaction: True
|
||||
Faction: ordos
|
||||
LockColor: True
|
||||
Color: 5A9473
|
||||
Enemies: Harkonnen, Creeps
|
||||
PlayerReference@Harkonnen:
|
||||
Name: Harkonnen
|
||||
LockFaction: True
|
||||
Faction: harkonnen
|
||||
LockColor: True
|
||||
Color: D64A42
|
||||
Enemies: Ordos, Creeps
|
||||
Bot: campaign
|
||||
|
||||
Actors:
|
||||
Actor0: light_inf
|
||||
Location: 2,2
|
||||
Owner: Harkonnen
|
||||
Actor1: light_inf
|
||||
Location: 21,2
|
||||
Owner: Harkonnen
|
||||
Actor2: wormspawner
|
||||
Location: 3,3
|
||||
Owner: Creeps
|
||||
Actor3: light_inf
|
||||
Location: 16,9
|
||||
Owner: Ordos
|
||||
Actor4: light_inf
|
||||
Location: 20,10
|
||||
Owner: Ordos
|
||||
Actor5: light_inf
|
||||
Location: 14,11
|
||||
Owner: Ordos
|
||||
OrdosConyard: construction_yard
|
||||
Location: 17,11
|
||||
Owner: Ordos
|
||||
Actor7: light_inf
|
||||
Location: 22,13
|
||||
Owner: Ordos
|
||||
Actor8: raider
|
||||
Location: 15,14
|
||||
Owner: Ordos
|
||||
Actor9: raider
|
||||
Location: 18,15
|
||||
Owner: Ordos
|
||||
Actor10: light_inf
|
||||
Location: 29,23
|
||||
Owner: Harkonnen
|
||||
Actor11: light_inf
|
||||
Location: 6,25
|
||||
Owner: Harkonnen
|
||||
OrdosWaypoint: waypoint
|
||||
Owner: Neutral
|
||||
Location: 29,12
|
||||
OrdosRally: waypoint
|
||||
Owner: Neutral
|
||||
Location: 12,9
|
||||
HarkonnenWaypoint1: waypoint
|
||||
Owner: Neutral
|
||||
Location: 26,25
|
||||
HarkonnenWaypoint2: waypoint
|
||||
Owner: Neutral
|
||||
Location: 2,21
|
||||
HarkonnenWaypoint3: waypoint
|
||||
Owner: Neutral
|
||||
Location: 2,5
|
||||
HarkonnenWaypoint4: waypoint
|
||||
Owner: Neutral
|
||||
Location: 24,2
|
||||
|
||||
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
|
||||
169
mods/d2k/maps/ordos-01b/ordos01b.lua
Normal file
169
mods/d2k/maps/ordos-01b/ordos01b.lua
Normal file
@@ -0,0 +1,169 @@
|
||||
--[[
|
||||
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.
|
||||
]]
|
||||
|
||||
HarkonnenReinforcements =
|
||||
{
|
||||
easy =
|
||||
{
|
||||
{ "light_inf", "light_inf" }
|
||||
},
|
||||
|
||||
normal =
|
||||
{
|
||||
{ "light_inf", "light_inf" },
|
||||
{ "light_inf", "light_inf", "light_inf" },
|
||||
{ "light_inf", "trike" }
|
||||
},
|
||||
|
||||
hard =
|
||||
{
|
||||
{ "light_inf", "light_inf" },
|
||||
{ "trike", "trike" },
|
||||
{ "light_inf", "light_inf", "light_inf" },
|
||||
{ "light_inf", "trike" },
|
||||
{ "trike", "trike" }
|
||||
}
|
||||
}
|
||||
|
||||
HarkonnenEntryWaypoints = { HarkonnenWaypoint1.Location, HarkonnenWaypoint2.Location, HarkonnenWaypoint3.Location, HarkonnenWaypoint4.Location }
|
||||
HarkonnenAttackDelay = DateTime.Seconds(30)
|
||||
|
||||
HarkonnenAttackWaves =
|
||||
{
|
||||
easy = 1,
|
||||
normal = 5,
|
||||
hard = 12
|
||||
}
|
||||
|
||||
ToHarvest =
|
||||
{
|
||||
easy = 2500,
|
||||
normal = 3000,
|
||||
hard = 3500
|
||||
}
|
||||
|
||||
OrdosReinforcements = { "light_inf", "light_inf", "light_inf", "light_inf", "raider" }
|
||||
OrdosEntryPath = { OrdosWaypoint.Location, OrdosRally.Location }
|
||||
|
||||
Messages =
|
||||
{
|
||||
UserInterface.GetFluentMessage("build-concrete"),
|
||||
UserInterface.GetFluentMessage("build-wind-trap"),
|
||||
UserInterface.GetFluentMessage("build-refinery"),
|
||||
UserInterface.GetFluentMessage("build-silo")
|
||||
}
|
||||
|
||||
CachedResources = -1
|
||||
Tick = function()
|
||||
if HarkonnenArrived and Harkonnen.HasNoRequiredUnits() then
|
||||
Ordos.MarkCompletedObjective(KillHarkonnen)
|
||||
end
|
||||
|
||||
if Ordos.Resources > SpiceToHarvest - 1 then
|
||||
Ordos.MarkCompletedObjective(GatherSpice)
|
||||
end
|
||||
|
||||
-- player has no Wind Trap
|
||||
if (Ordos.PowerProvided <= 20 or Ordos.PowerState ~= "Normal") and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
HasPower = false
|
||||
Media.DisplayMessage(Messages[2], Mentat)
|
||||
else
|
||||
HasPower = true
|
||||
end
|
||||
|
||||
-- player has no Refinery and no Silos
|
||||
if HasPower and Ordos.ResourceCapacity == 0 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[3], Mentat)
|
||||
end
|
||||
|
||||
if HasPower and Ordos.Resources > Ordos.ResourceCapacity * 0.8 and DateTime.GameTime % DateTime.Seconds(32) == 0 then
|
||||
Media.DisplayMessage(Messages[4], Mentat)
|
||||
end
|
||||
|
||||
if Ordos.Resources ~= CachedResources then
|
||||
local harvestedResources = UserInterface.GetFluentMessage("harvested-resources",
|
||||
{ ["harvested"] = Ordos.Resources, ["goal"] = SpiceToHarvest })
|
||||
UserInterface.SetMissionText(harvestedResources)
|
||||
CachedResources = Ordos.Resources
|
||||
end
|
||||
end
|
||||
|
||||
WorldLoaded = function()
|
||||
Ordos = Player.GetPlayer("Ordos")
|
||||
Harkonnen = Player.GetPlayer("Harkonnen")
|
||||
|
||||
SpiceToHarvest = ToHarvest[Difficulty]
|
||||
|
||||
InitObjectives(Ordos)
|
||||
KillOrdos = AddPrimaryObjective(Harkonnen, "")
|
||||
local harvestSpice = UserInterface.GetFluentMessage("harvest-spice", { ["spice"] = SpiceToHarvest })
|
||||
GatherSpice = AddPrimaryObjective(Ordos, harvestSpice)
|
||||
KillHarkonnen = AddSecondaryObjective(Ordos, "eliminate-harkonnen-units-reinforcements")
|
||||
|
||||
local checkResourceCapacity = function()
|
||||
Trigger.AfterDelay(0, function()
|
||||
if Ordos.ResourceCapacity < SpiceToHarvest then
|
||||
Media.DisplayMessage(UserInterface.GetFluentMessage("not-enough-silos"), Mentat)
|
||||
Trigger.AfterDelay(DateTime.Seconds(3), function()
|
||||
Harkonnen.MarkCompletedObjective(KillOrdos)
|
||||
end)
|
||||
end
|
||||
end)
|
||||
end
|
||||
|
||||
Trigger.OnRemovedFromWorld(OrdosConyard, function()
|
||||
|
||||
-- Mission already failed, no need to check the other conditions as well
|
||||
if checkResourceCapacity() then
|
||||
return
|
||||
end
|
||||
|
||||
local refs = Utils.Where(Map.ActorsInWorld, function(actor) return actor.Type == "refinery" and actor.Owner == Ordos end)
|
||||
|
||||
if #refs == 0 then
|
||||
Harkonnen.MarkCompletedObjective(KillOrdos)
|
||||
else
|
||||
Trigger.OnAllRemovedFromWorld(refs, function()
|
||||
Harkonnen.MarkCompletedObjective(KillOrdos)
|
||||
end)
|
||||
|
||||
local silos = Utils.Where(Map.ActorsInWorld, function(actor) return actor.Type == "silo" and actor.Owner == Ordos end)
|
||||
Utils.Do(refs, function(actor) Trigger.OnRemovedFromWorld(actor, checkResourceCapacity) end)
|
||||
Utils.Do(silos, function(actor) Trigger.OnRemovedFromWorld(actor, checkResourceCapacity) end)
|
||||
end
|
||||
end)
|
||||
|
||||
Media.DisplayMessage(Messages[1], Mentat)
|
||||
|
||||
Trigger.AfterDelay(DateTime.Seconds(25), function()
|
||||
Media.PlaySpeechNotification(Ordos, "Reinforce")
|
||||
Reinforcements.Reinforce(Ordos, OrdosReinforcements, OrdosEntryPath)
|
||||
end)
|
||||
|
||||
WavesLeft = HarkonnenAttackWaves[Difficulty]
|
||||
SendReinforcements()
|
||||
end
|
||||
|
||||
SendReinforcements = function()
|
||||
local units = HarkonnenReinforcements[Difficulty]
|
||||
local delay = Utils.RandomInteger(HarkonnenAttackDelay - DateTime.Seconds(2), HarkonnenAttackDelay)
|
||||
HarkonnenAttackDelay = HarkonnenAttackDelay - (#units * 3 - 3 - WavesLeft) * DateTime.Seconds(1)
|
||||
if HarkonnenAttackDelay < 0 then HarkonnenAttackDelay = 0 end
|
||||
|
||||
Trigger.AfterDelay(delay, function()
|
||||
Reinforcements.Reinforce(Harkonnen, Utils.Random(units), { Utils.Random(HarkonnenEntryWaypoints) }, 10, IdleHunt)
|
||||
|
||||
WavesLeft = WavesLeft - 1
|
||||
if WavesLeft == 0 then
|
||||
Trigger.AfterDelay(DateTime.Seconds(1), function() HarkonnenArrived = true end)
|
||||
else
|
||||
SendReinforcements()
|
||||
end
|
||||
end)
|
||||
end
|
||||
61
mods/d2k/maps/ordos-01b/rules.yaml
Normal file
61
mods/d2k/maps/ordos-01b/rules.yaml
Normal file
@@ -0,0 +1,61 @@
|
||||
Player:
|
||||
PlayerResources:
|
||||
DefaultCash: 2300
|
||||
|
||||
World:
|
||||
LuaScript:
|
||||
Scripts: campaign.lua, utils.lua, ordos01b.lua
|
||||
MissionData:
|
||||
Briefing: briefing
|
||||
BriefingVideo: O_BR01_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
|
||||
|
||||
upgrade.conyard:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
upgrade.barracks:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
upgrade.light:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
upgrade.heavy:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
concreteb:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
barracks:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
light_factory:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
heavy_factory:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
medium_gun_turret:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
|
||||
wall:
|
||||
Buildable:
|
||||
Prerequisites: ~disabled
|
||||
Reference in New Issue
Block a user