Skip to content

Commit

Permalink
Extend training mission to GDI mission, add new mission.
Browse files Browse the repository at this point in the history
  • Loading branch information
dnqbob committed Oct 5, 2023
1 parent 8274bdd commit 7e2719d
Show file tree
Hide file tree
Showing 26 changed files with 1,512 additions and 64 deletions.
57 changes: 57 additions & 0 deletions OpenRA.Mods.Sp/Traits/DamageOnCreation.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
#region Copyright & License Information
/*
* 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.
*/
#endregion

using OpenRA.Primitives;
using OpenRA.Traits;

namespace OpenRA.Mods.SP.Traits
{
[Desc("Attach this to actors which should regenerate or lose health points over time.")]
sealed class DamageOnCreationInfo : TraitInfo, Requires<IHealthInfo>
{
[Desc("Absolute amount of health points added in each step.",
"Use negative values to apply damage.")]
public readonly int Step = 0;

[Desc("Relative percentages of health added in each step.",
"Use negative values to apply damage.",
"When both values are defined, their summary will be applied.")]
public readonly int PercentageStep = 0;

[Desc("Apply the health change when encountering these damage types.")]
public readonly BitSet<DamageType> DamageTypes = default;

public override object Create(ActorInitializer init) { return new DamageOnCreation(init.Self, this); }
}

sealed class DamageOnCreation : ISync, ITick
{
readonly IHealth health;
readonly DamageOnCreationInfo info;
bool damaged;

public DamageOnCreation(Actor self, DamageOnCreationInfo info)
{
this.info = info;
health = self.Trait<IHealth>();
}

public void Tick(Actor self)
{
// Cast to long to avoid overflow when multiplying by the health
if (!damaged)
{
damaged = true;
self.InflictDamage(self, new Damage((int)-(info.Step + info.PercentageStep * (long)health.MaxHP / 100), info.DamageTypes));
}
}
}
}
15 changes: 15 additions & 0 deletions artsrc/nodiconascII.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@


1000000000001
101 101
101 0000000 101
101 0001 10001 101
101 000 000 101
101 001 10001 101
101 10 000 101
101 1 10001 101
101 0000 101
101 100101 101
101 100111 101
100000000000000000001

Binary file added mods/sp/bits/gdi/structures/gbeacon.shp
Binary file not shown.
Binary file added mods/sp/bits/gdi/structures/gbeacon_tur.shp
Binary file not shown.
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,8 @@ tip-lua-usage-deliver = [Deliver Vehicle]: when Carryall move to destination, se
eva-lua-finish = All flags is activated, you are qualified.
objective-finish-train = Use your infantry to activate all flags.
mission-lua-begin = Move your infantry to the next red flag.
objective-finish-train = Use your infantry to activate all red flags.
mission-lua-begin = Follow instructions to finish the training.
Press `Enter` key to see instruction history, Press again to hide.
Press `ESC` key to see training objective, Press again to hide.
File renamed without changes.
File renamed without changes.
File renamed without changes
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ MapFormat: 12

RequiresMod: sp

Title: Training: Basic Control
Title: Prologue 01: Combat Training

Author: Westwood Studios
Author: Westwood Studios, Dnqbob

Tileset: TEMPERATE

Expand Down
File renamed without changes.
39 changes: 39 additions & 0 deletions mods/sp/maps/gdi-prologue-01/rules.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
World:
MissionData:
Briefing: Lesson 1: Basic Combat.\n\nWelcome, new commander, I am E.V.A. Your training objective is to activate all the red flags in this area. Hologram devices are applied as virtual enemy during training. \n\nOverall Difficulty: Educational\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n\n<<You have an unread message>>\n\nTITLE: Will Hologram Bring Us A New Era? -- Blue Zone Post\n\nCONTENT: Hologram technology is becoming crucial for our life. It brings vivid stories to our kids, turns amateurs to experienced workers, and plays the important role in the military safe training concepts. However, it is all known that hologram technology comes from the hell of the First Tiberium War, and the largest hologram device provider nowadays was also the infamous "Cloak" device provider of the Nod back in the day. There are rumors about...

^HopspitalHeal:
ChangesHealth@HOSPITAL:
PercentageStep: 1
Step: 0
Delay: 10
StartIfBelow: 100
DamageCooldown: 0
RequiresCondition: hospitalheal

^Infantry:
DamagedByTerrain: ## Increase damage by tib during guide.
Damage: 1700

