Skip to content

Commit

Permalink
Merge branch 'release/1.2.0'
Browse files Browse the repository at this point in the history
  • Loading branch information
npruehs committed Jun 24, 2020
2 parents c045c7a + 69b5f24 commit 4dc8a43
Show file tree
Hide file tree
Showing 121 changed files with 4,289 additions and 885 deletions.
5 changes: 3 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,12 +35,13 @@ Internally, we're using the following checklist when preparing for a new release
* Check pending pull requests
* Create release branch
* Add examples for new features where appropriate
* Verify new features in multiplayer
* Run all automated tests
* Update documentation (README, images, spelling, table of contents)
* Increase version number (and engine version, if necessary)
* Create plugin package
* Create plugin package (and remove intermediates)
* Check plugin package in another project
* Merge release branch with tag
* Add a new GitHub release with release notes
* Add a new GitHub release with release notes (including deprecation notes)
* Update GitHub issues and milestones
* Notify community (e.g. forums)
2 changes: 2 additions & 0 deletions Documents/Manual/Buildings.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ From the perspective of the plugin, buildings are just units with a few addition
1. Set the _Progress Made Automatically_ and _Progress Made Per Builder_ factors.
1. Set _Initial Health Percentage_ to a value between 0 and 1 to specify how much health the construction site should start with.
1. Set the _Start Immediately_ flag unless you want to trigger construction start from script.
1. If you want to use grid-based building placement, set the _Grid Width and Height_.
1. Set the _Finished Sound_ to the sound cue to play when the construction is finished.
1. Add an `RTSContainerComponent` if you want builders to enter the building site while building. Its capacity value will be automatically set at runtime to reflect _Max Assigned Builders_ of the construction site.
1. Add your `RTSConstructionProgressBarWidgetComponent` (see [User Interface](UserInterface.md)).

Expand Down
Binary file added Documents/Manual/Images/AddGameplayTag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/Manual/Images/GetGameplayTags.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/Manual/Images/GetOwnActors.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/Manual/Images/HasGameplayTag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/Manual/Images/IsVisibleForActor.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/Manual/Images/IssueOrder.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Documents/Manual/Images/RemoveGameplayTag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 2 additions & 0 deletions Documents/Manual/Maps.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,8 @@ For the plugin, you'll design and create your maps the same way you're used to w

