-
Notifications
You must be signed in to change notification settings - Fork 33
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
11 changed files
with
63 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,6 @@ | ||
# Factions Extension Documentation | ||
|
||
* [Implementation](implementation.md) | ||
- Documentation | ||
* [Implementation](documentation/implementation.md) | ||
* [Usage](documentation/usage.md) | ||
* [Installation](installation.md) | ||
* [Usage](usage.md) |
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.
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.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
# Implementation | ||
|
||
## Blueprints | ||
|
||
*Check the **[Test Project](https://mega.nz/#!JMowlKCA!wZv-L6oNSJCwDw1CUbTFyjPOXvd6viB-QLgK-u36xtY)** for an in-engine example* | ||
|
||
### Adding the interface | ||
|
||
For an actor to have a faction, we need to add a FactionAgentInterface. | ||
This will allow the system to set and get the current interface. | ||
|
||
<img align="right" width="300" height="100%" src="https://i.imgur.com/adet7y6.png"> <img align="right" width="200" height="100%" src="https://i.imgur.com/IJS8qG6.png"> | ||
|
||
To add an interface we have to go into **Class Settings** | ||
|
||
From here we click on **Add**, inside Interfaces and search for FactionAgentInterface | ||
|
||
### Getting and Settings the Faction | ||
|
||
Factions require your actor to define how to get and set a faction. That can be done overriding **GetFaction** and **SetFaction**. | ||
|
||
A common implementation would be to have a **class variable** (of type *"Faction"*), and then return it at GetFaction and set it at SetFaction: | ||
|
||
![](https://i.imgur.com/imuFDXn.png) | ||
|
||
![](https://i.imgur.com/Cf7QZju.png) | ||
|
||
### Factions in Controllers | ||
|
||
Sometimes you may want a controller to share a faction with its controlled pawn or character. | ||
|
||
This process is exactly the same as before, except that instead of getting and setting a variable, we will get and set the faction from our pawn. | ||
|
||
## C++ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,42 @@ | ||
# Usage | ||
|
||
Factions can be edited from *Project Settings*, inside *Game* category, *Factions* tab. | ||
All settings can be edited from **Project Settings -> Game -> Factions** tab. | ||
|
||
<img width="600" height="100%" src="https://i.imgur.com/5hKfoHF.png"> | ||
![Settings](img\settings.png) | ||
|
||
|
||
|
||
### Editing Factions | ||
## Factions | ||
|
||
Factions are defined as an array to be edited and every faction will have its own properties like color or default attitudes. | ||
Factions settings are defined by right and left areas. | ||
|
||
<img width="400" height="100%" src="https://i.imgur.com/YRl4Kmk.png"> | ||
**At the left** you have a list of all factions, with a little search box in case you have more than you can deal with. | ||
|
||
This information is available on runtime though | ||
**At the right** you will find all the properties of a selected faction (which was selected by just clicking on it on the list). | ||
|
||
![Factions Settings](img\settings-factions.png) | ||
|
||
|
||
|
||
You can also rename factions by double clicking on them. | ||
|
||
![Rename Faction](img\rename-faction.gif) | ||
|
||
|
||
|
||
All Faction information can be read on runtime too: | ||
|
||
<img width="200" height="100%" src="https://i.imgur.com/4SOhCGb.png"> | ||
|
||
|
||
|
||
### Editing Relations | ||
## Relations | ||
|
||
Relations define how will two factions interact to each other. | ||
<img width="400" height="100%" src="https://i.imgur.com/ihngM3D.png"> | ||
|
||
By default there are three possible attitudes: **Hostile**, **Neutral** and **Friendly** | ||
In this example, Brotherhood and Triggermen are enemies: | ||
|
||
![Relations](img\relations.png) | ||
|
||
By default there are three possible attitudes: **Hostile**, **Neutral** and **Friendly** | ||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,7 +8,7 @@ | |
"Category": "Piperift", | ||
"CreatedBy": "Piperift", | ||
"CreatedByURL": "http://piperift.com/", | ||
"DocsURL": "", | ||
"DocsURL": "https://piperift.com/FactionsExtension/", | ||
"SupportURL": "[email protected]", | ||
"EngineVersion": "4.19.0", | ||
"EnabledByDefault": true, | ||
|