FlameHologram:
-KillsSelf@TimedLife:

TICKHOLOGRAM:
-KillsSelf@TimedLife:

FLAGNEUTRAL:
-Targetable:
RevealsShroud@mission-reveal:
Range: 5c0
Type: GroundPosition
ValidRelationships: Ally, Enemy

MEDIC:
-Targetable:
RejectsMoveToAttack:

GADEPT:
-Targetable:

GAPILE:
-Targetable:
66 changes: 66 additions & 0 deletions mods/sp/maps/gdi-prologue-02/languages/en.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
eva-lua-name = E.V.A
tip-lua-name = Tip
kane-lua-name = Kane
general-lua-name = General Phoenix
badeva-lua-name = E.V.A.V.A.E
mission-lua-begin = Follow instructions to finish the training.
Press `Enter` key to see instruction history, Press again to hide.
Press `ESC` key to see training objective, Press again to hide.
objective-powerdown = Destroy all enemy by powerdown building.
objective-sell = Finish Sell training.
objective-repair = Fully repair the DropShip Beacon.
objective-mcv = Deploy the M.C.V
objective-build = Build all required buildings.
objective-placeholder = Train 10 Marines.
objective-helpnod = Help Kane to take down the Phoenix base.
eva-lua-begin = The power provided by powerplant is not enough to enable all our buildings.
eva-lua-powerdown = Activate the defence building, destroy all enemy.
tip-lua-usage-powerdown = [PowerDown]: Click the button with electric icon at the top-right of the screen, you can enter the POWERDOWN command mode. When at POWERDOWN command mode, your cursor will also become electric icon.
Click on building that consumes power to turn it off/on. Turned off Building consumes no power but disabled.
eva-lua-sell = Sell all your buildings in the base, for rebuild fund.
tip-lua-usage-sell = [Sell]: Click the button with money icon at the top-right of the screen, you can enter the SELL command mode. When at SELL command mode, your cursor will also become money icon.
Click on building to sell it. You will recieve a refund max to 50% of the sold building.
eva-lua-repair = Fully repair the beacon to call our MCV.
tip-lua-usage-repair = [Repair Building]: Click the button with wrench icon at the top-right of the screen, you can enter the REPAIR command mode. When at REPAIR command mode, your cursor will also become wrench icon.
Click on building to repair/cancel repairing. Repair Building consumes resource.
eva-lua-mcv = Deploy the M.C.V
tip-lua-usage-mcv = [Deploy MCV]: Select the M.C.V and move to a clear and flat 3x3 area, then click it again or use `F` to deploy it into a Construction Yard.
Construction Yard is the only building/defense producer in combat, the heart of your base. Protect it at all cost!
eva-lua-build = Build following buildings: PowerPlant, Refinery and Barrack.
tip-lua-usage-build1 = [Produce Building]: Click the Building production tab on the right to find what you can produce.
Click on the icon in production panel to PRODUCE, it requires time and resource. Only one can be produced at a time.
tip-lua-usage-build2 = [Place Building]: When Building or Defence is ready, you need to find a place to place it.
Click on the ready building in production panel to place it.
tip-lua-powerplant = Power Plant is always the first building you need to build. All other buildings requires power to be fully functional.
tip-lua-proc = Refinery is the major way for us to get resource by refining Tiberium. You will get a free harvester when you build a refinery.
You can rotate Refinery by press `V` to make it towards the Tiberium field, shorten the path for harvester on harvesting and delivering.
tip-lua-barrack = Barrack is the first building can produce combat units.
Click the production tab of Infantry on the right to find what you can produce.
Click on the icon in production panel to PRODUCE, it requires time and resource, only one can be produced at a time.
eva-lua-congrat = Your base management skill is qualified.
eva-lua-gdie1 = Now, train 10 Marines from <<<Training Interrupted>>>
gen-lua-say1 = STOP!
gen-lua-say2 = F**king STOP! You son of *****!
gen-lua-say3 = Who the hell gives you the ***** authorization code of my base?!
gen-lua-say4 = Who on earth allows you "training" here without my permission?!
gen-lua-say5 = WHERE IS MY GODDAMNED ION CANNON?
eva-lua-kane = It is he.
badeva-lua-kane1 = It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is
badeva-lua-kane2 = he who lives
kane-lua-lives = I lives.
kane-lua-game1 = Brotherhood of Nod is here, and we are no hologram.
kane-lua-game2 = We are coming for you.
kane-lua-end1 = You have served me well, apprentice.
kane-lua-end2 = The seed of the paradise has been sowed.
66 changes: 66 additions & 0 deletions mods/sp/maps/gdi-prologue-02/languages/tr.ftl
Original file line number Diff line number Diff line change
@@ -0,0 +1,66 @@
eva-lua-name = E.V.A
tip-lua-name = Tip
kane-lua-name = Kane
general-lua-name = General Phoenix
badeva-lua-name = E.V.A.V.A.E
mission-lua-begin = Follow instructions to finish the training.
Press `Enter` key to see instruction history, Press again to hide.
Press `ESC` key to see training objective, Press again to hide.
objective-powerdown = Destroy all enemy by powerdown building.
objective-sell = Finish Sell training.
objective-repair = Fully repair the DropShip Beacon.
objective-mcv = Deploy the M.C.V
objective-build = Build all required buildings.
objective-placeholder = Train 10 Marines.
objective-helpnod = Help Kane to take down the Phoenix base.
eva-lua-begin = The power provided by powerplant is not enough to enable all our buildings.
eva-lua-powerdown = Activate the defence building, destroy all enemy.
tip-lua-usage-powerdown = [PowerDown]: Click the button with electric icon at the top-right of the screen, you can enter the POWERDOWN command mode. When at POWERDOWN command mode, your cursor will also become electric icon.
Click on building that consumes power to turn it off/on. Turned off Building consumes no power but disabled.
eva-lua-sell = Sell all your buildings in the base, for rebuild fund.
tip-lua-usage-sell = [Sell]: Click the button with money icon at the top-right of the screen, you can enter the SELL command mode. When at SELL command mode, your cursor will also become money icon.
Click on building to sell it. You will recieve a refund max to 50% of the sold building.
eva-lua-repair = Fully repair the beacon to call our MCV.
tip-lua-usage-repair = [Repair Building]: Click the button with wrench icon at the top-right of the screen, you can enter the REPAIR command mode. When at REPAIR command mode, your cursor will also become wrench icon.
Click on building to repair/cancel repairing. Repair Building consumes resource.
eva-lua-mcv = Deploy the M.C.V
tip-lua-usage-mcv = [Deploy MCV]: Select the M.C.V and move to a clear and flat 3x3 area, then click it again or use `F` to deploy it into a Construction Yard.
Construction Yard is the only building/defense producer in combat, the heart of your base. Protect it at all cost!
eva-lua-build = Build following buildings: PowerPlant, Refinery and Barrack.
tip-lua-usage-build1 = [Produce Building]: Click the Building production tab on the right to find what you can produce.
Click on the icon in production panel to PRODUCE, it requires time and resource. Only one can be produced at a time.
tip-lua-usage-build2 = [Place Building]: When Building or Defence is ready, you need to find a place to place it.
Click on the ready building in production panel to place it.
tip-lua-powerplant = Power Plant is always the first building you need to build. All other buildings requires power to be fully functional.
tip-lua-proc = Refinery is the major way for us to get resource by refining Tiberium. You will get a free harvester when you build a refinery.
You can rotate Refinery by press `V` to make it towards the Tiberium field, shorten the path for harvester on harvesting and delivering.
tip-lua-barrack = Barrack is the first building can produce combat units.
Click the production tab of Infantry on the right to find what you can produce.
Click on the icon in production panel to PRODUCE, it requires time and resource, only one can be produced at a time.
eva-lua-congrat = Your base management skill is qualified.
eva-lua-gdie1 = Now, train 10 Marines from <<<Training Interrupted>>>
gen-lua-say1 = STOP!
gen-lua-say2 = F**king STOP! You son of *****!
gen-lua-say3 = Who the hell gives you the ***** authorization code of my base?!
gen-lua-say4 = Who on earth allows you "training" here without my permission?!
gen-lua-say5 = WHERE IS MY GODDAMNED ION CANNON?
eva-lua-kane = It is he.
badeva-lua-kane1 = It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is It is
badeva-lua-kane2 = he who lives
kane-lua-lives = I lives.
kane-lua-game1 = Brotherhood of Nod is here, and we are no hologram.
kane-lua-game2 = We are coming for you.
kane-lua-end1 = You have served me well, apprentice.
kane-lua-end2 = The seed of the paradise has been sowed.
Binary file added mods/sp/maps/gdi-prologue-02/map.bin
Binary file not shown.
Binary file added mods/sp/maps/gdi-prologue-02/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7e2719d

Please sign in to comment.