1. Add an `RTSVisionVolume` to the very center of your map, encompassing the whole valid visible map area.
1. Set the _Size In Tiles_ of the vision volume to match your minimap background images (e.g. 256).
1. Set the _Tile Height_ of the vision volume to the height of a single height level of your map, in cm (e.g. 250).
1. Set the _Height Level Trace Channel_ if you want special geometry to affect your height levels, only.
1. Add a `PostProcessVolume` to your map, and check _Infinite Extent (Unbound)_.
1. Add an `RTSFogOfWarActor` to your map.
1. Set the _Fog Of War Volume_ reference to the post process volume created before.
Expand Down
38 changes: 38 additions & 0 deletions Documents/Manual/Scripting.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ Occasionally, you want to create additional gameplay (especially when creating a

Feel free to explore the plugin yourself by looking at what other functions and events each component provides, and open an issue if you're missing something.

Also note that much gameplay of the plugin relies on [Gameplay Tags](https://docs.unrealengine.com/en-US/Gameplay/Tags/index.html) as defined by `Content\Data\DT_RTSGameplayTags.uasset`. This enables you to create unique gameplay and abilities by applying/removing these tags to/from the `URTSGameplayTagsComponent` of your actors. Initially, many of the plugin components apply matching gameplay tags (e.g. `Status.Permanent.CanAttack` from `RTSAttackComponent`). When creating your own actor components, you can derive from `RTSActorComponent` to provide your own _Initial Gameplay Tags_ as well. The plugin also provides an own [Gameplay Debugger](https://docs.unrealengine.com/en-US/Gameplay/Tools/GameplayDebugger/index.html) category for checking the gameplay tags of selected actors.


### RTSBountyComponent
#### Events
Expand Down Expand Up @@ -38,6 +40,25 @@ Feel free to explore the plugin yourself by looking at what other functions and
| ![Transfer Ownership](Images/TransferOwnership.png) | Sets the specified player as the owner of the passed actor. |


### RTSGameplayLibrary
#### Functions

| Node | Description |
| --- | --- |
| ![Is Visible For Actor](Images/IsVisibleForActor.png) | Checks whether Other is visible for Actor. |


### RTSGameplayTagLibrary
#### Functions

| Node | Description |
| --- | --- |
| ![Add Gameplay Tag](Images/AddGameplayTag.png) | Applies the passed gameplay tag to the specified actor. |
| ![Get Gameplay Tags](Images/GetGameplayTags.png) | Gets the current set of gameplay tags of the specified actor. |
| ![Has Gameplay Tag](Images/HasGameplayTag.png) | Checks whether the specified actor currently has the passed gameplay tag applied. |
| ![Remove Gameplay Tag](Images/RemoveGameplayTag.png) | Removes the passed gameplay tag from the specified actor. |


### RTSHealthComponent
#### Events

Expand All @@ -52,6 +73,7 @@ Feel free to explore the plugin yourself by looking at what other functions and

| Node | Description |
| --- | --- |
| ![Issue Order](Images/IssueOrder.png) | Makes the pawn carry out the specified order. |
| ![Issue Attack Order](Images/IssueAttackOrder.png) | Makes the pawn attack the specified target. |
| ![Issue Begin Construction Order](Images/IssueBeginConstructionOrder.png) | Makes the pawn construct the specified building at the passed location. |
| ![Issue Gather Order](Images/IssueGatherOrder.png) | Makes the pawn gather resources from the specified source. |
Expand All @@ -65,6 +87,14 @@ Feel free to explore the plugin yourself by looking at what other functions and
| ![On Order Changed](Images/OnOrderChanged.png) | Event when the pawn has received a new order. |


### RTSPlayerController
#### Events

| Event | Description |
| --- | --- |
| ![On Player State Available](Images/OnPlayerStateAvailable.png) | Event when the player state has been set up or replicated for this player. |


### RTSPlayerResourcesComponent
#### Functions

Expand All @@ -79,6 +109,14 @@ Feel free to explore the plugin yourself by looking at what other functions and
| ![On Resources Changed](Images/OnResourcesChanged.png) | Event when the current resource stock amount for the player has changed. |


### RTSPlayerController
#### Functions

| Node | Description |
| --- | --- |
| ![Get Own Actors](Images/GetOwnActors.png) | Gets the list of actors currently owned by this player. |


### RTSProductionComponent
#### Events

Expand Down
8 changes: 8 additions & 0 deletions Documents/Manual/Setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ Usually, players control a single [pawn](https://docs.unrealengine.com/en-US/Gam
1. At your `RTSPlayerController`, set the _Camera Speed_ (e.g. to 1000).
1. At your `RTSPlayerController`, set the _Camera Scroll Threshold_ (e.g. to 20).
1. At your `RTSPlayerController`, set _Camera Zoom Speed_, _Min Camera Distance_ and _Max Camera Distance_ as desired.
1. At your `RTSPlayerController`, set _Double Group Selection Time_ to the number of seconds the player has for rapidly selecting the same control group to center the camera on it.


### Input Setup
Expand All @@ -61,6 +62,13 @@ At _Edit > Project Settings > Engine > Input_ ...
1. Bind the actions `LoadControlGroup0` to `LoadControlGroup9` (e.g. to 0 to 9).
1. Bind the action `AddSelection` (e.g. to Left Shift).
1. Bind the action `ToggleSelection` (e.g. to Left Ctrl).
1. Bind the action `SelectNextSubgroup` (e.g. to Tab).
1. Bind the action `SelectPreviousSubgroup` (e.g. Shift + Tab).

#### Camera

1. Bind the actions `SaveCameraLocation0` to `SaveCameraLocation4` (e.g. to CTRL+F5 to CTRL+F9).
1. Bind the actions `LoadCameraLocation0` to `LoadCameraLocation9` (e.g. to F5 to F9).

#### Orders

Expand Down
7 changes: 6 additions & 1 deletion Documents/Manual/Units.md
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ As mentioned before, most features of the plugin are implemented by the means of
### Vision

1. Add the `RTSVision` component to your units and set their _Sight Radius_ (e.g. 1000).
1. If your actor should be able to ignore height levels for vision (e.g. watchtowers), check _Ignore Height Levels_.
1. Add a `RTSVisible`component to your actor. That component will manage vibility of that actor, in case multiple effects want to show/hide it (e.g. fog of war, containers).

### Combat
Expand All @@ -46,13 +47,15 @@ As mentioned before, units are not directly possessed by player controllers in t
1. Set the _Maximum Health_ of the `RTSHealthComponent`.
1. In case your actor should regenerate health, check _Regenerate Health_ and set the _Health Regeneration Rate_.
1. If you want to play animations or visual effects when the actor dies, set _Actor Death Type_ to _Stop Gameplay_. In that case, you're responsible of destroying the actor yourself as soon as all of your visual clues have finished playing.
1. Set the _Death Sound_ to the sound cue to play when the actor is killed.
1. Add your `RTSHealthBarWidgetComponent` (see [User Interface](UserInterface.md)).

1. Add the `RTSAttackComponent` to any actors than can attack.
1. Add an attack to the `RTSAttackComponent` of these actors, setting its _Cooldown, Damage, Range, Acquisition Radius_ and _Chase Radius_.

_Setting the Damage Type is optional._



#### Projectiles

If you don't specify a projectile, the damage will be applied immediately. In order to setup a projectile for the unit:
Expand All @@ -62,6 +65,7 @@ If you don't specify a projectile, the damage will be applied immediately. In or
1. At the `ProjectileMovement` component, set its _Initial Speed_ (e.g. to 1000).
1. If you want your projectile to use a ballistic trajectory, check _Ballistic Trajectory_ at the projectile and set the _Ballistic Trajectory Factor_ as you like.
1. For dealing area of effect damage, check _Apply Area Of Effect_ and set your area of effect radius and collision filters.
1. Set the _Fired Sound_ and _Impact Sound_ to the sound cues to play when the projectile is fired and detonated, respectively.
1. At the `RTSAttackComponent`, reference the new projectile in your attack.


Expand All @@ -72,6 +76,7 @@ If you don't specify a projectile, the damage will be applied immediately. In or
1. Set the _Resources_ to any resources required for production.
1. Set the _Production Cost Type_ to to _Pay Immediately_ if all costs should be paid in full when starting production, or to _Pay Over Time_ for continuously paying costs (similar to Command & Conquer).
1. Set the _Refund Factor_ to the factor to multiply refunded resources with after cancelation.
1. Set the _Finished Sound_ to the sound cue to play when the actor spaws after being produced.
1. Add the `RTSRequirementsComponent` if the actor should have any requirements, and set the _Required Actors_.


Expand Down
2 changes: 2 additions & 0 deletions Documents/Manual/UserInterface.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,8 +78,10 @@ _You might want to make sure that the visibility of the widget is set to Hit Tes
### Building Cursors

1. Create an actor deriving from `RTSBuildingCursor` (or use the `BP_RTSBuildingCursor` shipped with the plugin).
1. If you want to use grid-based building placement, set the _Grid Cell Size_ of your building cursor, and set up its collision and navigation check settings as desired.
1. In your player controller, set the building cursor reference.

_Note: When having your building cursor query navigation, you need to enable Allow Client Side Navigation in your project settings for this to work in multiplayer._

### Range Indicators

Expand Down
4 changes: 4 additions & 0 deletions Source/RTSProject/Config/DefaultEngine.ini
Original file line number Diff line number Diff line change
Expand Up @@ -162,3 +162,7 @@ AsyncSceneSmoothingFactor=0.990000
InitialAverageFrameRate=0.016667
PhysXTreeRebuildRate=10
DefaultBroadphaseSettings=(bUseMBPOnClient=False,bUseMBPOnServer=False,MBPBounds=(Min=(X=0.000000,Y=0.000000,Z=0.000000),Max=(X=0.000000,Y=0.000000,Z=0.000000),IsValid=0),MBPNumSubdivs=2)

[/Script/GameplayDebugger.GameplayDebuggerConfig]
ActivationKey=Decimal

8 changes: 8 additions & 0 deletions Source/RTSProject/Config/DefaultInput.ini
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,14 @@ DoubleClickTime=0.200000
+ActionMappings=(ActionName="CancelBuildingPlacement",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=RightMouseButton)
+ActionMappings=(ActionName="CancelConstruction",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=C)
+ActionMappings=(ActionName="CancelProduction",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=C)
+ActionMappings=(ActionName="SelectNextSubgroup",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=Tab)
+ActionMappings=(ActionName="SelectPreviousSubgroup",bShift=True,bCtrl=False,bAlt=False,bCmd=False,Key=Tab)
+ActionMappings=(ActionName="SaveCameraLocation0",bShift=False,bCtrl=True,bAlt=False,bCmd=False,Key=F5)
+ActionMappings=(ActionName="SaveCameraLocation1",bShift=False,bCtrl=True,bAlt=False,bCmd=False,Key=F6)
+ActionMappings=(ActionName="SaveCameraLocation2",bShift=False,bCtrl=True,bAlt=False,bCmd=False,Key=F7)
+ActionMappings=(ActionName="LoadCameraLocation0",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F5)
+ActionMappings=(ActionName="LoadCameraLocation1",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F6)
+ActionMappings=(ActionName="LoadCameraLocation2",bShift=False,bCtrl=False,bAlt=False,bCmd=False,Key=F7)
+AxisMappings=(AxisName="MoveCameraLeftRight",Scale=-1.000000,Key=Left)
+AxisMappings=(AxisName="MoveCameraLeftRight",Scale=1.000000,Key=Right)
+AxisMappings=(AxisName="MoveCameraUpDown",Scale=1.000000,Key=Up)
Expand Down
Binary file modified Source/RTSProject/Content/Buildings/Starbase/BP_Starbase.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file modified Source/RTSProject/Content/Resources/BP_OreAsteroid.uasset
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"FileVersion" : 1,
"Version" : 1,
"VersionName" : "1.1.0",
"VersionName" : "1.2.0",
"FriendlyName" : "Real-Time Strategy",
"Description" : "Provides a gameplay framework for developing real-time strategy games.",
"Category" : "RTS",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

#include "CoreMinimal.h"

#include "Components/ActorComponent.h"
#include "RTSActorComponent.h"

#include "Combat/RTSAttackData.h"

Expand All @@ -18,7 +18,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FRTSAttackComponentAttackedUsedSig
* These can also be used for healing.
*/
UCLASS(meta = (BlueprintSpawnableComponent))
class REALTIMESTRATEGY_API URTSAttackComponent : public UActorComponent
class REALTIMESTRATEGY_API URTSAttackComponent : public URTSActorComponent
{
GENERATED_BODY()

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,15 @@

#include "CoreMinimal.h"

#include "Components/ActorComponent.h"
#include "RTSActorComponent.h"

#include "Combat/RTSActorDeathType.h"

#include "RTSHealthComponent.generated.h"


class AActor;
class USoundCue;


DECLARE_DYNAMIC_MULTICAST_DELEGATE_FourParams(FRTSHealthComponentHealthChangedSignature, AActor*, Actor, float, OldHealth, float, NewHealth, AActor*, DamageCauser);
Expand All @@ -20,7 +21,7 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FRTSHealthComponentKilledSignatur
* Adds health to the actor, e.g. for taking damage and dying.
*/
UCLASS(meta = (BlueprintSpawnableComponent))
class REALTIMESTRATEGY_API URTSHealthComponent : public UActorComponent
class REALTIMESTRATEGY_API URTSHealthComponent : public URTSActorComponent
{
GENERATED_BODY()

Expand Down Expand Up @@ -50,6 +51,10 @@ class REALTIMESTRATEGY_API URTSHealthComponent : public UActorComponent
float GetLastTimeDamageTaken() const;


/** Event when the current health of the actor has changed. */
virtual void NotifyOnHealthChanged(AActor* Actor, float OldHealth, float NewHealth, AActor* DamageCauser);


/** Event when the current health of the actor has changed. */
UPROPERTY(BlueprintAssignable, Category = "RTS")
FRTSHealthComponentHealthChangedSignature OnHealthChanged;
Expand All @@ -75,6 +80,10 @@ class REALTIMESTRATEGY_API URTSHealthComponent : public UActorComponent
UPROPERTY(EditDefaultsOnly, Category = "RTS")
ERTSActorDeathType ActorDeathType;

/** Sound to play when the actor is killed. */
UPROPERTY(EditDefaultsOnly, Category = "RTS")
USoundCue* DeathSound;

/** Current health of the actor. */
UPROPERTY(ReplicatedUsing=ReceivedCurrentHealth)
float CurrentHealth;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@


class UProjectileMovementComponent;
class USoundCue;


/**
Expand Down Expand Up @@ -77,6 +78,14 @@ class REALTIMESTRATEGY_API ARTSProjectile : public AActor
UPROPERTY(EditDefaultsOnly, Category = "RTS", meta = (EditCondition = bApplyAreaOfEffect))
TSubclassOf<AActor> AreaOfEffectTargetClassFilter;

/** Sound to play when the projectile is fired. */
UPROPERTY(EditDefaultsOnly, Category = "RTS")
USoundCue* FiredSound;

/** Sound to play on projectile impact. */
UPROPERTY(EditDefaultsOnly, Category = "RTS")
USoundCue* ImpactSound;

bool bFired;

UPROPERTY()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,8 @@

#include "CoreMinimal.h"

#include "Components/ActorComponent.h"
#include "RTSActorComponent.h"

#include "Templates/SubclassOf.h"

#include "RTSBuilderComponent.generated.h"
Expand All @@ -21,11 +22,14 @@ DECLARE_DYNAMIC_MULTICAST_DELEGATE_ThreeParams(FRTSBuilderComponentConstructionF
* Allows the actor to construct buildings.
*/
UCLASS(meta = (BlueprintSpawnableComponent))
class REALTIMESTRATEGY_API URTSBuilderComponent : public UActorComponent
class REALTIMESTRATEGY_API URTSBuilderComponent : public URTSActorComponent
{
GENERATED_BODY()

public:
URTSBuilderComponent(const FObjectInitializer& ObjectInitializer = FObjectInitializer::Get());


/** Assigns the builder to the specified construction site. */
UFUNCTION(BlueprintCallable)
virtual void AssignToConstructionSite(AActor* ConstructionSite);
Expand Down
Loading

0 comments on commit 4dc8a43

Please sign in to comment.